Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Face recognition - Get distance for all trained images

Hi,

I have just begun using OpenCV in the past week and i am hoping to get a little advice :).

I am currently using the FaceRecognizer to train a set of images and then use predict to to compare a face against that trained set of images. This appears to be working fine however it only retrieves the label with the best score whereas I was hoping to be able to retrieve the score and label for each trained image.

So say i have trained 10 images, i then have an image i want to compare against that trained set of images. My ideal output would be.

img1, distance

img2, distance

img3, distance

etc..

Is this possible?

Im not sure if it makes a big difference but i want to use each technique available and test the results. So Eigenfaces, Fisherfaces and LBP

Face recognition - Get distance for all trained images

Hi,

I have just begun using OpenCV in the past week and i am hoping to get a little advice :).

I am currently using the FaceRecognizer to train a set of images and then use predict to to compare a face against that trained set of images. This appears to be working fine fine, however it only retrieves the label with the best score whereas I was hoping to be able to retrieve the score and label for each trained image.

So say i have trained 10 images, i then have an image i want to compare against that trained set of images. My ideal output would be.

img1, distance

img2, distance

img3, distance

etc..

Is this possible?

Im not sure if it makes a big difference but i want to use each technique available and test the results. So Eigenfaces, Fisherfaces and LBP

Face recognition - Get distance for all trained images

Hi,

I have just begun using OpenCV in the past week and i am hoping to get a little advice :).

I am currently using the FaceRecognizer to train a set of images and then use predict to compare a face against that trained set of images. This appears to be working fine, however it only retrieves the label with the best score whereas I was hoping to be able to retrieve the score and label for each trained image.

So say i have trained 10 images, i then have an image i want to compare against that trained set of images. My ideal output would be.

img1, distance

img2, distance

img3, distance

etc..

Is this possible?

Im not sure if it makes a big difference but i want to use each technique available and test the results. So Eigenfaces, Fisherfaces and LBP

So essentiall what im doing is.

Ptr<FaceRecognizer> model = createLBPHFaceRecognizer();
model->train(images , labels);
int predictedLabel;
double distance;
model->predict(testSample , predictedLabel , distance);

And essentially what i want is an array of labels and array of distance returned. Which isn't how it works haha.