Ask Your Question
0

create' : is not a member of 'cv::Algorithm'

asked 2015-06-06 07:36:13 -0600

stillNovice gravatar image

Hi all, I am having a problem with the cv::Algorithm.create line.

This line of code:

Ptr<Feature2D> surf = Algorithm::create<Feature2D>("Feature2D.SURF");

gives me the following error:

Error   7 error C2039: 'create' : is not a member of 'cv::Algorithm'

Please help! this is driving me insane. Windows 8, visual studio 2013, opencv 3.0

edit retag flag offensive close merge delete

Comments

to be more specific, this is code from MRPT examples. http://www.mrpt.org/

stillNovice gravatar imagestillNovice ( 2015-06-06 07:42:54 -0600 )edit

I have added initModule_nonfree() as explained in the docs, but to no effect.

stillNovice gravatar imagestillNovice ( 2015-06-06 07:45:37 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
2

answered 2015-06-06 09:53:33 -0600

Eduardo gravatar image

updated 2015-06-06 09:57:27 -0600

It is normal as you use OpenCV 3.0.0. This way of use has been removed.

Instead, you can use:

cv::Ptr<cv::Feature2D> surf = cv::xfeatures2d::SURF::create();

You will need also the contrib module to have access to SURF keypoints.

edit flag offensive delete link more

Comments

thank you! Much appreciated.

stillNovice gravatar imagestillNovice ( 2015-06-07 12:15:39 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2015-06-06 07:36:13 -0600

Seen: 2,231 times

Last updated: Jun 06 '15