OpenCV3.X Python3.X: cv2.xfeatures2d 无法使用问题解决

cv2.xfeatures2d 找不到

Opencv 3.0 - module object has no attribute ‘xfeatures2d’

本人使用环境:OpenCV 3.4.0 Python3.5

cv2._ _ version _ _ 查看opencv版本号

开始安装opencv是通过:

sudo python3 -m pip install opencv-python

xfeatures2d 目前在opencv-contrib可以使用,解决方法:

sudo python3 -m pip uninstall opencv-python
sudo python3 -m pip install opencv-contrib-python

你可能感兴趣的:(OpenCV)