This shows you the differences between two versions of the page.
| icub:yarp_install_opencv [2012/11/28 14:16] – created jansohn | icub: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:// | ||
| + | |||
| + | Extract the archive and prepare for compilation: | ||
| + | tar -C ~/ | ||
| + | cd ~/ | ||
| + | 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 ' | ||
| + | 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:/ | ||
| + | | ||