From: Andrey Kamaev Date: Tue, 9 Oct 2012 15:17:40 +0000 (+0400) Subject: Add sanity checks to stitching perf tests X-Git-Tag: accepted/2.0/20130307.220821~364^2~86^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7cc67701a66d0c7b05d36162e56275ebea599f6e;p=profile%2Fivi%2Fopencv.git Add sanity checks to stitching perf tests --- diff --git a/modules/stitching/perf/perf_stich.cpp b/modules/stitching/perf/perf_stich.cpp index 946a534..3ee47a9 100644 --- a/modules/stitching/perf/perf_stich.cpp +++ b/modules/stitching/perf/perf_stich.cpp @@ -56,6 +56,8 @@ PERF_TEST_P(stitch, a123, TEST_DETECTORS) stitcher.stitch(imgs, pano); stopTimer(); } + + SANITY_CHECK(pano, 2); } PERF_TEST_P(stitch, b12, TEST_DETECTORS) @@ -88,6 +90,8 @@ PERF_TEST_P(stitch, b12, TEST_DETECTORS) stitcher.stitch(imgs, pano); stopTimer(); } + + SANITY_CHECK(pano, 2); } PERF_TEST_P( match, bestOf2Nearest, TEST_DETECTORS) @@ -122,8 +126,7 @@ PERF_TEST_P( match, bestOf2Nearest, TEST_DETECTORS) detail::MatchesInfo pairwise_matches; - declare.in(features1.descriptors, features2.descriptors) - .iterations(100); + declare.in(features1.descriptors, features2.descriptors); while(next()) { @@ -133,6 +136,8 @@ PERF_TEST_P( match, bestOf2Nearest, TEST_DETECTORS) stopTimer(); matcher->collectGarbage(); } + + SANITY_CHECK_MATCHES(pairwise_matches.matches); } PERF_TEST_P( matchVector, bestOf2NearestVectorFeatures, testing::Combine( @@ -186,4 +191,8 @@ PERF_TEST_P( matchVector, bestOf2NearestVectorFeatures, testing::Combine( stopTimer(); matcher->collectGarbage(); } + + + std::vector& matches = pairwise_matches[0].matches; + SANITY_CHECK_MATCHES(matches); }