Linux Melodic 源码安装 ViSP
Linux Melodic 源码安装 ViSP
1. ViSP 简介
ViSP is a modular C++ library that allows fast development of visual servoing applications. ViSP is developed and maintained by the Inria Lagadic team located at Inria Rennes.
ViSP是一个模块化C++库,允许快速开发视觉伺服应用程序。ViSP由位于Inria Rennes的Inria Lagadic团队开发和维护。
If you have any problems or find any bugs, please report them at http://gforge.inria.fr/tracker/?group_id=397.
If you may need help, please use the available forums http://gforge.inria.fr/forum/?group_id=397 or mailing lists http://gforge.inria.fr/mail/?group_id=397.
It is also possible to contact ViSP main developers using: visp@inria.fr
2. 源码安装
2.1 Required packages 需要的安装包
- gcc 4.4.x or later. gcc 4.4.x 及以上。
sudo apt-get install build-essential
- CMake 2.6 or higher. CMake 2.6 及以上。
sudo apt-get install cmake-curses-gui
2.2 Getting ViSP source code 下载
- 方法一
直接下载zip or tarball: latest stable release. 下载成功后解压:
tar xvzf ViSP-2.10.0.tar.gz
或者
unzip ViSP-2.10.0.zip
- 方法二
下载链接: recent snapshot. 下载成功后解压:
unzip ViSP-2.y.z-snapshot-2015.mm.dd.zip
- 方法三
从Subversion repository下载cutting-edge ViSP,先安装subversion:
sudo apt-get install subversion
然后使用命令:
svn checkout svn://scm.gforge.inria.fr/svn/visp/trunk/ViSP ViSP-trunk
2.3 Configuring ViSP from source 配置Visp
首先新建一个<binary_dir>,来build Visp. 其中包括生成的Makefiles, object files, and output libraries and binaries. 然后配置。
下载文件是visp-3.5.0,解压后进行配置,命令如下。
mkdir visp-build-release
cd visp-build-release
cmake -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_SHARED_LIBS=ON ../visp-3.5.0
一个更多功能的配置方法是使用ccmake:
ccmake ../visp-3.5.0
使用第二种配置方法后,如图所示:
2.3.1 Optional 3rd party packages 建议安装的第三方库
- OpenCV
sudo apt-get install libopencv-dev
- libX11 to be able to open a window to display images
sudo apt-get install libx11-dev
- lapack and GSL to benefit from optimized mathematical capabilities
sudo apt-get install liblapack-dev libgsl0-dev
- libdc1394 to grab images from firewire cameras
sudo apt-get install libdc1394-22-dev
- libv4l to grab images from usb or analogic cameras
sudo apt-get install libv4l-dev
- Coin, to be able to support vrml cad model used by the model-based trackers
sudo apt-get install libCoin80-dev
- libxml2 to be able to configure the model-based trackers from xml files
sudo apt-get install libxml2-dev
- libjpeg, libpng to support jpeg and png images
sudo apt-get install libjpeg-dev libpng12-dev
- ffmpeg, to be able to read or encode compressed video streams
sudo apt-get install libswscale-dev libavutil-dev libavformat-dev libavcodec-dev libbz2-dev libbz2-1.0
- Ogre 3D if you want to do augmented reality or simulation
sudo apt-get install libogre-1.9-dev libois-dev
- Bar code detection
sudo apt-get install libzbar-dev libdmtx-dev
安装后,重新配置Visp.
2.3.2 Generating Makefiles
To generate the makefiles, just press [g] key in the ccmake gui.
Now we can build ViSP.
2.4 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 apt-get install doxygen graphviz texlive-latex-base
Then you can proceed with:
make visp_doc
参考: