Reputation: 11
I tried to install opencv3.4.0 on a raspberry3 following this guide: https://www.life2coding.com/install-opencv-3-4-0-python-3-raspberry-pi-3/
Now the problem is that I could not figure out why python3 gives me the error:
AttributeError: module 'cv2' has no attribute 'face'
This happens, whenever I try to execute
face_recognizer = cv2.face.LBPHFaceRecognizer_create()
I already installed opencv3.4.0 and also the additional modules: opencv3.4.0_contrib. I know that "face" needs to be part of the extra modules. Still I cannot figure out what causes this error.
Can anyone help me out?
Upvotes: 0
Views: 4205
Reputation: 11
Finally, I got it working. I just used pip for both installations:
pip install opencv-python
pip install opencv-contrib-python
Upvotes: 1