how faceRecognizer.predict provides face is matched or not [closed]
I was trying to figure out openCV using javaCV layer. I found an example which almost close the example mentioned in openCV site.
faceRecognizer.predict( greyTestImage, labels, new double[] {0.5} );
int predictedLabel = faceRecognizer.predict(greyTestImage);
We are using finally the above predict method and it always return some value only if we set threshold as 0.0 , then it always return -1. I want to know how exactly I can derive that test image matched with the DB images or not. If I am using the API, how can i properly calculate nearest and confidence to deduce.
After reading the link http://docs.opencv.org/modules/contrib/doc/facerec/tutorial/facerec_save_load.html
I found
faceRecognizer.predict( greyTestImage, labels, new double[] {0.5} );
but anyway the above method is void type se again I am not getting the matched picture type.
Finally , the question can be concluded as how to use FaceRecognizer api to actually find the matched faces , after calling the predict method.
https://code.google.com/p/javacv/source/browse/src/main/java/com/googlecode/javacv/cpp/opencv_contrib.java#852
thanks for the link.checked the same. Now point is I set the threshold to 10 and found matching result are now coming only if exact match is there. So how this threshold works. any link.
10 is probably too small. check, what is returned in dist, and base on that
as you talked about dist, that's what I was trying to find out . unfortunately couldn't.. can u link some api for my understanding..
float projectedTrainFaceDistance = (float) projectedTrainFaceMat.get(iTrain, i); is the to get the distance but what is the keyword for getting the projectedTrainFaceMat....faceRecognizer.getMat("XYZ"); what is the param to be passed here