Python accessibility for the xfeatures2d functions (from `opencv_extra`)

asked 2014-11-28 20:21:41 -0500

I'm trying to use the some of the functions from the opencv_extra repo, from python 3.

I'm building OpenCV from source:

   durr@mainnas:~/b_opencv/opencv/build$ cmake -D CMAKE_BUILD_TYPE=RELEASE                                                              \
          -D BUILD_PYTHON_SUPPORT=ON                                                               \
          -D WITH_XINE=ON                                                                          \
          -D WITH_OPENGL=ON                                                                        \
          -D WITH_TBB=ON                                                                           \
          -D BUILD_EXAMPLES=ON                                                                     \
          -D BUILD_NEW_PYTHON_SUPPORT=ON                                                           \
          -D PYTHON_EXECUTABLE=/usr/bin/python3                                                    \
          -D INSTALL_C_EXAMPLES=ON                                                                 \
          -D INSTALL_PYTHON_EXAMPLES=ON                                                            \
          -D PYTHON_INCLUDE_DIR=/usr/include/python3.4                                             \
          -D PYTHON_INCLUDE_DIR2=/usr/include/x86_64-linux-gnu/python3.4m                          \
          -D PYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/                             \
          -D PYTHON_NUMPY_INCLUDE_DIRS=/usr/local/lib/python3.4/dist-packages/numpy/core/include/  \
          -D PYTHON_PACKAGES_PATH=/usr/local/lib/python3.4/dist-packages/numpy/core/include/       \
          -D BUILD_OPENCV_JAVA=NO                                                                  \
          -D OPENCV_EXTRA_MODULES_PATH=~/b_opencv/opencv_contrib/modules                           \
          -D OPENCV_TEST_DATA_PATH=~/b_opencv/opencv_extra/testdata                                \
          -D PYTHON3_EXECUTABLE=/usr/bin/python3                                                   \
          -D PYTHON3_NUMPY_INCLUDE_DIRS=/usr/local/lib/python3.4/dist-packages/numpy/core/include/ \

cmake is correctly finding my python dir, and is claiming it's building xfeatures2d:

-- General configuration for OpenCV 3.0.0-dev =====================================
--   Version control:               3.0.0-beta-41-g50c9367
--   Platform:
--     Host:                        Linux 3.13.0-40-generic x86_64
--     CMake:             
--     CMake generator:             Unix Makefiles
--     CMake build tool:            /usr/bin/make
--     Configuration:               RELEASE
--   C/C++:
--     Built as dynamic libs?:      YES
--     C++ Compiler:                /usr/bin/c++  (ver 4.8.2)
--     C++ flags (Release):         -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG
--     C++ flags (Debug):           -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG
--     C Compiler:                  /usr/bin/cc
--     C flags (Release):           -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -fvisibility=hidden -O3 -DNDEBUG  -DNDEBUG
--     C flags (Debug):             -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -fvisibility=hidden -g  -O0 -DDEBUG -D_DEBUG
--     Linker flags (Release):
--     Linker flags (Debug):
--     Precompiled headers:         YES
--   OpenCV modules:
--     To be built:                 core imgproc imgcodecs videoio highgui xobjdetect adas video bgsegm bioinspired flann ml features2d calib3d ccalib face text datasets objdetect latentsvm line_descriptor optflow photo reg rgbd saliency shape xfeatures2d stitching superres surface_matching videostab ximgproc xphoto python2 python3 tracking ts
--     Disabled:                    world
--     Disabled by dependency:      -
--     Unavailable:                 androidcamera cuda cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaoptflow cudastereo cudawarping cudev java viz cvv matlab
--   GUI:
--     QT:                          NO
--     GTK+ 2.x:                    YES (ver 2.24.23)
--     GThread :                    YES (ver 2.40.2)
--     GtkGlExt:                    NO
--     OpenGL support:              NO
--     VTK support:                 NO
--   Media I/O:
--     ZLib:                        /usr/lib/x86_64-linux-gnu/ (ver 1.2.8)
--     JPEG:                        /usr/lib/x86_64-linux-gnu/ (ver )
--     WEBP:                        /usr/lib/x86_64-linux-gnu/ (ver encoder: 0x0202)
--     PNG:                         /usr/lib/x86_64-linux-gnu/ (ver 1.2.50)
--     TIFF ...
edit retag flag offensive close merge delete