c++ - 如何在 OPENCV 3.x C++ Visual Studio 2015 中声明 BruteForceMatcher

标签 c++ opencv visual-studio-2015 opencv3.0

我正在使用 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/

相关文章:

image-processing - OpenCV:立体声校正问题(使用书中的示例代码)

c++ - Visual Studio : Hotkey/way to step into f() in statement a()->f(b(), c(),d()) 直接

c++ - 调试时 VC++ 2015 IDE 中的错误?

c++ - 线程和 QRegisterMetatype 问题

c++ - 如何修复 C++ 中的回溯行号错误

c++ - Mac 上的 OpenCV 无法打开 USB 网络摄像头

javascript - 如何使用opencv4node.js设置矩阵区域

c++ - CryptoNote 使编译问题 Ubuntu

c++ - 使用某些系数将图像转换为灰度的最快方法

visual-studio-2015 - MS 假货/垫片与 VS2015 专业版?