Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

how faceRecognizer.predict provides face is matched or not

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.

click to hide/show revision 2
retagged

updated 2013-10-08 04:11:30 -0600

berak gravatar image

how faceRecognizer.predict provides face is matched or not

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.