User`s manual
AW00098504000 Features
Basler ace Camera Link 197
Setting an Auto Function AOI Position and Size Using Basler pylon
You can select an Auto Function AOI and set the X Offset, Y Offset, Width, and Height parameter
values for the Auto Function AOI from within your application software by using the pylon API. The
following code snippet illustrates using the API to select Auto Function AOI one and to get the
maximum allowed settings for the Width and Height parameters. The snippet also illustrates setting
the X Offset, Y Offset, Width, and Height parameter values.
// Select auto function AOI 1
// Set position and size of the selected 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() );
You can also use the Basler pylon Viewer application to easily set the parameters.
For more information about the pylon API and the pylon Viewer, see Section 3.1 on page 19.
Setting an Auto Function AOI Position and Size Using Direct Register Access
To set the X Offset, Y Offset, Width, and Height for Auto Function 1 via direct register access:
Set the value of the Auto AOI 1 Left register to set the X offset.
Set the value of the Auto AOI 1 Top register to set the Y offset.
Set the value of the Auto AOI 1 Width register to set the width.
Set the value of the Auto AOI 1 Height register to set the height.
To set the X Offset, Y Offset, Width, and Height for Auto Function 2 via direct register access:
Set the value of the Auto AOI 2 Left register to set the X offset.
Set the value of the Auto AOI 2 Top register to set the Y offset.
Set the value of the Auto AOI 2 Width register to set the width.
Set the value of the Auto AOI 2 Height register to set the height.
For more information about direct register access, see Section 3.2 on page 21.