Ask Your Question
0

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

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

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 - http://docs.opencv.org/3.0-beta/modul...

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
3

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

berak gravatar image

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

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

Comments

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 -0600 )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 -0600 )edit
1

Thank you very much. It worked.

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

Question Tools

1 follower

Stats

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

Seen: 1,638 times

Last updated: Oct 21 '15