Skip to content

Commit

Permalink
Merge pull request opencv#23154 from tomoaki0705:handleNonBitExact
Browse files Browse the repository at this point in the history
  • Loading branch information
alalek committed Jan 21, 2023
2 parents 17e860a + 1833b03 commit b71a168
Showing 1 changed file with 27 additions and 5 deletions.
32 changes: 27 additions & 5 deletions modules/ts/src/cuda_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b71a168

Please sign in to comment.