Open snipiba opened 8 years ago
I believe they changed quite a number of things between OpenCV 2.x.x and 3.x.x . I would suggest trying to run it with OpenCV 2.4.9 (that's the version I used and had no problems with).
i made some changes, but still got errors on training on training model... ValueError: operands could not be broadcast together with shapes .... @ cv2.imwrite(MEAN_FILE, normalize(mean, 0, 255, dtype=np.uint8))
To get train.py to run on OpenCV 3.1:
change line 77 to: model = cv2.face.createEigenFaceRecognizer()
change line 85 to: mean = model.getMean().reshape(faces[0].shape)
and change line 87 to: eigenvectors = model.getEigenVectors()
Should also work if you are using OpenCV 3.0
@PaulSolheim , does the servo work on pi3 if we apply your solution ?
@PaulSolheim, Do you know what are the modifications needed on the hardware.py file when using the DC servo control other the RPIO.PWM
Hey @PaulSolheim, After using getEigenVectors()
I'm getting output as [[0.][0.]......[0.][0.]]
and I'm not able to generate the Positive and Negative Eigenfaces. Is there any alternative way to generate these eigenvectors for both Positive and Negative eigenfaces.
Hi, on opencv 3.0.0 is not recognized getMat model must by set to> model = cv2.face.createEigenFaceRecognizer()
and then getMat is not found / File "train.py", line 85, in
mean = model.getMat("mean").reshape(faces[0].shape)
AttributeError: 'cv2.face_BasicFaceRecognizer' object has no attribute 'getMat'