Skip to content

OpenCV Compilation

David Mansolino edited this page Nov 7, 2018 · 3 revisions

This page explains how to recompile the Open Source Computer Vision dependency on every platforms. Open Source Computer Vision is not used directly by Webots but is distributed with Webots and is used by several controllers performing computer vision.

Get package

From http://opencv.org/downloads.html, get OpenCV-2.4.3.exe (Windows), OpenCV-2.4.3.tar.bz2 (Linux), and move it in ~/software.

Extract the package

Linux:

tar -xjf OpenCV-2.4.3.tar.bz2

Windows:

OpenCV-2.4.3.exe

Then:

mv OpenCV-2.4.3 opencv
cd opencv/

Compile

mkdir build
cd build/

On Windows:

With Cmake gui, set the source to opencv/src and the destination to opencv/build, set the generator to "MSYS Makefiles", click on configure twice, then generate

Linux:

(Be careful to have libgtk2.0-dev and pkg-config installed)
cmake ..
make
Clone this wiki locally