Reputation: 55
I'm using Open CV 3.2 and work in Visual Studio 2015 Platform.
In this tutorial they use BruteForceMatcher.
And based on this answer, I know there are several differences of using opencv 2.x and 3.x.
So, is there any suggestion how to change
BruteForceMatcher<L2<float> > matcher;
vector<DMatch> matches;
matcher.match(descriptors1, descriptors2, matches);
into Open CV 3.x form?
Upvotes: 0
Views: 645
Reputation: 1388
You can try the following code
Ptr<cv::DescriptorMatcher> matcher(new cv::BFMatcher(cv::NORM_HAMMING, true));
vector<DMatch> matches;
matcher->match(descriptors1, descriptors2, matches);
Upvotes: 3