User`s manual
Features AW00098504000
162 Basler ace Camera Link
Setting the Image AOI Using Basler pylon
You can set the Offset X, Offset Y, Width, and Height parameter values from within your application
software by using the Basler pylon API. The following code snippets illustrate using the API to get
the maximum allowed settings and the increments for the Width and Height parameters. They also
illustrate setting the Offset X, Offset Y, Width, and Height parameter values and enabling automatic
AOI centering.
int64_t widthMax = Camera.Width.GetMax( );
int64_t widthInc = Camera.Width.GetInc();
Camera.Width.SetValue( 200 );
Camera.OffsetX.SetValue( 100 );
int64_t heightMax = Camera.Height.GetMax( );
int64_t heightInc = Camera.Height.GetInc();
Camera.Height.SetValue( 200 );
Camera.OffsetY.SetValue( 100 );
// Enable automatic X and Y centering
Camera.CenterX.SetValue( true );
Camera.CenterY.SetValue( true );
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.
Your frame grabber may place additional restrictions on how the AOI size must be
set. Check the documentation included with your frame grabber to determine its
AOI requirements.
Normally the X Offset, Y Offset, Width, and Height parameter settings refer to the
physical columns and lines in the sensor. But if binning is enabled, these
parameters are set in terms of "virtual" columns and lines. For more information
about binning, see Section 10.8 on page 184.