After I compile opencv_contrib to opencv3.1,I still can't use SURF [closed]

asked 2016-12-02 03:32:50 -0600

ddddn gravatar image

updated 2016-12-02 04:50:29 -0600

berak gravatar image

Below is my cmake options:

cmake -D WITH_TBB=ON -D WITH_EIGEN=ON -D BUILD_DOCS=ON -D BUILD_TESTS=OFF -D BUILD_PERF_TESTS=OFF -D BUILD_EXAMPLES=OFF -D WITH_OPENCL=OFF -D WITH_CUDA=OFF -D BUILD_opencv_gpu=OFF -D BUILD_opencv_gpuarithm=OFF -D BUILD_opencv_gpubgsegm=OFF -D BUILD_opencv_gpucodec=OFF -D BUILD_opencv_gpufeatures2d=OFF -D BUILD_opencv_gpufilters=OFF -D BUILD_opencv_gpuimgproc=OFF -D BUILD_opencv_gpulegacy=OFF -D BUILD_opencv_gpuoptflow=OFF -D BUILD_opencv_gpustereo=OFF -D BUILD_opencv_gpuwarping=OFF -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D PYTHON_DEFAULT_EXECUTABLE=/usr/local/bin/python -D PYTHON_EXECUTABLE=/usr/local/bin/python -D PYTHON_INCLUDE_DIRS=/usr/local/include/python3.5m -D PYTHON_LIBRARY=/usr/local/lib/libpython3.5m.so ../../opencv-3.1.0

and cmake output:

-- Detected version of GNU GCC: 44 (404)
-- Found ZLIB: /usr/lib64/libz.so (found suitable version "1.2.3", minimum required is "1.2.3") 
-- Could NOT find Jasper (missing:  JASPER_LIBRARIES JASPER_INCLUDE_DIR) 
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.3") 
-- checking for module 'gtk+-3.0'
--   package 'gtk+-3.0' not found
-- checking for module 'gtk+-2.0'
--   package 'gtk+-2.0' not found
-- checking for module 'gthread-2.0'
--   package 'gthread-2.0' not found
-- checking for module 'gstreamer-base-1.0'
--   package 'gstreamer-base-1.0' not found
-- checking for module 'gstreamer-video-1.0'
--   package 'gstreamer-video-1.0' not found
-- checking for module 'gstreamer-app-1.0'
--   package 'gstreamer-app-1.0' not found
-- checking for module 'gstreamer-riff-1.0'
--   package 'gstreamer-riff-1.0' not found
-- checking for module 'gstreamer-pbutils-1.0'
--   package 'gstreamer-pbutils-1.0' not found
-- checking for module 'gstreamer-base-0.10'
--   package 'gstreamer-base-0.10' not found
-- checking for module 'gstreamer-video-0.10'
--   package 'gstreamer-video-0.10' not found
-- checking for module 'gstreamer-app-0.10'
--   package 'gstreamer-app-0.10' not found
-- checking for module 'gstreamer-riff-0.10'
--   package 'gstreamer-riff-0.10' not found
-- checking for module 'gstreamer-pbutils-0.10'
--   package 'gstreamer-pbutils-0.10' not found
-- checking for module 'libdc1394-2'
--   package 'libdc1394-2' not found
-- checking for module 'libdc1394'
--   package 'libdc1394' not found
-- checking for module 'libv4l1'
--   package 'libv4l1' not found
-- checking for module 'libv4l2'
--   package 'libv4l2' not found
-- Looking for linux/videodev.h
-- Looking for linux/videodev.h - found
-- Looking for linux/videodev2.h
-- Looking for linux/videodev2.h - found
-- Looking for sys/videoio.h
-- Looking for sys/videoio.h - not found
-- checking for module 'libavcodec'
--   package 'libavcodec' not found
-- checking for module 'libavformat'
--   package 'libavformat' not found
-- checking for module 'libavutil'
--   package 'libavutil' not found
-- checking for module 'libswscale'
--   package 'libswscale' not found
-- checking for module 'libavresample'
--   package 'libavresample' not found
-- Looking for libavformat/avformat.h
-- Looking for libavformat/avformat.h - not found
-- Looking for ffmpeg/avformat.h
-- Looking for ffmpeg/avformat.h - not found
-- checking for module 'libgphoto2'
--   package 'libgphoto2' not found
-- checking for module 'tbb'
--   package 'tbb' not found
-- found IPP (ICV version): 9.0.1 [9.0.1]
-- at: /data/software/opencv-3.1.0/3rdparty/ippicv/unpack/ippicv_lnx
-- To enable PlantUML support, set PLANTUML_JAR environment variable or pass -DPLANTUML_JAR=<filepath> option to cmake
-- Found PythonInterp: /usr/local/bin/python (found suitable version "3.5.2", minimum required is "2.7") 
-- Found PythonInterp: /usr/local/bin/python3 (found suitable version "3.5.2", minimum required is "3.4") 
-- Could NOT find JNI (missing ...
(more)
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by berak
close date 2016-12-02 08:08:53.919191

Comments

  • can you add your cmake output ? (large, but probably helpful)

  • are you sure, a new cv2.so was built, and you're using that ? (did you run make install ?)

  • your PYTHON_INCLUDE_DIRS looks wrong
berak gravatar imageberak ( 2016-12-02 03:52:40 -0600 )edit
1

@berak i have update the question with cmake output,it's so large and ugly ORZ;I have executed “make install”,and the original name of cv2.so is "cv2.cpython-35m-x86_64-linux-gnu.so";What‘s wrong with my PYTHON_INCLUDE_DIRS?

ddddn gravatar imageddddn ( 2016-12-02 04:39:00 -0600 )edit

PYTHON_INCLUDE_DIRS should point to some include folder, but cmake has found that anyway, so you can ignore that.

(cmake output looks pretty ok, so no real idea atm.)

oh, try cmake -DOPENCV_ENABLE_NONFREE=ON

berak gravatar imageberak ( 2016-12-02 04:56:41 -0600 )edit
1

@berak Hi,bro,I have figured it out, I lost the option "OPENCV_EXTRA_MODULES_PATH",ORZ,whatever,thank you for your help.

ddddn gravatar imageddddn ( 2016-12-02 06:48:43 -0600 )edit