There are many digital image representation such as raster and vector format. The raster typerepresent the image in pixels, while vector type represent the image in vector notation (curve, line,circle, etc). Only raster type will be discussed here. Raster image is constructed by many pixels, whereeach pixel is arranged in rows and columns. Each pixel can be addressed by its Cartesian coordinate. Within raster image, there are some very popular formats: binary, gray scale, true color, and indexedcolor.
In binary image, there are only two values: 0 or 1, representing two different colors. Most commoncolor mapping is black for 0 and white for 1. Example of binary image is shown in figure 1.
Figure 1. Binary ImageGray Scale
Using gray scale, the intensity of a pixel can vary in many values, giving smoother image. Each pixelcan has many possible values, depending on the bit-depth of the format, for example, an 8 bit gray scale has 256 possible value for each pixel to represent the dot intensity. The most common colormapping for gray scale is black for 0 (zero) value, white for maximum value (255 in case of 8-bitimage), and gray for values in between. Other color mapping is possible such as dark brown for zeroand light orange for maximum value. An example of a gray scale image is shown in figure 2.
Figure 2. Gray Scale ImageTrue Color Image
In a color image, a specific color of a pixel is represented as a combination of three primary color: red,green, and blue (RGB), therefor this true color format is also known as RGB format. This RGBprimary color is using display format, where the display device normally has red, green, and blue lightsource to construct a pixel. This is different with printing based representation that normally uses