added MatCn enum to GPU perf tests
authorAnatoly Baksheev <no@email>
Mon, 8 Oct 2012 09:58:03 +0000 (13:58 +0400)
committerAnatoly Baksheev <no@email>
Mon, 8 Oct 2012 15:57:20 +0000 (19:57 +0400)
modules/gpu/perf/perf_core.cpp
modules/gpu/perf/perf_denoising.cpp
modules/gpu/perf/perf_imgproc.cpp
modules/gpu/perf/perf_video.cpp
modules/gpu/perf/utility.hpp

index 915a9a2..ffbb669 100644 (file)
@@ -1456,7 +1456,7 @@ enum {FLIP_BOTH = 0, FLIP_X = 1, FLIP_Y = -1};
 CV_ENUM(FlipCode, FLIP_BOTH, FLIP_X, FLIP_Y)\r
 #define ALL_FLIP_CODES ValuesIn(FlipCode::all())\r
 \r
-DEF_PARAM_TEST(Sz_Depth_Cn_Code, cv::Size, MatDepth, int, FlipCode);\r
+DEF_PARAM_TEST(Sz_Depth_Cn_Code, cv::Size, MatDepth, MatCn, FlipCode);\r
 \r
 PERF_TEST_P(Sz_Depth_Cn_Code, Core_Flip, Combine(\r
     GPU_TYPICAL_MAT_SIZES,\r
@@ -2204,7 +2204,7 @@ enum {Rows = 0, Cols = 1};
 CV_ENUM(ReduceDim, Rows, Cols)\r
 #define ALL_REDUCE_DIMS ValuesIn(ReduceDim::all())\r
 \r
-DEF_PARAM_TEST(Sz_Depth_Cn_Code_Dim, cv::Size, MatDepth, int, ReduceCode, ReduceDim);\r
+DEF_PARAM_TEST(Sz_Depth_Cn_Code_Dim, cv::Size, MatDepth, MatCn, ReduceCode, ReduceDim);\r
 \r
 PERF_TEST_P(Sz_Depth_Cn_Code_Dim, Core_Reduce, Combine(\r
     GPU_TYPICAL_MAT_SIZES,\r
index ba3dd07..46fc8c5 100644 (file)
@@ -9,10 +9,10 @@ using namespace testing;
 //////////////////////////////////////////////////////////////////////
 // BilateralFilter
 
-DEF_PARAM_TEST(Sz_Depth_Cn_KernelSz, cv::Size, MatDepth, int, int);
+DEF_PARAM_TEST(Sz_Depth_Cn_KernelSz, cv::Size, MatDepth, MatCn, int);
 
 PERF_TEST_P(Sz_Depth_Cn_KernelSz, Denoising_BilateralFilter, 
-            Combine(GPU_DENOISING_IMAGE_SIZES, Values(CV_8U, CV_32F), testing::Values(1, 3), Values(3, 5, 9)))
+            Combine(GPU_DENOISING_IMAGE_SIZES, Values(CV_8U, CV_32F), GPU_CHANNELS_1_3, Values(3, 5, 9)))
 {
     declare.time(60.0);
 
@@ -59,10 +59,10 @@ PERF_TEST_P(Sz_Depth_Cn_KernelSz, Denoising_BilateralFilter,
 //////////////////////////////////////////////////////////////////////
 // nonLocalMeans
 
-DEF_PARAM_TEST(Sz_Depth_Cn_WinSz_BlockSz, cv::Size, MatDepth, int, int, int);
+DEF_PARAM_TEST(Sz_Depth_Cn_WinSz_BlockSz, cv::Size, MatDepth, MatCn, int, int);
 
 PERF_TEST_P(Sz_Depth_Cn_WinSz_BlockSz, Denoising_NonLocalMeans, 
-            Combine(GPU_DENOISING_IMAGE_SIZES, Values<MatDepth>(CV_8U), Values(1, 3), Values(21), Values(5, 7)))
+            Combine(GPU_DENOISING_IMAGE_SIZES, Values<MatDepth>(CV_8U), GPU_CHANNELS_1_3, Values(21), Values(5, 7)))
 {
     declare.time(60.0);
 
@@ -103,10 +103,10 @@ PERF_TEST_P(Sz_Depth_Cn_WinSz_BlockSz, Denoising_NonLocalMeans,
 //////////////////////////////////////////////////////////////////////
 // fastNonLocalMeans
 
-DEF_PARAM_TEST(Sz_Depth_WinSz_BlockSz, cv::Size, MatDepth, int, int);
+DEF_PARAM_TEST(Sz_Depth_Cn_WinSz_BlockSz, cv::Size, MatDepth, MatCn, int, int);
 
-PERF_TEST_P(Sz_Depth_WinSz_BlockSz, Denoising_FastNonLocalMeans, 
-            Combine(GPU_DENOISING_IMAGE_SIZES, Values<MatDepth>(CV_8U), Values(21), Values(7)))
+PERF_TEST_P(Sz_Depth_Cn_WinSz_BlockSz, Denoising_FastNonLocalMeans, 
+            Combine(GPU_DENOISING_IMAGE_SIZES, Values<MatDepth>(CV_8U), GPU_CHANNELS_1_3, Values(21), Values(7)))
 {
     declare.time(150.0);
     
@@ -150,6 +150,7 @@ PERF_TEST_P(Sz_Depth_WinSz_BlockSz, Denoising_FastNonLocalMeans,
 //////////////////////////////////////////////////////////////////////
 // fastNonLocalMeans (colored)
 
+DEF_PARAM_TEST(Sz_Depth_WinSz_BlockSz, cv::Size, MatDepth, int, int);
 
 PERF_TEST_P(Sz_Depth_WinSz_BlockSz, Denoising_FastNonLocalMeansColored, 
             Combine(GPU_DENOISING_IMAGE_SIZES, Values<MatDepth>(CV_8U), Values(21), Values(7)))
index 14fd71a..6bb6d99 100644 (file)
@@ -49,7 +49,7 @@ void generateMap(cv::Mat& map_x, cv::Mat& map_y, int remapMode)
     }\r
 }\r
 \r
-DEF_PARAM_TEST(Sz_Depth_Cn_Inter_Border_Mode, cv::Size, MatDepth, int, Interpolation, BorderMode, RemapMode);\r
+DEF_PARAM_TEST(Sz_Depth_Cn_Inter_Border_Mode, cv::Size, MatDepth, MatCn, Interpolation, BorderMode, RemapMode);\r
 \r
 PERF_TEST_P(Sz_Depth_Cn_Inter_Border_Mode, ImgProc_Remap, Combine(\r
     GPU_TYPICAL_MAT_SIZES,\r
@@ -108,7 +108,7 @@ PERF_TEST_P(Sz_Depth_Cn_Inter_Border_Mode, ImgProc_Remap, Combine(
 //////////////////////////////////////////////////////////////////////\r
 // Resize\r
 \r
-DEF_PARAM_TEST(Sz_Depth_Cn_Inter_Scale, cv::Size, MatDepth, int, Interpolation, double);\r
+DEF_PARAM_TEST(Sz_Depth_Cn_Inter_Scale, cv::Size, MatDepth, MatCn, Interpolation, double);\r
 \r
 PERF_TEST_P(Sz_Depth_Cn_Inter_Scale, ImgProc_Resize, Combine(\r
     GPU_TYPICAL_MAT_SIZES,\r
@@ -158,7 +158,7 @@ PERF_TEST_P(Sz_Depth_Cn_Inter_Scale, ImgProc_Resize, Combine(
 //////////////////////////////////////////////////////////////////////\r
 // ResizeArea\r
 \r
-DEF_PARAM_TEST(Sz_Depth_Cn_Scale, cv::Size, MatDepth, int, double);\r
+DEF_PARAM_TEST(Sz_Depth_Cn_Scale, cv::Size, MatDepth, MatCn, double);\r
 \r
 PERF_TEST_P(Sz_Depth_Cn_Scale, ImgProc_ResizeArea, Combine(\r
     GPU_TYPICAL_MAT_SIZES,\r
@@ -207,7 +207,7 @@ PERF_TEST_P(Sz_Depth_Cn_Scale, ImgProc_ResizeArea, Combine(
 //////////////////////////////////////////////////////////////////////\r
 // WarpAffine\r
 \r
-DEF_PARAM_TEST(Sz_Depth_Cn_Inter_Border, cv::Size, MatDepth, int, Interpolation, BorderMode);\r
+DEF_PARAM_TEST(Sz_Depth_Cn_Inter_Border, cv::Size, MatDepth, MatCn, Interpolation, BorderMode);\r
 \r
 PERF_TEST_P(Sz_Depth_Cn_Inter_Border, ImgProc_WarpAffine, Combine(\r
     GPU_TYPICAL_MAT_SIZES,\r
@@ -316,7 +316,7 @@ PERF_TEST_P(Sz_Depth_Cn_Inter_Border, ImgProc_WarpPerspective, Combine(
 //////////////////////////////////////////////////////////////////////\r
 // CopyMakeBorder\r
 \r
-DEF_PARAM_TEST(Sz_Depth_Cn_Border, cv::Size, MatDepth, int, BorderMode);\r
+DEF_PARAM_TEST(Sz_Depth_Cn_Border, cv::Size, MatDepth, MatCn, BorderMode);\r
 \r
 PERF_TEST_P(Sz_Depth_Cn_Border, ImgProc_CopyMakeBorder, Combine(\r
     GPU_TYPICAL_MAT_SIZES,\r
@@ -882,7 +882,7 @@ PERF_TEST_P(Sz_KernelSz_Ccorr, ImgProc_Convolve, Combine(GPU_TYPICAL_MAT_SIZES,
 CV_ENUM(TemplateMethod, cv::TM_SQDIFF, cv::TM_SQDIFF_NORMED, cv::TM_CCORR, cv::TM_CCORR_NORMED, cv::TM_CCOEFF, cv::TM_CCOEFF_NORMED)\r
 #define ALL_TEMPLATE_METHODS ValuesIn(TemplateMethod::all())\r
 \r
-DEF_PARAM_TEST(Sz_TemplateSz_Cn_Method, cv::Size, cv::Size, int, TemplateMethod);\r
+DEF_PARAM_TEST(Sz_TemplateSz_Cn_Method, cv::Size, cv::Size, MatCn, TemplateMethod);\r
 \r
 PERF_TEST_P(Sz_TemplateSz_Cn_Method, ImgProc_MatchTemplate8U, Combine(\r
     GPU_TYPICAL_MAT_SIZES,\r
@@ -1282,7 +1282,7 @@ PERF_TEST_P(Sz, ImgProc_BuildWarpSphericalMaps, GPU_TYPICAL_MAT_SIZES)
 //////////////////////////////////////////////////////////////////////\r
 // Rotate\r
 \r
-DEF_PARAM_TEST(Sz_Depth_Cn_Inter, cv::Size, MatDepth, int, Interpolation);\r
+DEF_PARAM_TEST(Sz_Depth_Cn_Inter, cv::Size, MatDepth, MatCn, Interpolation);\r
 \r
 PERF_TEST_P(Sz_Depth_Cn_Inter, ImgProc_Rotate, Combine(\r
     GPU_TYPICAL_MAT_SIZES,\r
index 286222d..0d58e84 100644 (file)
@@ -421,7 +421,7 @@ PERF_TEST_P(Video, Video_FGDStatModel, Values("gpu/video/768x576.avi", "gpu/vide
 //////////////////////////////////////////////////////\r
 // MOG\r
 \r
-DEF_PARAM_TEST(Video_Cn_LearningRate, string, int, double);\r
+DEF_PARAM_TEST(Video_Cn_LearningRate, string, MatCn, double);\r
 \r
 PERF_TEST_P(Video_Cn_LearningRate, Video_MOG, Combine(Values("gpu/video/768x576.avi", "gpu/video/1920x1080.avi"), GPU_CHANNELS_1_3_4, Values(0.0, 0.01)))\r
 {\r
@@ -737,7 +737,7 @@ PERF_TEST_P(Video_Cn, Video_VIBE, Combine(Values("gpu/video/768x576.avi", "gpu/v
 //////////////////////////////////////////////////////\r
 // GMG\r
 \r
-DEF_PARAM_TEST(Video_Cn_MaxFeatures, string, int, int);\r
+DEF_PARAM_TEST(Video_Cn_MaxFeatures, string, MatCn, int);\r
 \r
 PERF_TEST_P(Video_Cn_MaxFeatures, Video_GMG, Combine(Values("gpu/video/768x576.avi", "gpu/video/1920x1080.avi"), GPU_CHANNELS_1_3_4, Values(20, 40, 60)))\r
 {\r
index d2e3a07..b40d55e 100644 (file)
@@ -20,6 +20,11 @@ CV_ENUM(Interpolation, cv::INTER_NEAREST, cv::INTER_LINEAR, cv::INTER_CUBIC, cv:
 #define ALL_INTERPOLATIONS testing::ValuesIn(Interpolation::all())\r
 CV_ENUM(NormType, cv::NORM_INF, cv::NORM_L1, cv::NORM_L2, cv::NORM_HAMMING)\r
 \r
+enum { Gray = 1, TwoChannel = 2, BGR = 3, BGRA = 4 };\r
+CV_ENUM(MatCn, Gray, TwoChannel, BGR, BGRA)\r
+#define GPU_CHANNELS_1_3_4 testing::Values(Gray, BGR, BGRA)\r
+#define GPU_CHANNELS_1_3 testing::Values(Gray, BGR)\r
+\r
 struct CvtColorInfo\r
 {\r
     int scn;\r
@@ -41,6 +46,6 @@ DEF_PARAM_TEST(Sz_Depth, cv::Size, MatDepth);
 DEF_PARAM_TEST(Sz_Depth_Cn, cv::Size, MatDepth, int);\r
 \r
 #define GPU_TYPICAL_MAT_SIZES testing::Values(perf::sz720p, perf::szSXGA, perf::sz1080p)\r
-#define GPU_CHANNELS_1_3_4 testing::Values(1, 3, 4)\r
+\r
 \r
 #endif // __OPENCV_PERF_GPU_UTILITY_HPP__\r