Chapter 1   Introduction

HALCON can be extended by up to 99 additional operator packages. During the initialization of the system all packages indicated by the environment variable HALCONEXTENSIONS are automatically loaded. A package typically contains libraries with the new operators, their prototypes, the operator information needed by HDevelop, and the HTML online documentation. For the programming of such a package the HALCON Extension Package Interface is used, e.g., to manipulate parameters of HALCON operators and to read or write iconic data (images, regions, XLDs1)) from the HALCON database of iconic objects.

Furthermore, the operators provided by HALCON itself are also based on the functionality of the Extension Package Interface. Thus, the Extension Package Interface is both the interface between application programs and the operator layer of the HALCON system and the interface between the operator layer and the iconic object database.

A reason why to extend the capabilities of HALCON by using the Extension Package Interface might be one of the following:

Once the user has extended HALCON by a package containing his/her own operators, they can be used within all supported host-languages, and the interactive tool HDevelop.

This chapter gives a short introduction to HALCON packages and operators, including an example describing the integration of a simple operator. The following chapters present detailed information that will allow you to write your own packages. As a common example, a package called halconuser will be used (see %HALCONEXAMPLES%\extension_package\halconuser).

Except in Linux/macOS specific sections in this manual file paths and environment variables are printed in the Windows convention, e.g.,

    %HALCONEXAMPLES%\extension_package\halconuser to denote the subdirectory halconuser containing an example package within the HALCON base directory referenced by the environment variable HALCONEXAMPLES. The same expression in Linux convention would look like

    $HALCONEXAMPLES/extension_package/halconuser On macOS, replace $HALCONEXAMPLES with /Users/Shared/Library/Application Support/HALCON-21.05/examples.

1) eXtended Line Description; i.e., subpixel contours and polygons.