Trouble installing opencv_contrib

asked 2016-10-23 18:08:51 -0600

benn gravatar image

I have a perfectly good opencv 3 installation on debian 8.5, and can use it via python or c++, and even works with my webcams.

The problem is that it doesn't have opencv_contrib, and I can't figure out how to add it. When I do the following, it complains of missing gstreamer and vtk packages:

  cmake -D CMAKE_BUILD_TYPE=RELEASE -D    CMAKE_INSTALL_PREFIX=/usr/local -D INSTALL_C_EXAMPLES=OFF -D INSTALL_PYTHON_EXAMPLES=ON -D OPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules -D BUILD_EXAMPLES=ON .

The output of the compile is here:

http://pastebin.com/2mfx6Yvg

Maybe it can't find it during build, but I did verify that gstreamer and vtk are installed.. these are the packages that are also installed:

kernel 3.16, gcc 4.9.2, python 2.7.9, opencv 3.1, vtk 6.1.0, QtCore 4.8.6, pyqt 4.11.2 (sip 4.16.4), matplotlib 1.5.2, scipy 0.18.0, skimage 0.12.3, IPython 2.3.0, sympy 1.0, dlib 19.1.0, h5py 2.6, progressbar 2.3, scikit-learn 0.17.1, cPickle 1.71

What could be the problem?

edit retag flag offensive close merge delete

Comments

CMake version is 3.0 may be you should update CMake. And why did you say you haven't got opencv_contrib?

--   OpenCV modules:
--     To be built:                 core flann hdf imgproc ml photo reg surface_matching video viz dnn fuzzy imgcodecs shape videoio highgui objdetect plot superres ts xobjdetect xphoto bgsegm bioinspired dpm face features2d line_descriptor saliency text calib3d ccalib cvv datasets java rgbd stereo structured_light tracking videostab xfeatures2d ximgproc aruco optflow stitching python2 python3

xfeatures2d plot ximgproc... are opencv_contrib modules. Have you try compile and check if you can find example like aruco-example-calibrate_camera, ximgproc-example-disparity_filtering

LBerger gravatar imageLBerger ( 2016-10-23 21:22:13 -0600 )edit

your cmake output looks ok. can it simply be, your python is picking up your previous (w/o contrib) cv2 ?

berak gravatar imageberak ( 2016-10-24 02:51:36 -0600 )edit

It's possible, is there a way to check if opencv_contrib is installed and/or if python's path is not pointing to it?

benn gravatar imagebenn ( 2016-10-29 16:04:49 -0600 )edit

print(cv2.getBuildInformation())

berak gravatar imageberak ( 2016-10-29 19:59:50 -0600 )edit