Sorry, this content is no longer available

Ask Your Question
0

Facerecognizer

asked Nov 21 '12

updated Nov 21 '12

Hello,

I am using the facerecognizer EigenFaceRecognizer.

And I am using these instructions to get the label prediction:

Mat img = imread("person1/3.jpg", CV_LOAD_IMAGE_GRAYSCALE);
// Some variables for the predicted label and associated confidence (e.g. distance):
int predicted_label = -1;
double predicted_confidence = 0.0;
// Get the prediction and associated confidence from the model
model->predict(img, predicted_label, predicted_confidence)

In the predicted_label, I got the label of the person the facerecognizer thinks is the most nearest to the one in the test image.

My question is: Is there any way to get the 5 closest labels for the image to identify???

  1. label "1" predicted_confidence = 90 %
  2. Label "1" predicted_confidence = 85 %
  3. Label "4" predicted_confidence = 80 %
  4. Label "20" predicted_confidence = 70 %
  5. Label "7" predicted_confidence = 65 %

Thank you.

Preview: (hide)

1 answer

Sort by » oldest newest most voted
1

answered Nov 21 '12

Not yet, but I think about adding such a functionality. If it is urgent, you could extend the existing code like this:

You would only need to order the result, in order to find the 5 nearest neighbors.

Preview: (hide)

Comments

this link is not giving the required result....any other way out ?

Ishmeet gravatar imageIshmeet (Jun 17 '14)edit

Question Tools

Stats

Asked: Nov 21 '12

Seen: 1,010 times

Last updated: Nov 21 '12