'module' object has no attribute 'xfeatures2d'(已解决)

**原因:**3.X以后OpenCv只包含部分内容,需要神经网络或者其他的函数需要导入opencv_contrib

解决方法:

pip install opencv-contrib-python

注意:
如果已经安装OpenCv2,则需要先卸载pip uninstall opencv-python再安装

参考资料:https://pypi.python.org/pypi/opencv-contrib-python

猜你喜欢

转载自blog.csdn.net/github_38236333/article/details/78781210