我已经安装了带有额外模块的 opencv 3.1.0,但是当我尝试使用
>>> s = cv2.face.MinDistancePredictCollector()
它返回一个错误
Traceback (most recent call last):
File "<pyshell#5>", line 1, in <module>
s.MinDistancePredictCollector()
AttributeError: 'module' object has no attribute 'MinDistancePredictCollector'
我还检查了文档:
>>> help(cv2.face)
Help on module cv2.face in cv2:
NAME
cv2.face
FILE
(built-in)
FUNCTIONS
StandardCollector_create(...)
StandardCollector_create([, threshold]) -> retval
createEigenFaceRecognizer(...)
createEigenFaceRecognizer([, num_components[, threshold]]) -> retval
createFisherFaceRecognizer(...)
createFisherFaceRecognizer([, num_components[, threshold]]) -> retval
createLBPHFaceRecognizer(...)
createLBPHFaceRecognizer([, radius[, neighbors[, grid_x[, grid_y[, threshold]]]]]) -> retval
我发现MinDistancePredictCollector()
不存在。那么我该如何安装呢?