feature detection code error

asked 2016-09-07 01:30:10 -0600

snehal gravatar image

updated 2016-09-07 01:44:49 -0600

berak gravatar image

Hi

https://github.com/uscrs-art/beohawk-...

This is the link which i reffered from github... i m using opencv version 2.4.13.. but i got an error...

feature_matching.cpp:50:2: error:‘SurfFeatureDetector’ does not name a type
SurfFeatureDetector surf_feature_detector;
^
feature_matching.cpp:51:2: error: ‘SurfDescriptorExtractor’ does not name a type
SurfDescriptorExtractor surf_descriptor_extractor;
^
feature_matching.cpp: In member function ‘void Feature_Matching::sub_image_callback(const ImageConstPtr&)’:
feature_matching.cpp:86:4: error: ‘surf_feature_detector’ was not declared in this scope
surf_feature_detector.detect(img_tgt, *keypoints_tgt_ptr);
^
feature_matching.cpp:87:4: error: ‘surf_descriptor_extractor’ was not declared in this scope
surf_descriptor_extractor.compute(img_tgt, *keypoints_tgt_ptr, descriptors_tgt);

I tried #include <opencv2/nonfree/features2d.hpp> but it doesn't work... can someone tell me what is the issue in that code? Also i tried for SIFT but its get same error... please suggest me for SIFT also.

edit retag flag offensive close merge delete

Comments

1

2011 was how many years ago, now ?

berak gravatar imageberak ( 2016-09-07 01:35:11 -0600 )edit
1

"but it doesn't work... " -- not helpful. what happened exactly ?

berak gravatar imageberak ( 2016-09-07 01:52:44 -0600 )edit

When i was using this piece code for practical implementation and after i was compiling this code in ROS it showed me this error. How to solved this error?

snehal gravatar imagesnehal ( 2016-09-07 04:01:43 -0600 )edit
1

usually, ros comes with it's own opencv, it might not be using your 2.4.13, please check.

berak gravatar imageberak ( 2016-09-07 04:17:45 -0600 )edit