即使我在 pycharm 窗口中安装了它的库,cv2.face.LBPHFaceRecognizer_create() 也不起作用该怎么办?

问题描述

我正在尝试在我的程序中使用 '''cv2.face.LBPHFaceRecognizer_create()''' 但出现此错误 AttributeError: module 'cv2.cv2' has no attribute 'face'皮卡姆。我已经安装了此功能所需的所有以下库,但仍然没有解决方案。我是 pycharm windows 10 上的这个程序。

解决方法

做:

pip install opencv-contrib-python

然后再试一次。这对我有用