本文整理汇总了C++中BFMatcher::radiusMatch方法的典型用法代码示例。如果您正苦于以下问题:C++ BFMatcher::radiusMatch方法的具体用法?C++ BFMatcher::radiusMatch怎么用?C++ BFMatcher::radiusMatch使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BFMatcher
的用法示例。
在下文中一共展示了BFMatcher::radiusMatch方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: query
PERF_TEST_P(BruteForceMatcherFixture, DISABLED_radiusMatch,
OCL_BFMATCHER_TYPICAL_MAT_SIZES) // TODO too many outliers
{
const Size srcSize = GetParam();
const float max_distance = 2.0f;
vector<vector<DMatch> > matches(2);
Mat query(srcSize, CV_32F), train(srcSize, CV_32F);
declare.in(query, train);
Mat trainIdx, distance, allDist;
randu(query, 0.0f, 1.0f);
randu(train, 0.0f, 1.0f);
if (RUN_PLAIN_IMPL)
{
BFMatcher matcher (NORM_L2);
TEST_CYCLE() matcher.radiusMatch(query, matches, max_distance);
std::vector<DMatch> & matches0 = matches[0], & matches1 = matches[1];
SANITY_CHECK_MATCHES(matches0);
SANITY_CHECK_MATCHES(matches1);
}
else if (RUN_OCL_IMPL)
{
ocl::oclMat oclQuery(query), oclTrain(train);
ocl::BruteForceMatcher_OCL_base oclMatcher(ocl::BruteForceMatcher_OCL_base::L2Dist);
TEST_CYCLE() oclMatcher.radiusMatch(oclQuery, oclTrain, matches, max_distance);
std::vector<DMatch> & matches0 = matches[0], & matches1 = matches[1];
SANITY_CHECK_MATCHES(matches0);
SANITY_CHECK_MATCHES(matches1);
}
else
OCL_PERF_ELSE
}