在Linux中安装Zivid+HALCON
Zivid offers two ways of interfacing with HALCON:
Through the Zivid SDK, utilizing the C++/C# libraries available for HALCON. We provide samples for both C++ and C#. (Recommended)
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.
安装Zivid SDK
Install Zivid SDK by following the instructions on this page: 软件安装. If you install all the suggested packages, GenICamTL will be installed as well.
安装GenICamTL包
If you have installed all Zivid packages except the GenICamTL package, follow the steps below.
Start by opening a terminal window by pressing Ctrl + Alt + T keys on the keyboard.
如果您还没有,请创建一个临时文件夹并导航到里面:
mkdir Zivid && cd Zivid
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
备注
自 SDK 2.10 起,移除了对 Ubuntu 18.04 的支持。如需查看早期 SDK 版本的 Ubuntu 18.04 说明,请更改左上角的知识库版本。
备注
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
小心
GenICam/HALCON support is experimental.
为了使设置生效,您必须注销并重新登录linux或键入:
source /etc/profile.d/zivid-genicam-gentl.sh
安装HALCON
访 问 MVTec download page 并 在 Product 下选择HALCON。选择合适的版本并选 择 Linux 操作系统。根据他们的文档下载并安装HALCON。我们建议您使用经过Zivid测试过的 HALCON 版本。
设置环境变量
安装Zivid和HALCON后,必须设置或修改以下环境变量才能使HALCON正常工作。应根据HALCON的安装指南来设置环境。下面是HALCON 21.05的示例。
调整环境变量时,您应该在一个login脚本或shell资源脚本中设置变量,例如,cshrc、profile 或 bashrc。将以下shell脚本示例粘贴到文件底部:
# 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
然后,确 认 LD_LIBRARY_PATH
设置是正确的:
echo $LD_LIBRARY_PATH
开始吧!
您现在已经做好准备工作,可以去测试一些我们 的 HALCON示例 了!要启动 HALCON,请打开终端窗口并运行:
hdevelop&
Version History
SDK |
Changes |
---|---|
2.15.0 |
Added installation instructions for Jetson. |