Principles and Adjustment of Color Camera White Balance

What is White Balance?

White balance is the process of making white appear as white.

Definition

White balance is an indicator that measures the accuracy of the white color produced by mixing the red, green, and blue primary colors on a display. It is also a technique used to adjust camera settings, aiming to eliminate color temperature deviations in images, thus ensuring that neutral white objects appear correctly as neutral white in the image.

The color temperature of an image can reflect the quality of the camera’s white balance function. Images with poor white balance often appear yellowish or bluish.

Color Temperature

Definition

Color temperature uses a temperature unit Kelvin (K) to measure the warmth or coolness of an image or light source.

Images with lower color temperatures present warm colors like red or yellow, while images with higher color temperatures present cool colors like blue or cyan. The relationship lower color temperature = warm colors, higher color temperature = cool colors might seem counterintuitive, but it stems from the definition of color temperature:

If we heat an ideal black body from absolute zero (0 K), it gradually transitions from black to red (as the temperature rises to 3,000 K), then from red to yellow (up to 4,500 K), and further up to white (up to 5,500K). As the temperature continues to rise, the color becomes blue at very high temperatures (up to 10,000K). The sequence of red -> yellow -> white -> blue corresponds to the continuous increase in temperature. Therefore, lower color temperature = warm colors, higher color temperature = cool colors.

Common Color Temperatures

Measuring Color Temperatures

Some light meters come equipped with color temperature measurement capabilities, allowing for direct measurement of a light source’s color temperature.




Some mobile apps can also measure color temperature (requiring calibration with a light source of known color temperature). Although they cannot directly measure the color temperature of a light source, they can measure the color temperature of a white paper illuminated by the light source, indirectly reflecting the light source’s color temperature.

Adjusting White Balance

Why Adjust White Balance?

Different on-site projects use lighting with various color temperatures (as seen in the diagram below). Due to the influence of the light source’s color temperature, the colors of captured objects can deviate. However, our aim is for the RGB images from a color camera to accurately reflect the true colors of objects under any lighting conditions, making objects appear bright and vibrant as if bathed in natural daylight.

When is White Balance Adjustment Needed?

Mech-Eye Industrial 3D Camera are pre-adjusted for white balance before leaving the factory, ensuring that under a light source with a color temperature of 6,000 K ± 500 K (most commonly used for industrial production, such as LED white light), the colors in RGB images are accurate. However, some on-site lighting conditions might fall outside this range. If the light source’s color temperature is below 5,500 K, the image might appear yellowish, and if the color temperature is above 6,500 K, the image might appear bluish.

If you notice a yellowish or bluish tint in the RGB image as shown below, it is necessary to readjust the white balance:

Incorrect white balance!
The image has a yellowish tint (warm color tone):
Normal white balance.
The image displays a neutral color tone:
Incorrect white balance!
The image has a bluish tint (cool color tone):

What factors can affect the color temperature of RGB images?

Color temperature of the on-site light source (LED lights).

What factors cannot affect the color temperature of RGB images?

Exposure time, capturing distance, color of the captured object, whether the captured object is stationary or in motion, etc.

How to Adjust the White Balance of Mech-Eye Industrial 3D Cameras?

Preparation

Prepare a neutral-gray color board. If a neutral-gray color board is not available on-site, you can use a white object as a substitute, such as A4 paper.

image

Instructions

In Mech-Eye Viewer, click on “Tools” → “Check and Configure 2D Cameras”:

  1. Select the 2D camera whose white balance needs to be adjusted, and click ViewOn. The camera will acquire data continuously.
  2. In 2D Camera Configuration, set AutoWhiteBalance to Once, and the camera will start to adjust the white balance (see the image in Preparation).
  3. Click Apply Config and Sync Config and the White Balance will be adjusted automatically.
  4. After clicking on Sync Config, AutoWhiteBalance will be set to Off by default and the white balance adjustment is finished.