From 5a2a0b326a47f647eec9b438e6d1789a3b3678fa Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Mon, 13 Jan 2014 15:30:35 +0400 Subject: [PATCH] added perf tests for cv::dilate --- modules/imgproc/perf/opencl/perf_filters.cpp | 22 ++++++++++++++++++++ modules/imgproc/perf/opencl/perf_imgproc.cpp | 1 - 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/modules/imgproc/perf/opencl/perf_filters.cpp b/modules/imgproc/perf/opencl/perf_filters.cpp index 93d0f2faa..27abe051f 100644 --- a/modules/imgproc/perf/opencl/perf_filters.cpp +++ b/modules/imgproc/perf/opencl/perf_filters.cpp @@ -118,6 +118,28 @@ OCL_PERF_TEST_P(ErodeFixture, Erode, SANITY_CHECK(dst); } +///////////// Dilate //////////////////// + +typedef Size_MatType DilateFixture; + +OCL_PERF_TEST_P(DilateFixture, Dilate, + ::testing::Combine(OCL_TEST_SIZES, OCL_TEST_TYPES)) +{ + const Size_MatType_t params = GetParam(); + const Size srcSize = get<0>(params); + const int type = get<1>(params), ksize = 3; + const Mat ker = getStructuringElement(MORPH_RECT, Size(ksize, ksize)); + + checkDeviceMaxMemoryAllocSize(srcSize, type); + + UMat src(srcSize, type), dst(srcSize, type); + declare.in(src, WARMUP_RNG).out(dst).in(ker); + + OCL_TEST_CYCLE() cv::dilate(src, dst, ker); + + SANITY_CHECK(dst); +} + ///////////// Sobel //////////////////////// typedef Size_MatType SobelFixture; diff --git a/modules/imgproc/perf/opencl/perf_imgproc.cpp b/modules/imgproc/perf/opencl/perf_imgproc.cpp index 117fe1ad6..d7d03b7b3 100644 --- a/modules/imgproc/perf/opencl/perf_imgproc.cpp +++ b/modules/imgproc/perf/opencl/perf_imgproc.cpp @@ -199,4 +199,3 @@ OCL_PERF_TEST_P(CLAHEFixture, CLAHE, OCL_TEST_SIZES) } } // namespace cvtest::ocl #endif // HAVE_OPENCL -