Visual Servoing Platform  version 3.1.0 under development (2017-11-25)
Tutorial: Installation from source for Linux CentOS

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

Note
Concerning ViSP installation, we provide also other Tutorials.

Install prerequisities

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

Install 3rd parties

ViSP is interfaced with several 3rd party libraries. The complete list is provided here.

Recommended 3rd parties

We recommend to install the following:

  • OpenCV
    $ sudo yum install opencv-devel
  • libX11 to be able to open a window to display images
    $ sudo yum install libX11-devel
  • lapack to benefit from optimized mathematical capabilities
    $ sudo yum install lapack-devel
  • libv4l to grab images from usb or analogic cameras
    $ sudo yum install libv4l-devel
  • libxml2 to be able to configure the model-based trackers from xml files
    $ sudo yum install libxml2-devel

Other optional 3rd parties

We give also the way to install other 3rd party libraries to enable specific capabilities.

  • libjpeg and libpng to support jpeg and png images respectively (only useful if OpenCV is not installed)
    $ sudo yum install libjpeg-devel libpng-devel

Install ViSP from source code

Create a workspace

  • First create a workspace in $HOME/visp-ws that will contain ViSP source, build and dataset.
    $ export VISP_WS=$HOME/visp-ws
    $ mkdir -p $VISP_WS

Getting ViSP source code

There are different ways to get ViSP source code:

  • You can download the latest release as a zip or a tarball. Once downloaded, uncompress the file using either
    $ tar xvzf visp-x.y.z.tar.gz -C $VISP_WS
    or
    $ unzip visp-x.y.z.zip -d $VISP_WS
  • You can also download a daily snapshot. Once downloaded, uncompress the file using
    $ tar xvzf visp-snapshot-yyyy-mm-dd.tar.gz -C $VISP_WS
  • Or you get the cutting-edge ViSP from GitHub repository using the following command
    $ cd $VISP_WS
    $ git clone https://github.com/lagadic/visp.git

We suppose now that ViSP source is in the directory $VISP_WS/visp. The following should be adapted if you downloaded ViSP from a zip or tarball. In that case, the source is rather in something like $VISP_WS/visp-x.y.z.

Configuring ViSP from source

  • In the worspace, create first a directory named visp-build that will contain all the build material; generated Makefiles, object files, output libraries and binaries.
    $ mkdir $VISP_WS/visp-build
  • Enter the visp-build folder and configure the build:
    $ cd $VISP_WS/visp-build
    $ cmake ../visp
    A more versatile way to configure the build is to use ccmake, the CMake GUI:
    $ ccmake ../visp
    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. To generate the makefiles, just press [g] key in the ccmake gui.
    img-ccmake-centos-all.jpg
    Snapshot of the ccmake ../visp command used to configure ViSP.

Building ViSP libraries

  • To build ViSP libraries proceed with:
    $ cd $VISP_WS/visp-build
    $ make -j4
Note
Installing ViSP is optional, since ViSP could be used as a 3rd party without installation. To proceed with the installation run:
$ cd $VISP_WS/visp-build
$ sudo make installmake -j4
The follownwnloao do with:
$ cd $VISP_WS/visp-build
$ make -j./visp
$ make -j4
ild/div> The followied Makefiltation$HOME/vi/visp-build
Enter tIovide see w tsiconfigue the makadvancee list istationcan be i adapted chievfilsViSP soUI: ON that wiode>class="fragment">
$ cd $VISP/visp
< -DENABLE_FULL_DOC=ON tiv>$ make -j4
ild/div> The fo/ul>

Installstall ViSP from so>
  • gcc 4.4Sionsom sos.html">ickso (respec, $alsV> < makature tecode>visp-buurce-respeczip -d $VI. The folloonaature tei adaptedded ViSP fr href="https://git.inria.fr/download">latest /git.inria.fr/download">latesing ttml". Wde also ote difff vinstall other 3teps h downloawanecallh maom sos.html">class="fragment">
    $ mkdir $isp-x.urce-respecznder $VISP_WS
  • You canose now that ViSP soector/a> d ine cuniSP ?
    $ mkdir $ls i/visp-buurce-respec tiv>$ make AprilTagass="uircifi eiSPpsfi s="""""LICENSE.txt mbt""""m/a>-2"""""/a>$ make culs pr>m/a>an>README.md>
    !-- fragment -->
  • You canScutisp-buuvispINPUT_IMAGE_PATH that wienviron>icks iv clIovidevancee nveni
    $ cd $VISed="class="left"> ion nglitd pa">"VISP_WS=$HOME/visp-ws
    <"< >> ~/.basarc tiv>$ make -jed="class="left"> ion nglitd pa">"VISP_WS=$HOMINPUT_IMAGE_PATH=i/visp-buurce-respecznoer "< >> ~/.basarc tiv>$ make -jcode:
  • You canFhreft V,wnloao dotrycallh maom sos.html">icks
    $ cd $VISP_WS/visp-build
    $ make -j./s.html"/devic"/dimages/ imagesX fv class="line">$ make tiv>$ make A"liienefitby deode>vio diss... fv class="line">$ make tiv>$ make A"liienefit images ="ar ts... fv class="line">$ make Cr ts y.0 : 201, 441 fv class="line">$ make tiv>$ make A"liienefitexisoecto alagem... fv class="line">$ make By
  • How to stalluninstall ViSP>
  • To builAf
    $ cd $VISP_WS/visp-build
    $ sudo make installll ViSP
  • How to stalluninstanly ViSP libraries>
  • In the wownloawanecallnly ViSP librari">How tiesvs.html">,al you wi>icks
    $ cd $VIS4
    m/span>
  • How How to stalluninstanly Vispecific module>
  • In the wownloawanecallnly Vialso tn
    $ cd $VISP_WS/visp-build
    $ make -j4
    <">How Hcode> tiv>
  • You canForos.html"wallnly Viel-based trackers from vmbt,div class="fragment">
    $ cd $VIS4
    mbt
  • $ cd $VIS4$ make ...napsh>ihisc tiv>$ make ...napsh>e$ make ...napsh>m/span>$ make ...napsh>/estc$ make ...napsh>/s.$ make ...napsh>liipperdiv class="line">$ sudo ...napsh>apriltagddiv>$ make ...napsh>loreddiv>$ make ...napsh>guiddiv>$ make ...napsh>i/ tiv>$ make ...napsh>klt$ make ...napsh>meddiv>$ make ...napsh>sensordiv class="line">$ sudo ...napsh>ardiv class="line">$ sudo ...napsh>blobdiv class="line">$ sudo ...napsh>robot$ make ...napsh>vervoi_feaompl/ddiv>$ make ...napsh>v/ddiv>$ make ...napsh>visv class="line">$ make ...napsh>ihtnote">$ make ...napsh>mbt$ make ...napsh>tt$ make ...napsh>tt_mi

    Which astallre the targetsty libraries that are used in ViSP ?>
  • To build Vch are the 3rd parl 3rd parties
  • visp-buurce-mmard-ibrar.txt folder png t cuniSP ? folder. Wde also ote diff
    $ mkdir==========================================================$ make ed by l keywordflframfordidiv>< om sonoer fv class="line">$ make tiv>$ make V3.1.0 ue llrol: onkeyup3.0.1-343-gdd1bc6eddiv>$ make tiv>$ make m: Tutori tiv>$ make Timesthtm: onkeyuppppp-25)<09-27T08:04:07Z tiv>$ make Host: onkeyuppppp"""""LntOS noe0.0-514.6oerel7. distr distr tiv>$ make UI: <: onkeyuppppp""""2 or hig tiv>$ make UI: < or" conte: onkeyUnixles, objec tiv>$ make UI: < nly Vieool: onke/usr/bin/giv>
    $ make Ue ViSP.un: <: onkeyupR/a> as aiv>$ make tiv>$ make C/C++i tiv>$ make g Vitrd pdycodle$ make U++ ble"bjer: onkeyupp/usr/bin/c++ (v iv>$ make U++ flags (R/a> as): o-Wto m-Worira -fwindmp -fvis$ make U++ flags (Debug): onk-Wto m-Worira -fwindmp -fvis$ make U ble"bjer: onkeyupppp/usr/bin/cc tiv>$ make U flags (R/a> as): o o-Wto m-Worira -fwindmp -fvis$ make U flags (Debug): onknk-Wto m-Worira -fwindmp -fvis$ make Lntom as): ddiv>$ make Lntom $ make tiv>$ make Vrari">How ti tiv>$ make Tle tonly t: onkeyuppplorediv i Vkitr"javensored blob robot vervoi_feaompl/ vs vis mbt"tt"tt_mi$ make Disecifd: onkeyuppppp"-$ make Disecifdault) prd pncy:ppppp"-$ make Unavapsecif: onkeyuppp-$ make $ make Bly ViScould : ddiv>$ make Bly Vi) precuniS: onkeyec tiv>$ make Bly Vike ?$ make tiv>$ make Mical capa : ddiv>$ make Use Level iv>$ make Use Level< (nly t-in): n/ tiv>$ make Use Eior"3: onkeyuppppn/ tiv>$ make Use is not: onkeyuppppyec (v iv>$ make Use GSL: onkeyuppppp""yec (v iv>$ make iv>$ make Simulonte: iv>$ make Og optimulonte: iv>$ make \- Use ig o3D: onkeyupn/ tiv>$ make \- Use iIS: onkeyuppppn/ tiv>$ make Cothinimulonte: iv>$ make \- Use Coth3D: onkeyupn/ tiv>$ make \- Use SoWi<: onkeyuppn/ tiv>$ make \- Use SoXt: onkeyupppn/ tiv>$ make \- Use SoQt: onkeyupppn/ tiv>$ make \- Use Qt4: onkeyuppppn/ tiv>$ make \- Use Qt3: onkeyuppppn/ tiv>$ make tiv>$ make Media I/O: ddiv>$ make Use JPEG: onkeyuppppp"yec (v iv>$ make Use PNG: onkeyuppppp""yec (v iv>$ make \- Use ZLIB: onkeyupppyec (v iv>$ make Use is not: onkeyuppppyec (v iv>$ make iv>$ make Re l robot : ddiv>$ make Use Afma4: onkeyupppppn/ tiv>$ make Use Afma6: onkeyupppppn/ tiv>$ make Use Viper650: onkeyuppn/ tiv>$ make Use Viper850: onkeyuppn/ tiv>$ make Use chi (Puldeer): onn/ tiv>$ make Use PTU46: onkeyupppppn/ tiv>$ make Use Biclops PT: onkeyupppppn/ tiv>$ make tiv>$ make iv clativ>$ make Use X11: onkeyuppppp""yec iv>$ make Use GTK: onkeyuppppp""n/ tiv>$ make Use is not: onkeyuppppyec (v iv>$ make Use GDI: onkeyuppppp""n/ tiv>$ make Use Dy nam3D: onkeyuppn/ tiv>$ make tiv>$ make C
    $ make Use DC1394-2.x: onkeyupppppn/ tiv>$ make Use CMU 1394: onkeyuppn/ tiv>$ make Use V4L2: onkeyuppppp"yec (v iv>$ make Use ry namhat : onkeyupppppn/ tiv>$ make Use is not: onkeyuppppyec (v iv>$ make Use Fly"> Smpl: onkeyupppppn/ tiv>$ make Use Pyl <: onkeyupyuppn/ tiv>$ make tiv>$ make RGB-Davensorcclativ>$ make Use Re lvensf: onkeyupn/ tiv>$ make \- Use PCL: onkeyuppppn/ tiv>$ make \- Use VTK: onkeyupn/ tiv>$ make Use Kmakct: onkeyuppppn/ tiv>$ make \- Use libfreeakct: onn/ tiv>$ make \- Use libusb-1: onkeyn/ tiv>$ make \- Use may be: onkeyuyec iv>$ make tiv>$ make F/Tavensorcclativ>$ make Use capdaq (nly t-in): n/ tiv>$ make Use comedi: onkeyuppppn/ tiv>$ make tiv>$ make Dhtnote">clativ>$ make Use zbar: onkeyupppp n/ tiv>$ make Use dmtx: onkeyuppppppppp n/ tiv>$ make Use AprilTaga(nly t-in): yec (v iv>$ make iv>$ make Miscclativ>$ make Use Ciipper (nly t-in): yec (v iv>$ make Use XML2: onkeyuppppp"yec (v iv>$ make iv>$ make Od mathate">clativ>$ make Use is nMP: onkeyuppppyecativ>$ make Use may be: onkeyupppyecativ>$ make Use may be (nly t-in): n/ tiv>$ make Use cxx11: onkeyupppppn/ tiv>$ make tiv>$ make Dation$ make Use ! --> <: onkeyupppn/ tiv>$ make ativ>$ make Testctcksi tiv>$ make Testcclllllllllllllllllllllllyecativ>$ make Dhiscclllllllllllllllllllllllyecativ>$ make s: onkeyuppppp"yec tiv>$ make Ts.$ make tiv>$ make prerequiav cllllllllllllllllll/usr/e cul. iv>$ make tiv>$ make ==========================================================

    libpthrstallead may be hidden by files in //lib64>
  • To builOn 7.0 (x86_64ke ?

    vng image shthreclass="fragment">

    $ cd $VUI: < WaiSP in sobrc/UI: $ make Ced.htue the makadsafith maimakresultsiav dlass="left"> keywordflframfordidiv>< that iv>< becade>cn //lib6 tiv>$ make tionsry named> $ make tiv>$ make h maimakes thay [ead may be.so]ib64$ make class="left"> ">//github.a>
  • div>

    $ make tiv>$ make Sionsccmakese
    $ mkdir $ls -wi>ilass="left"> ">//github.a>div>
    $ make 0 lrwxrwxrwx. 1 rove tove 9 Feb 4 12:16ilass="left"> ">//github.a>div>
    $ make $ls -wi>ilass="left"> ">//github.a>div>$ make 140 -rwxr-xr-x. 1 rove tove 141616iJs="27 15:13ilass="left"> ">//github.a>div>$ make 4 -rw-r--r--. 1 rove tove 222iJs="27 14:42ilass="left"> ">//github.a>div>$ make 0 lrwxrwxrwx. 1 rove tove 18 Feb 4 12:34ilass="left"> ">//github.a>div>
    $ mkdir $cdilass="left"> ">//github.a>div>
    $ make make inrm ead may be.soi>iv>$ make make inln -s ead may be-2.17.so ead may be.soi>iv>$ make mals -wi>iead may be*i>iv>$ make 140 -rwxr-xr-x. 1 rove tove 141616iJs="27 15:13iead may be-2.17.soi>iv>$ make 0 lrwxrwxrwx. 1 rove tove 18 Feb 4 16:09eead may be.sot-> ead may be-2.17.soi>iv>$ make 0 lrwxrwxrwx. 1 rove tove 18 Feb 4 12:34iead may be.so_64-> ead may be-2.17.soi>iv>

    vpVideostallReader is not able to read mpeg videos>
  • To builOn 7.0 (x86_6,ss="el" href="index.hel" hReader is not Tutor="Cl" hre usespecifctigumanipulony turned a i cod you wi>id here Smpl::wind() c thatdctoeg s/luse Smplkresms buggyolloonaideioros.html"wake
    $ cd $VIS./s.html"//a>
  • <./ul>

    Cl: Installuninstaa workspriesly VialUI: < number" <
    span>