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
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
//////////////////////////////////////////////////////////////////////
// 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);
//////////////////////////////////////////////////////////////////////
// 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);
//////////////////////////////////////////////////////////////////////
// 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);
//////////////////////////////////////////////////////////////////////
// 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)))
}\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
//////////////////////////////////////////////////////////////////////\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
//////////////////////////////////////////////////////////////////////\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
//////////////////////////////////////////////////////////////////////\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
//////////////////////////////////////////////////////////////////////\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
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
//////////////////////////////////////////////////////////////////////\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
//////////////////////////////////////////////////////\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
//////////////////////////////////////////////////////\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
#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
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