Color Balancing Algorithms for Digital Cameras




 

Each of these images shows the unprocessed output of a digital camera when the object in the image(called the Macbeth ColorChecker) was illuminated with a different light.  The colors in the image do not represent our perception of the Macbeth ColorChecker.  This is because the digital camera sensors do not ‘see’ the world with the same spectral responsivities as the human eye.  Moreover, imaging sensors respond differently when different lights illuminate the same surface.  Humans, however, adapt their color response so that surfaces appear to be approximately the same despite differences in scene illumination.  This adaptive brain response is referred to as “color constancy”.

 

The problem of color balancing is to transform the digital image pixel values such that when they are displayed they create the perception that the surfaces in the image (originally illuminated by the scene illuminant) are illuminated by the same and, hopefully, desirable rendering illuminant, such as daylight. 

These images show the digital camera images after they have been color-balanced.  There are two steps to color balancing.  First, we need to estimate the scene illuminant.  This process will be described later.  Second, given that we know the scene illuminant, we can select an appropriate linear 3x3 color transformation matrix to convert sensor RGB values into color-balanced RGB values.  The second step, referred to as color-conversion, typically takes into account the type of the display that the color-balanced RGB values will be rendered on. 

The most challenging aspect of color balancing is estimating the scene illuminant.  Typically, the scene illumination is unknown, so we do not know which 3x3 linear mapping, to use. Illuminant estimation involves making an educated guess about the ambient scene illumination conditions from the information available in each sensor image.  Color rendering can fail if we make a poor guess about the scene illumination.

There are two general strategies for performing illuminant estimation. One approach is to use statistics derived from each image to create the coefficients in a color transformation matrix. (The so-called “Gray World” algorithm uses this strategy.)  A second method is to pre-compute a set of matrices for likely scene illuminants and to use statistics from the image to choose the best matrix (from the set of pre-computed matrices) for that particular image.

The first method is simple and can be accomplished by linearly scaling the output of the camera sensors.  The second method requires memory storage but it produces better results.