From a25c443d1f99285c0986fd197d4b4a0c663571f1 Mon Sep 17 00:00:00 2001 From: elenagvo Date: Thu, 9 Nov 2017 14:13:55 +0300 Subject: [PATCH] add perf test for boxFilter CV8U to CV16U --- modules/imgproc/perf/perf_blur.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/modules/imgproc/perf/perf_blur.cpp b/modules/imgproc/perf/perf_blur.cpp index 2a284dc..956782e 100644 --- a/modules/imgproc/perf/perf_blur.cpp +++ b/modules/imgproc/perf/perf_blur.cpp @@ -43,6 +43,9 @@ typedef perf::TestBaseWithParam Size_MatType_Borde typedef std::tr1::tuple Size_MatType_BorderType_t; typedef perf::TestBaseWithParam Size_MatType_BorderType; +typedef std::tr1::tuple Size_ksize_BorderType_t; +typedef perf::TestBaseWithParam Size_ksize_BorderType; + PERF_TEST_P(Size_MatType_BorderType3x3, gaussianBlur3x3, testing::Combine( testing::Values(szODD, szQVGA, szVGA, sz720p), @@ -134,6 +137,28 @@ PERF_TEST_P(Size_MatType_BorderType3x3, box3x3, SANITY_CHECK(dst, 1e-6, ERROR_RELATIVE); } +PERF_TEST_P(Size_ksize_BorderType, box_CV8U_CV16U, + testing::Combine( + testing::Values(szODD, szQVGA, szVGA, sz720p), + testing::Values(3, 5, 15), + BorderType3x3::all() + ) + ) +{ + Size size = get<0>(GetParam()); + int ksize = get<1>(GetParam()); + BorderType3x3 btype = get<2>(GetParam()); + + Mat src(size, CV_8UC1); + Mat dst(size, CV_16UC1); + + declare.in(src, WARMUP_RNG).out(dst); + + TEST_CYCLE() boxFilter(src, dst, CV_16UC1, Size(ksize, ksize), Point(-1,-1), false, btype); + + SANITY_CHECK(dst, 1e-6, ERROR_RELATIVE); +} + PERF_TEST_P(Size_MatType_BorderType3x3, box3x3_inplace, testing::Combine( testing::Values(szODD, szQVGA, szVGA, sz720p), -- 2.7.4