xfeatures2d not found in OpenCV on Ubuntu

前端 未结 2 1789
清酒与你
清酒与你 2020-12-11 21:30

I am using OpenCV version 3.2.0 and xfeatures2d is not found on this. Is there any way I can install this to the same version of OpenCV?

>>> import          


        
相关标签:
2条回答
  • 2020-12-11 22:01

    http://www.pyimagesearch.com/2015/06/22/install-opencv-3-0-and-python-2-7-on-ubuntu/ This link has all the steps required to install opencv 3 along with opencv_contrib.

    In case the xfeatures2d doesn't work even after finishing all the steps mentioned in the above link, then clone https://github.com/opencv/opencv_contrib.git for opencv_contrib.

    0 讨论(0)
  • 2020-12-11 22:16

    I encountered the same problem. SURF and SIFT are not a part of the main repo module of OpenCV. Instead, they are available in opencv_contrib folder. The README file of opencv_contrib gives clear instructions on how to install the modules in opencv_contrib.

    cd <opencv_build_directory>
    cmake -DOPENCV_EXTRA_MODULES_PATH=<opencv_contrib>/modules <opencv_source_directory>
    make -j5
    

    Also note that if you are using OpenCV 3.2, these modules will be installed on Python3.

    0 讨论(0)
提交回复
热议问题