From: Vitaly Tuzov Date: Fri, 18 Jan 2019 11:59:03 +0000 (+0300) Subject: Performance test for bounding rect estimation X-Git-Tag: accepted/tizen/6.0/unified/20201030.111113~1^2~341^2~3^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=78f80c35d214eb3b54f7ac536ec74f62fb84bfd3;p=platform%2Fupstream%2Fopencv.git Performance test for bounding rect estimation --- diff --git a/modules/imgproc/perf/perf_contours.cpp b/modules/imgproc/perf/perf_contours.cpp index d3a70cf..bc8b530 100644 --- a/modules/imgproc/perf/perf_contours.cpp +++ b/modules/imgproc/perf/perf_contours.cpp @@ -84,4 +84,26 @@ PERF_TEST_P(TestFindContoursFF, findContours, SANITY_CHECK_NOTHING(); } +typedef TestBaseWithParam< tuple > TestBoundingRect; + +PERF_TEST_P(TestBoundingRect, BoundingRect, + Combine( + testing::Values(CV_32S, CV_32F), // points type + Values(400, 511, 1000, 10000, 100000) // points count + ) +) + +{ + int ptType = get<0>(GetParam()); + int n = get<1>(GetParam()); + + Mat pts(n, 2, ptType); + declare.in(pts, WARMUP_RNG); + + cv::Rect rect; + TEST_CYCLE() rect = boundingRect(pts); + + SANITY_CHECK_NOTHING(); +} + } } // namespace