1 | initial version |
you cannot predict on a slice of an image, a slice does not have 'continuous data', so you need something like :
cropped = predict_image[y: y + 130, x: x + 130].copy()
then, due to a current bug, you cannot get confidence and label at the same time, only the label:
nbr_predicted = recognizer.predict(cropped)
(one way to get the confidence back, would be , to remove the CV_WRAP here and rerun cmake && make && make install)
2 | No.2 Revision |
you EigenFaces cannot predict on a slice of an image, a slice does not have 'continuous data', so you need something like :
cropped = predict_image[y: y + 130, x: x + 130].copy()
then, due to a current bug, you cannot get confidence and label at the same time, only the label:
nbr_predicted = recognizer.predict(cropped)
(one way to get the confidence back, would be , to remove the CV_WRAP here and rerun cmake && make && make install)