grabIm
Top  Previous  Next

grabIm ( integer Output )

Use this function to capture a single image from the video device. The format and size of the image captured depends on the video device settings.

Parameters
 
Output  
 
An integer between 0 and 116 specifying the number of the frame into which the image will be placed. Values in the range of 100-116 correspond to hidden frames. A value of 0 represents the DMA memory buffer of the video device  
 
Error flags

ERR_OK  
 
The flag set if successful.  
 
ERR_FAILED  
 
The flag set if failed.  
 
ERR_TIMEOUT  
 
The flag set if timeout occurred.  
 
Example

This set of statements will continuously grab the live video into a frame #1. If a capture error occurs, the script will terminate.  
 
do  
grabIm(1)  
loop while getError()=ERR_OK  
 
Remark

If the Output is set to zero, the function will initiate acquisition into the DMA buffer of the video device without subsequent transferring the data into an image frame memory. The data in the buffer can be accessed by processing and measurement functions as image #0. This provides the fastest and most efficient way for real-time image processing. However, if the video device is configured in an asynchronous mode and processing occurs at a slower rate than pixels are acquired, using the direct access to the DMA buffer may result in the decomposition of images and lost of data.