Standard Features AW00097603000
168 Basler aviator GigE
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 on page 21.
Normally the 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.17 on page 250.