背景:
win10 + pytho3.6 + opencv3 + anaconda
问题:
使用model = cv2.face.createEigenFaceRecognizer()
AttributeError: module 'cv2.face' has no attribute 'createEigenFaceRecognizer' 解决:
第一步:
卸载原有环境
第二步:pip uninstall opencv_python-3.3.0-cp36-cp36m-win_amd64.whl
下载并安装:https://www.lfd.uci.edu/~gohlke/pythonlibs/ (下载地址)进入目录:pip install https://www.lfd.uci.edu/~gohlke/pythonlibs/opencv_python-3.3.0+contrib-cp36-cp36m-win_amd64.whl
第三步:
改成
model = cv2.face.LBPHFaceRecognizer_create()完成