We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 41678fe commit 4dd9a36Copy full SHA for 4dd9a36
modules/features2d/test/test_matchers_algorithmic.cpp
@@ -565,7 +565,6 @@ TEST(Features2d_DMatch, issue_11855)
565
1, 1, 1);
566
Mat targets = (Mat_<uchar>(2, 3) << 1, 1, 1,
567
0, 0, 0);
568
-
569
Ptr<BFMatcher> bf = BFMatcher::create(NORM_HAMMING, true);
570
vector<vector<DMatch> > match;
571
bf->knnMatch(sources, targets, match, 1, noArray(), true);
@@ -577,4 +576,18 @@ TEST(Features2d_DMatch, issue_11855)
577
576
EXPECT_EQ(0.0f, match[0][0].distance);
578
}
579
+TEST(Features2d_DMatch, issue_17771)
580
+{
581
+ Mat sources = (Mat_<uchar>(2, 3) << 1, 1, 0,
582
+ 1, 1, 1);
583
+ Mat targets = (Mat_<uchar>(2, 3) << 1, 1, 1,
584
+ 0, 0, 0);
585
+ UMat usources = sources.getUMat(ACCESS_READ);
586
+ UMat utargets = targets.getUMat(ACCESS_READ);
587
+ vector<vector<DMatch> > match;
588
+ Ptr<BFMatcher> ubf = BFMatcher::create(NORM_HAMMING);
589
+ Mat mask = (Mat_<uchar>(2, 2) << 1, 0, 0, 1);
590
+ EXPECT_NO_THROW(ubf->knnMatch(usources, utargets, match, 1, mask, true));
591
+}
592
+
593
}} // namespace
0 commit comments