Ask Your Question

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

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

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


to be more specific, this is code from MRPT examples.

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

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

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

1 answer

Sort by ยป oldest newest most voted

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

Eduardo gravatar image

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

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


thank you! Much appreciated.

stillNovice gravatar imagestillNovice ( 2015-06-07 12:15:39 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


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

Seen: 1,885 times

Last updated: Jun 06 '15