12

Auto White Balance: Your Digital Camera is Color-Smart

Ronald C
Photography is all about light. The color of light, or color temperature*, affects the color reflected on an object. For instance, the candlelight renders the color of objects more orange and warm than they would appear under bright daylight. While under different light source, human eyes have the ability to perceive the color as it were under the normal lighting, no matter what the actual light source is -- a function called color constancy -- a digital camera does not. The Auto White Balance (AWB) function embedded in digital cameras aims to equip the digital camera with the ability of color constancy.

So what AWB basically does is to estimate the illuminant's color temperature, from an image shot under unknown lighting, and adjust the color of image so that the image would appear as if it was shot under normal lighting (daylight with clear sky). Since estimating the illuminant is generally not easy and accurate, most professional digital cameras allow users to set the illuminant manually if known. For example, the Canon PowerShot S3 IS digital camera provides options of daylight, cloudy, tungsten, fluorescent, flash, etc., in addition to the automatic mode which is AWB.

There are various ways in designing AWB. Gray World (GW) and Balance-to-White (BW) algorithm are the two most commonly used methods. The GW method is based on the assumption that the average color of the world is achromatic (thus "gray"), or for an image, the average values of three channels -- red, green and blue, or RGB -- are equal. This is more accurate when the image contains diverse colors, and loses accuracy when the image is dominated by a single color. For example, a shot at the sea is predominantly blue, and a picture of plants may be mostly green. In this cases, the GW method may perform very poorly, as its basic assumption does not hold.

The BW method follows a different approach. It identifies a point or a region in an image that is near white. This near-white point or region, although does not appear white due to colored lighting, is supposed to be white under normal lighting. The BW method, therefore, adjusts the RGB colors of the image so that the determined near-white regions become white in the AWB-corrected image.

There are pros and cons regarding these two approaches:

1. Gray World method tends to dull the image color. This is due to its "gray world" assumption which shifts the image color towards the gray. The advantage of this method, however, is its effectiveness in removing casting, or the color of illuminant. The reason is because casting causes a dominant color shift in an image, and when GW shifts the image color towards the gray it removes the casting of the image as well.

2. Balance-to-White method preserves the color tone of the original image better. This is a good property when the image is dominated by a single color. Its problem is that it often makes the image too bright, that is, over-exposed.

A good algorithm used nowadays is a combination of these two, leveraging the strengths of these two methods. Even a simple averaging of these two methods can be shown to achieve superior results than each method alone. However, sophisticated combination can achieve even better results. For example, Image 1 is shot under a warm color temperature (candlelight, for example) and looks yellowish. Image 2 is the corrected image, the result of a sophisticated algorithm combining GW and BW methods.

*Different light sources are described by different color temperatures. For instance, daylight with clear sky is 5000-6500 K, daylight with moderately overcast sky is 6500-8000 K, and candlelight is around 1000-2000 K.

Published by Ronald C

I am a 30-year-old writer, researcher, meditator. I have always seen writing, research and meditation as practical skills that will allow me to bring positive change to this needy world.  View profile

To comment, please sign in to your Yahoo! account, or sign up for a new account.