Monday, September 20, 2010

A12 – Color Image Processing

Have you ever had your photo taken and you somehow appeared bluish or maybe orangish? You may find the photo "artsy" but do you ever wonder why this happens so? Its because digital cameras have settings called white balance. White balancing just refers to the transformations the camera does to make a white object in your image appear white. White balancing depends on the illumination condition under which the image was taken. That's why if you select an inappropriate white balance setting, your camera transforms the colors wrong.

I have taken an image of colorful objects under different white balance settings as shown below:

Figure 1: Image of colored objects taken under different white balance settings

Notice that using fluorescent and incandescent white balance settings makes your image appear bluish (especially using incandescent). From here we may say that using sunny(daylight) or cloudy are more appropriate white balance settings for this particular imaging conditions.

These are the two automatic white balancing algorithms that are available:

1. White patch algorithm: done by dividing the RGB channels of the image with the RGB components of the part of the image which should be white.

2. Gray world algorithm: white patch algorithm then averaging the RGB channels of the image.

These are the results using the two white balancing algorithms:


Figure 2: Results after performing white patch and gray world algorithm

Both algorithms worked with images quite well but I think that the gray world algorithm performed better since the white piece of paper looked more white upon its application.

The next part of the activity would be to apply both the white patch algorithm and the gray world algorithm on an image of objects having the same color.

Given this image:

Figure 3: Image of object having similar color
(sorry if the image is rotated...I couldn't figure out how to rotate this image)


Here are the results:


Figure 4: Result upon application of white patch algorithm



Figure 5: Result upon using gray world algorithm

Through visual inspection, I would say that using white patch algorithm yield better result than gray world algorithm since white patch algorithm captured the background color better (supposed to be green). This is probably because for the gray world algorithm to work optimally, sample colors from red, green and blue should be present. For this particular image however, only green colored objects are present.

I would like to give myself a grade of 10/10 for this activity since I was able to implement both algorithms and presented results asked.



No comments:

Post a Comment