AW00089317000 Standard Features
Basler ace GigE 285
The limits within which the camera will adjust the Gain Raw parameter are defined by the Auto Gain
Raw Upper Limit and the Auto Gain Raw Lower Limit parameters. The minimum and maximum
allowed settings for the Auto Gain Raw Upper Limit and Auto Gain Raw Lower Limit parameters
depend on the current pixel data format, on the current settings for binning, and on whether or not
the parameter limits for manually setting the gain feature are disabled.
The Auto Target Value parameter defines the target average gray value that the gain auto function
will attempt to achieve when it is automatically adjusting the Gain Raw value. The target average
gray value can range from 0 (black) to 255 (white) when the camera is set for an 8 bit pixel format
or from 0 (black) to 4095 (white) when the camera is set for a 12 bit pixel format.
Setting the gain auto functionality using Basler pylon is a several step process:
Select the Auto Function AOI 1.
Set the value of the Offset X, Offset Y, Width, and Height parameters for the AOI.
Set the Gain Selector to All.
Set the value of the Auto Gain Raw Lower Limit and Auto Gain Raw Upper Limit parameters.
Set the value of the Auto Target Value parameter.
Set the value of the Gain Auto parameter for the "once" or the "continuous" mode of operation.
You can set the gain auto functionality from within your application software by using the pylon API.
The following code snippets illustrate using the API to set the exposure auto functionality:
// Select auto function AOI 1
// Set the position and size of the auto function AOI
Camera.AutoFunctionAOISelector.SetValue(
AutoFunctionAOISelector_AOI1 );
Camera.AutoFunctionAOIOffsetX.SetValue( 0 );
Camera.AutoFunctionAOIOffsetY.SetValue( 0 );
Camera.AutoFunctionAOIWidth.SetValue(
Camera.AutoFunctionAOIWidth.GetMax() );
Camera.AutoFunctionAOIHeight.SetValue(
Camera.AutoFunctionAOIHeight.GetMax() );
// Select gain all and set the upper and lower gain limits for the
// gain auto function
Camera.GainSelector.SetValue( GainSelector_All );
Camera.AutoGainRawLowerLimit.SetValue( Camera.GainRaw.GetMin() );
Camera.AutoGainRawUpperLimit.SetValue( Camera.GainRaw.GetMax() );
// Set the target gray value for the gain auto function
// (If exposure auto is enabled, this target is also used for
// exposure auto control.)
Camera.AutoTargetValue.SetValue( 128 );