using namespace testing;
using namespace perf;
+#ifdef OPENCV_TINY_GPU_MODULE
+#define ARITHM_MAT_DEPTH Values(CV_8U, CV_32F)
+#else
#define ARITHM_MAT_DEPTH Values(CV_8U, CV_16U, CV_32F, CV_64F)
+#endif
//////////////////////////////////////////////////////////////////////
// Merge
//////////////////////////////////////////////////////////////////////
// Abs
-PERF_TEST_P(Sz_Depth, Core_Abs,
- Combine(GPU_TYPICAL_MAT_SIZES,
- Values(CV_16S, CV_32F)))
+PERF_TEST_P(Sz_Depth, Core_Abs, Combine(
+ GPU_TYPICAL_MAT_SIZES,
+#ifdef OPENCV_TINY_GPU_MODULE
+ Values(MatDepth(CV_32F))
+#else
+ Values(CV_16S, CV_32F)
+#endif
+))
{
const cv::Size size = GET_PARAM(0);
const int depth = GET_PARAM(1);
//////////////////////////////////////////////////////////////////////
// Sqr
-PERF_TEST_P(Sz_Depth, Core_Sqr,
- Combine(GPU_TYPICAL_MAT_SIZES,
- Values(CV_8U, CV_16S, CV_32F)))
+PERF_TEST_P(Sz_Depth, Core_Sqr, Combine(
+ GPU_TYPICAL_MAT_SIZES,
+#ifdef OPENCV_TINY_GPU_MODULE
+ Values(MatDepth(CV_32F))
+#else
+ Values(CV_8U, CV_16S, CV_32F)
+#endif
+))
{
const cv::Size size = GET_PARAM(0);
const int depth = GET_PARAM(1);
//////////////////////////////////////////////////////////////////////
// Sqrt
-PERF_TEST_P(Sz_Depth, Core_Sqrt,
- Combine(GPU_TYPICAL_MAT_SIZES,
- Values(CV_8U, CV_16S, CV_32F)))
+PERF_TEST_P(Sz_Depth, Core_Sqrt, Combine(
+ GPU_TYPICAL_MAT_SIZES,
+#ifdef OPENCV_TINY_GPU_MODULE
+ Values(MatDepth(CV_32F))
+#else
+ Values(CV_8U, CV_16S, CV_32F)
+#endif
+))
{
const cv::Size size = GET_PARAM(0);
const int depth = GET_PARAM(1);
//////////////////////////////////////////////////////////////////////
// Log
-PERF_TEST_P(Sz_Depth, Core_Log,
- Combine(GPU_TYPICAL_MAT_SIZES,
- Values(CV_8U, CV_16S, CV_32F)))
+PERF_TEST_P(Sz_Depth, Core_Log, Combine(
+ GPU_TYPICAL_MAT_SIZES,
+#ifdef OPENCV_TINY_GPU_MODULE
+ Values(MatDepth(CV_32F))
+#else
+ Values(CV_8U, CV_16S, CV_32F)
+#endif
+))
{
const cv::Size size = GET_PARAM(0);
const int depth = GET_PARAM(1);
//////////////////////////////////////////////////////////////////////
// Exp
-PERF_TEST_P(Sz_Depth, Core_Exp,
- Combine(GPU_TYPICAL_MAT_SIZES,
- Values(CV_8U, CV_16S, CV_32F)))
+PERF_TEST_P(Sz_Depth, Core_Exp, Combine(
+ GPU_TYPICAL_MAT_SIZES,
+#ifdef OPENCV_TINY_GPU_MODULE
+ Values(MatDepth(CV_32F))
+#else
+ Values(CV_8U, CV_16S, CV_32F)
+#endif
+))
{
const cv::Size size = GET_PARAM(0);
const int depth = GET_PARAM(1);
DEF_PARAM_TEST(Sz_Depth_Power, cv::Size, MatDepth, double);
-PERF_TEST_P(Sz_Depth_Power, Core_Pow,
- Combine(GPU_TYPICAL_MAT_SIZES,
- Values(CV_8U, CV_16S, CV_32F),
- Values(0.3, 2.0, 2.4)))
+PERF_TEST_P(Sz_Depth_Power, Core_Pow, Combine(
+ GPU_TYPICAL_MAT_SIZES,
+#ifdef OPENCV_TINY_GPU_MODULE
+ Values(MatDepth(CV_32F)),
+#else
+ Values(CV_8U, CV_16S, CV_32F),
+#endif
+ Values(0.3, 2.0, 2.4)
+))
{
const cv::Size size = GET_PARAM(0);
const int depth = GET_PARAM(1);
//////////////////////////////////////////////////////////////////////
// BitwiseAndScalar
-PERF_TEST_P(Sz_Depth_Cn, Core_BitwiseAndScalar,
- Combine(GPU_TYPICAL_MAT_SIZES,
- Values(CV_8U, CV_16U, CV_32S),
- GPU_CHANNELS_1_3_4))
+PERF_TEST_P(Sz_Depth_Cn, Core_BitwiseAndScalar, Combine(
+ GPU_TYPICAL_MAT_SIZES,
+#ifdef OPENCV_TINY_GPU_MODULE
+ Values(MatDepth(CV_8U)),
+ testing::Values(MatCn(Gray))
+#else
+ Values(CV_8U, CV_16U, CV_32S),
+ GPU_CHANNELS_1_3_4
+#endif
+))
{
const cv::Size size = GET_PARAM(0);
const int depth = GET_PARAM(1);
//////////////////////////////////////////////////////////////////////
// BitwiseOrScalar
-PERF_TEST_P(Sz_Depth_Cn, Core_BitwiseOrScalar,
- Combine(GPU_TYPICAL_MAT_SIZES,
- Values(CV_8U, CV_16U, CV_32S),
- GPU_CHANNELS_1_3_4))
+PERF_TEST_P(Sz_Depth_Cn, Core_BitwiseOrScalar, Combine(
+ GPU_TYPICAL_MAT_SIZES,
+#ifdef OPENCV_TINY_GPU_MODULE
+ Values(MatDepth(CV_8U)),
+ testing::Values(MatCn(Gray))
+#else
+ Values(CV_8U, CV_16U, CV_32S),
+ GPU_CHANNELS_1_3_4
+#endif
+))
{
const cv::Size size = GET_PARAM(0);
const int depth = GET_PARAM(1);
//////////////////////////////////////////////////////////////////////
// BitwiseXorScalar
-PERF_TEST_P(Sz_Depth_Cn, Core_BitwiseXorScalar,
- Combine(GPU_TYPICAL_MAT_SIZES,
- Values(CV_8U, CV_16U, CV_32S),
- GPU_CHANNELS_1_3_4))
+PERF_TEST_P(Sz_Depth_Cn, Core_BitwiseXorScalar, Combine(
+ GPU_TYPICAL_MAT_SIZES,
+#ifdef OPENCV_TINY_GPU_MODULE
+ Values(MatDepth(CV_8U)),
+ testing::Values(MatCn(Gray))
+#else
+ Values(CV_8U, CV_16U, CV_32S),
+ GPU_CHANNELS_1_3_4
+#endif
+))
{
const cv::Size size = GET_PARAM(0);
const int depth = GET_PARAM(1);
//////////////////////////////////////////////////////////////////////
// MinScalar
-PERF_TEST_P(Sz_Depth, Core_MinScalar,
- Combine(GPU_TYPICAL_MAT_SIZES,
- Values(CV_8U, CV_16U, CV_32F)))
+PERF_TEST_P(Sz_Depth, Core_MinScalar, Combine(
+ GPU_TYPICAL_MAT_SIZES,
+#ifdef OPENCV_TINY_GPU_MODULE
+ Values(CV_8U, CV_32F)
+#else
+ Values(CV_8U, CV_16U, CV_32F)
+#endif
+))
{
const cv::Size size = GET_PARAM(0);
const int depth = GET_PARAM(1);
//////////////////////////////////////////////////////////////////////
// MaxScalar
-PERF_TEST_P(Sz_Depth, Core_MaxScalar,
- Combine(GPU_TYPICAL_MAT_SIZES,
- Values(CV_8U, CV_16U, CV_32F)))
+PERF_TEST_P(Sz_Depth, Core_MaxScalar, Combine(
+ GPU_TYPICAL_MAT_SIZES,
+#ifdef OPENCV_TINY_GPU_MODULE
+ Values(CV_8U, CV_32F)
+#else
+ Values(CV_8U, CV_16U, CV_32F)
+#endif
+))
{
const cv::Size size = GET_PARAM(0);
const int depth = GET_PARAM(1);
PERF_TEST_P(Sz_3Depth, Core_AddWeighted,
Combine(GPU_TYPICAL_MAT_SIZES,
+#ifdef OPENCV_TINY_GPU_MODULE
+ Values(MatDepth(CV_32F)),
+ Values(MatDepth(CV_32F)),
+ Values(MatDepth(CV_32F))
+#else
Values(CV_8U, CV_16U, CV_32F, CV_64F),
Values(CV_8U, CV_16U, CV_32F, CV_64F),
- Values(CV_8U, CV_16U, CV_32F, CV_64F)))
+ Values(CV_8U, CV_16U, CV_32F, CV_64F)
+#endif
+))
{
const cv::Size size = GET_PARAM(0);
const int depth1 = GET_PARAM(1);
PERF_TEST_P(Sz_Depth_Norm, Core_Norm,
Combine(GPU_TYPICAL_MAT_SIZES,
+#ifdef OPENCV_TINY_GPU_MODULE
+ Values(CV_8U, CV_32F),
+#else
Values(CV_8U, CV_16U, CV_32S, CV_32F),
+#endif
Values(NormType(cv::NORM_INF), NormType(cv::NORM_L1), NormType(cv::NORM_L2))))
{
const cv::Size size = GET_PARAM(0);
//////////////////////////////////////////////////////////////////////
// Sum
-PERF_TEST_P(Sz_Depth_Cn, Core_Sum,
- Combine(GPU_TYPICAL_MAT_SIZES,
- Values(CV_8U, CV_16U, CV_32F),
- GPU_CHANNELS_1_3_4))
+PERF_TEST_P(Sz_Depth_Cn, Core_Sum, Combine(
+ GPU_TYPICAL_MAT_SIZES,
+#ifdef OPENCV_TINY_GPU_MODULE
+ Values(CV_8U, CV_32F),
+ testing::Values(MatCn(Gray))
+#else
+ Values(CV_8U, CV_16U, CV_32F),
+ GPU_CHANNELS_1_3_4
+#endif
+))
{
const cv::Size size = GET_PARAM(0);
const int depth = GET_PARAM(1);
//////////////////////////////////////////////////////////////////////
// SumAbs
-PERF_TEST_P(Sz_Depth_Cn, Core_SumAbs,
- Combine(GPU_TYPICAL_MAT_SIZES,
- Values(CV_8U, CV_16U, CV_32F),
- GPU_CHANNELS_1_3_4))
+PERF_TEST_P(Sz_Depth_Cn, Core_SumAbs, Combine(
+ GPU_TYPICAL_MAT_SIZES,
+#ifdef OPENCV_TINY_GPU_MODULE
+ Values(CV_8U, CV_32F),
+ testing::Values(MatCn(Gray))
+#else
+ Values(CV_8U, CV_16U, CV_32F),
+ GPU_CHANNELS_1_3_4
+#endif
+))
{
const cv::Size size = GET_PARAM(0);
const int depth = GET_PARAM(1);
//////////////////////////////////////////////////////////////////////
// SumSqr
-PERF_TEST_P(Sz_Depth_Cn, Core_SumSqr,
- Combine(GPU_TYPICAL_MAT_SIZES,
- Values<MatDepth>(CV_8U, CV_16U, CV_32F),
- GPU_CHANNELS_1_3_4))
+PERF_TEST_P(Sz_Depth_Cn, Core_SumSqr, Combine(
+ GPU_TYPICAL_MAT_SIZES,
+#ifdef OPENCV_TINY_GPU_MODULE
+ Values(CV_8U, CV_32F),
+ testing::Values(MatCn(Gray))
+#else
+ Values(CV_8U, CV_16U, CV_32F),
+ GPU_CHANNELS_1_3_4
+#endif
+))
{
const cv::Size size = GET_PARAM(0);
const int depth = GET_PARAM(1);
//////////////////////////////////////////////////////////////////////
// MinMax
-PERF_TEST_P(Sz_Depth, Core_MinMax,
- Combine(GPU_TYPICAL_MAT_SIZES,
- Values(CV_8U, CV_16U, CV_32F, CV_64F)))
+PERF_TEST_P(Sz_Depth, Core_MinMax, Combine(
+ GPU_TYPICAL_MAT_SIZES,
+#ifdef OPENCV_TINY_GPU_MODULE
+ Values(CV_8U, CV_32F)
+#else
+ Values(CV_8U, CV_16U, CV_32F, CV_64F)
+#endif
+))
{
const cv::Size size = GET_PARAM(0);
const int depth = GET_PARAM(1);
//////////////////////////////////////////////////////////////////////
// MinMaxLoc
-PERF_TEST_P(Sz_Depth, Core_MinMaxLoc,
- Combine(GPU_TYPICAL_MAT_SIZES,
- Values(CV_8U, CV_16U, CV_32F, CV_64F)))
+PERF_TEST_P(Sz_Depth, Core_MinMaxLoc, Combine(
+ GPU_TYPICAL_MAT_SIZES,
+#ifdef OPENCV_TINY_GPU_MODULE
+ Values(CV_8U, CV_32F)
+#else
+ Values(CV_8U, CV_16U, CV_32F, CV_64F)
+#endif
+))
{
const cv::Size size = GET_PARAM(0);
const int depth = GET_PARAM(1);
//////////////////////////////////////////////////////////////////////
// CountNonZero
-PERF_TEST_P(Sz_Depth, Core_CountNonZero,
- Combine(GPU_TYPICAL_MAT_SIZES,
- Values(CV_8U, CV_16U, CV_32F, CV_64F)))
+PERF_TEST_P(Sz_Depth, Core_CountNonZero, Combine(
+ GPU_TYPICAL_MAT_SIZES,
+#ifdef OPENCV_TINY_GPU_MODULE
+ Values(CV_8U, CV_32F)
+#else
+ Values(CV_8U, CV_16U, CV_32F, CV_64F)
+#endif
+))
{
const cv::Size size = GET_PARAM(0);
const int depth = GET_PARAM(1);
DEF_PARAM_TEST(Sz_Depth_Cn_Code_Dim, cv::Size, MatDepth, MatCn, ReduceCode, ReduceDim);
-PERF_TEST_P(Sz_Depth_Cn_Code_Dim, Core_Reduce,
- Combine(GPU_TYPICAL_MAT_SIZES,
- Values(CV_8U, CV_16U, CV_16S, CV_32F),
- Values(1, 2, 3, 4),
- ReduceCode::all(),
- ReduceDim::all()))
+PERF_TEST_P(Sz_Depth_Cn_Code_Dim, Core_Reduce, Combine(
+ GPU_TYPICAL_MAT_SIZES,
+#ifdef OPENCV_TINY_GPU_MODULE
+ Values(CV_8U, CV_32F),
+#else
+ Values(CV_8U, CV_16U, CV_16S, CV_32F),
+#endif
+ Values(1, 2, 3, 4),
+ ReduceCode::all(),
+ ReduceDim::all()
+))
{
const cv::Size size = GET_PARAM(0);
const int depth = GET_PARAM(1);
DEF_PARAM_TEST(Sz_Depth_NormType, cv::Size, MatDepth, NormType);
-PERF_TEST_P(Sz_Depth_NormType, Core_Normalize,
- Combine(GPU_TYPICAL_MAT_SIZES,
- Values(CV_8U, CV_16U, CV_32F, CV_64F),
- Values(NormType(cv::NORM_INF),
- NormType(cv::NORM_L1),
- NormType(cv::NORM_L2),
- NormType(cv::NORM_MINMAX))))
+PERF_TEST_P(Sz_Depth_NormType, Core_Normalize, Combine(
+ GPU_TYPICAL_MAT_SIZES,
+#ifdef OPENCV_TINY_GPU_MODULE
+ Values(CV_8U, CV_32F),
+#else
+ Values(CV_8U, CV_16U, CV_32F, CV_64F),
+#endif
+ Values(NormType(cv::NORM_INF),
+ NormType(cv::NORM_L1),
+ NormType(cv::NORM_L2),
+ NormType(cv::NORM_MINMAX))
+))
{
const cv::Size size = GET_PARAM(0);
const int type = GET_PARAM(1);
PERF_TEST_P(Sz_Depth_Cn_Inter_Border_Mode, ImgProc_Remap,
Combine(GPU_TYPICAL_MAT_SIZES,
+#ifdef OPENCV_TINY_GPU_MODULE
+ Values(CV_8U, CV_32F),
+#else
Values(CV_8U, CV_16U, CV_32F),
+#endif
GPU_CHANNELS_1_3_4,
+#ifdef OPENCV_TINY_GPU_MODULE
+ Values(Interpolation(cv::INTER_NEAREST), Interpolation(cv::INTER_LINEAR)),
+#else
Values(Interpolation(cv::INTER_NEAREST), Interpolation(cv::INTER_LINEAR), Interpolation(cv::INTER_CUBIC)),
+#endif
ALL_BORDER_MODES,
RemapMode::all()))
{
PERF_TEST_P(Sz_Depth_Cn_Inter_Scale, ImgProc_Resize,
Combine(GPU_TYPICAL_MAT_SIZES,
+#ifdef OPENCV_TINY_GPU_MODULE
+ Values(CV_8U, CV_32F),
+#else
Values(CV_8U, CV_16U, CV_32F),
+#endif
GPU_CHANNELS_1_3_4,
+#ifdef OPENCV_TINY_GPU_MODULE
+ Values(Interpolation(cv::INTER_NEAREST), Interpolation(cv::INTER_LINEAR)),
+#else
Values(Interpolation(cv::INTER_NEAREST), Interpolation(cv::INTER_LINEAR), Interpolation(cv::INTER_CUBIC)),
+#endif
Values(0.5, 0.3, 2.0)))
{
declare.time(20.0);
PERF_TEST_P(Sz_Depth_Cn_Scale, ImgProc_ResizeArea,
Combine(GPU_TYPICAL_MAT_SIZES,
+#ifdef OPENCV_TINY_GPU_MODULE
+ Values(CV_8U, CV_32F),
+#else
Values(CV_8U, CV_16U, CV_32F),
+#endif
GPU_CHANNELS_1_3_4,
Values(0.2, 0.1, 0.05)))
{
PERF_TEST_P(Sz_Depth_Cn_Inter_Border, ImgProc_WarpAffine,
Combine(GPU_TYPICAL_MAT_SIZES,
+#ifdef OPENCV_TINY_GPU_MODULE
+ Values(CV_8U, CV_32F),
+#else
Values(CV_8U, CV_16U, CV_32F),
+#endif
GPU_CHANNELS_1_3_4,
+#ifdef OPENCV_TINY_GPU_MODULE
+ Values(Interpolation(cv::INTER_NEAREST), Interpolation(cv::INTER_LINEAR)),
+#else
Values(Interpolation(cv::INTER_NEAREST), Interpolation(cv::INTER_LINEAR), Interpolation(cv::INTER_CUBIC)),
+#endif
ALL_BORDER_MODES))
{
declare.time(20.0);
PERF_TEST_P(Sz_Depth_Cn_Inter_Border, ImgProc_WarpPerspective,
Combine(GPU_TYPICAL_MAT_SIZES,
+#ifdef OPENCV_TINY_GPU_MODULE
+ Values(CV_8U, CV_32F),
+#else
Values(CV_8U, CV_16U, CV_32F),
+#endif
GPU_CHANNELS_1_3_4,
+#ifdef OPENCV_TINY_GPU_MODULE
+ Values(Interpolation(cv::INTER_NEAREST), Interpolation(cv::INTER_LINEAR)),
+#else
Values(Interpolation(cv::INTER_NEAREST), Interpolation(cv::INTER_LINEAR), Interpolation(cv::INTER_CUBIC)),
+#endif
ALL_BORDER_MODES))
{
declare.time(20.0);
PERF_TEST_P(Sz_Depth_Cn_Border, ImgProc_CopyMakeBorder,
Combine(GPU_TYPICAL_MAT_SIZES,
+#ifdef OPENCV_TINY_GPU_MODULE
+ Values(CV_8U, CV_32F),
+#else
Values(CV_8U, CV_16U, CV_32F),
+#endif
GPU_CHANNELS_1_3_4,
ALL_BORDER_MODES))
{
PERF_TEST_P(Sz_Depth_Op, ImgProc_Threshold,
Combine(GPU_TYPICAL_MAT_SIZES,
+#ifdef OPENCV_TINY_GPU_MODULE
+ Values(CV_8U, CV_32F),
+#else
Values(CV_8U, CV_16U, CV_32F, CV_64F),
+#endif
ThreshOp::all()))
{
const cv::Size size = GET_PARAM(0);
PERF_TEST_P(Image_AppertureSz_L2gradient, ImgProc_Canny,
Combine(Values("perf/800x600.png", "perf/1280x1024.png", "perf/1680x1050.png"),
+#ifdef OPENCV_TINY_GPU_MODULE
+ Values(3),
+#else
Values(3, 5),
+#endif
Bool()))
{
const string fileName = GET_PARAM(0);
PERF_TEST_P(Sz_Depth_Cn, ImgProc_PyrDown,
Combine(GPU_TYPICAL_MAT_SIZES,
+#ifdef OPENCV_TINY_GPU_MODULE
+ Values(CV_8U, CV_32F),
+#else
Values(CV_8U, CV_16U, CV_32F),
+#endif
GPU_CHANNELS_1_3_4))
{
const cv::Size size = GET_PARAM(0);
PERF_TEST_P(Sz_Depth_Cn, ImgProc_PyrUp,
Combine(GPU_TYPICAL_MAT_SIZES,
+#ifdef OPENCV_TINY_GPU_MODULE
+ Values(CV_8U, CV_32F),
+#else
Values(CV_8U, CV_16U, CV_32F),
+#endif
GPU_CHANNELS_1_3_4))
{
const cv::Size size = GET_PARAM(0);