Friday, August 7, 2009

Activity 11: Color Image Processing

Improperly white balanced images will result in incorrectly represented colors. Modern cameras has auto-white balance capability to ensure correct representation and other presets for different lighting conditions. For this activity we captured images by using the presets (e.g. daylight, cloudy, fluorescent, incandescent) and perform white balancing algorithm to correct the captured images.

The algorithm that will be used are the white patch algorithm and the gray world algorithm. The white patch algorithm uses the average RGB values of a white object in the image as balancing constants. While the gray world algorithm averages the RGB of the whole image and uses it as balancing constant. Below are images taken outdoors and indoors under different white balancing presets in the camera. The camera used is a cellphone camera (i.e. Sony Ericsson K550i with 2MP camera)

Figure 1. Outdoor images. First column: Original image. Second column: Balanced using white patch algorithm. Third column: Balanced using gray world algorithm. The rows represent the white balancing preset used. First row: Daylight. Second row: Cloudy. Third row: Fluorescent. Fourth row: Incandescent.




Figure 2. Indoor images. First column: Original image. Second column: Balanced using white patch algorithm. Third column: Balanced using gray world algorithm. The rows represent the white balancing preset used. First row: Daylight. Second row: Cloudy. Third row: Fluorescent. Fourth row: Incandescent.

From the two sets of images, indoor and outdoor, the white patch algorithm produces better color representation than the gray world algorithm. In white patch algorithm, white objects indeed appears white. White objects serve as basis for the white balancing. Gray algorithm highly depends on the dominant color in the image. More clipping is also observed in gray world algorithm. Both algorithms were also tested with subjects that has a dominant color which in this case is red




Figure 3. Indoor incorrectly white balanced images with red as dominant. First column: Original image. Second column: Balanced using white patch algorithm. Third column: Balanced using gray world algorithm. The rows represent the white balancing preset used. First row: Incandescent. Second row: Daylight. Third row: Cloudy.

Figure 3 shows that white patch algorithm still produces more decent result. The gray world algorithm produces images with a shade different from the dominant. For example, in the first row of figure 3, the result of the gray world algorithm has a shade of blue. For daylight and cloudy presets, the shade is yellow.

For this activity, I'll give myself a 10 for completing the activity and for the effort to finish this. This blog is posted using only a cellphone with GPRS connected to a laptop.

1 comment:

  1. The last columns appear saturated. Before displaying, multiply the processed image by a number less than 1.0 and see if the image improves.

    ReplyDelete