RawFrameAcquired
Top  Previous  Next

Description

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


Syntax


[VB]
Private Sub objActiveDcam_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 CDcamProDlg::OnRawFrameAcquiredActiveDcam1()   
{  
   VARIANT v=m_ActiveDcam.GetRawData(true);  
   int nSize=m_ActiveDcam.GetSizeX()*m_ActiveDcam.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 ActiveDcam 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.