AttributeError: module 'cv2.cv2' has no attribute 'xfeatures2d'

是因为opencv的版本问题,将原本安装的opencv卸载,然后重新安装opencv版本3.4.2即可以解决
pip install opencv-python3.4.2.16
pip install opencv-contrib-python
3.4.2.16

你可能感兴趣的:(SURF,opencv)