From 2170811e48a1f4bf7f8fb350f5eb3eb7866cdf68 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Fri, 13 Jul 2018 14:34:46 +0300 Subject: [PATCH] imgproc(perf): update getPerspectiveTransform perf test Function is very fast, so 0.000 ms results are useless. 1000 runs requires 25ms on i7-6700K. --- modules/imgproc/perf/perf_warp.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/imgproc/perf/perf_warp.cpp b/modules/imgproc/perf/perf_warp.cpp index 728a7bba70..b51e9ae75c 100644 --- a/modules/imgproc/perf/perf_warp.cpp +++ b/modules/imgproc/perf/perf_warp.cpp @@ -271,7 +271,7 @@ void update_map(const Mat& src, Mat& map_x, Mat& map_y, const int remapMode ) } } -PERF_TEST(Transform, getPerspectiveTransform) +PERF_TEST(Transform, getPerspectiveTransform_1000) { unsigned int size = 8; Mat source(1, size/2, CV_32FC2); @@ -280,12 +280,14 @@ PERF_TEST(Transform, getPerspectiveTransform) declare.in(source, destination, WARMUP_RNG); - TEST_CYCLE() + PERF_SAMPLE_BEGIN() + for (int i = 0; i < 1000; i++) { transformCoefficient = getPerspectiveTransform(source, destination); } + PERF_SAMPLE_END() - SANITY_CHECK(transformCoefficient, 1e-5); + SANITY_CHECK_NOTHING(); } } // namespace