opencv 3.0 what is the correct way to use surffeaturedetector?

asked 2015-03-04 13:27:33 -0600

pingping__ gravatar image

updated 2015-03-04 13:38:21 -0600

I looked all over of the site and from different sites, and found that the syntax were different for each for opencv 3.0

https://github.com/Itseez/opencv_cont...

http://docs.opencv.org/trunk/doc/tuto...

http://answers.opencv.org/question/52...

all these sites provide different syntax for instantiating surffeaturedetector.

I followed the homography tutorial but it was in 2.4. When i switched to 3.0 beta, but it's not getting the same results. any guidance? thanks!

notes: windows 8.1, opencv 3.0 beta with Qt creator

EDIT: sorry wrong problem. i meant to say wrong results instead of compilation errors.

int minHessian = 40; //400

//this worked with 2.4 but didnt with 3.0
//SurfFeatureDetector detector(minHessian);

// this wouldnt work if minHessian goes over 40
Ptr<FeatureDetector> detector = FastFeatureDetector::create(minHessian);
vector<KeyPoint> keypoints_obj, keypoints_scene;
detector->detect(center, keypoints_obj);
detector->detect(theScene, keypoints_scene);
edit retag flag offensive close merge delete

Comments

2

show your errors, and try the last link ;)

(and yes, a couple of things there will need an update, thanks for reporting any problems)

the surfer_match.cpp from contrib should work, doesn't it ?

berak gravatar imageberak ( 2015-03-04 13:32:25 -0600 )edit

1st arg to FastFeatureDetector::create is threshold, and it does not take minhessian at all.

berak gravatar imageberak ( 2015-03-04 13:44:32 -0600 )edit

@berak i think the surfer_matcher.cpp works, just that im not sure if the structs in the beginning is needed. sorry.. im new to opencv.

pingping__ gravatar imagepingping__ ( 2015-03-04 13:44:39 -0600 )edit
1

i must side you, the whole surfer_matcher thing looks pretty 'over-engeneered' ;)

rip it apart, keep, what you need !

berak gravatar imageberak ( 2015-03-04 13:46:42 -0600 )edit
1

@berak okay thanks! ill give it a try!

pingping__ gravatar imagepingping__ ( 2015-03-04 13:49:23 -0600 )edit