installation memo of openCV3 + python (2.7)
Installation of libraries, etc. that may be necessary for building. It's all apt-get. (Probably some unnecessary things are included)
$ sudo apt-get update
$ sudo apt-get install git cmake python-numpy python-dev libpng12-dev libjpeg-turbo8-dev libtiff5-dev libgtk-3-dev libeigen3-dev libopencv-dev
OpenCV3 Get the sauce. I want to use xfeatures2d but it's in opencv_contrib It will come.
$ git clone https://github.com/Itseez/opencv.git
$ git clone https://github.com/Itseez/opencv_contrib.git
Then run cmake. By specifying it with a flag, opencv_contrib will also be taken care of at once.
$ cd opencv
$ mkdir build
$ cd build
$ cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D WITH_EIGEN=ON \
-D OPENCV_EXTRAMODELUES_PATH="<path/to/opencv_contrib>/modules" \
..
$ make
$ sudo make install
Look at the output of cmake to see if the module you want to use and the library can be used properly.
If you forget to add the library and remake cmake, delete CMakeCache.txt properly.
Recommended Posts