HALCON Reference Manual 10.0.2
Table of Contents / Image / Acquisition ClassesClassesClasses | | | Operators

grab_data_asyncgrab_data_asyncgrab_data_asyncGrabDataAsyncGrabDataAsync (Operator)

Name

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

Signature

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

Herror grab_data_async(Hobject* Image, Hobject* Region, Hobject* Contours, const Hlong AcqHandle, double MaxDelay, char* Data)

Herror T_grab_data_async(Hobject* Image, Hobject* Region, Hobject* Contours, const Htuple AcqHandle, const Htuple MaxDelay, Htuple* Data)

Herror grab_data_async(Hobject* Image, Hobject* Region, Hobject* Contours, const HTuple& AcqHandle, const HTuple& MaxDelay, char* Data)

Herror grab_data_async(Hobject* Image, Hobject* Region, Hobject* Contours, const HTuple& AcqHandle, const HTuple& MaxDelay, HTuple* Data)

HImage HImage::GrabDataAsync(HRegion* Region, HXLDCont* Contours, const HFramegrabber& AcqHandle, const HTuple& MaxDelay, char* Data)

HImageArray HImageArray::GrabDataAsync(HRegionArray* Region, HXLDContArray* Contours, const HFramegrabber& AcqHandle, const HTuple& MaxDelay, HTuple* Data)

HImageArray HFramegrabber::GrabDataAsync(HRegion* Region, HXLDCont* Contours, const HTuple& MaxDelay, HTuple* Data) const

void HOperatorSetX.GrabDataAsync(
[out] IHUntypedObjectX*Image, [out] IHUntypedObjectX*Region, [out] IHUntypedObjectX*Contours, [in] VARIANT AcqHandle, [in] VARIANT MaxDelay, [out] VARIANT* Data)

IHRegionX* HImageX.GrabDataAsync(
[out] IHXLDContX*Contours, [in] IHFramegrabberX* AcqHandle, [in] double MaxDelay, [out] VARIANT* Data)

IHImageX* HRegionX.GrabDataAsync(
[out] IHXLDContX*Contours, [in] IHFramegrabberX* AcqHandle, [in] double MaxDelay, [out] VARIANT* Data)

IHImageX* HFramegrabberX.GrabDataAsync(
[out] IHRegionX*Region, [out] IHXLDContX*Contours, [in] double MaxDelay, [out] VARIANT* Data)

static void HOperatorSet.GrabDataAsync(out HObject image, out HObject region, out HObject contours, HTuple acqHandle, HTuple maxDelay, out HTuple data)

HRegion HImage.GrabDataAsync(out HXLDCont contours, HFramegrabber acqHandle, double maxDelay, out HTuple data)

HRegion HImage.GrabDataAsync(out HXLDCont contours, HFramegrabber acqHandle, double maxDelay, out string data)

HImage HRegion.GrabDataAsync(out HXLDCont contours, HFramegrabber acqHandle, double maxDelay, out HTuple data)

HImage HRegion.GrabDataAsync(out HXLDCont contours, HFramegrabber acqHandle, double maxDelay, out string data)

HImage HFramegrabber.GrabDataAsync(out HRegion region, out HXLDCont contours, double maxDelay, out HTuple data)

HImage HFramegrabber.GrabDataAsync(out HRegion region, out HXLDCont contours, double maxDelay, out string data)

Description

The operator grab_datagrab_datagrab_dataGrabDataGrabData grabs images and preprocessed image data via the image acquisition device specified by AcqHandleAcqHandleAcqHandleAcqHandleacqHandle 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_framegrabberopen_framegrabberopen_framegrabberOpenFramegrabberOpenFramegrabber. Additional interface-specific settings can be specified via set_framegrabber_paramset_framegrabber_paramset_framegrabber_paramSetFramegrabberParamSetFramegrabberParam. The segmented image regions are returned in RegionRegionRegionRegionregion. Depending on the current configuration of the image acquisition device, the preprocessed image data can be returned in terms of images (ImageImageImageImageimage), regions (RegionRegionRegionRegionregion), XLD contours (ContoursContoursContoursContourscontours), and control data (DataDataDataDatadata).

The grab of the next image is finished by calling grab_data_asyncgrab_data_asyncgrab_data_asyncGrabDataAsyncGrabDataAsync or grab_image_asyncgrab_image_asyncgrab_image_asyncGrabImageAsyncGrabImageAsync. If more than MaxDelayMaxDelayMaxDelayMaxDelaymaxDelay 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 MaxDelayMaxDelayMaxDelayMaxDelaymaxDelay this control mechanism is deactivated.

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

Parallelization

Parameters

ImageImageImageImageimage (output_object)  image(-array) objectHImageHImageHImageXHobject * (byte / uint2)

Grabbed image data.

RegionRegionRegionRegionregion (output_object)  region(-array) objectHRegionHRegionHRegionXHobject *

Pre-processed image regions.

ContoursContoursContoursContourscontours (output_object)  xld_cont(-array) objectHXLDContHXLDContHXLDContXHobject *

Pre-processed XLD contours.

AcqHandleAcqHandleAcqHandleAcqHandleacqHandle (input_control)  framegrabber HFramegrabber, HTupleHFramegrabber, HTupleHFramegrabberX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong)

Handle of the acquisition device to be used.

MaxDelayMaxDelayMaxDelayMaxDelaymaxDelay (input_control)  number HTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double)

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

DataDataDataDatadata (output_control)  string(-array) HTupleHTupleVARIANTHtuple (string / real / integer) (string / double / int / long) (char* / double / Hlong) (BSTR / double / Hlong) (char* / double / Hlong)

Pre-processed control data.

Example (HDevelop)

* 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 (Image1, Region1, Contours1, AcqHandle, -1.0, Data1)
* Process data 1...
* Finish asynchronous grab, segment this image, and start next grab
grab_data_async (Image2, Region2, Contours2, AcqHandle, -1.0, Data2)
* Process data 2...
close_framegrabber(AcqHandle)

Result

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

Possible Predecessors

open_framegrabberopen_framegrabberopen_framegrabberOpenFramegrabberOpenFramegrabber, grab_image_startgrab_image_startgrab_image_startGrabImageStartGrabImageStart, set_framegrabber_paramset_framegrabber_paramset_framegrabber_paramSetFramegrabberParamSetFramegrabberParam

Possible Successors

grab_data_asyncgrab_data_asyncgrab_data_asyncGrabDataAsyncGrabDataAsync, grab_image_asyncgrab_image_asyncgrab_image_asyncGrabImageAsyncGrabImageAsync, set_framegrabber_paramset_framegrabber_paramset_framegrabber_paramSetFramegrabberParamSetFramegrabberParam, close_framegrabberclose_framegrabberclose_framegrabberCloseFramegrabberCloseFramegrabber

See also

open_framegrabberopen_framegrabberopen_framegrabberOpenFramegrabberOpenFramegrabber, info_framegrabberinfo_framegrabberinfo_framegrabberInfoFramegrabberInfoFramegrabber, set_framegrabber_paramset_framegrabber_paramset_framegrabber_paramSetFramegrabberParamSetFramegrabberParam

Module

Foundation


Table of Contents / Image / Acquisition ClassesClassesClasses | | | Operators
HALCON Reference Manual 10.0.2 Copyright © 1996-2011 MVTec Software GmbH