prediction with FaceRecognizer

asked 2016-05-12 20:19:11 -0600

arcticworker gravatar image

I use method cv::face::FaceRecognizer::predict from here, in python i write this:

nbr_predicted, conf = recognizer.predict(predict_image)

it predicts a label and associated confidence (e.g. distance) for a given input image, it return only 1 label (the closest for a given input image). How i can get all labels and associated confidence (e.g. distance) for my input image?

On same page i find this method:

virtual void cv::face::FaceRecognizer::predict  (   InputArray  src,
                                                    Ptr< PredictCollector >     collector,
                                                    const int   state = 0
                                                    )       const

If I'm not mistaken this is what I need. But i can't figure out what this is "Ptr< PredictCollector > collector", and how to describe (use) this in python?

p.s. sorry for my bad English.

edit retag flag offensive close merge delete

Comments

which opencv version are you using exactly ?

berak gravatar imageberak ( 2016-05-13 00:51:12 -0600 )edit

i use 3.1 version for linux

arcticworker gravatar imagearcticworker ( 2016-05-13 06:54:20 -0600 )edit