问题描述

前往本页,可查看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。

解决方案

安装方式可见网址:
https://pypi.org/project/opencv-contrib-python/

  1. 卸载opencv-python
    pip uninstall opencv-python
  2. 安装opencv-contrib-python
    pip install opencv-contrib-python==3.4.2.17

注意第二步要指定版本,安装新版本有风险,可能有错误:Set OPENCV_ENABLE_NONFREE CMake option and rebuild the library in function 'create'等。

相关文章:

  • 2021-10-14
  • 2022-01-13
  • 2022-12-23
  • 2021-05-26
  • 2021-08-27
  • 2021-11-03
  • 2021-09-30
  • 2021-06-11
猜你喜欢
  • 2022-01-20
  • 2022-02-04
  • 2021-04-09
  • 2021-04-03
  • 2021-09-12
  • 2022-12-23
  • 2021-06-13
相关资源
相似解决方案