Gray World Assumption

Introduction

When implementing Color Balancing algorithms, certain assumptions are sometimes made about the general nature of the color components of images. One of such assumptions is the Gray World Assumption. What Gray World Assumption states is that, given an image with sufficient amount of color variations, the average value of the RED, GREEN, and BLUE components of the image should average out to a common gray value. This assumption is in general valid since in any given real world scene, it is often the case where we have lots of different color variations. Since the variations in color are random and independent, it would be safe to say that given a large enough amount of samples, the average should tend to converge to the mean value, which is gray.

Color balancing algorithms can make use of this assumption by forcing it's images to have a uniform average gray value for it's R, G, and B color components. For example, if an image was shot with a camera under yellow lighting, the camera output image will have a yellow cast over the entire image. The effect of this yellow cast disturbs the Gray World Assumption of the original image. By enforcing the Assumption on the camera output image, we would be able to remove the yellow cast and re-acquire the colors of our original scene, fairly accurately.

A simple method of Gray World Assumption enforcement would be to find the average values of the image's R, G, and B color components and use their average to determine an overall gray value for the image. Each color component is then scaled according to the amount of it's deviation from this gray value. We can obtain the scale factors by simply dividing the grayvalue by the approriate average of each color component. Thus if an image under nomal white lighting satisfies the grayworld assumption, putting it under a color filtered lighting would disrupt this behavior. By forcing the gray world assumption on the image again, we are in essence, removing the colored lighting to reacquire the true colors of the original. The following two images demonstrates such an effect.

Image from Camera

GW Enforced Image

The above example was implemented using the MATLAB script RealGWbal.m, which takes in an image in RGB format and enforces the Gray World Assumption on the R, G, and B color components of the image.

Objective

The objective for this section of the project is to determine whether the HP Photo Smart C30 digital camera takes into account the Gray World Assumption, when implementing its color balancing algorithms on its images.

Next Page -->

Home ...