Virtual Image Acquisition Interface (File Interface)

Interface: File
Revision: 24.11.8
Date: 2026-03-06

General

This page provides the documentation of the HALCON virtual image acquisition interface which allows reading images from file(s) by using the regular operators of the HALCON image acquisition interface. Registered customers can download the latest revision of this interface from the MVTec WWW server.

Introduction

The HALCON virtual image acquisition interface allows you to load images and image sequences from files by using the regular image acquisition operators open_framegrabber, grab_image, grab_image_async and close_framegrabber. Thus, you are able to test and debug your image acquisition application without having installed a real frame grabber board or camera in your computer. All you have to do is to choose "File" in the parameter Name of open_framegrabber and to give the proper file name of the image(s) to be loaded in the parameter CameraType. The CameraType parameter can be either the name of a

Examples for using the HALCON virtual image acquisition interface can be found in the directory %HALCONEXAMPLES%/hdevelop/Image/Acquisition. An example for a sequence file can be found in %HALCONEXAMPLES%/images/pendulum/.

System Requirements

Interface Versioning

MVTec interfaces for digital I/O and image acquisition are always compatible to a range of HALCON versions. Therefore, the versioning scheme both describes the compatibility of the interface and also the revision of the interface itself. An interface version always consists of three numbers, separated by dots, i.e. 24.11.5. The first two numbers describe the minimum HALCON version the interface is compatible with. For the example version 24.11.5 this means that the interface is compatible with all HALCON versions since HALCON 24.11. The last number describes the revision of the interface, in this example this is revision 5.

Installation

Only when installing or updating the interface manually follow these steps:

Parameters for info_framegrabber

Parameter Value List Type Kind Description
'bits_per_channel' [] Unused.
'camera_type' ['CAMFILE:', 'tif;tiff;gif;bmp;jpg;jpeg;jp2;png;pcx;pgm;ppm;pbm;xwd;avi;seq', '<example_dir>/images'] string pre-defined Syntax for file format and path.
'color_space' [] Unused.
'defaults' [1, 1, 0, 0, 0, 0, 'default', -1, 'default', -1.0, 'false', 'printer_chip/printer_chip_01', '', 1, 2] mixed pre-defined Default values for open_framegrabber.
'device' [] Unused.
'external_trigger' [] Unused.
'field' [] Unused.
'general' [] string pre-defined Information about the HALCON File interface.
'generic' [] Unsupported query.
'horizontal_resolution' 1 integer pre-defined Value list for horizontal resolution.
'image_height' [] Unsupported query.
'image_width' [] Unsupported query.
'info_boards' 'device:default' string pre-defined Pre-defined list for device.
'parameters' ['<parameters>'] string pre-defined Pre-defined parameters of the HALCON interface.
'parameters_readonly' ['<parameters>'] string pre-defined Pre-defined read-only parameters of the HALCON interface.
'parameters_writeonly' ['<parameters>'] string pre-defined Pre-defined write-only parameters of the HALCON interface.
'port' [] Unused.
'revision' '<revision>' string pre-defined Revision number of the File interface.
'start_column' [] Unsupported query.
'start_row' [] Unsupported query.
'vertical_resolution' 1 integer pre-defined Value list for vertical resolution.

Parameters for open_framegrabber

Parameter Values Default Type Description
Name 'File' string Name of the HALCON interface.
HorizontalResolution --- Ignored.
VerticalResolution --- Ignored.
ImageWidth --- Ignored.
ImageHeight --- Ignored.
StartRow --- Ignored.
StartColumn --- Ignored.
Field --- 'default' Ignored.
BitsPerChannel --- -1 Ignored.
ColorSpace --- Ignored.
Generic --- Ignored.
ExternalTrigger --- Ignored.
CameraType '<filename>' or '<directory>' 'printer_chip/printer_chip_01' string The camera type parameter is used to specify the name of either a single image file, an AVI file (Windows only!), a sequence file containing the file names of a whole image sequence, or a directory (see introduction above).
Device --- Ignored.
Port --- Ignored.
LineIn --- Ignored.

Parameters for set_framegrabber_param

Parameter Values Default Type Description
'frame_number' <number> integer Number of the next frame to be grabbed by grab_image or grab_image_async. AVI format only.

Parameters for get_framegrabber_param

There may exist additional read-only parameters with the following postfixes:

All these postfixed parameter names are not returned when calling info_framegrabber(.., 'parameters', ..) and are used to enable the easy parameterization via a generic graphical user interface, particularly the HDevelop Image Acquisition Assistant.

Parameter Values Default Type Kind Description
'bits_per_channel' <default> -1 integer pre-defined The value is not used, so a default value is returned.
'camera_type' '<filename>' 'printer_chip/printer_chip_01' string pre-defined Current camera type.
'color_space' ['gray', 'multichannel'] 'gray' string pre-defined 'gray' is used for 1-channel images, 'multichannel' otherwise.
'device' '<filename>' string dynamic Returns the file name of the next image.
'external_trigger' '<default>' 'false' string pre-defined The value is not used, so a default value is returned.
'field' '<default>' 'progressive' string pre-defined The value is not used, so a default value is returned.
'first_frame' <number> integer dynamic Number of the first frame of the AVI video stream. AVI format only.
'frame_number' <number> integer dynamic Number of the next frame to be grabbed by grab_image or grab_image_async. AVI format only.
'generic' <default> -1 mixed pre-defined The value is not used, so a default value is returned.
'horizontal_resolution' <default> 1 integer pre-defined The value is not used, so a default value is returned.
'image_height' <height> 0 integer pre-defined Height of the image in pixels.
'image_width' <width> 0 integer pre-defined Width of the image in pixels.
'last_frame' <number> integer dynamic Number of the last frame of the AVI video stream. AVI format only.
'line_in' <default> 2 integer pre-defined The value is not used, so a default value is returned.
'name' 'File' string pre-defined Name of the HALCON interface.
'port' <default> 1 integer pre-defined The value is not used, so a default value is returned.
'revision' '<revision>' string pre-defined Revision number of the File interface.
'start_column' <default> 0 integer pre-defined The value is not used, so a default value is returned.
'start_row' <default> 0 integer pre-defined The value is not used, so a default value is returned.
'vertical_resolution' <default> 1 integer pre-defined The value is not used, so a default value is returned.

Operator set_framegrabber_lut

Not supported by this interface.

Operator get_framegrabber_lut

Not supported by this interface.

Operator set_framegrabber_callback

Not supported by this interface.

Operator get_framegrabber_callback

Not supported by this interface.

Operator grab_image_start

Starts a new asynchronous grab. See also grab_image_start.

Operator grab_image

grab_image starts a new synchronous grab. See also grab_image. Note that the interface converts the image from the device to the desired image format specified by the parameters 'image_width', 'image_height', 'start_row', 'start_column', 'bits_per_channel', and 'color_space'.

Operator grab_image_async

grab_image_async returns an image and starts the next asynchronous grab. See also grab_image_async. Note that the interface converts the image from the device to the desired image format specified by the parameters 'image_width', 'image_height', 'start_row', 'start_column', 'bits_per_channel', and 'color_space'.

Operator grab_data

Not supported by this interface.

Operator grab_data_async

Not supported by this interface.

Operator close_framegrabber

This operator closes the device. See also close_framegrabber.

HDevelop Examples

For this interface there are the following examples available:

Release Notes


Legal disclaimer regarding hyperlinks: This page may provide users with access by hypertext links to external, non-MVTec websites. Any such access is provided with the understanding that the contents of non-MVTec sites are beyond the control of MVTec Software GmbH, that MVTec Software GmbH makes no representations whatsoever about such sites, and that users shall proceed at their own risk. MVTec Software GmbH is not responsible for the privacy practices or the content of external, non-MVTec websites.
Copyright notes: © Copyright MVTec Software GmbH. All rights reserved. Unless otherwise stated, the copyright and similar rights in the contents of this page, including but not limited to all text, designs and images appearing herein, are copyrighted works owned by MVTec Software GmbH. "MVTec Software GmbH" and "HALCON" are registered trademarks of MVTec Software GmbH. All other brand names, designs, service marks and trademarks (whether or not registered) referenced or used herein are the property of their respective owners.