Ask Your Question
0

How can I use createLBPHFaceRecognizer() in opencv3.2, python3?

asked 2017-04-02 10:41:10 -0600

acytoo gravatar image

cv2.createLBPHFaceRecognizer() NOT working
And cv2.face.createLBPHFaceRecognizer() NOT working
It says module 'cv2.cv2' has no attribute 'createLBPHFaceRecognizer' or module 'cv2.cv2' has no attribute 'face'
win10, python 3.6.1- amd64, kali linux python 3.5.3 or 2.7.13, I have tested opencv 3.1 and 3.2, I just got the same AttributeError. So, what's the problem, where is the createLBPHFaceRecognizer()

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-04-02 10:51:21 -0600

berak gravatar image

cv2.face.createLBPHFaceRecognizer()

is the correct invocation for opencv3. but most likely, you do not have the face submodule, because your cv2.pyd was built without opencv_contrib

there's a couple of options:

  • rebuild from src with opencv_contrib (see readme there) you need a c++ compiler and cmake for this.
  • fall back to opencv2.4 and use cv2.createLBPHFaceRecognizer()
  • use an entirely independant implementation
edit flag offensive delete link more

Comments

Thank you :)

acytoo gravatar imageacytoo ( 2017-04-02 11:20:21 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2017-04-02 10:41:10 -0600

Seen: 17,539 times

Last updated: Apr 02 '17