天天看点

opencv-contrib-python的安装:Set OPENCV_ENABLE_NONFREE CMake option and rebuild the library in function

问题描述

前往本页,可查看opencv-python和opencv-contrib-python的区别。

​​https://docs.opencv.org/master/​​

opencv-contrib-python的安装:Set OPENCV_ENABLE_NONFREE CMake option and rebuild the library in function

比如,SIFT就需要用到opencv-contrib-python包中的cv2.xfeatures2d。

解决方案

  1. 卸载opencv-python

    ​​

    ​pip uninstall opencv-python​

  2. 安装opencv-contrib-python

    ​​

    ​pip install opencv-contrib-python==3.4.2.17​