added perf test for cv::erode
authorKirill Kornyakov <no@email>
Thu, 6 Oct 2011 12:42:14 +0000 (12:42 +0000)
committerKirill Kornyakov <no@email>
Thu, 6 Oct 2011 12:42:14 +0000 (12:42 +0000)
modules/imgproc/perf/perf_integral.cpp
modules/imgproc/perf/perf_morph.cpp [new file with mode: 0644]

index 741b956..ee53b46 100644 (file)
@@ -91,4 +91,3 @@ PERF_TEST_P( Size_MatType_OutMatDepth, integral3,
     SANITY_CHECK(sqsum);\r
     SANITY_CHECK(tilted);\r
 }\r
-\r
diff --git a/modules/imgproc/perf/perf_morph.cpp b/modules/imgproc/perf/perf_morph.cpp
new file mode 100644 (file)
index 0000000..4e44817
--- /dev/null
@@ -0,0 +1,28 @@
+#include "perf_precomp.hpp"\r
+\r
+using namespace std;\r
+using namespace cv;\r
+using namespace perf;\r
+\r
+typedef perf::TestBaseWithParam<cv::Size> MatSize;\r
+\r
+/*\r
+ void erode( InputArray src, OutputArray dst, InputArray kernel,\r
+             Point anchor=Point(-1,-1), int iterations=1,\r
+             int borderType=BORDER_CONSTANT,\r
+             const Scalar& borderValue=morphologyDefaultBorderValue() );\r
+*/\r
+PERF_TEST_P( MatSize, erode, ::testing::Values( TYPICAL_MAT_SIZES ))\r
+{\r
+    Size sz = GetParam();\r
+    int type = CV_8UC1;\r
+\r
+    Mat src(sz, type);\r
+    Mat dst(sz, type);\r
+\r
+    declare.in(src, WARMUP_RNG);\r
+\r
+    TEST_CYCLE(100) { erode(src, dst, Mat()); }\r
+\r
+    SANITY_CHECK(dst);\r
+}\r