Top  Previous  Next

grabAvrg ( integer Output, integer Frames [, integer Delay] )

Use this function to capture a single image as a result of accumulating and averaging several video frames. This function is typically used for the noise reduction. The format and size of the image captured depends on the video device settings.

An integer between 1 and 116 specifying the number of the workspace frame into which the image will be placed. Values in the range of 100-116 correspond to hidden frames.  
A positive integer specifying the amount of video frames used for image averaging.  
A positive integer specifying the delay (in milliseconds) between consecutive video frames used for image averaging. If this parameter is omitted or if the video device frame rate is lower than the rate corresponding to the specified delay time, the function will use the fastest frame rate possible for the current video device adjusting the actual delay time accordingly.  
Error flags

The flag set if successful.  
The flag set if failed.  
The flag set if timeout occurred.  

This set of statements will continuously grab the live video averaging every four frames of the video stream. If a capture error occurs, the script will terminate.  
grabAvrg(1, 4, 60)  
loop while getError()=ERR_OK