User`s manual

Features
204 Basler ace Camera Link
10.9.7 Balance White Auto
Balance White Auto is the "automatic" counterpart to manually setting the white balance. The
balance white auto function is only available on color models.
Automatic white balancing is a two-step process. First, the Balance Ratio Abs parameter values for
red, green, and blue are each set to 1.0. Next, the Balance Ratio Abs parameter values are
automatically adjusted such that the average values for the "red", "green", and "blue" pixels are all
the same. During this process, the color that needs the smallest amount of gain will be adjusted to
a value of 1.0.
The balance white auto function uses the Auto Function AOI that was related to the Balance White
Auto function and can only be operated in the "once" mode of operation.
If the related Auto Function AOI does not overlap the Image AOI (see the "Auto Function AOI"
section) the pixel data from the Auto Function AOI will not be used to control the white balance of
the image. However, as soon as the Balance White Auto function is set to "once" operation mode,
the Balance Ratio parameter values for red, green, and blue are each set to 1.5. These settings will
then control the white balance of the image.
For more information about the "manual" white balance settings, see Section 8.3.1 on page 130.
Setting the Balance White Auto Function Using Basler pylon
Setting the balance white auto functionality using Basler pylon is a several step process:
Select the Auto Function AOI to which the Balance White Auto is assigned.
Set the value of the Offset X, Offset Y, Width, and Height parameters for the AOI.
Set the value of the Exposure Auto parameter for the "once" or the "continuous" mode of
operation.
You can set the white balance auto functionality from within your application software by using the
pylon API. The following code snippets illustrate using the API to set the balance auto functionality:
// Select Auto Function AOI to which the Balance White Auto function is assigned
// For this example, assume that the Balance White Auto function is
// assigned to Auto AOI 2
Camera.AutoFunctionAOISelector.SetValue( AutoFunctionAOISelector_AOI2 );
// Set the position and size of selected auto function AOI. In this example, we set
// auto function AOI to cover the entire sensor.
Camera.AutoFunctionAOIOffsetX.SetValue( 0 );
Camera.AutoFunctionAOIOffsetY.SetValue( 0 );
Camera.AutoFunctionAOIWidth.SetValue( Camera.AutoFunctionAOIWidth.GetMax() );
Camera.AutoFunctionAOIHeight.SetValue( Camera.AutoFunctionAOIHeight.GetMax() );
// Set mode of operation for balance white auto function
Camera.BalanceWhiteAuto.SetValue( BalanceWhiteAuto_Once );
You can also use the Basler pylon Viewer application to easily set the parameters.