Installing extension packages🔗
The HALCON Extension Package Interface enables you to integrate newly developed image processing algorithms into HALCON in the form of so-called extension packages. The same mechanism is used by MVTec to extend the current HALCON release with additional functionality.
To integrate a (downloaded) package named newextpkg to use it within your HALCON system:
-
Extract the package to a directory of your choice, for example,
%HALCONROOT%. -
Add the complete path of the package, for example,
%HALCONROOT%\packages\newextpkgto the environment variableHALCONEXTENSIONS.Note
Use a semicolon as the delimiter between paths in an environment variable.
Important
Never change the name of an extension package or the corresponding names of the DLLs contained in it.
These names are encoded within the DLLs.
If you change the names, this information will no longer match.
Hence, the loader of the operating system will fail to open the dynamic libraries.
-
Extract the package to a directory of your choice, for example,
$HALCONROOT. -
Add the complete path of the package, for example,
$HALCONROOT/packages/newextpkgto the environment variableHALCONEXTENSIONS.Note
Use a colon as the delimiter between paths in an environment variable.
Important
Never change the name of an extension package or the corresponding names of the libraries contained in it.
These names are encoded within the libraries.
If you change the names, this information will no longer match.
Hence, the loader of the operating system will fail to open the dynamic libraries.
If the package contains images used, for example, within example programs, we recommend including the complete path to the corresponding images directory within the package in the environment variable HALCONIMAGES.
This enables access to those images without specifying a complete path.
Using an extension package within HDevelop🔗
To use a new package within HDevelop, just restart the program.
HDevelop automatically integrates all extension packages specified in HALCONEXTENSIONS, i.e., the operators contained in a package can be accessed and used like any other HALCON operator.
More Info
For the possible values of HALCONARCH, see the system requirements.
Include the package library subdirectory (i.e., lib/$HALCONARCH) in the environment variable LD_LIBRARY_PATH before starting HDevelop the first time.
More Info
For the possible values of HALCONARCH, see the system requirements.
Using an extension package in a stand-alone application🔗
If you want to generate a stand-alone application that uses an extension package, you have to link the package libraries (DLLs under Windows, shared libraries under Linux) to the application code, in addition to the HALCON library.
To create new application programs, link the corresponding language interface library, for example, packagecpp.lib for a C++ application, to your objects.
As for any HALCON application, you also need the HALCON interface library, for example halconcpp.lib for a C++ application.
To be able to link the package DLL to your application program, the complete DLL file path of the new package must be added to the environment variable PATH, for example:
More Info
See the system requirements for the possible values of HALCONARCH.
Important
Do not copy a package DLL into the Windows system directories, as it would be loaded twice in this case.
To create new application programs, link libnewextpkg.so and the corresponding language interface library, for example, libnewextpkgcpp.so for a C++ application, to your objects
As for any HALCON application, you also need libhalcon.so and the HALCON interface library, for example libhalconcpp.so for a C++ application.
Furthermore, you have to add the path to the package library subdirectory lib/$HALCONARCH to the environment variable LD_LIBRARY_PATH.
Otherwise, the loader will fail to access the libraries.
More Info
See the system requirements for the possible values of HALCONARCH.