A11: Color Image Processing

So far, we've only processed and enhanced grayscale and black and white images that are only represented by 2D nxm matrices. Colored images are represented by three of such matrices, one for each color channel (red, green, and blue) and hence are treated as 3D nxmx3 matrices and they require different enhancement techniques.

White balancing is done on images to fix image discoloration due to different lighting conditions. Most cameras give users the option to pick the white balancing constants to used on the images captured. Properly white-balanced images should have white appear white and other colors correctly captured. Choosing the wrong white balancing constants can cause image discoloration. There are white balancing techniques that choose constants automatically based on the illumination detected (from colors detected). Two popular techniques are the White Patch Algorithm (WP) and the Gray World Algorithm (GW).

In the White Patch Algorithm, we simply divide the RGB of the image with the RGB values of the image for white. In the Gray World algorithm, it is assumed that the average of the colors of the world is gray, hence we divide the RGB values of the image with its average RGB for each color channel.

In this activity, we are to attempt enhancement of colored images using WP and GW and demonstrate the advantages and disadvantages of each algorithm.

Figure 1 shows images of an ensemble of objects of different colors at different camera white balancing settings. This is to test rendering of different colors. Figure 2 shows images of an ensemble of objects of different hues. This is to test rendering of different hues.


Figure 1. Images of an ensemble of different colored objects taken with camera white balancing set to (left to right): cloudy, day, fluorescent, and bulb.


Figure 2. Images of an ensemble of objects of different hues of red taken with camera white balancing set to (left to right): cloudy, day, fluorescent, and bulb.

Figures 3 and 4 show a summaries of results of PW and GW. From Figure 3, we find that both are successful at lightening the scene and showing colors nearer the actual colors of the objects as seen by the eye. However, in the 'bulb' camera setting, both techniques leave white parts as green. We note that for 'cloudy', WP gives brighter colors while for 'fluorescent', GW gives brighter colors. WP and GW give similar results for 'day.'




Figure 3. WP (top) and GW (bottom) white balancing of images of different colored objects (middle) taken with camera WB set to (left to right): cloudy, day, and fluorescent.

From Figure 4, we find that only the color of Kaye's bag and Jaziel's blouse show obvious enhancement. Also for all camera settings except 'day', WP produces better results.




Figure 4. WP (top) and GW (bottom) white balancing of images of objects with different hues of red (middle) taken with camera WB set to (left to right): cloudy, day, and fluorescent.

I give myself a grade of 9 because the effects of using WP and GW were demonstrated and compared.

I would like to thank Ms. Kaye Vergel for taking the pictures with her camera and for lending some of her things for the two sets of pictures along with Ms. Winsome Chloe Rara and Ms. Cherry May Palomero. I would also like to thank Ms. Jaziel Vitug for patiently posing for us as we took pictures of her pink blouse. :)

0 comments:

Post a Comment