IMAGE TYPES
The Image Processing Toolbox supports four basic types of images:
- Binary images
- grayscale images
- Indexed images
- RGB images
Binary images
- In a binary image, each pixel assumes one of only two discrete values.
- Essentially, these two values correspond to on and off.
- A binary image is stored as a two-dimensional matrix of 0’s (off pixels) and 1’s (on pixels).
- Each pixel is just black or white. Since there are only two possible values for each pixel (0,1), we only need one bit per pixel.
- Binary images are often created from gray-scale images via a threshold operation.
- White (‘1’) if pixel value is larger than threshold.
- Black (‘0’) if it is less.
- A binary image is a digital image that has only two possible values for each pixel
- Binary images are also called bi-level or two-level
- A binary image is usually stored in memory as a bitmap, a packed array of bits
- Binary images often arise in digital image processing as masks or as the result of certain operations such as segmentation, thresholding.
grayscale images
- Also referred to as monochrome or one-color images.
- Contain only brightness information. No color information.
- Typically contain 8 bits/pixel data, which corresponds to 256 (0 to 255) different brightness (gray) levels
- Why 8 bits/pixel?
Provides a “noise margin” by allowing approximately twice gray levels as
required
Byte (8-bits) is the standard small unit in computers
- However, there are applications such as medical imaging or astronomy that requires 12 or 16 bits/pixel.
Allows the user to repeatedly zoom a specific area in the image.
- MATLAB stores an intensity image as a single matrix, with each element of the matrix corresponding to one image pixel.
- The matrix can be of class double, in which case it contains values in the range [0,1], or of class uint8, in which case the data range is [0,255] (0 – black, 255 – white).
Indexed images
- An indexed image consists of two arrays, an image matrix and a colormap.
- The colormap is an ordered set of values that represent the colors in the image.
- For each image pixel, the image matrix contains a value that is an index into the colormap.
- The colormap is an m-by-3 matrix of class double. Each row of the colormap matrix specifies the red, green, and blue (RGB) values for a single color:
- An indexed image is where the pixel values are indices to elements in a colour map or colour lookup table.
- The colour map will contain entries corresponding to red, green and blue intensities for each index in the image.
RGB images
- Like an indexed image, an RGB image represents each pixel color as a set of three values, representing the red, green, and blue intensities that make up the color.
- Unlike an indexed image, however, these intensity values are stored directly in the image array, not indirectly in a colormap
- In MATLAB, the red, green, and blue components of an RGB image reside in a single m-by-n-by-3 array.
- m and n are the numbers of rows and columns of pixels in the image, and the third dimension consists of three planes, containing red, green, and blue intensity values.
- For each pixel in the image, the red, green, and blue elements combine to create the pixel’s actual color.
No comments:
Post a Comment