From 9a408c744d689f3600873318aeed54b5be0d05cc Mon Sep 17 00:00:00 2001 From: Daniil Osokin Date: Fri, 10 Aug 2012 15:33:19 +0400 Subject: [PATCH] Added perf test for distanceTransform --- .../imgproc/perf/perf_distanceTransform.cpp | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 modules/imgproc/perf/perf_distanceTransform.cpp diff --git a/modules/imgproc/perf/perf_distanceTransform.cpp b/modules/imgproc/perf/perf_distanceTransform.cpp new file mode 100644 index 0000000000..8cdacdc194 --- /dev/null +++ b/modules/imgproc/perf/perf_distanceTransform.cpp @@ -0,0 +1,23 @@ +#include "perf_precomp.hpp" +#include "distransform.cpp" + +using namespace std; +using namespace cv; +using namespace perf; + +typedef perf::TestBaseWithParam Size_DistanceTransform; + +PERF_TEST_P(Size_DistanceTransform, icvTrueDistTrans, testing::Values(TYPICAL_MAT_SIZES)) +{ + Size size = GetParam(); + Mat src(size, CV_8UC1); + Mat dst(size, CV_32FC1); + CvMat srcStub = src; + CvMat dstStub = dst; + + declare.in(src, WARMUP_RNG).out(dst); + + TEST_CYCLE() icvTrueDistTrans(&srcStub, &dstStub); + + SANITY_CHECK(dst, 1); +}