The Linux SDK is provided as a Debian package (imago-sdk*.deb
) which gets installed onto the device. The SDK is normally preinstalled and included in the provided OS images.
Requirements
Installation requires a Debian based Linux Distribution like Ubuntu.
The Debian package has the following dependencies:
- libc6 ≥ 2.24: GNU C Library
- libstdc++6: GNU Standard C++ Library
- make: GNU Make
- binutils: GNU assembler, linker and binary utilities
- dkms (Dynamic Kernel Module Support Framework)
The following packages are recommended for development:
- g++: GNU C++ compiler
- python3: For using the Python bindings
Installation
The following command can be used to install or update SDK:
sudo dpkg -i imago-sdk_<version>_<architecture>.deb
Previously installed versions will be removed automatically.
The package can also be installed with apt to install all dependencies (e.g. dkms):
sudo apt update
sudo apt install ./imago-sdk_<version>_<architecture>.deb
Use the following command to show the installed SDK version on the device:
apt list --installed | grep -e imago-sdk -e agexsdk -e vcxmsdk -e vspvsdk
Beginning with version 1.6.8.3, the changelog can be listed by:
apt changelog -o Acquire::Changelogs::AlwaysOnline=false imago-sdk
Python bindings
Python 3 bindings are provided for the VisionBox Interface Library (package vib) and for the FG Camera Library (package fg). If the python3-pip package is present during installation of the SDK, the Python bindings will be installed automatically into the system site directory.
The SDK directory /opt/ImagoTechnologies/SDK/python contains Python wheels and the source code to build the packages.
Install packages from Python wheels
To install the packages vib and fg manually from the provided wheel files, enter the following commands:
~# apt-get update
~# apt-get install python3-pip
~# python3 -m pip install --upgrade --no-index --find-links=file:///opt/ImagoTechnologies/SDK/python vib
~# python3 -m pip install --upgrade --no-index --find-links=file:///opt/ImagoTechnologies/SDK/python fg
Build and install packages from source
The shell script /opt/ImagoTechnologies/SDK/python/build_and_install.sh can be used to build and install the Python bindings from source. An internet connection is required. The script performs the following steps:
Install and update pip to the newest version, assuming python3 is the executable for Python 3:
~# apt-get update
~# apt-get install python3-pip python3-dev
~# python3 -m pip install --upgrade pip
...
Build and install the library bindings:
~# python3 -m pip install /opt/ImagoTechnologies/SDK/python/vib
...
Successfully built vib
Installing collected packages: vib
Successfully installed vib-1.7.4.0
~# python3 -m pip install /opt/ImagoTechnologies/SDK/python/fg
...
Driver installation
The SDK package uses the DKMS framework to automatically build and install the required kernel modules for the running Linux kernel. A reboot is required to load the new drivers.
An update of the Linux kernel will trigger a rebuild of the modules for the new kernel. The rebuild can also be triggered manually by using the following command:
dpkg-reconfigure imago-sdk
- Note
- The system must have the correct Linux kernel headers installed before installing the SDK package. The kernel headers can usually be found in /usr/src/linux-headers-<kernel version>.
- Building of the modules may fail if the major version of the installed GCC compiler is different from the version that was used for building the kernel.
- In order to update the Linux kernel, first install the kernel headers package (linux-headers-*.deb) and then the kernel image package (linux-image-*.deb).
- In order to update both the Linux kernel and the SDK without rebooting in between, first install the SDK and then the kernel.
- Automatic rebuild of the drivers after a kernel update may fail on Debian 9 systems. Enter the command above to trigger a manual rebuild.