提交 4dd9a36a 编写于 作者: M Maksim Shabunin

Added test for checkMasks with UMat train descs

上级 41678fe3
......@@ -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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册