ViSP  2.10.0
Tutorial: Installation from source on Linux openSUSE

In this tutorial you will learn how to install ViSP from source on openSUSE. These steps have been tested for openSUSE 13.2 (x86_64) distribution, but should work with any other distribution as well.

Note
Concerning ViSP installation, we provide also other Tutorials.

Required packages

  • gcc 4.4.x or later. This can be installed with:
    sudo zypper install gcc-c++
  • CMake 2.6 or higher that could be installed with:
    sudo zypper install cmake

ViSP is interfaced with several optional third-party libraries. The installation of the corresponding packages is described in Optional 3rd party packages section.

Getting ViSP source code

There are different ways to get ViSP source code:

  • You can download the latest stable release as a zip or a tarball. Once downloaded, uncompress the file using either
    tar xvzf ViSP-2.10.0.tar.gz
    or
    unzip ViSP-2.10.0.zip
  • You can also download a more recent snapshot. Once downloaded, uncompress the file using
    unzip ViSP-2.y.z-snapshot-2015.mm.dd.zip
  • Or you get the cutting-edge ViSP from Subversion repository. To this end you have first to install subversion
    sudo zypper install subversion
    and then use the following command
    svn checkout svn://scm.gforge.inria.fr/svn/visp/trunk/ViSP ViSP-trunk

We suppose now that ViSP source is in a directory denoted <source_dir>, for example $HOME/ViSP-2.10.0

Configuring ViSP from source

  • Create first a directory denoted <binary_dir> where you want to build ViSP. This directory will contain generated Makefiles, object files, and output libraries and binaries.
    cd $HOME; mkdir ViSP-build-release
  • Enter the <binary_dir> and to configure the build type:
    cmake [<optional parameters>] <source_dir>
    For example:
    cd $HOME/ViSP-build-release
    cmake -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_SHARED_LIBS=ON ../ViSP-2.10.0
    A more versatile way to configure the build is to use ccmake, the CMake GUI:
    ccmake ../ViSP-2.10.0
    The following image shows that this command allows to configure (just by pressing [c] key) the build in a more advanced way where some options could be easily turned On/Off. It allows also to see which are the 3rd parties that will be used.
    img-ccmake-opensuse.png
    Snapshot of the ccmake ../ViSP-2.10.0 command used to configure ViSP.
  • There is an other way to see which are the 3rd parties that are found during the configuration stage and that will be used by ViSP during the build. To this end you can have a look to the text file named ViSP-third-party.txt and located in <binary_dir>. We provide hereafter an example of a possible content of this file:
    ViSP third-party libraries
    Below you will find the list of third party libraries used to
    build ViSP on your computer.
    Mathematics:
    Gnu Scientific Library : no
    Lapack/blas : no
    Simulator:
    Ogre simulator : no
    \- Ogre3D : no
    \- OIS : no
    Coin simulator :
    \- Coin3D : no
    \- SoWin : no
    \- SoXt : no
    \- SoQt : no
    \- Qt4 : no
    \- Qt3 : no
    Robots
    Afma6 : no
    Afma4 : no
    Biclops : no
    Ptu46 : no
    Pioneer : no
    Viper S650 : no
    Viper S850 : no
    Video devices (display)
    X11 : no
    GTK : no
    OpenCV : no
    GDI : no
    Direct3D : no
    Framegrabbers
    Firewire libdc1394-1.x : no
    Firewire libdc1394-2.x : no
    Video For Linux Two : no
    DirectShow : no
    CMU 1394 Digital Camera SDK : no
    OpenCV : no
    Specific devices
    Yarp : no
    Kinect : no
    \-libfreenect : no
    \-libusb-1.0 : no
    \-pthread : yes
    Video and image Read/Write:
    FFMPEG : no
    libjpeg : no
    libpng : no
    Misc:
    XML2 : no
    pthread : yes
    OpenMP : yes
    zbar : no
    dmtx : no
    Documentation:
    Doxygen : no
    Graphviz dot : no
    ViSP built with C++11 features: no
    In our case, only pthread an OpenMP 3rd parties are detected.

Optional 3rd party packages

As mentioned previously, ViSP is interfaced with some 3rd party libraries. The complete list is provided here. We recommend to install the following:

  • OpenCV
    sudo zypper install opencv-devel
  • libX11 to be able to open a window to display images
    sudo zypper install libX11-devel
  • lapack and gsl to benefit from optimized mathematical capabilities
    sudo zypper install lapack-devel gsl-devel
  • libv4l to grab images from usb or analogic cameras
    sudo zypper install libv4l-devel
  • libxml2 to be able to configure the model-based trackers from xml files
    sudo zypper install libxml2-devel
  • libjpeg and libpng to support jpeg and png images
    sudo zypper install libjpeg8-devel libpng-devel

Once installed, if you want that ViSP exploit the new 3rd parties, you have to configure ViSP again.

ccmake ../ViSP-2.10.0

The following image shows now that all the previous optional 3rd parties are detected.

img-ccmake-opensuse-all.png
Snapshot of the ccmake ../ViSP-2.10.0 command used to configure ViSP after installation of optional 3rd party libraries.
Note
Other 3rd party libraries are interfaced with ViSP. This is for example the case of Ogre that can be used to enhance the visibility computation of the faces that are tracked with the model-based tracker (see Tutorial: Model-based tracking), or Coin that can be used to parse vrml files that describe the 3D model of the object to track using the same model-based tracker. It seems that these 3rd parties are not packaged on openSUSE. If you want to use these 3rd parties, you have to install them from source code.

Generating Makefiles

To generate the makefiles, just press [g] key in the ccmake gui.

Now we can build ViSP.

Known issues

  • Note that with openSUSE 12.04 but also with 13.02, libjpeg-devel package lead to libjpeg62.so installation, that may conflict with libjpeg8.so that is also installed. That's why we recommend to not install libjpeg-devel, but rather install libjpeg8-devel.
    Linking CXX executable HelloWorld
    /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: warning: libjpeg.so.8, needed by /usr/lib64/libopencv_highgui.so.2.4.9, may conflict with libjpeg.so.62

Building ViSP from source

  • To build ViSP proceed with:
    make -j4
  • To install ViSP proceed with:
    sudo make install
  • To build ViSP documentation, you have first to install Doxygen package:
    sudo zypper install doxygen graphviz
    Then you can proceed with:
    make visp_doc

You are now ready to see the next Tutorial: How to create and build a CMake project that uses ViSP on Unix or Windows that will show you how to use ViSP as a 3rd party to build your own project.