WatchProSite|Market|Digest

Photography

Auto White Balance and a Digital Camera

 

While it's common for photographers to use manual rather than auto features, one setting that is quite often left on auto is WB - specifically setting the camera to use AWB.  The standard approach is to deal with color correction in post processing...  Let's take a look under the hood...



For the most part our photographs are shared... prints, on the web, on social media, in an e-mail... and for the most part what we are doing is representing a scene "as we saw it".  While the eye acts similar to the lens, the brain is hard at work adjusting the colors so that what we "see" is what we know...  Maybe you have seen the following Grey Square Illusion where the area of the image labeled A and the area of the image labeled B are the same color.  We have the ability to "see" the color that we expect under different lighting conditions.



Grey Square Illusion1

The "sensor" part of the eye is made up of rods and cones... of which there are three types of cones that are 'primarily but not exclusively' responsive to different wave lengths of light as we can see in the following graphic.



Color Sensitivity2

The wave lengths of the three different types of cones correspond almost one-to-one with the wave lengths of the filters in a digital camera... the short-cones / blue filter, the medium-cones / green filter, and the long-cones / red filter.  It seems that the eye is capable of resolving around 10,000,000 color variations (color blindness aside).  Now here is an interesting bit...

if X=the "result of summing up" the effect on the long-cones
if Y=the "result of summing up" the effect on the medium-cones
if Z=the "result of summing up" the effect on the short-cones

Each of the 10,000,000 color variations that the human eye can differentiate can be expressed as a triplet (X,Y,Z), a trichromatic response... and, AND it follows (chicken-and-egg) that with a digital camera the only requirement for capturing color information at each pixel is a three number combination.



Examples of various N-chromatic groups (with many exceptions)

The AWB challenge defined:  The two factors that have an impact the "color experience" of a scene are the illumination source (typically tungsten, fluorescent, daylight, flash, cloudy, or shade) and the object reflectance.  However as we have noted, 'our' experience is that the same object appears to have the same color no matter what lighting source is present... when a red apple looks the same in daylight or tungsten it's called "color constancy".  The challenge of a digital camera is to approximate the experience of color constancy, part of the approach that is taken to resolve this is via WB settings / AWB (artistic interpretation aside).

Most digital cameras today allow the photographer to select the illumination source (typically tungsten, fluorescent, daylight, flash, cloudy, or shade plus custom WB and Kelvin settings).  Film photographers used warming and cooling filters to match the illumination with the specifications of the color film (typically daylight, tungsten, or floodlight film).



The typical digital camera imaging pipeline includes an AWB algorithm3 of which there are a number of different approaches and/or combinations thereof.  Below is a summary of the major ways in which this is done.  Each solution has it's plus and minus points and the actual implementation involves a fair bit of math ; )

01) Gray World: similar to a gray card approach... get the average of each (RGB) channel across the entire scene, and adjust the gain of the red and blue channel to match that of the green.  Early film color temperature meters such as the Gossen Sixticolor ignored the green spectrum and suggested which warming or cooling filter (e.g. LBW4 or LBC2) to match the type of film used with the scene.  With the Gray World approach, skewed results would be found in: a) scenes with limited number of colors, b) scenes with dominant hues, and c) simple graphic designs.

02) White Patch: Based on the Retinex theory (combination of retina / cortex) that the maximum cone values are perceived as white.  Get the maximum of each (RGB)  channel across the entire scene, and adjust the gain of the red and blue channel to match that of the green.  Problems with this approach: a) high contrast scenes, b) noise sensitivity,  c) specular surfaces, and d) presence of a white object.

03) Iterative White Balancing: rather than use the entire scene, select only pixels that meet certain criteria...  e.g. representative of an "ideal white point" or "ideal gray point" and/or approximations of the same.  The "ideal white point" sampling tends to fail if there are no such points in the scene.  The "gray point" approach relies on adjustment for a calculated color cast in each step of multiple iterations.

04) Illuminant Voting: Based on the Hough transform, which is a technique used to find imperfect instances of objects within a certain class of shapes by a voting procedure.  After all the math, it's suffice to say the approach is to identify (and subsequently adjust to) the actual illuminant rather than (as in 01-03 above) by adjusting the red and blue gain to match a theoretical illuminant (which may not exist).

05) Color by Correlation: similar to 04-Illuminant Voting, except that multiple illuminants are identified along with a  probability factor... based on the fact that there is a limited number of possible illuminants (see the list above).



Camera Process

The photographer doesn't have to use AWB, it's also possible to set a Custom White Balance or even the degrees Kelvin (based on a Color Temperature Meter / CTM or an estimation).  But let's be practical - just leave the camera set to AWB, shoot RAW, and correct in post processing if there are 'problems'... I can live with that, but I can also envision times when I might want the output to match as closely as possible my perception of the actual scene. 

The problem that I still struggle with from time to time in post processing is getting that "color constancy" in tricky or mixed light images.  If using flash, it's possible to gel the flash to match the existing light source... My take away from researching and writing this piece is that the "science" of AWB algorithms is not perfect and that different mfgs have different approaches - "all color is not equal".  Shooting RAW may still give you the most options, depending your requirements and expectations...

Thanks for reading,
Casey

__________
Note1: "Grey square optical illusion" Original by Edward H. Adelson this copy by Gustavb is Licensed under Copyrighted free use via Wikimedia Commons.
Note2: "1416 Color Sensitivity" by OpenStax College - Anatomy & Physiology, Connexions Web site.  Licensed under CC BY 3.0 via Wikimedia Commons.
Note3: "Single-Sensor Imaging: Methods and Applications for Digital Cameras" by Rastislav Lukac (Editor).  Chapter 10 "Automatic White Balancing in Digital Photography" by Edmund Y. Lam & George S. K. Fung

  login to reply