Activity 12 – Color Image Processing


The aim of this activity is to compare the White Patch algorithm and the Gray World algorithm in balancing and improperly captured image under an unmatched white balancing set-up. This means that for an imbalanced image, white is seen differently from white per se and so are other colors and opposite happens when the image is balanced.Now, from an image of red, green and blue put on a white paper under a constant illumination but captured under different white balance modes of the camera, I chose what the ones which are improperly balanced and applied the two balancing algorithms to it. The images shown below are the captured images using the same camera but under various white balance modes. The last three pictures are the imbalanced ones.

So at this point, the last three images will be our concern. Using the White Patch algorithm wherein i chose a small part of the background which is supposedly a white bond paper then arbitrarily choose a point on it that will serve as the divisor for the pixel values of R,G,B of the image. After applying a scaling factor differently for each layer of R,G and B, I clipped the maximum value to be 1 by saturating those which exceeds one. The images below is the result of the first algorithm applied to the last three images above in the same order.

We can observe the difference in quality of the balanced image, nevertheless, it significantly improved as compared to its original form above.

Now, we apply the Gray World algorithm to the same images and see what happens. This algorithm, by the way, just replaces the divisor of the R,G,B layers of the imbalanced image with the average of each layer. Everything else follows the same procedure.

There is not much difference in the quality of the balanced images for three different WB camera modes. However, we can see that the new image is like exposed to a higher intensity light source. There is not much difference in rendered colors especially the white background unlike the first algorithm where there is much distinction between the white backgrounds.

Going to another imbalanced image with largely the same hue (in this case green) and the applying the two algorithms, we get the results below.

Imbalanced image

Balanced using White Patch algorithm

Balanced using Gray World algorithm

The most properly balanced image in this case is the one using White Patch algorithm. We observe here the same effect that the second algorithm produced with first set of images. It intensifies the white value in the image and it appears now that the object image was capture under a very high intensity white light source. Also from the procedure done in the algorithm, one can infer that White Patch algorithm depends solely on a single white value in the image while the Gray World algorithm depends entirely on the colors of the captured image since it relies it divisor value from the mean of all values. The best algorithm, well for this case in the first one.

This activity compared to other ones is relatively easy but its application is noble and dynamic. The concept was well understood and the procedures executed smoothly. It is just to give myself a grade of 9 for this one.

About jrafrica

applied physics student
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a comment