It is a challenge to obtain an accurate color representation on your video screen when imaging a scene from sunrise to sunset, e.g. imaging under changing lighting conditions. White balance is a function inside cameras to overcome this challenge.
When a colorful scene is recorded without adjusting the white balance of the camera, the color that is shown on your displaying screen depends a lot on the light source that illuminates the scene. By using white balance the effect of different light sources can be excluded. Many cameras, especially those designed for outdoor and global security applications, include automatic white balance (AWB) to continuously adjust for changing lighting conditions.
To give two examples:
- Without any changes in camera or display settings, a scene recorded in full daylight would look quite different from the same scene recorded at sunrise or sunset. In the latter case details that appear white in daylight would have a more red color. Even though by direct observation with your eyes white still looks white. By adjusting the white balance, the white details can be made to look equally white under both lighting conditions.
- Artificial lights like a tungsten light bulb give objects that are white under daylight illumination a more yellow/orange color. Again white balance can correct for this.
There are some times when automatic white balance is not helpful which we will explain in further detail.
Definition of white
The whole purpose of white balance is to properly display the white objects in the scene. Therefore it is actually very convenient to have a formal definition of white.
So how could we define white? Under normal daylight it is those objects that reflect all incident light that humans perceive as being white. This is thus exactly the color that is defined by the standard illuminant D65. More general, if an achromatic light source is used, the light source spectrum is often taken as the definition for white.
For cameras and electronic displays it is convenient to speak in terms of RGB values. Thus by taking standard illuminant D65 for the white definition, we want that whenever the camera records a spectrum equal to D65 it should assign the value R=G=B=1(normalized) to it. A camera using a Bayer pattern is, of course, no spectrometer. But if a D65 spectrum is incident on the Bayer pattern it will give a specific ratio between the R, G and B signals.
This measured signal ratio in general will not equal the situation R=G=B. Thus an internal gain for each color pixel (R,G and B) has to be set to create R=G=B at the output.
The automatic white balance function is perfectly suitable for situations in which the same single illuminated landscape has to be imaged on a clouded day as well as on a sunny day. Another example for which AWB works is shown in Figure 1.
Figure 1: In (a), a scene is shown that is recorded with a fixed D65 (daylight) white balance setting while the actual light is artificial light. In (b) the same scene is shown when the AWB function is applied. Figure (b) much more reflects the reality as perceived by humans. The presence of large white areas as well as the color patch that on average contains all colors of the illuminant makes that the AWB function works perfect in this situation.
There are however also situations in which the AWB might not be beneficial. Examples of those situations are:
1. Low light situations.
Due to the low light intensity it is difficult to determine the illuminant spectrum.
2. Multiple light sources are illuminating the scene.
White is defined by the illuminant spectrum. Two sources will thus give two definitions for white while the camera can adjust only for one. Note that on a sunny day, regions in the shade are also illuminated by a different illuminant compared to non-shaded parts (direct sunlight versus indirect sunlight).
3. A big uniformly colored object is present.
The assumption that the average contains all colors of the illuminant will most often not be valid anymore in this situation. See the example in Figure 2.
Figure 2: In (a), a scene is shown that is recorded with a fixed D65 (daylight) white balance setting which describes the actual light source pretty well. In (b) the same scene is shown when the AWB function is applied. In (b) the color representation is less accurate as compared to (a). The failure of the AWB in this case, is caused by the wooden table that is covering a large part of the scene and actually has a color that is very close to an artificial light source.
4. Filters are being used.
If a filter is used other than factory installed filters it is most likely that the white balance is not accurate anymore because the ratio between the signals from R, G and B changes such that a wrong illuminant is assumed in the estimation process.
Auto white balance seems like a trivial concept; however it is made more complex under changing outdoor lighting conditions in combination with the perception of the human being. For camera designers, a deep understanding of both is needed in order to create a useful function inside the camera.
For more information on how to enable or disable AWB or if you have a challenging imaging condition, and you want to discuss if AWB is helpful for you or not, please contact us.