RawFrameAcquired
Top  Previous  Next

Description

This event is fired each time a raw frame has arrived from the camera, before it is submitted to ActiveGige decoding and processing chain. Can be used in combination with GetRawData to perform a preprocessing on raw images.


Syntax


[VB]
Private Sub objActiveGige_RawFrameAcquired()


[C/C++]
HRESULT Fire_RawFrameAcquired();


Parameters
[C/C++]

None  


Return Values


S_OK  
Success  
E_FAIL  
Failure.  


Example


This MFC fragment uses the RawFrameAcquired event to perform a preprocessing (invert operation) of the raw video:

void CGcamProDlg::OnRawFrameAcquiredActivegige1()   
{  
   VARIANT v=m_ActiveGige.GetRawData(true);  
   int nSize=m_ActiveGige.GetSizeX()*m_ActiveGige.GetSizeY();  
   BYTE* ptr=(BYTE*)v.pcVal;   
   int max=255;  
   for(int y=0;y<nSize;y++,ptr++)  
      *ptr=max-*ptr;  
}     
 

Remarks


One of the following conditions must be met, before the RawFrameAcquired event will be fired:
The Acquire property has been set to TRUE  
The Grab method has been called.  

The internal ActiveGige processing chain will be blocked until the container application releases the event handler. Therefore the displayed frame rate can drop and frames can get missed, if the external pre-processing procedure is not fast enough.