Ask Your Question
0

model->get<Mat>

asked 2016-01-17 05:32:37 -0600

Bilityuk gravatar image

Hi to everyone! I am trying to use some obsolete code from opencv 2.4.1 in opencv 3.1 project. And some functions have "get" method:

Mat eigenvalues = model->get<Mat>("eigenvalues");
int ncomponents = model->get<int>("ncomponents");
vector<Mat> projections = model->get<vector<Mat> >("projections");
Mat averageFaceRow = model->get<Mat>("mean");

Does anybody know how to make the same in OpenCV 3.1? Help me please to find a solution. Thank you.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2016-01-17 05:50:31 -0600

berak gravatar image

updated 2016-01-17 06:06:08 -0600

the api has changed a bit there. have a look at the updated samples

long story short, there are no more generic, template methods, but

model->getEigenValues();
model->getNComponents()
model->getProjections()

etc.

edit flag offensive delete link more

Comments

Thank you very much!!!

Bilityuk gravatar imageBilityuk ( 2016-01-17 07:43:31 -0600 )edit
1

https://github.com/Itseez/opencv/sear...

(the LDA class is in the core module now)

berak gravatar imageberak ( 2016-01-17 07:44:30 -0600 )edit

Thank you, berak!!!

Bilityuk gravatar imageBilityuk ( 2016-01-17 10:32:43 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-01-17 05:32:37 -0600

Seen: 409 times

Last updated: Jan 17 '16