HALCON is a product of MVTec Software GmbH.
Did you ever ask yourself: "What's the meaning of all these different data types in HALCON?". Here's an interactive overview. First, select the configuration of HALCON you are using. Then click on the data type nodes in the tree to see details.
Please contact us for commercial service offerings.
Currently we support data types of HALCON 11 and HALCON 12. Select the major version you are using.
The used architecture of HALCON. The x64-* architectures can only be used on an x64 operating system. Available architectures depend on the selected product version.
HALCON comes in two variants: standard and XL. HALCON XL is optimized for large images (larger than 32k x 32k).
Show additional fields and additional details.
Interactive HALCON datatype explorer. Reveal the details of the HALCON machine vision library.
Click on a node on the left to see details here.
Please contact us for commercial service offerings.
An object or iconic variable is one of the two most basic types used in HALCON. The other basic type is a tuple or control variable. HALCON operators can have input objects, output objects, input tuples, and output tuples (if used they always appear in this sequence in an operator's function signature).
An object can consist of a practically arbitrary number of images, regions, XLD contours,XLD polygons, and XLD parallel contours, these can be mixed within one object, too.
An empty object containing zero elements may be created with the operator gen_empty_obj.
The internal representation of the region chords can be accessed by calling the operator get_region_runs.
By default, HALCON clips regions ( get_system ('clip_region', ClipRegion) returns ClipRegion := 'true') to a maximum size of 512 x 512 ( get_system ('height', Height) returns Height := 512). You can change this behavior with set_system ('clip_region', "false") .
An empty region (area = 0) may be created with the operator gen_empty_region.
A channel contains the gray value data for one component of the pixels. Unlike many formats encountered in other applications, HALCON separates multiple channels in memory, so the internal layout for an RGB image is something like ['RRRRR...', 'GGGGG...', 'BBBBB...'] in HALCON and not ['RGBRGBRGB...'] as one might eventually expect.. All channels have the size (width and height) of the parent image but each channel can have a different channel type.
The number of channels can be determined by calling the operator count_channels.
A single channel can be accessed by calling the operator access_channel or decompose2 (2-channel image), decompose3 (3-channel image), decompose4, decompose5, decompose6, or decompose7.
A domain is the region or ROI bound to an image that defines which region HALCON operators consider when applied to that image.
For more details see the description of region.
Each channel of an image contains a linearized array of gray values, e.g. the red components of all pixels in the image.
In HALCON, one row of pixels equals exactly the stride, i.e. there is no special alignment of pixels that start a new row. The maximum number of pixels is defined through HIMGCNT, i.e. the maximum number of pixels is .
The number of pixels can be determined by calling the operator get_image_pointer1 or get_image_size. Then NumPixels := Height * Width .
The height of an image is defined as HIMGDIM, i.e. the maximum height of an image is . Be aware that the maximum image coordinate is defined to be HIMGCOOR though, see also the description of image.
The height of an image can be determined by calling the operator get_image_size.
The width of an image is defined as HIMGDIM, i.e. the maximum width of an image is . Be aware that the maximum image coordinate is defined to be HIMGCOOR though, see also the description of image.
The height of an image can be determined by calling the operator get_image_size.
byte | 1 byte per pixel, unsigned | 0..255 |
int1 | 1 byte per pixel, signed | -128..127 |
uint2 | 2 bytes per pixel, unsigned | 0..65535 |
int2 | 2 bytes per pixel, signed | -32768..32767) |
int4 | 4 bytes per pixel, signed | -2147483648..2147483647) |
int8 | 8 bytes per pixel, signed (only available on 64 bit systems) | -9223372036854775808..9223372036854775807) |
real | 4 bytes per pixel, floating point | -3.4e38..3.4e38 6 significant decimal digits |
complex | Two matrices of type real | |
vector_field_relative | Two matrices of type real | Interpretation: Vectors |
vector_field_absolute | Two matrices of type real | Interpretation: Absolute coordinates |
direction | 1 byte per pixel, unsigned | 0..179 Interpretation: Angle divided by two |
cyclic | 1 byte per pixel, unsigned, cyclic arithmetics | 0..255 |
The type of a channel can be determined by calling the operator get_image_pointer1 or get_image_type.
A single run or chord of a region.
The maximum number of runs or chords is defined through HITEMCNT, i.e. the maximum number of runs or chords is .
The row of a single run or chord of a region.
The row is defined through HIMGCOOR, i.e. the maximum row is .
The column in which a single run or chord of a region begins, including the column itself.
The column is defined through HIMGCOOR, i.e. the maximum column is .
The length of a run is given by Length := ColumnEnd - ColumnStart + 1 .
The column in which a single run or chord of a region ends, including the column itself.
The column is defined through HIMGCOOR, i.e. the maximum column is .
The length of a run is given by Length := ColumnEnd - ColumnStart + 1 .
A tuple or control variable is one of the two most basic types used in HALCON. The other basic type is an object or iconic variable. HALCON operators can have input objects, output objects, input tuples, and output tuples (if used they always appear in this sequence in an operator's function signature).
Many operators on (large) tuples will work faster if all data types in a tuple are the same.
The tuple length is defined by Hlong, i.e. the maximum number of elements in a tuple is .
An empty object containing zero elements may be created with Tuple := [] .
A tuple can contain integers, defined as Hlong.
An integer is defined by Hlong, i.e. the minimum value is and the maximum value is .
A tuple can contain real numbers, defined as double.
Double has a minimum value of and a maximum value of .
A tuple can contain strings (0-terminated). Strings are defined using single quotes in HALCON (e.g. 'str').