GetSequencePixel (DVR version only)
Top  Previous  Next

Description

Returns the pixel value at the specified coordinates.


Syntax


[VB]
Value=objActiveGige.GetSequencePixel( Frame, X, Y )


[C/C++]
HRESULT GetSequencePixel( long iFrame, short X, short Y, long* pValue );


Data Types
[VB]

Long: Frame
X
: Integer
Y: Integer
Return value: Long


Parameters
[C/C++]

iFrame [in]  
The zero-based index of the frame in the memory sequence  
X [in]  
The x-coordinate of the pixel  
Y [in]  
The y-coordinate of the pixel  
pValue [out,retval]  
Pointer to the pixel's value  


Return Values


S_OK  
Success  
E_FAIL  
Failure.  
E_INVALIDARG  
Invalid input arguments.  


Example


This VB example displays the value of the pixel at the specified coordinates of the memory sequence frame #0.

ActiveGige1.Grab
value=ActiveGige1.GetSequencePixel(0,64,32)
MsgBox value
 

Remarks


The value returned by GetSequencePixel depends on the format of the video acquired. For monochrome video the method will return the actual pixel value. For the color video the RGB data in the specified coordinates will be converted to the luminance using the formula: L=(R+G+B) / 3.

The values of the x and y coordinates must not exceed the width and height of the video frame, or the error will occur.