Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

OpenCV3, Python3, Missing xFeatures

On Ubuntu 16.04 trying to build OpenCV3.1.0 with the contrib module. I have a clean build with CUDA fully enabled (which is awesome!). I can get the python 3.x bindings to build without issue, but can not seem to get xfeatures2d bindings to be built.

I see that Python2 is unavailable, but am not concerned as I am trying to get bindings for Python 3. Otherwise, the config looks reasonable (I think?). Perhaps I am missing something pretty basic in the config?

CMAKE:

      cmake \
  -D CMAKE_BUILD_TYPE=RELEASE \
  -D CMAKE_INSTALL_PREFIX=/usr/local \
  -D WITH_TBB=ON \
  -D WITH_V4L=ON \
  -D WITH_QT=ON \
  -D WITH_OPENGL=ON \
  -D WITH_CUDA=ON \
  -D ENABLE_FAST_MATH=1 \
  -D CUDA_FAST_MATH=1 \
  -D CUDA_NVCC_FLAGS="-D_FORCE_INLINES" \
  -D WITH_CUBLAS=1 \
  -D OPENCV_EXTRAS_MODULES_PATH=../../opencv_contrib-3.1.0/modules \
  -D BUILD_TESTS=OFF \
  -D BUILD_PERF_TESTS=OFF \
  -D BUILD_OPENCV_PYTHON3=1 \
  -D PYTHON3_EXECUTABLE=$(which python3) \
  -D PYTHON3_INCLUDE_DIR=$(python3 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())") \
  -D PYTHON3_LIBRARIES=$(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") \
  -D PYTHON3_LIBRARY=/home/jlaura/anaconda3/lib/libpython3.5m.so ..

cv2.getBuildInformation()

    General configuration for OpenCV 3.1.0 =====================================
  Version control:               unknown

  Platform:
    Host:                        Linux 4.4.0-34-generic x86_64
    CMake:                       3.5.1
    CMake generator:             Unix Makefiles
    CMake build tool:            /usr/bin/make
    Configuration:               RELEASE

  C/C++:
    Built as dynamic libs?:      YES
    C++ Compiler:                /usr/bin/g++-4.8  (ver 4.8.5)
    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 -ffast-math -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -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 -ffast-math -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -ffunction-sections -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG
    C Compiler:                  /usr/bin/gcc-4.8
    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 -ffast-math -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -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 -ffast-math -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -ffunction-sections -fvisibility=hidden -g  -O0 -DDEBUG -D_DEBUG
    Linker flags (Release):
    Linker flags (Debug):
    Precompiled headers:         YES
    Extra dependencies:          /home/jlaura/anaconda3/lib/libQtGui.so /home/jlaura/anaconda3/lib/libQtTest.so /home/jlaura/anaconda3/lib/libQtCore.so /home/jlaura/anaconda3/lib/libpng.so /home/jlaura/anaconda3/lib/libz.so /home/jlaura/anaconda3/lib/libtiff.so /usr/lib/x86_64-linux-gnu/libjasper.so /home/jlaura/anaconda3/lib/libjpeg.so v4l1 v4l2 avcodec-ffmpeg avformat-ffmpeg avutil-ffmpeg swscale-ffmpeg dl m pthread rt cudart nppc nppi npps cublas cufft -L/usr/local/cuda-7.5/lib64
    3rdparty dependencies:       libwebp IlmImf

  OpenCV modules:
    To be built:                 cudev core cudaarithm flann imgproc ml video cudabgsegm cudafilters cudaimgproc cudawarping imgcodecs photo shape videoio cudacodec highgui objdetect features2d calib3d cudafeatures2d cudalegacy cudaobjdetect cudaoptflow cudastereo stitching superres videostab python3
    Disabled:                    world
    Disabled by dependency:      -
    Unavailable:                 java python2 ts viz

  GUI: 
    QT 4.x:                      YES (ver 4.8.7 EDITION = OpenSource)
    QT OpenGL support:           NO
    OpenGL support:              NO
    VTK support:                 NO

  Media I/O: 
    ZLib:                        /home/jlaura/anaconda3/lib/libz.so (ver 1.2.8)
    JPEG:                        /home/jlaura/anaconda3/lib/libjpeg.so (ver 80)
    WEBP:                        build (ver 0.3.1)
    PNG:                         /home/jlaura/anaconda3/lib/libpng.so (ver 1.6.17)
    TIFF:                        /home/jlaura/anaconda3/lib/libtiff.so (ver 42 - 4.0.6)
    JPEG 2000:                   /usr/lib/x86_64-linux-gnu/libjasper.so (ver 1.900.1)
    OpenEXR:                     build (ver 1.7.1)
    GDAL:                        NO

  Video I/O:
    DC1394 1.x:                  NO
    DC1394 2.x:                  NO
    FFMPEG:                      YES
      codec:                     YES (ver 56.60.100)
      format:                    YES (ver 56.40.101)
      util:                      YES (ver 54.31.100)
      swscale:                   YES (ver 3.1.101)
      resample:                  NO
      gentoo-style:              YES
    GStreamer:                   NO
    OpenNI:                      NO
    OpenNI PrimeSensor Modules:  NO
    OpenNI2:                     NO
    PvAPI:                       NO
    GigEVisionSDK:               NO
    UniCap:                      NO
    UniCap ucil:                 NO
    V4L/V4L2:                    Using libv4l1 (ver 1.10.0) / libv4l2 (ver 1.10.0)
    XIMEA:                       NO
    Xine:                        NO
    gPhoto2:                     NO

  Parallel framework:            pthreads

  Other third-party libraries:
    Use IPP:                     9.0.1 [9.0.1]
         at:                     /usr/local/src/opencv-3.1.0/3rdparty/ippicv/unpack/ippicv_lnx
    Use IPP Async:               NO
    Use VA:                      NO
    Use Intel VA-API/OpenCL:     NO
    Use Eigen:                   NO
    Use Cuda:                    YES (ver 7.5)
    Use OpenCL:                  YES
    Use custom HAL:              NO

  NVIDIA CUDA
    Use CUFFT:                   YES
    Use CUBLAS:                  YES
    USE NVCUVID:                 NO
    NVIDIA GPU arch:             20 21 30 35
    NVIDIA PTX archs:            30
    Use fast math:               YES

  OpenCL:
    Version:                     dynamic
    Include path:                /usr/local/src/opencv-3.1.0/3rdparty/include/opencl/1.2
    Use AMDFFT:                  NO
    Use AMDBLAS:                 NO

  Python 2:
    Interpreter:                 /usr/bin/python2.7 (ver 2.7.12)

  Python 3:
    Interpreter:                 /home/jlaura/anaconda3/bin/python3 (ver 3.5.1)
    Libraries:                   /home/jlaura/anaconda3/lib/libpython3.5m.so (ver 3.5.1)
    numpy:                       /home/jlaura/anaconda3/lib/python3.5/site-packages/numpy/core/include (ver 1.11.1)
    packages path:               lib/python3.5/site-packages

  Python (for build):            /usr/bin/python2.7

  Java:
    ant:                         /usr/bin/ant (ver 1.9.6)
    JNI:                         NO
    Java wrappers:               NO
    Java tests:                  NO

  Matlab:                        Matlab not found or implicitly disabled

  Documentation:
    Doxygen:                     NO
    PlantUML:                    NO

  Tests and samples:
    Tests:                       NO
    Performance tests:           NO
    C/C++ Examples:              NO

  Install path:                  /usr/local

  cvconfig.h is in:              /usr/local/src/opencv-3.1.0/build
-----------------------------------------------------------------