grab_data_async ( : Image, Region, Contours : AcqHandle, MaxDelay : Data )

Grab images and preprocessed image data from the specified image image acquisition device and start the next asynchronous grab.

The operator grab_data grabs images and preprocessed image data via the image acquisition device specified by AcqHandle and starts the next asynchronous grab. The desired operational mode of the image acquisition device as well as a suitable image part can be adjusted via the operator open_framegrabber. Additional interface-specific settings can be specified via set_framegrabber_param. The segmented image regions are returned in Region. Depending on the current configuration of the image acquisition device, the preprocessed image data can be returned in terms of images (Image), regions (Region), XLD contours (Contours), and control data (Data).

The grab of the next image is finished by calling grab_data_async or grab_image_async. If more than MaxDelay ms have passed since the asynchronous grab was started, the asynchronously grabbed image is considered as too old and a new image is grabbed. If a negative value is assigned to MaxDelay this control mechanism is deactivated.

Please note that if you call the operators grab_image or grab_data after grab_data_async, the asynchronous grab started by grab_data_async is aborted and a new image is grabbed (and waited for).


Parameters

Image (output_object)
image(-array) -> object
Grabbed image data.

Region (output_object)
region(-array) -> object
Pre-processed image regions.

Contours (output_object)
xld_cont(-array) -> object
Pre-processed XLD contours.

AcqHandle (input_control)
framegrabber -> integer
Handle of the acquisition device to be used.

MaxDelay (input_control)
number -> real
Maximum tolerated delay between the start of the asynchronous grab and the delivery of the image [ms].
Default value: -1.0
Suggested values: -1.0, 20.0, 33.3, 40.0, 66.6, 80.0, 99.9

Data (output_control)
string(-array) -> string / real / integer
Pre-processed control data.


Example
// Select a suitable image acquisition interface name AcqName
open_framegrabber(AcqName,1,1,0,0,0,0,'default',-1,'default',-1.0,
                  'default','default','default',-1,-1,AcqHandle)
// Grab image, segment it, and start next grab
grab_data_async(Region1,AcqHandle,-1.0)
// Process Region1...
// Finish asynchronous grab, segment this image, and start next grab
grab_data_async(Region2,AcqHandle,-1.0) 
// Process Region2...
close_framegrabber(AcqHandle)

Result

If the image acquisition device is open and supports the image acquisition via grab_data_async, the operator grab_data_async returns the value 2 (H_MSG_TRUE). Otherwise an exception handling is raised.


Parallelization Information

grab_data_async is reentrant and processed without parallelization.


Possible Predecessors

open_framegrabber, grab_image_start, set_framegrabber_param


Possible Successors

grab_data_async, grab_image_async, set_framegrabber_param, close_framegrabber


See also

open_framegrabber, info_framegrabber, set_framegrabber_param


Module

Foundation


Up: Image/Acquisition    Top: HALCON Operators
Copyright © 1996-2008 MVTec Software GmbH