grab_data

This operator is used to access the binary nodes of the NxLib API Tree.

Parameters

grab_data (ImageRegionContoursAcqHandleData)

Parameter

Description

Image

Variable where the retrieved image will be stored.

Note: If ‘grab_data_items’ contains multiple items, this will be a tuple of images.

Region

Region which describes the valid 3D points.

Note: If ‘grab_data_items’ contains multiple items, this will be a tuple of regions.

Contours

Not used.

AcqHandle

An acquisition handle obtained via ‘ open_framegrabber’.

Data

Not used.

Dependencies

All dependencies can be manipulated with ‘ set_framegraber_param’.

Parameter

Description

grab_data_items

Contains the list of binary nodes which will be returned in the Image value.

Depending on the type of the acquisition handle following binary nodes can be accessed:

‘Stereo’

Binary node

Image Type

Images/Raw/Left, Images/Raw/Right

1 channel / Byte

Images/Rectified/Left, Images/Rectified/Right

1 channel / Byte

Images/WithOverlay/Left, Images/WithOVerlay/Right

3 channel / Byte

Images/DisparityMap

1 channel / Byte

Images/PointMap

3 channel / Byte

Images/Normals

3 channel / Byte

‘Monocular’

Images/Left

1 channel / Byte

Images/Left

1 channel / Byte

Images/WithOverlay/Left

3 channel / Byte

‘Item’ (referring to root)

Images/RenderPointMap

1 channel / Byte

Images/RenderPointMapTexture

1 channel / Byte

Images/RenderView

3 channel / Byte

auto_grab_data

If ‘auto_grab_data’ is set, ‘grab_data’ will also automatically capture a new image and execute all necessary commands to generate the binary nodes listed in ‘grab_data_items’.

Binary node

Execute commands

Images/Raw/Left, Images/Raw/Right

cmdCapture

Images/Rectified/Left, Images/Rectified/Right

cmdCapture, cmdRectifyImages

Images/DisparityMap

cmdCapture, cmdComputeDisparityMap

Images/PointMap

cmdCapture, cmdComputeDisparityMap, cmdComputePointMap

Images/Normals

cmdCapture, cmdComputeDisparityMap, cmdComputePointMap, cmdComputeNormals

Images/Left

cmdCapture,

Images/Rectified

cmdCapture, cmdRectifyImages

Images/RenderPointMap

cmdCapture, cmdComputeDisparityMap, cmdComputePointMap

Images/RenderPointMapTexture

cmdCapture, cmdComputeDisparityMap, cmdComputePointMap

Images/RenderView

cmdCapture, cmdComputeDisparityMap, cmdRenderView

replace_nans

All internal binary fields use the NaN (“Not a number”) value of the IEEE floating point format to indicate that a certain point is invalid (i.e. not triangulated). Unfortunately NaN values within images cause various problems within Halcon, therefore by stetting this flag to ‘true’, ‘grab_data’ replaces NaN values within floating point images with 0.

generate_regions

By deactivating this flag, ‘grab_data’ no longer delivers the Region value. This can be used to save computation time.

Note

All automaticallly executed commands will be run without parameters. The operator automatically enables the projector for stereo cameras.

Example

* Open default stereo camera
open_framegrabber('Ensenso-NxLib'000000'default'0'Raw'-1'false''Stereo'''00AcqHandle)

* Set 'grab_data_items'
* 'grab_data_items' is by default 'Images/PointMap' for Stereo handles
set_framegrabber_param (AcqHandle'grab_data_items', ['Images/DisparityMap','Images/PointMap'])

* Grab images with 'auto_grab_data' on
grab_data (ImageRegionContoursAcqHandleData)

* Without 'auto_grab_data' following commands would be needed for the same result:
* Note that in this case, you have to enable the projector manually if you need it!
set_framegrabber_param (AcqHandle'auto_grab_data''false')
open_framegrabber('Ensenso-NxLib'000000'default'0'Raw'-1'false''Item''/'00RootHandle)
set_framegrabber_param (RootHandle'do_execute''Capture')
set_framegrabber_param (RootHandle'do_execute''ComputeDisparityMap')
set_framegrabber_param (RootHandle'do_execute''ComputePointMap')
grab_data (ImageRegionContoursAcqHandleData)