Home > C: Programming > Function Descriptions > | History back Previous chapter Next chapter Print |
is_AOI |
uEye Camera Manual Version 3.80
is_AOI
USB 2.0 GigE |
USB 2.0 GigE |
Syntax
INT is_AOI (HIDS hCam, UINT nCommand, void* pParam, UINT nSizeOfParam)
Description
is_AOI() can be used to set 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 |
The nCommand input parameter is used to select the function mode. The pParam input parameter depends on the selected function mode. If you select functions for setting or returning a value, pParam contains a pointer to a variable of the UINT type. The size of the memory area to which pParam refers is specified in the nSizeOfParam input parameter.
|
|
|
|
|
|
Input Parameters
hCam |
Camera handle |
nCommand |
|
IS_AOI_IMAGE_SET_AOI |
Sets the position and size of the image by using an object of the IS_RECT type. You can define the start position of the AOI in the memory by ORing IS_AOI_IMAGE_POS_ABSOLUTE with the X or Y position. |
IS_AOI_IMAGE_GET_AOI |
Returns the AOI in an IS_RECT object. |
IS_AOI_IMAGE_SET_POS |
Sets the AOI position by using an object of the IS_POINT_2D type. IS_AOI_IMAGE_POS_ABSOLUTE can be ORed here, as well. |
IS_AOI_IMAGE_GET_POS |
Returns the position in an IS_POINT_2D object. |
IS_AOI_IMAGE_SET_SIZE |
Sets the AOI size by using an object of the IS_SIZE_2D type. |
IS_AOI_IMAGE_GET_SIZE |
Returns the size in an IS_SIZE_2D object. |
IS_AOI_IMAGE_GET_POS_MIN |
Returns the minimum possible position in an IS_POINT_2D object. |
IS_AOI_IMAGE_GET_SIZE_MIN |
Returns the smallest possible size in an IS_SIZE_2D object. |
IS_AOI_IMAGE_GET_POS_MAX |
Returns the maximum possible position in an IS_POINT_2D object. |
IS_AOI_IMAGE_GET_SIZE_MAX |
Returns the largest possible size in an IS_SIZE_2D object. |
IS_AOI_IMAGE_GET_POS_INC |
Returns the increment for the position in an IS_POINT_2D object. |
IS_AOI_IMAGE_GET_SIZE_INC |
Returns the increment for the size in an IS_SIZE_2D object. |
IS_AOI_IMAGE_GET_POS_X_ABS |
Returns an UINT object indicating whether IS_AOI_IMAGE_POS_ABSOLUTE is set for the X position. |
IS_AOI_IMAGE_GET_POS_Y_ABS |
Returns an UINT object indicating whether IS_AOI_IMAGE_POS_ABSOLUTE is set for the Y position. |
IS_AOI_IMAGE_GET_ORIGINAL_AOI |
Returns the AOI in an IS_RECT object without binning, subsampling or scaling. |
IS_AOI_IMAGE_SET_POS_FAST |
Allows changing the AOI position very quickly by using an IS_POINT_2D object. Hot pixel correction has to be disabled (see information box above). |
IS_AOI_IMAGE_SET_POS_FAST_SUPPORTED |
Returns an UINT object indicating whether fast AOI position changes are supported. The passed variable returns 0 if the function is not supported by the sensor. |
IS_AOI_AUTO_BRIGHTNESS_SET_AOI |
Sets the AOI for automatic brightness control (similar to IS_AOI_IMAGE_SET_AOI). |
IS_AOI_AUTO_BRIGHTNESS_GET_AOI |
Returns the AOI for automatic brightness control (similar to IS_AOI_IMAGE_GET_AOI). |
IS_AOI_AUTO_WHITEBALANCE_SET_AOI |
Sets the AOI for automatic white balance (similar to IS_AOI_IMAGE_SET_AOI). |
IS_AOI_AUTO_WHITEBALANCE_GET_AOI |
Returns the AOI for automatic white balance (similar to IS_AOI_IMAGE_GET_AOI). |
IS_AOI_MULTI_GET_SUPPORTED_MODES |
Returns the supported Multi AOI modes in an UINT object. |
IS_AOI_MULTI_SET_AOI |
Sets the Multi AOI mode. The mode you want to use has to be ORed with IS_AOI_MULTI_SET_AOI. |
IS_AOI_MULTI_GET_AOI |
Returns the set Multi AOI mode. The mode that is used has to be ORed with IS_AOI_MULTI_SET_AOI. |
IS_AOI_MULTI_DISABLE_AOI |
Disables Multi AOI. The mode that is used has to be ORed with IS_AOI_MULTI_SET_AOI. |
pParam |
Pointer to a function parameter; which function parameter is referred to here depends on nCommand. |
nSizeOfParam |
Size (in bytes) of the memory area to which pParam refers. |
Contents of the IS_RECT Structure
INT |
s32X |
X position of the AOI |
INT |
s32Y |
Y position of the AOI |
INT |
s32Width |
Width of the AOI |
INT |
s32Height |
Height of the AOI |
Contents of the IS_POINT_2D Structure
INT |
s32X |
X position of the AOI |
INT |
s32Y |
Y position of the AOI |
Contents of the IS_SIZE_2D Structure
INT |
s32Width |
Width of the AOI |
INT |
s32Height |
Height of the AOI |
Return Values
IS_SUCCESS |
Function executed successfully |
IS_NO_SUCCESS |
General error message |
Related Functions
Code Samples for AOI
// Sets the position and size of the image by using an object of the IS_RECT type. IS_RECT rectAOI;
sizeAOI.s32X = 100; sizeAOI.s32Y = 100; rectAOI.s32Width = 200; rectAOI.s32Height = 100;
INT nRet = is_AOI( hCam, IS_AOI_IMAGE_SET_AOI, (void*)&rectAOI, sizeof(rectAOI)); |
// Returns the AOI position by using an object of the IS_POINT_2D type. IS_RECT rectAOI;
INT nRet = is_AOI(hCam, IS_AOI_IMAGE_GET_AOI, (void*)&rectAOI, sizeof(rectAOI)); if (nRet == IS_SUCCESS) { INT x = rectAOI.s32X; INT y = rectAOI.s32Y; INT width = rectAOI.s32Width; INT height = rectAOI.s32Height; } |
// Returns an UINT object indicating whether IS_AOI_IMAGE_POS_ABSOLUTE is set for the X position. UINT nAbsPos = 0;
INT nRet = is_AOI(hCam, IS_AOI_IMAGE_GET_POS_X_ABS, (void*)&nAbsPos , sizeof(nAbsPos )); if (nRet == IS_SUCCESS) { if (nAbsPos == IS_AOI_IMAGE_POS_ABSOLUTE) { // set } else if (nAbsPos == 0) { // not set } } |
Figure 148: Examples of setting the AOI position in the memory
Code Samples for Multi AOI
// Set Multi AOI. The axes are passed in an UINT array of length 8. UINT nAxes[8];
nAxes[0] = 100; nAxes[1] = 120; ...
INT nRet = is_AOI(hCam, IS_AOI_MULTI_SET_AOI | IS_AOI_MULTI_MODE_AXES, (void*)nAxes, sizeof(nAxes)); |
// Read Multi AOI UINT nAxes[8];
INT nRet = is_AOI(hCam, IS_AOI_MULTI_GET_AOI | IS_AOI_MULTI_MODE_AXES, (void*)nAxes, sizeof(nAxes)); |
// Disable Multi AOI UINT nAxes[8];
INT nRet = is_AOI(hCam, IS_AOI_MULTI_DISABLE_AOI | IS_AOI_MULTI_MODE_AXES, NULL, NULL); |