Install Zivid + HALCON for LINUX

Zivid offers two ways of interfacing with HALCON:

  1. Through the Zivid SDK, utilizing the C++/C# libraries available for HALCON. We provide samples for both C++ and C#. (Recommended)

  2. Directly through a GenICam GenTL producer that comes with the Zivid Software.

To go with the second option, follow the steps below. To get started with the recommended option, follow the samples for your preferred programming language.

Install Zivid SDK

Install Zivid SDK by following the instructions on this page: Software Installation. If you install all the suggested packages, GenICamTL will be installed as well.

Installing GenICamTL package

If you have installed all Zivid packages except the GenICamTL package, follow the steps below.

  1. Start by opening a terminal window by pressing Ctrl + Alt + T keys on the keyboard.

  2. If you have not yet, create a temporary folder and navigate into it:

    mkdir Zivid && cd Zivid
    
  3. Download and install the GenICamTL package:

    wget https://downloads.zivid.com/sdk/releases/2.15.0+5fcc365b-1/u24/amd64/zivid-genicam_2.15.0+5fcc365b-1_amd64.deb
    sudo apt install ./zivid-genicam_2.15.0+5fcc365b-1_amd64.deb
    
    wget https://downloads.zivid.com/sdk/releases/2.15.0+5fcc365b-1/u22/amd64/zivid-genicam_2.15.0+5fcc365b-1_amd64.deb
    sudo apt install ./zivid-genicam_2.15.0+5fcc365b-1_amd64.deb
    
    wget https://downloads.zivid.com/sdk/releases/2.15.0+5fcc365b-1/u20/amd64/zivid-genicam_2.15.0+5fcc365b-1_amd64.deb
    sudo apt install ./zivid-genicam_2.15.0+5fcc365b-1_amd64.deb
    

    Note

    Support for Ubuntu 18.04 is removed since SDK 2.10. To see Ubuntu 18.04 instructions for an earlier SDK version, change the Knowledge Base version in the top left corner.

    Note

    The JetPack SDK version you use, if you use JetPack, determines which Zivid deb packages to install.

    • JetPack SDK 5 includes Nvidia Jetson Linux 35 which is based on Ubuntu 20.04.

    • JetPack SDK 6 includes Nvidia Jetson Linux 36 which is based on Ubuntu 22.04.

    wget \
    https://downloads.zivid.com/sdk/releases/2.15.0+5fcc365b-1/u22/arm64/zivid-genicam_2.15.0+5fcc365b-1_arm64.deb
    sudo apt install ./zivid-genicam_2.15.0+5fcc365b-1_arm64.deb
    
    wget \
    https://downloads.zivid.com/sdk/releases/2.15.0+5fcc365b-1/u20/arm64/zivid-genicam_2.15.0+5fcc365b-1_arm64.deb
    sudo apt install ./zivid-genicam_2.15.0+5fcc365b-1_arm64.deb
    

    Caution

    GenICam/HALCON support is experimental.

In order for the setup to take effect, you must either log out and back in on linux or type:

source /etc/profile.d/zivid-genicam-gentl.sh

Install HALCON

Visit MVTec download page and under Product choose HALCON. Choose an appropriate version and select Linux as operating system. Download and install HALCON according to their documentation. We recommend that you use a HALCON version that has been tested by Zivid.

Set environment variables

After the installation of Zivid and HALCON, the following environment variables must be set or modified in order for HALCON to work. The environments should be set according to HALCON’s installation guide. An example for HALCON 21.05 follows.

To adjust the environment variables you should set the variables in a login script or a shell resource script, e.g., cshrc, profile or bashrc. Paste the following sample shell script in at the bottom of the file:

# Sample shell script for HALCON environment settings
# (sh syntax)
# If you are using the Bourne shell source this file with the following
# command:
# source .profile_halcon
HALCONARCH=x64-linux; export HALCONARCH
HALCONROOT="/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

Afterwards, verify that LD_LIBRARY_PATH is set correctly:

echo $LD_LIBRARY_PATH

Get started!

You are now ready to go and try out some of our HALCON samples! To launch HALCON, open a terminal window and run:

hdevelop&

Version History

SDK

Changes

2.15.0

Added installation instructions for Jetson.