Home > Software engineering >  OpenCV4.1.0 FlannBasedMatcher used in error
OpenCV4.1.0 FlannBasedMatcher used in error

Time:11-20

OpenCV3 use is normal, why to 4.1.0 error, the official in the Sample is also no relevant examples, in addition, using class BFMatcher is normal,
The code is as follows:
 Mat img1=imread (" 3. BMP "); 
Mat img2=imread (" 7. BMP ");
Vector Kpts1 kpts2, kpts3 kpts4;
Mat desc1 desc2, desc3 desc4;
//BFMatcher matcher (NORM_HAMMING);
FlannBasedMatcher matcher.
Vector
Ptr Detector0=AKAZE: : create ();
Detector0 - & gt; DetectAndCompute (img1, noArray (), kpts1, desc1);
Detector0 - & gt; DetectAndCompute (img2, noArray (), kpts2 desc2);
The matcher. Match (desc1 desc2, matches0);//here collapse

CodePudding user response:

The new version without the class seems to be due to the patent
  • Related