IVT - Installation

Integrating Vision Toolkit

This tutorial describes the setup of a ready-to-use environment for programming with the IVT library under Linux. This includes the setup of the Qt library as well as an optional driver for Firewire cameras.

Linux Logo
  1. Setting up IVT
  2. Setting up Qt
  3. Optional: Setting up Firewire and libdc1394/libraw1394

1. Setting up IVT

1.1. Downloading the IVT

Download the newest version of the IVT, e.g. ivt-1.3.7.zip, at http://sourceforge.net/projects/ivt/ in the download area.

1.2. Unpacking

In a console window, change to the directory of the downloaded archive and then run the command unzip ivt-1.3.5.zip. After unpacking, the directory IVT should exist in the current directory.

1.3. Configuration

The IVT offers the possibility of configuring the library before building it. This configuration takes place in the file IVT/src/Makefile.base. In order to change the default settings, the file Makefile.base must be opened and edited with a text editor (e.g. vim). In the following, the most important configuration options available under Linux are listed. These options are configuration variables, which can be set either to 1 or 0. In order to integrate or exclude certain parts of the IVT library, the appropriate configuration variable must be set to 1 for integration and to 0 for exclusion.

Note: Only one GUI implementation can be activated at a time, i.e. USE_QTGUI and USE_GTK_GUI must not both be set to 1 at the same time.

  • USE_QT
    The IVT library is extended by classes that allow the easy creation of graphical user interfaces with Qt. The associated source files with the file names QT* are located in IVT/src/gui. The default settings for the include paths and library paths assume Qt4 to be installed.
    The IVT library implements an own multi-platform GUI toolkit, which is used by the example applications. Under Linux, a Qt as well as a GTK implementation are available. The Qt implementation can be activated with this flag. When setting QT_GUI = 1, then USE_QT = 1 must also be set.
    The IVT library implements an own multi-platform GUI toolkit, which is used by the example applications. Under Linux, a Qt as well as a GTK implementation are available. The GTK implementation can be activated with this flag.
    The IVT library allows easy access to OpenGL and GLU. The GUI toolkit of the IVT allows the creation of GL widgets. Furthermore, the class COpenGLVisualizer sets up the projection model for a given instance of the class CCalibration.
  • USE_V4L
    An interface to Video for Linux (V4L) enables the control of most USB cameras (e.g. webcams). The class CV4LCapture implements the capture module.
  • USE_LIBDC1394 or USE_LIBDC1394_V2
    An interface to the library libdc1394 enables the control of IEEE1394 cameras (firewire cameras). For using version 1.x of libdc1394 USE_LIBDC1394 = 1 must be set and the class CLinux1394Capture must be used. For using version 2.x of libdc1394 USE_LIBDC1394_V2 = 1 must be set and the class CLinux1394Capture2 must be used. It is recommended to use the more current version 2.x.
    The IVT library optionally integrates calls to the OpenCV library. The file names of the source files implementing encapsulated calls to the OpenCV have the ending CV.h and CV.cpp, respectively.
    HighGUI is part of the OpenCV library. It is needed for the optional IVT classes CCVCamCapture, COpenCVCapture, CVideoWriterCV, CHaarClassifierCV, COpenCVApplicationHandler, COpenCVWindow and the namespace ImageAcessCV.

Apart from these variables, the directory paths to include and library files as well as the file names of the libraries can be changed in the lower part of the file. Most of the paths are set automatically by using pkg-config. If pkg-config is not available, hardcode paths are set, which usually correspond to the default installation paths. However, these paths can differ, depending on the Linux distribution. Modifying the paths is only recommended, if problems arise with the default paths. For manual adjustment of the paths, a short explanation of the appropriate variables is given in the following:

    Contains all directory paths to included files. Adding a path takes place by using the operator += and adding the path with the leading parameter -I. For example INCPATHS_BASE += -I/usr/include/QtCore
    Contains all directory paths to library files. Adding a path takes place by using the operator += and adding the path with the leading parameter -L. For example LIBPATHS_BASE += -L/usr/share/qt4/lib
    Contains all file names of the libraries. Adding a file name takes place by using the operator += and adding the file name with the leading parameter -l. For example LIBS_BASE += -lQtCore

1.4. Building the IVT libraries

The libraries are built by running the command make in the directory IVT/src. If after having built the IVT library once, modifications are made to the IVT files located in IVT/src, it is recommended to run the command make clean before running the command make, in order to enforce a complete new build process.

1.5. Example application

For checking the installation, and as an introduction to programming with the IVT, the most simple example application is SimpleApp. SimpleApp doesn't use a GUI and thus doesn't require Qt or any other libraries to be installed. It is found in IVT/examples/SimpleApp. After changing to the directory SimpleApp, an executable file with the name simpleapp is created by running the command make. If the application is started with
./simpleapp ../../files/scene_left.bmp,
then a file called output.bmp is produced in the same directory. There are numerous further example applications in the directory IVT/examples, with which the features of the IVT can be tested and learned. For checking Qt support, e.g. the example application in IVT/examples/FilterDemo can be used.

2. Setting up Qt

For the installation of Qt, a so-called package tool is recommended. It is important to make sure that a developer package of Qt version 4 (Qt4) is installed. Qt3 is also supported, but the default settings in the file Makefile.base assume Qt4. For instance, under Debian Linux, Qt4 is installed with:
apt-get install qt4-dev-tools.

3. Optional: Setting up Firewire and libdc1394/libraw1394

3.1. Installation of libdc1394/libraw1394

The two libraries libdc1394 and libraw1394 can also be installed with a package tool. For instance, under Debian Linux, the libraries are installed with:
apt-get install libraw1394 and apt-get install libdc1394.

3.2. Installing a firewire camera

In order to use a firewire camera under Linux, the four kernel modules named raw1394, video1394, ohci1394 and ieee1394 must be loaded. This is accomplished under Debian Linux using the command modprobe. modprobe raw1394 and modprobe video1394 are sufficient to activate all four modules. With the command lsmod | grep 1394, it can be checked whether the four modules have been successfully loaded. This command should list the above mentioned four modules. If this should not be the case, try to add each module individually with the command modprobe.
In order to allow a user or an application to access the interface to the camera, the user has to be registered in the appropriate groups (usually video) of the devices /dev/raw1394 and /dev/video1394, or the user privileges of the devices must be set appropriately. For this, root privileges are necessary.