在这种情况下如何声明“ SurfFeatureDetector”和“ BFMatcher”?

时间:2019-11-07 15:12:44

标签: c++ opencv

我正在尝试一种在FREAK的帮助下使用特征检测物体的算法。在此情况下如何正确声明“ SurfFeatureDetector”和“ BFMatcher”(matcher.match)函数。

SurfFeatureDetector检测器(1000);

FREAK extractor;

BFMatcher matcher(Hamming);


double t = (double)getTickCount();

detector.detect(ImageTemple, keypointsImageTemple);
detector.detect(Image, keypointsImage);

t = ((double)getTickCount() - t) / getTickFrequency();

t = (double)getTickCount();

extractor.compute(ImageTemple, keypointsImageTemple, descriptorsImageTemple);
extractor.compute(Image, keypointsImage, descriptorsImage);

t = ((double)getTickCount() - t) / getTickFrequency();

t = (double)getTickCount();

matcher.match(descriptorsImageTemple, descriptorsImage, matches);

......

0 个答案:

没有答案