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

grab_datagrab_datagrab_dataGrabDataGrabData (Operator)

Name

grab_datagrab_datagrab_dataGrabDataGrabData — Grab images and preprocessed image data from the specified image acquisition device.

Signature

grab_data( : Image, Region, Contours : AcqHandle : Data)

Herror grab_data(Hobject* Image, Hobject* Region, Hobject* Contours, const Hlong AcqHandle, char* Data)

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

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

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

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

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

HImageArray HFramegrabber::GrabData(HRegion* Region, HXLDCont* Contours, HTuple* Data) const

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

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

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

IHImageX* HFramegrabberX.GrabData(
[out] IHRegionX*Region, [out] IHXLDContX*Contours, [out] VARIANT* Data)

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

HRegion HImage.GrabData(out HXLDCont contours, HFramegrabber acqHandle, out HTuple data)

HRegion HImage.GrabData(out HXLDCont contours, HFramegrabber acqHandle, out string data)

HImage HRegion.GrabData(out HXLDCont contours, HFramegrabber acqHandle, out HTuple data)

HImage HRegion.GrabData(out HXLDCont contours, HFramegrabber acqHandle, out string data)

HImage HFramegrabber.GrabData(out HRegion region, out HXLDCont contours, out HTuple data)

HImage HFramegrabber.GrabData(out HRegion region, out HXLDCont contours, out string data)

Description

The operator grab_datagrab_datagrab_dataGrabDataGrabData grabs images and preprocessed image data via the image acquisition device specified by AcqHandleAcqHandleAcqHandleAcqHandleacqHandle. 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. 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).

Parallelization

Parameters

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

Grabbed image data.

RegionRegionRegionRegionregion (output_object)  region(-array) objectHRegionHRegionHRegionXHobject *

Preprocessed image regions.

ContoursContoursContoursContourscontours (output_object)  xld_cont(-array) objectHXLDContHXLDContHXLDContXHobject *

Preprocessed XLD contours.

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

Handle of the acquisition device to be used.

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

Preprocessed control data.

Example (HDevelop)

* Select a suitable image acquisition interface name AcqName
info_framegrabber(AcqName,'port',Information,Values)
* Choose the port P and the input line L your camera is connected to
open_framegrabber(AcqName,1,1,0,0,0,0,'default',-1,'default',-1.0, \
                  'default','default','default',P,L,AcqHandle)
* Grab and segment image
grab_data (Image, Region, Contours, AcqHandle, Data)
* Process Region...
close_framegrabber(AcqHandle)

Example (C)

/* Select a suitable image acquisition interface name AcqName*/
info_framegrabber(AcqName,"port",&Information,&Values) ;
/* Choose the port P and the input line L your camera is connected to */
open_framegrabber(AcqName,1,1,0,0,0,0,"default",-1,"default",-1.0,
                  "default","default","default",P,L,&AcqHandle) ;
/* Grab and segment image */
grab_data(&Region,AcqHandle) ;
/* Process Region... */
close_framegrabber(AcqHandle) ;

Example (HDevelop)

* Select a suitable image acquisition interface name AcqName
info_framegrabber(AcqName,'port',Information,Values)
* Choose the port P and the input line L your camera is connected to
open_framegrabber(AcqName,1,1,0,0,0,0,'default',-1,'default',-1.0, \
                  'default','default','default',P,L,AcqHandle)
* Grab and segment image
grab_data (Image, Region, Contours, AcqHandle, Data)
* Process Region...
close_framegrabber(AcqHandle)

Example (HDevelop)

* Select a suitable image acquisition interface name AcqName
info_framegrabber(AcqName,'port',Information,Values)
* Choose the port P and the input line L your camera is connected to
open_framegrabber(AcqName,1,1,0,0,0,0,'default',-1,'default',-1.0, \
                  'default','default','default',P,L,AcqHandle)
* Grab and segment image
grab_data (Image, Region, Contours, AcqHandle, Data)
* Process Region...
close_framegrabber(AcqHandle)

Example (HDevelop)

* Select a suitable image acquisition interface name AcqName
info_framegrabber(AcqName,'port',Information,Values)
* Choose the port P and the input line L your camera is connected to
open_framegrabber(AcqName,1,1,0,0,0,0,'default',-1,'default',-1.0, \
                  'default','default','default',P,L,AcqHandle)
* Grab and segment image
grab_data (Image, Region, Contours, AcqHandle, Data)
* Process Region...
close_framegrabber(AcqHandle)

Result

If the image acquisition device is open and supports the image acquisition via grab_datagrab_datagrab_dataGrabDataGrabData, the operator grab_datagrab_datagrab_dataGrabDataGrabData 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_datagrab_datagrab_dataGrabDataGrabData, grab_data_asyncgrab_data_asyncgrab_data_asyncGrabDataAsyncGrabDataAsync, grab_image_startgrab_image_startgrab_image_startGrabImageStartGrabImageStart, grab_imagegrab_imagegrab_imageGrabImageGrabImage, 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