1. 程式人生 > >BruteForceMatcher報錯“無法識別的識別符號”

BruteForceMatcher報錯“無法識別的識別符號”

對於OpenCV2.4.9的解決辦法:
BruteForceMatcher並不在opencv2/features2d/features2d.hpp 而是
需加入opencv2/nonfree/features2d.hpp
包含上面檔案最終還需加入 opencv2/legacy/legacy.hpp。
但是對於OpenCV3,上面辦法不可行
有這麼一個辦法:https://blog.csdn.net/qsy2000/article/details/70230827
Ptr matcher = DescriptorMatcher::create(“BruteForce”);
matcher->match(descriptors_1, descriptors_2, matches);