我正在使用 Open CV 3.2 并在 Visual Studio 2015 平台中工作。
在this tutorial他们使用 BruteForceMatcher。
并基于this answer ,我知道使用 opencv 2.x 和 3.x 有几个区别。
那么,有什么建议如何改变
BruteForceMatcher<L2<float> > matcher;
vector<DMatch> matches;
matcher.match(descriptors1, descriptors2, matches);
进入 Open CV 3.x 表格?
最佳答案
你可以试试下面的代码
Ptr<cv::DescriptorMatcher> matcher(new cv::BFMatcher(cv::NORM_HAMMING, true));
vector<DMatch> matches;
matcher->match(descriptors1, descriptors2, matches);
关于c++ - 如何在 OPENCV 3.x C++ Visual Studio 2015 中声明 BruteForceMatcher,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42877604/