0

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?

Community
  • 1
  • 1
Berlian
  • 57
  • 2
  • 10

1 Answers1

3

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);
Lakshya Kejriwal
  • 1,340
  • 4
  • 17
  • 27