gpt4 book ai didi

python - 即使我使用opencv-contrib-python更新了opencv之后,我仍然遇到属性错误

转载 作者:行者123 更新时间:2023-12-02 17:28:58 27 4
gpt4 key购买 nike

AttributeError: module 'cv2.cv2' has no attribute 'createLBPHFaceRecognizer' I restarted my windows but still its not working


recognizer=cv2.face.createLBPHFaceRecognizer_create()

最佳答案

您的代码中有错字。该方法称为LBPHFaceRecognizer_create,而不是createLBPHFaceRecognizer_create

以下对我有用(在安装opencv-contrib-python之后):

import cv2
recognizer = cv2.face.LBPHFaceRecognizer_create()

关于python - 即使我使用opencv-contrib-python更新了opencv之后,我仍然遇到属性错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57099170/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com