从this question in SO我知道错误应该通过opencv contrib来解决,但问题是当我第一次使用cmake使用this guide by pyimagesearch构建opencv时,我还构建了opencvcontrib。如果我必须重建它,我该怎么做呢?AttributeError:'模块'对象没有任何属性'createLBPHFaceRecognizer'
这是错误:
import cv2
cv2.createLBPHFaceRecognizer()
Traceback (most recent call last):
File "stdin", line 1, in module
AttributeError: 'module' object has no attribute 'createLBPHFaceRecognizer'
另外:
import cv2
help(cv2.face.createLBPHFaceRecognizer)
Traceback (most recent call last):
File "stdin", line 1, in module
AttributeError: 'module' object has no attribute 'face'
的Mac OS,Python 2.7版,opencv的3.2