Corrected sanity checks in several perf tests
Also fixed a typo in performance testing framework and removed hardcoded temporary file name from highgui perf test
This commit is contained in:
@@ -57,7 +57,13 @@ PERF_TEST_P(stitch, a123, TEST_DETECTORS)
|
||||
stopTimer();
|
||||
}
|
||||
|
||||
SANITY_CHECK(pano, 2);
|
||||
Mat pano_small;
|
||||
if (!pano.empty())
|
||||
resize(pano, pano_small, Size(320, 240), 0, 0, INTER_AREA);
|
||||
else
|
||||
pano_small = pano;
|
||||
|
||||
SANITY_CHECK(pano_small, 5);
|
||||
}
|
||||
|
||||
PERF_TEST_P(stitch, b12, TEST_DETECTORS)
|
||||
@@ -91,7 +97,13 @@ PERF_TEST_P(stitch, b12, TEST_DETECTORS)
|
||||
stopTimer();
|
||||
}
|
||||
|
||||
SANITY_CHECK(pano, 2);
|
||||
Mat pano_small;
|
||||
if (!pano.empty())
|
||||
resize(pano, pano_small, Size(320, 240), 0, 0, INTER_AREA);
|
||||
else
|
||||
pano_small = pano;
|
||||
|
||||
SANITY_CHECK(pano_small, 5);
|
||||
}
|
||||
|
||||
PERF_TEST_P( match, bestOf2Nearest, TEST_DETECTORS)
|
||||
@@ -137,7 +149,11 @@ PERF_TEST_P( match, bestOf2Nearest, TEST_DETECTORS)
|
||||
matcher->collectGarbage();
|
||||
}
|
||||
|
||||
SANITY_CHECK_MATCHES(pairwise_matches.matches);
|
||||
std::vector<DMatch>& matches = pairwise_matches.matches;
|
||||
if (GetParam() == "orb") matches.resize(0);
|
||||
for(size_t q = 0; q < matches.size(); ++q)
|
||||
if (matches[q].imgIdx < 0) { matches.resize(q); break;}
|
||||
SANITY_CHECK_MATCHES(matches);
|
||||
}
|
||||
|
||||
PERF_TEST_P( matchVector, bestOf2NearestVectorFeatures, testing::Combine(
|
||||
@@ -193,6 +209,8 @@ PERF_TEST_P( matchVector, bestOf2NearestVectorFeatures, testing::Combine(
|
||||
}
|
||||
|
||||
|
||||
std::vector<DMatch>& matches = pairwise_matches[0].matches;
|
||||
std::vector<DMatch>& matches = pairwise_matches[detectorName == "surf" ? 1 : 0].matches;
|
||||
for(size_t q = 0; q < matches.size(); ++q)
|
||||
if (matches[q].imgIdx < 0) { matches.resize(q); break;}
|
||||
SANITY_CHECK_MATCHES(matches);
|
||||
}
|
||||
|
Reference in New Issue
Block a user