Merge pull request #23154 from tomoaki0705:handleNonBitExact

pull/23167/head^2
Alexander Alekhin 2 years ago
commit b71a168937
  1. 32
      modules/ts/src/cuda_test.cpp

@ -519,13 +519,35 @@ namespace cvtest
int validCount = 0;
for (size_t i = 0; i < gold.size(); ++i)
if (actual.size() == gold.size())
{
const cv::KeyPoint& p1 = gold[i];
const cv::KeyPoint& p2 = actual[i];
for (size_t i = 0; i < gold.size(); ++i)
{
const cv::KeyPoint& p1 = gold[i];
const cv::KeyPoint& p2 = actual[i];
if (keyPointsEquals(p1, p2))
++validCount;
if (keyPointsEquals(p1, p2))
++validCount;
}
}
else
{
std::vector<cv::KeyPoint>& shorter = gold;
std::vector<cv::KeyPoint>& longer = actual;
if (actual.size() < gold.size())
{
shorter = actual;
longer = gold;
}
for (size_t i = 0; i < shorter.size(); ++i)
{
const cv::KeyPoint& p1 = shorter[i];
const cv::KeyPoint& p2 = longer[i];
const cv::KeyPoint& p3 = longer[i+1];
if (keyPointsEquals(p1, p2) || keyPointsEquals(p1, p3))
++validCount;
}
}
return validCount;

Loading…
Cancel
Save