SURF特征在opencv2.x中用法:
SurfFeatureDetector detector( minHessian );
std::vector<KeyPoint> keypoints_1, keypoints_2;
detector.detect( img_1, keypoints_1 );
detector.detect( img_2, keypoints_2 )
在opencv3.2中的用法为:
Ptr<SURF> detector = SURF::create(minHessian);
detector->detect(img_1, keypoints_1);
Ptr<SURF> extractor = SURF::create();
extractor->compute(img_1, keypoints_1, descriptors_1);
Ptr<DescriptorMatcher> matcher = DescriptorMatcher::create("BruteForce");
matcher->match(descriptors_1, descriptors_2, matches);
同样的,
SurfFeatureDetector、SurfDescriptorExtractor、BruteForceMatcher,都有类似操作。使用方法类似。