HALCON Reference Manual / Image / Acquisition Operators

grab_image_async (Operator)

Name

grab_image_async — Grab an image from the specified image acquisition device and start the next asynchronous grab.

Synopsis

grab_image_async( : Image : AcqHandle, MaxDelay : )

Description

The operator grab_image_async grabs an image via the image acquisition device by AcqHandle and starts the asynchronous grab of the next image. 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 grab of the next image is finished by calling grab_image_async or grab_data_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_image_async, the asynchronous grab started by grab_image_async is aborted and a new image is grabbed (and waited for).

Parameters

Image (output_object) image object (byte / int2)
Grabbed image.

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

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 + start next grab
grab_image_async(Image1,AcqHandle,-1.0)
* Process Image1 ...
* Finish asynchronous grab + start next grab
grab_image_async(Image2,AcqHandle,-1.0)
* Process Image2 ...
close_framegrabber(AcqHandle)

Result

If the image acquisition device is open and supports asynchronous grabbing the operator grab_image_start returns the value 2 (H_MSG_TRUE). Otherwise an exception handling is raised.

Parallelization Information

grab_image_async is reentrant and processed without parallelization.

Possible Predecessors

grab_image_start, open_framegrabber, set_framegrabber_param

Possible Successors

grab_image_async, grab_data_async, set_framegrabber_param, close_framegrabber

See also

grab_image_start, open_framegrabber, info_framegrabber, set_framegrabber_param

Module

Foundation


HALCON Reference Manual / Image / Acquisition Operators
Version 9.0.1 Copyright © 1996-2009 MVTec Software GmbH