GetROI
Top  Previous  Next

Description

Returns the array containing the current ROI settings.


Syntax


[VB]
value = objActiveGeni.GetROI 


[C/C++]
HRESULT GetROI( VARIANT* pROI );


Data Types
[VB]

Return value: Variant (Array)

Parameters
[C/C++]

pROI [out,retval]  
Pointer to the SAFEARRAY containing the current ROI settings as follows:  
ROI [0] - horizontal coordinate of the top left corner of the ROI, relative to the image origin  
ROI [1] - vertical coordinate of the top left corner of the ROI, relative to the image origin.  
ROI [2] - horizontal coordinate of the bottom right corner of the ROI, relative to the image origin.  
ROI [3] - vertical coordinate of the bottom right corner of the ROI, relative to the image origin.  
ROI [4] - lower threshold of the luminance range for image statistics calculations  
ROI [5] - higher threshold of the luminance range for image statistics calculations  

Return Values


S_OK  
Success  
E_FAIL  
Failure.  

Example

The following VB example displays the settings of the current ROI:

ROI=ActiveGeni1.GetROI
MsgBox "X1: ", ROI[0], "Y1: ", ROI[1], "X2: ", ROI [2], "Y2: ", ROI [3]


Remarks


For more information on the region of interest see SetROI, GetImageStat, GetHistogram.