2017-03-18 11 views
0

私はOpen CV 3.2を使用しており、Visual Studio 2015プラットフォームで動作しています。OPENCV 3.xでBruteForceMatcherを宣言する方法C++ Visual Studio 2015

this tutorialでは、BruteForceMatcherを使用します。

this answerに基づいて、私はopencv 2.xと3.xを使用していくつかの違いがあることを知っています。

ので、オープンCV 3.xのフォームに

BruteForceMatcher<L2<float> > matcher; 
vector<DMatch> matches; 
matcher.match(descriptors1, descriptors2, matches); 

を変更するには、どのように任意の提案はありますか?

答えて

3

次のコード

Ptr<cv::DescriptorMatcher> matcher(new cv::BFMatcher(cv::NORM_HAMMING, true)); 
vector<DMatch> matches; 
matcher->match(descriptors1, descriptors2, matches); 
を試すことができます
関連する問題