I am using linux and want to install opencv contrib repo to include "opencv2/xfeatures2d.hpp" file. I have read the readme file from the link : https://github.com/Itseez/opencv_contrib , but still can't understand how to use the commands in the terminal . Can anyone help ? I have installed opencv in home (~/opencv) and the folder opencv_contrib-master in Downloads.
0
votes
3 Answers
0
votes
Just clone opencv_contrib to the any directory you like then build it as:
- git clone (opencv_contrib)
- cd opencv (main directory) and mkdir build
- cd build
- Here u have to provide the linkage to the opencv_contrib. I used the following command.
cmake -D CMAKE_BUILD_TYPE=DEBUG -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D WITH_QT=ON -D WITH_OPENGL=ON -D ENABLE_FAST_MATH=1 -D CUDA_FAST_MATH=1 -D WITH_CUBLAS=1 -D OPENCV_EXTRA_MODULES_PATH../opencv_contrib/modules ..
0
votes
I have found the solution. I had to uninstall the library and install it again, like described in this link : http://embedonix.com/articles/image-processing/installing-opencv-3-1-0-on-ubuntu/