Fail perf_inRange.cpp added
authorAlexander Kapustin <no@email>
Mon, 23 Apr 2012 09:09:30 +0000 (09:09 +0000)
committerAlexander Kapustin <no@email>
Mon, 23 Apr 2012 09:09:30 +0000 (09:09 +0000)
modules/core/perf/perf_inRange.cpp [new file with mode: 0644]

diff --git a/modules/core/perf/perf_inRange.cpp b/modules/core/perf/perf_inRange.cpp
new file mode 100644 (file)
index 0000000..c4268f2
--- /dev/null
@@ -0,0 +1,26 @@
+#include "perf_precomp.hpp"\r
+\r
+using namespace std;\r
+using namespace cv;\r
+using namespace perf;\r
+using std::tr1::make_tuple;\r
+using std::tr1::get;\r
+\r
+#define TYPICAL_MAT_TYPES_INRANGE  CV_8UC1, CV_8UC4, CV_8SC1, CV_16UC1, CV_16SC1, CV_32SC1, CV_32FC1, CV_32FC4\r
+#define TYPICAL_MATS_INRANGE       testing::Combine(testing::Values(szVGA, sz720p, sz1080p), testing::Values(TYPICAL_MAT_TYPES_INRANGE))\r
+\r
+PERF_TEST_P(Size_MatType, inRange, TYPICAL_MATS_INRANGE)\r
+{\r
+    Size size = get<0>(GetParam());\r
+    int type = get<1>(GetParam());\r
+    Mat src1(size, type);\r
+    Mat src2(size, type);\r
+    Mat src3(size, type);\r
+    Mat dst(size, type);\r
+\r
+    declare.in(src1, src2, src3, WARMUP_RNG).out(dst);\r
+\r
+    TEST_CYCLE() inRange( src1, src2, src3, dst );\r
+\r
+    SANITY_CHECK(dst);\r
+}\r