You are here: Start » Getting Started » SDK Installation

SDK Installation

Requirements

Adaptive Vision Library is designed to be used with GCC compiler on Linux x86_64 and embedded ARMv7 systems. Currently gcc-5.4 and arm-linux-gnueabihf-gcc-5.4 are supported, but custom build can be prepared upon the earlier contact with Adaptive Vision team. The Adaptive Vision Library is distributed as .tar.gz archive. The library is compatible with Debian-like system, including - but not limited to - Ubuntu distributions.

Linux x86_64

On PC-based Linux only dongle-type license is supported, thus the CodeMeter(tm) runtime from Wibu Systems has to be installed: http://www.wibu.com/downloads-user-software.html.

Common prerequisites

Libraries needed to link programs:

  • libopenmp
  • libpthread
  • librt
  • libdl

For some examples to build, additional libraries listed below may be needed:

  • libgtk-3-dev / libgtk2.0-dev
  • libsdl-dev
  • qt5

To build example in simple manner, GNU Make tool is needed.

Installing library (optional)

To install the library, simply unpack the provided .tar.gz and execute the provided install.sh script (sudo permissions are needed). This will put SDK files in system directories, which are by default searched by compiler. If you do not want to pollute system directories, you can use library without installation, as described below.

Compilation instructions

Directory structure

Unpacked directory consists of following entries:

  • examples/ - directory contains source files of example programs written with Adaptive Vision Library
  • include/ - this directory contains library header files
  • lib/ - here the .so file with library is stored
  • tools/ - optional directory for additional tools, like Licensing tool.
  • /README - instruction of library usage
  • /install.sh - script, which installs include/ and lib/ folders to system directories

Compilation

For compiling with Adaptive Vision Library please remember to:

  • add the include/ subdirectory to the compiler include directories: -I switch
  • add the lib/ subdirectory to the linker directories: -L switch
  • link with Adaptive Vision Library: -lavl switch
  • use -rpath in linker options, LD_LIBRARY_PATH or LD_PRELOAD of libavl.so file.
  • link with dependencies: -fopenmp -lpthread -lrt -ldl

When the library was previously installed with install.sh script, just the -lavl switch and other dependencies are needed. One can also consult makefile in the examples/ directory to see how to compile and link with Adaptive Vision Library.

Licensing and distribution

Licensing

Linux x86_64

For PC based Linux only dongle license is supported. To develop and debug programs written with Adaptive Vision Library dongle with Library license has to be inserted in systems' USB port. To run compiled binaries linked with Adaptive Vision Library dongle with LibraryRuntime license has to be present.

ARM Linux

On ARMv7 Linux only the file-base license is supported. To obtain such a license, one have to generate ComputerId. This can be done by executing the ComputerIdGenerator program, which is provided in tools/ directory, without any parameters. In response, the unique ComputerId is printed on terminal window. This ComputerId should be given to generate license, a .key file, from User Area on www.adaptive-vision.com website. Then, generated file should be downloaded to the target machine, and the ComputerIdGenerator program has to be executed, but this time path to downloaded .key license file should be passed as a parameter on the command line. This will copy the license to appropriate directory and allow for usage of Adaptive Vision Library.

Distribution

To distribute program with Adaptive Vision Library, one have to provide license (file or dongle - depending on system used) and the libavl.so. To provide the .so file, one can install SDK on target machine, but this will provide headers etc., which may be unwanted. In such case, the library file should be copied to suitable system directory, or the program has to be compiled with -rpath and relative path to the .so file. Third option is to provide a boot script, which will set LD_LIBRARY_PATH or LD_PRELOAD with libavl.so location.

Program development - general advise

The most convenient way to make programs with Adaptive Vision Library for Linux is to develop vision algorithm using Adaptive Vision Studio on Windows and then generating C++ code. This code can be further changed or interfaced with rest of the system and tested on Windows. Then, cross-compiler can be used to prepare Linux build, which will be provided to target machine. It is easy to organize work this way, because:

  • developing vision algorithm using plain C++ is hard, troublesome and error prone, but Adaptive Vision Studio makes it easy,
  • programs written with Adaptive Vision Library on Windows can be easily debugged using Visual Studio thanks to provided debug visualisers and the Image Watch extensions to Visual Studio,
  • cross compilation using virtualization solution, like Vagrant, is easy and fast, and does not force developer to use two systems simultaneously.
  • Of course, the programs can be also developed on Linux machine directly. Than a doze of work should be put into writing good Makefile. Debugging can be done by GDB, bud we do not provide debug symbols for Adaptive Vision Library.

Previous: Project Configuration Next: Usage Tips