Please enable JavaScript to view this site.

uEye .NET Manual 4.97

The AOI class provides methods for setting the size and position of an area of interest (AOI) within an image. The following AOIs can be defined:

Image AOI – display of an image portion

Auto Brightness AOI – reference area of interest for automatic brightness control

Auto Whitebalance AOI – reference area of interest for automatic white balance control

hint_info

This function is currently not supported by the following camera models:

UI-1007XS

AOI for automatic image control

The AOI for automatic brightness control (AES/AGC) and automatic white balance (AWB) defaults to the same size as the current image (i.e. the image AOI).

After changes to the image geometry (by resetting an image AOI, by binning or subsampling), the AOIs for automatic image control will always be reset to the image AOI value. This means that it might be necessary to set the AOIs for auto brightness/auto white balance again manually.

Fast changes of AOI position

Using SetPosFast(), you can change the positions of AOIs very quickly. Executing this command takes just a few milliseconds. When using this command, a few special requirements have to be met:

The command is currently not supported by all uEye cameras. With GetPosFastSupported(), you can check whether your sensor supports fast position changes.

Hot pixel correction has to be disabled (see HotPixel).

Image capture is not suspended for fast AOI position changes. As a result, a number of images might still be transferred with the old AOI position if they were in the driver buffer at that moment.

hint_info

Note on changing the image size

When changing the size of the AOI, please make sure that the selected image memory is large enough. If it isn't, allocate a new image memory (see Allocate()).

Changes to the image size affect the value ranges of the frame rate and exposure time. After executing AOI, calling the following classes is recommended in order to keep the defined camera settings:

oFramerate

oExposure

oIf you are using the flash function: IO

hint_info

Note on step widths for AOI definition (position grid)

The available step widths for the position and size of image AOIs depend on the sensor. The values defining the position and size of an AOI have to be integer multiples of the allowed step widths.

For details on the AOI grids of the individual camera models, please see "Camera and sensor data" in the uEye manual.

hint_info

Note to AOI in combination with high frame rates

With very small AOI and therefore high frame rate and maximum possible frame rate set, it is possible that the USB camera transfers in freerun mode only half frame rates. This is a signal for a camera-internal overload. In this case it is recommended to set the frame rate to maximum of 98 %.

The following classes and methods exists:

Multi

Sequences

Methods

Method

Description

Get

Returns the AOI.

GetAbsX

Returns if the X position is set absolutely.

GetAbsY

Returns if the Y position is set absolutely.

GetAutoBrightness

Returns the AOI for automatic brightness control.

GetOriginal

Returns the AOI without binning, subsampling or scaling.

GetPosFastSupported

Returns if fast AOI position changes are supported.

GetPosRange

Returns the range of possible positions.

GetSizeRange

Returns the range possible sizes.

GetWhiteBalance

Returns the AOI for automatic white balance.

Set

Sets the AOI.

SetAutoBrightness

Sets the AOI for automatic brightness control.

SetPosFast

Allows changing the AOI position very quickly.

SetWhiteBalance

Sets the AOI for automatic white balance.

Example

// Returns the AOI
Rectangle rect;
hCam.Size.AOI.Get(out rect);
 
// Returns the X position
bool absX;
hCam.Size.AOI.GetAbsX(out absX);
 
// Returns the Y position
bool absY;
hCam.Size.AOI.GetAbsY(out absY);
 
// Returns the AOI for automatic brightness control
int x, y, width, height;
hCam.Size.AOI.GetAutoBrightness(out x, out y, out width, out height);
 
// Returns the AOI without binning, subsampling or scaling
int x, y, width, height;
hCam.Size.AOI.GetOriginal(out x, out y, out width, out height);
 
// Returns if fast AOI position changes are supported
bool supported;
hCam.Size.AOI.GetPosFastSupported(out supported);
 
// Returns the range of possible positions
uEye.Types.Range<int> rangeX;
uEye.Types.Range<int> rangeY;
hCam.Size.AOI.GetPosRange(out rangeX, out rangeY);
 
// Returns the range possible sizes
uEye.Types.Range<int> rangeWidth;
uEye.Types.Range<int> rangeHeight;
hCam.Size.AOI.GetSizeRange(out rangeWidth, out rangeHeight);
 
// Returns the AOI for automatic white balance
Rectangle rect;
hCam.Size.AOI.GetWhiteBalance(out rect);
 
// Sets the AOI
hCam.Size.AOI.Set(0, 0, 100, 100);
hCam.Size.AOI.Set(new Rectangle(0,0,200,200));
 
// Sets the AOI for automatic brightness control
Rectangle rect;
hCam.Size.AOI.SetAutoBrightness(out rect);
 
// Allows changing the AOI position very quickly
hCam.Size.AOI.SetPosFast(0, 100);
hCam.Size.AOI.SetPosFast(new Point(0,100));
 
// Sets the AOI for automatic white balance
hCam.Size.AOI.SetWhiteBalance(new Rectangle(0, 100, 100, 200));
hCam.Size.AOI.SetWhiteBalance(0, 100, 100, 200);