During the development of Machine Vision applications, image data is regularly used for tuning and debugging purposes.

In order to access video data from ibaCapture, there is the option to install the extension “ibaHALCONCapture” (Installation) with the ibaVision installer.

This is an HDevelop image acquisition interface that allows accessing video directly from ibaCapture. To use this interface it is required to also install ibaCapture Player on the HDevelop PC.

If the “ibaHALCONCapture” option has been installed, an “Iba” image acquisition interface is available in HDevelop and HDevelop XL.

With this it is possible to access ibaCapture Server instances directly over the network for access to live video or stored video. Also, MP4 files exported from ibaCapture can be read with this interface.

When using the HDevelop Image Acquisition assistant, specify the server to connect to in the “Camera Type” input field. Possible values are hostname or IP address of the server.

The camera on the ibaCapture Server can be selected with the “Device” input field. This accepts either the camera id (numeric) or the camera name (text).

The “Generic” input field allows selecting the access mode.

Once all parameters have been set, it is possible to test the interface by using the “Connect” and “Snap”/”Live” buttons.

On the Code Generation tab, clicking “Insert Code” will generate the basic code to use the image acquisition interface in a Halcon program.

The HDevelop User’s Guide contains more information about the Image Acquisition Assistant.

As soon as the “ibaHALCONCapture” interface has been installed, it is also possible to open the interface documentation in the HDevelop Help Window.

Examples

Opening a live video stream from an ibaCapture Server:

open_framegrabber('Iba', 0, 0, 0, 0, 0, 0, 'progressive', 8, 'rgb', ‘live’, 'false', 'server\\user\\password', '1', 0, 0, AcqHandle)

If user management is not enabled on the ibaCapture Server, the user and password information can be omitted.

Opening a stream of recorded video from an ibaCapture Server:

open_framegrabber('Iba', 0, 0, 0, 0, 0, 0, 'progressive', 8, 'rgb', 'dd/MM/yyyy HH.mm:ss;2', 'false', 'server', '1', 0, 0, AcqHandle)

In this example, the server does not have user management enabled. The timestamp to start replaying is given in the “Generic” parameter. Optionally, the replay speed can also be specified, this is done by adding “;2” to the start timestamp.

Reading video from an exported MP4 file:

open_framegrabber('Iba', 0, 0, 0, 0, 0, 0, 'progressive', 8, 'rgb', ';1', 'false', '(file)', '<Path to file>', 0, 0, AcqHandle)

In this case, the "CameraType" parameter is set to “(file)”, the path to the MP4 file needs to be given in the "Device" parameter.