Thursday, September 23, 2010

Calibrations: Is White Really White

Vision and imaging are two similar yet so different things. The basic idea is to take in the light signals sent to us by our enviroment and interpret them. Now, one of the major differences in human vision and computer imaging is the ability of human vision to adapt to the enviroment around us. Our eyes and our brain has the ability to know that a white object is white regardless of the light source around us. After which it adjusts the rest of the world for us. For cameras, we need programing languages and computers to act as the brain to do this.

Basic idea.

From Applied Physics 187, we know that a color signal of an object is affected by the reflectance of the object, sensitivity of the camera and the light source used. Now, to adjust to the light source around us the we can white balance the signal by dividing it by the signal from a reference white object. Now, if we have an image with a wrong white balance setting used by the camera, how do we adjust the image without retaking the shot?

There are two methods. One is a more obvious method called White Patch Algorithm. The other more gloomy method is the Gray World Algorithm.

Lets start with the White Patch Algorithm. First, we take a pixel in the image that we know to be white. The RGB values of that pixel then is the reaction of the camera to that light source if shown on to a white object. We use those values to white balance the image by dividing each channel with the corresponding value. Very obvious and very inline with the concept of white balancing.

The second is the Gray World Algorithm. It assumes that the average color of the World is gray (hence the gloomy comment). So, if you balance the image with the signal of a gray object, you will get a slightly white balanced image.

White Patch Algorithm of Paper Clips (taken by Ms. May Ann Tenorio)
Gray World Algorithm on Paper Clips (taken by Ms. May Ann Tenorio)

Upon comparison of the two methods, we see that the Gray World Algorithm (GWA) adjusts the image more compared to the White Patch Algorithm (WPA). This is logical since in theory, the image is being gray balanced rather than white balanced when using the GWA. Meaning you are dividing each channel with a fraction of the signal of an actual white object. But one advantage of WPA is that it does not oversaturate very easily.

Now, lets examine how it works with an image of a single hue and only one white object.

Single Hue Image Using Tungsten Light Source (left) Original Image (center) WPA White Balanced and (right) GWA White Balanced

Here, we can see that WPA works better than GPA. This is because the gray world assumes that the world on average is gray and that the image is a good sample of the world. So when it takes the average of the image, it does not get a gray object's signal but rather a biased signal towards the hue of the objects. So clearly, GWA has its limitations.

For this exercise, I give myself a grade of 7 since I did not possess a camera to take my own images.

No comments:

Post a Comment