Differences

This shows you the differences between two versions of the page.

Link to this comparison view

icub:yarp_install_opencv [2012/11/28 14:16] – created jansohnicub:yarp_install_opencv [2012/11/28 14:17] (current) jansohn
Line 1: Line 1:
 +====== Linux: Install OpenCV ======
  
 +It is better to compile OpenCV from scratch than to use the precompiled versions in Ubuntu as most of them are not optimized.
 +
 +Make sure to have these packages installed:
 +  sudo apt-get install pkg-config ant libeigen3-dev sphinx-common libopenexr-dev libtbb-dev python-numpy
 +
 +Get the OpenCV sources from here: [[http://sourceforge.net/projects/opencvlibrary/files/ |OpenCV]]
 +
 +Extract the archive and prepare for compilation:
 +  tar -C ~/local/src/ -xf ~/Downloads/OpenCV-2.4.3.tar.bz2
 +  cd ~/local/src/OpenCV-2.4.3/
 +  mkdir build && cd build
 +  
 +Configure with following options:
 +  ccmake -DCMAKE_BUILD_TYPE=Release -DWITH_GIGEAPI=OFF -DWITH_CUDA=OFF -DWITH_PVAPI=OFF -DWITH_TBB=ON ..
 +  
 +Hit 'c' to configure and check that there are no dependency problems. Hit 'c' again and then 'g' to generate. Now we can compile and install with:
 +  make
 +  sudo make install
 +
 +Add the pkg-config path to the end of your bashrc so that the OpenCV libraries can be found later by other programs:
 +  gedit ~/.bashrc
 +  export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
 +  
 
Recent changes RSS feed Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki