Ask Your Question

What is the alternative of getMat() of Facerecognizer class in opencv3.00 ?

asked 2015-10-21 09:50:25 -0500

Noman gravatar image

I want to follow the tutorials of the face recognition with opencv. But in the tutorial source code example getMat() method is used, which is deprecated in opencv3.0. What can I use instead of getMat() now in opencv3.0?

This is the tutorial I am trying to follow -

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2015-10-21 09:53:57 -0500

berak gravatar image

updated 2015-10-21 10:04:44 -0500

the interface has changed a bit, please have another look at the updated samples

it's all like: reco->getEigenValues() instead of reco->getMat("eigenvalues") and such.

also, do yourself a favour, and update both opencv and opencv_contrib repos (and rebuild) for consistancy

last, but not least, the beta docs are outdated, rather look here

edit flag offensive delete link more


Thank you for your answer. But the same error as before - class cv::face::FaceRecognizer has no member "getEigenValues". I installed opencv just a month ago and downloaded opencv_contrib repo weeks ago. Do I need to update both and rebuild again?

Noman gravatar imageNoman ( 2015-10-21 10:16:36 -0500 )edit
  • anyway, update, since you're on 3.0, get used to do a git pull on a regular basis (even if it's not for this issue only)
  • then, cv::face::FaceRecognizer does not have any of those methods, you want an instance of cv::face::BasicFaceRecognizer in this case.
berak gravatar imageberak ( 2015-10-21 10:27:07 -0500 )edit

Thank you very much. It worked.

Noman gravatar imageNoman ( 2015-10-21 10:30:44 -0500 )edit

Question Tools

1 follower


Asked: 2015-10-21 09:50:25 -0500

Seen: 1,413 times

Last updated: Oct 21 '15