Sunday, February 10, 2013

Image Modes (Grayscale, RGB, Indexed)

Grayscale Image
As illuminated by Fisher et al (2003), “A grayscale (or graylevel) image is simply one in which the only colors are shades of gray”. As he mentioned Grayscale image consists of shades of gray color without any other color. In a grayscale image the darkest possible color is black and lightest possible color is white. The black color represents the absence of transmitted or reflected light of the wave length and white conveys the transmission or the reflected light of the wave length. Intermediate shades give an equal brightness to the image of the three primary colors red, green and blue or equal amounts of three primary pigments cyan, magenta and yellow.

As mentioned Techtarget (2010), the brightness level of the transmitted light is represented as a combination of red, blue and green colors representing as a number from 0 to 255 or 00000000 to 11111111. In a grayscale image every pixel in red, green and blue is equal to each other. In grayscale images black is represented by R=B=G=0, and white is represented by R=B=G=255.

As pointed out Fisher et al (2003), in general the grayscale (or gray level) intensity values are accumulated as an eight-bit (8) integer that providing 256 different shades of gray from black to white. The grayscale images are very common in image processing area and other graphic designing industries. Besides, comparing to the colored images, grayscale images are not harder and complicated to process. According to Techtarget (2010), hue, saturation and brightness parameters are defined to exhibit the grayscale images rather than using RGB or CYMK color models. As mentioned in that article, the hue (apparent color shade) and saturation (apparent color intensity) of each pixel is equal to 0 in grayscale images. The varying parameter is the lightness (apparent brightness). The varying pixels values lay from a minimum of 0 (Black) to the 100 (white).

RGB Image
An RGB image is a three dimensional byte array that stores colors in pixels. This array is made of three basic components, width, height and three channels of color information. The color information is stored in three sections, color channel, color bands and color layers. These channels represent the three colors red, green and blue.

RGB image is also defined as a true color image, which is stored in Mathlab as a data array that represents red, green and blue color component for each pixel. Graphic file formats store true color images in 24-bit images where red, green and blue information is stored in 8-bits each.

These types of images do not use a palette. Scanned photographs are normally stored as RGB images. The color of each pixel is represented as a combination of red, green and blue stored in each color plane at the pixel’s location. Most of the graphic file formats store RGB images as 24 bit images.

Indexed Image
Index images do not contain any information of color images. The pixel values are indices into a color Look up Table (LUT). Colors are applied using this index to look up the corresponding RGB triplet in LUT. Sometimes the pixel values of an index image reflect the intensity of each pixel. Rather than that, each pixel value is normally an index which the image usually intended to be associated with a specific LUT.

(Fulton, 2010), GIF and PNG image files can be saved as an indexed color. GIF files only store a 4bit or 8bit index at each pixel while the other image formats like FIT and JPEG store a 24 bit RGB values in each pixels. The idea is it is capable for storing colors in each pixel much smaller than storing 24 bits for each pixel. The drawback of this is an 8 bit number can only have 0-255 values. Therefore only 256 colors can be in the color palette. 


You might read more on below links, 
  • Fisher, R & Perkins, S. & Walker, Wolfart, E. Dilation. [Online]. Available from: http://homepages.inf.ed.ac.uk/rbf/HIPR2/dilate.htm. [ Accessed 5th April 2012 ].
  • Chapter 5. Getting Images into GIMP. [Online]. Available from:  http://docs.gimp.org/en/gimp-images-in.html [ Accessed 5th April 2012].
  • Graphic Display Essentials.[Online]. Available from: http://idlastro.gsfc.nasa.gov/idl_html_help/Indexed_and_RGB_Image_Organization.html  [Accessed 5th April 2012].
  • Sandberg, k.Introduction to image processing in Matlab 1 [Online]. Available from: http://amath.colorado.edu/courses/5720/2000Spr/Labs/Worksheets/Matlab_tutorial/matlabimpr.html . [ Accessed 5th April 2012 ]. 

No comments:

Post a Comment