From 3a0e26b89d391ef9c6a4c8b3c13fae7370ca0a56 Mon Sep 17 00:00:00 2001 From: Andrey Pavlenko Date: Fri, 26 Jul 2013 17:27:31 +0400 Subject: [PATCH 1/2] adding/tuning multiple run for perf tests failing due to big deviation (functions using TBB can work so) --- modules/imgproc/perf/perf_cvt_color.cpp | 2 +- modules/imgproc/perf/perf_histogram.cpp | 2 +- modules/imgproc/perf/perf_resize.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/imgproc/perf/perf_cvt_color.cpp b/modules/imgproc/perf/perf_cvt_color.cpp index 601beb8996..966a442f36 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 : 5; + int runs = sz.width <= 320 ? 100 : 5; TEST_CYCLE_MULTIRUN(runs) cvtColor(src, dst, mode, ch.dcn); SANITY_CHECK(dst, 1); diff --git a/modules/imgproc/perf/perf_histogram.cpp b/modules/imgproc/perf/perf_histogram.cpp index 92db3be34a..fc6a5cc46b 100644 --- a/modules/imgproc/perf/perf_histogram.cpp +++ b/modules/imgproc/perf/perf_histogram.cpp @@ -35,7 +35,7 @@ PERF_TEST_P(Size_Source, calcHist1d, declare.in(source); - TEST_CYCLE() + TEST_CYCLE_MULTIRUN(3) { calcHist(&source, numberOfImages, channels, Mat(), hist, dims, histSize, ranges); } diff --git a/modules/imgproc/perf/perf_resize.cpp b/modules/imgproc/perf/perf_resize.cpp index ea959a627a..7634644ea5 100644 --- a/modules/imgproc/perf/perf_resize.cpp +++ b/modules/imgproc/perf/perf_resize.cpp @@ -25,7 +25,7 @@ PERF_TEST_P(MatInfo_Size_Size, resizeUpLinear, cvtest::fillGradient(src); declare.in(src).out(dst); - TEST_CYCLE() resize(src, dst, to); + TEST_CYCLE_MULTIRUN(10) resize(src, dst, to); #ifdef ANDROID SANITY_CHECK(dst, 5); @@ -52,7 +52,7 @@ PERF_TEST_P(MatInfo_Size_Size, resizeDownLinear, cvtest::fillGradient(src); declare.in(src).out(dst); - TEST_CYCLE() resize(src, dst, to); + TEST_CYCLE_MULTIRUN(10) resize(src, dst, to); #ifdef ANDROID SANITY_CHECK(dst, 5); From eb0d26b5be59605343310bcee109d85a6d36db78 Mon Sep 17 00:00:00 2001 From: Andrey Pavlenko Date: Tue, 30 Jul 2013 16:42:45 +0400 Subject: [PATCH 2/2] fixing warning on shadowing local var (TEST_CYCLE_MULTIRUN uses 'r') --- modules/imgproc/perf/perf_histogram.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/imgproc/perf/perf_histogram.cpp b/modules/imgproc/perf/perf_histogram.cpp index fc6a5cc46b..1789470c20 100644 --- a/modules/imgproc/perf/perf_histogram.cpp +++ b/modules/imgproc/perf/perf_histogram.cpp @@ -28,8 +28,8 @@ PERF_TEST_P(Size_Source, calcHist1d, int dims = 1; int numberOfImages = 1; - const float r[] = {rangeLow, rangeHight}; - const float* ranges[] = {r}; + const float range[] = {rangeLow, rangeHight}; + const float* ranges[] = {range}; randu(source, rangeLow, rangeHight);