From 29955620e013e524d45a44835bcaa0a2ef62543c Mon Sep 17 00:00:00 2001 From: Sergei Nosov Date: Wed, 26 Jun 2013 15:07:39 +0400 Subject: [PATCH] multiruns added to avoid the 'unreliable results' error --- modules/imgproc/perf/perf_cvt_color.cpp | 2 +- modules/imgproc/perf/perf_resize.cpp | 3 ++- modules/imgproc/perf/perf_threshold.cpp | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/imgproc/perf/perf_cvt_color.cpp b/modules/imgproc/perf/perf_cvt_color.cpp index 89c7c69160..601beb8996 100644 --- a/modules/imgproc/perf/perf_cvt_color.cpp +++ b/modules/imgproc/perf/perf_cvt_color.cpp @@ -258,7 +258,7 @@ PERF_TEST_P(Size_CvtMode, cvtColor8u, declare.time(100); declare.in(src, WARMUP_RNG).out(dst); - int runs = sz.width <= 320 ? 70 : 1; + int runs = sz.width <= 320 ? 70 : 5; TEST_CYCLE_MULTIRUN(runs) cvtColor(src, dst, mode, ch.dcn); SANITY_CHECK(dst, 1); diff --git a/modules/imgproc/perf/perf_resize.cpp b/modules/imgproc/perf/perf_resize.cpp index 7aef05ee52..ea959a627a 100644 --- a/modules/imgproc/perf/perf_resize.cpp +++ b/modules/imgproc/perf/perf_resize.cpp @@ -85,7 +85,8 @@ PERF_TEST_P(MatInfo_Size_Scale, ResizeAreaFast, declare.in(src, WARMUP_RNG).out(dst); - TEST_CYCLE() resize(src, dst, dst.size(), 0, 0, INTER_AREA); + int runs = 15; + TEST_CYCLE_MULTIRUN(runs) resize(src, dst, dst.size(), 0, 0, INTER_AREA); //difference equal to 1 is allowed because of different possible rounding modes: round-to-nearest vs bankers' rounding SANITY_CHECK(dst, 1); diff --git a/modules/imgproc/perf/perf_threshold.cpp b/modules/imgproc/perf/perf_threshold.cpp index 01fff2e8cc..9ccafd6b54 100644 --- a/modules/imgproc/perf/perf_threshold.cpp +++ b/modules/imgproc/perf/perf_threshold.cpp @@ -51,7 +51,8 @@ PERF_TEST_P(Size_Only, threshold_otsu, testing::Values(TYPICAL_MAT_SIZES)) declare.in(src, WARMUP_RNG).out(dst); - TEST_CYCLE() threshold(src, dst, 0, maxval, THRESH_BINARY|THRESH_OTSU); + int runs = 15; + TEST_CYCLE_MULTIRUN(runs) threshold(src, dst, 0, maxval, THRESH_BINARY|THRESH_OTSU); SANITY_CHECK(dst); }