Ask Your Question
0

SurfFeatureDetector undefined

asked 2019-02-07 04:48:43 -0600

opencvr gravatar image

Hello,

I am trying to use SURF DETECTOR using this tutorial. link text

I have installed opencv_contrib extra package using cmake by this tutorial. link text

After completing all procedure, when I am trying to use SurfFeatureDetector it gave me error like, it is not defined.

is anyone have idea what I am missing?

opencv version: 4.0.0

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2019-02-07 05:03:35 -0600

berak gravatar image

updated 2019-02-07 05:09:49 -0600

I have installed opencv_contrib extra package using cmake

good ! make sure you have cmake -DOPENCV_ENABLE_NONFREE=ON

then, syntax has changed:

#include "opencv2/xfeatures2d.hpp"

Ptr<xfeatures2d::SURF> surf = xfeatures2d::SURF::create();
surf->detectAndCompute(img, ....);
edit flag offensive delete link more

Comments

Thanks....

opencvr gravatar imageopencvr ( 2019-02-07 05:52:08 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2019-02-07 04:48:43 -0600

Seen: 928 times

Last updated: Feb 07 '19