Using HALCON for Linux
MVTec HALCON is the comprehensive standard software for machine vision with an integrated development environment (HDevelop) that is used worldwide. It enables cost savings and improved time to market. HALCON’s flexible architecture facilitates rapid development of any kind of machine vision application. The following instructions describe how to configure Lucid Vision GigE cameras with HALCON for Linux.
System Specifications
- Ubuntu 16.04.3 64-bit, kernel 4.10.0.28-generic
- HALCON 13.0.1.1 (14.06.2017) 64-bit
Table of Contents
Prerequisites
Set up the HALCON environment variables:
$ export HALCONARCH=x64-linux
$ export HALCONROOT="/opt/halcon"
$ export HALCONEXAMPLES=${HALCONROOT}/examples
$ export HALCONIMAGES=${HALCONROOT}/examples/images
$ export PATH=${HALCONROOT}/bin/${HALCONARCH}:${PATH}
$ export LD_LIBRARY_PATH=${HALCONROOT}/lib/${HALCONARCH}:${LD_LIBRARY_PATH}
MVTech’s HALCON installation guide also contains a script that can be used to perform this process.
Note
This documentation assumes the Full install option is chosen at installation.
HDevelop
-
Launch HDevelop to launch HALCON’s Integrated Development Environment (IDE). HDevelop can be launched from the Start Menu.
-
Click Assistants -> Open New Image Acquisition to open an Image Acquisition window.
-
Select GigEVision under the Image Acquisition Interface dropdown.
-
Click on the Connection tab, select your camera, and click .
-
Click to grab a single frame.
-
Click to continuously grab images.
-
Click to automatically detect valid parameters for the camera.
-
Click to reset parameters to default values.
-
Click to release control of the camera.
-
Click the Parameters tab to change settings on the camera.
The Code Generation tab assists in creating code based on current settings or changes made to the camera in the Image Acquisition window. The following is an example scenario:
-
Connect to camera with DeviceUserID ‘Camera0001’
-
Set DeviceUserID = Camera0002
-
Set Width = 320
-
Set Height = 240
-
Start acquisition
-
Click Insert Code to generate the code in the Image Acquisition Program Window
HDevelop code can be exported to various programming languages by clicking File -> Export.
Note
Additional HDevelop samples can be found by clicking File -> Browse HDevelop Examples Programs.
For more information on MVTec HALCON please visit http://www.mvtec.com/products/halcon/