message: Added test for checkMasks with UMat train descs
diff: @@ -565,7 +565,6 @@ TEST(Features2d_DMatch, issue_11855)
  1, 1, 1);
  Mat targets = (Mat_<uchar>(2, 3) << 1, 1, 1,
  0, 0, 0);
  -
  Ptr<BFMatcher> bf = BFMatcher::create(NORM_HAMMING, true);
  vector<vector<DMatch> > match;
  bf->knnMatch(sources, targets, match, 1, noArray(), true);
  @@ -577,4 +576,18 @@ TEST(Features2d_DMatch, issue_11855)
  EXPECT_EQ(0.0f, match[0][0].distance);
  }
  +TEST(Features2d_DMatch, issue_17771)
  +{
  + Mat sources = (Mat_<uchar>(2, 3) << 1, 1, 0,
  + 1, 1, 1);
  + Mat targets = (Mat_<uchar>(2, 3) << 1, 1, 1,
  + 0, 0, 0);
  + UMat usources = sources.getUMat(ACCESS_READ);
  + UMat utargets = targets.getUMat(ACCESS_READ);
  + vector<vector<DMatch> > match;
  + Ptr<BFMatcher> ubf = BFMatcher::create(NORM_HAMMING);
  + Mat mask = (Mat_<uchar>(2, 2) << 1, 0, 0, 1);
  + EXPECT_NO_THROW(ubf->knnMatch(usources, utargets, match, 1, mask, true));
  +}
  +
  }} // namespace
  