HALCON
Introduction
For more information about HALCON by MVtec, we refer to the product owner´s online presence: https://www.mvtec.com/products/halcon/
HALCON can be pre-installed on the camera via /opt/halcon and can be acceses via the path variable $HALCONROOT, please contact our sales.
HALCON for ARM-based Platforms
The offical MVTec document "HALCON for ARM-based Platforms" describes the process of "compiling/cross-compiling" of HALCON applications and is linked below.
https://www.mvtec.com/fileadmin/Redaktion/mvtec.com/documentation/manuals/arm_based_platforms.pdf
The document is divided into chapters. For a better orientation we give a short overview:
Chapter 1 Using HALCON on ARM-based Platforms
Gives a general overview of using HALCON on ARM-based Platforms.
Chapter 2 Getting Started
Discribes the process of installing HALCON to an ARM-based Platform and can be skipped since the HALCON tools are pre-installed both on iam and the virtual machine.
Chapter 3 Creating Applications
Describes the process of "compiling/cross-compiling" of an HALCON application.
HALCON installation on iam
In order to aquire live frames, the halcon-runtime and halcon-GenICamTL interface has to be installed on the camera.
Halcon environment variables must be set in order for HALCON to work.
Edit halcon.sh (<directory you installed HALCON in, e.g., /opt/halcon>) accordingly to your installation and copy it to /etc/profile.d
halcon.sh:
HALCONARCH=aarch64-linux; export HALCONARCH
HALCONROOT=<directory you installed HALCON in, e.g., /opt/halcon>; export HALCONROOT
HALCONEXAMPLES=${HALCONROOT}/examples; export HALCONEXAMPLES
HALCONIMAGES=${HALCONROOT}/examples/images; export HALCONIMAGES
PATH=${HALCONROOT}/bin/${HALCONARCH}:${PATH}
export PATH
if [ ${LD_LIBRARY_PATH} ] ; then
LD_LIBRARY_PATH=${HALCONROOT}/lib/${HALCONARCH}:${LD_LIBRARY_PATH}
export LD_LIBRARY_PATH
else
LD_LIBRARY_PATH=${HALCONROOT}/lib/${HALCONARCH}; export LD_LIBRARY_PATH
fi
export XILINX_XRT=/usr
GENICAM_GENTL64_PATH=/opt/synview/cti64Use HALCON on iam
Be sure that the iAMGigEServer is stopped, before you execute halcon-framegrabber-apps.
HALCON Examples on iam
Open an SSH Shell connection to the camera. In some cases X-Server support is required.
ssh -Y root@192.168.1.10 |
There are some examples pre-installed to iam. They can be found here:
cd /home/root/040530_test_halcon |
On top of the file system see for README.md.
There is detailed information about the provided samples.
Structure of the test_HALCON folder:
The folder contains the file system below. The three examples have a similar file structure.
.
|-- README.md
|-- cpp
| |-- Makefile
| |-- test_halcon_aniso_test
| | |-- bin
| | | |-- aarch64-linux
| | | |-- find_aniso_shape_model
| | |-- makefiles
| | | |-- macros.mak
| | | |-- makefile
| | | |-- rules.mak
| | |-- source
| | | |-- find_aniso_shape_model.cpp
| | |-- vs2010
| | |-- test_halcon_aniso.sln
| | |-- test_halcon_aniso.suo
| | |-- test_halcon_aniso.vcxproj
| | |-- test_halcon_aniso.vcxproj.filters
| | |-- test_halcon_aniso.vcxproj.user
| | |-- x64
| | |-- Release
| | |-- test_halcon_aniso.exe
| |-- test_halcon_live_view
| | |-- bin
| | | |-- aarch64-linux
| | | |-- test_halcon_live_view
| | |-- makefiles
| | | |-- macros.mak
| | | |-- makefile
| | | |-- rules.mak
| | |-- source
| | | |-- test_halcon_live_view.cpp
| | |-- vs2010
| | |-- test_halcon_live_view.sln
| | |-- test_halcon_live_view.suo
| | |-- test_halcon_live_view.vcxproj
| | |-- test_halcon_live_view.vcxproj.filters
| | |-- test_halcon_live_view.vcxproj.user
| | |-- x64
| | |-- Release
| | |-- test_halcon_live_view.exe
| |-- /test_halcon_sw_trigger
| |-- bin
| | |-- aarch64-linux
| | |-- test_halcon_sw_trigger
| |-- makefiles
| | |-- macros.mak
| | |-- makefile
| | |-- rules.mak
| |-- source
| | |-- test_halcon_sw_trigger.cpp
| |-- vs2010
| |-- test_halcon_sw_trigger.sln
| |-- test_halcon_sw_trigger.suo
| |-- test_halcon_sw_trigger.vcxproj
| |-- test_halcon_sw_trigger.vcxproj.filters
| |-- test_halcon_sw_trigger.vcxproj.user
| |-- x64
| |-- Release
| |-- test_halcon_sw_trigger.exe
|-- profile_halcon
|
Description of samples:
test_halcon_aniso_test:
This sample is derived from find_aniso_shape_model.hdev (MVTec Software GmbH).
This sample is designed for testing the performance of the FindAnisoShapeModel() function.
With 50 loops a mean value of the consumed time of FindAnisoShapeModel() is evaluated.
OPTIONS:
NO_WINDOWS ; if defined no windows are shown
For executing this sample make sure that smd*.png files are inside <directory you installed HALCON>/examples/images/smd
test_halcon_live_view:
This sample is derived from error_handling_timeout.cpp (MVTec Software GmbH).
This sample is designed for testing the live view of the iam platform.
OPTIONS:
SAVE_IMAGE ; if defined, a image is saved at the end of programSET_EXPOSURE_TIME ; if defined, a exposure time is set
test_halcon_sw_trigger:
This sample is derived from error_handling_timeout.cpp (MVTec Software GmbH).
This sample is designed to show the software trigger functionality.
This sample aquires 100 software triggered frames.
No live view is implemented.
OPTIONS: