fix performance tests in tiny mode

This commit is contained in:
Vladislav Vinogradov 2015-03-06 15:45:14 +03:00
parent f1bec940b1
commit 9d294cbcf5
5 changed files with 282 additions and 82 deletions

View File

@ -46,7 +46,11 @@ using namespace std;
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
@ -524,9 +528,14 @@ PERF_TEST_P(Sz_Depth, Core_AbsDiffScalar,
//////////////////////////////////////////////////////////////////////
// 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);
@ -552,9 +561,14 @@ PERF_TEST_P(Sz_Depth, Core_Abs,
//////////////////////////////////////////////////////////////////////
// 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);
@ -580,9 +594,14 @@ PERF_TEST_P(Sz_Depth, Core_Sqr,
//////////////////////////////////////////////////////////////////////
// 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);
@ -612,9 +631,14 @@ PERF_TEST_P(Sz_Depth, Core_Sqrt,
//////////////////////////////////////////////////////////////////////
// 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);
@ -644,9 +668,14 @@ PERF_TEST_P(Sz_Depth, Core_Log,
//////////////////////////////////////////////////////////////////////
// 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);
@ -678,10 +707,15 @@ PERF_TEST_P(Sz_Depth, Core_Exp,
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);
@ -859,10 +893,16 @@ PERF_TEST_P(Sz_Depth, Core_BitwiseAndMat,
//////////////////////////////////////////////////////////////////////
// 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);
@ -935,10 +975,16 @@ PERF_TEST_P(Sz_Depth, Core_BitwiseOrMat,
//////////////////////////////////////////////////////////////////////
// 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);
@ -1011,10 +1057,16 @@ PERF_TEST_P(Sz_Depth, Core_BitwiseXorMat,
//////////////////////////////////////////////////////////////////////
// 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);
@ -1155,9 +1207,14 @@ PERF_TEST_P(Sz_Depth, Core_MinMat,
//////////////////////////////////////////////////////////////////////
// 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);
@ -1226,9 +1283,14 @@ PERF_TEST_P(Sz_Depth, Core_MaxMat,
//////////////////////////////////////////////////////////////////////
// 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);
@ -1265,9 +1327,16 @@ DEF_PARAM_TEST(Sz_3Depth, cv::Size, MatDepth, MatDepth, MatDepth);
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);
@ -1784,7 +1853,11 @@ DEF_PARAM_TEST(Sz_Depth_Norm, cv::Size, MatDepth, NormType);
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);
@ -1859,10 +1932,16 @@ PERF_TEST_P(Sz_Norm, Core_NormDiff,
//////////////////////////////////////////////////////////////////////
// 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);
@ -1896,10 +1975,16 @@ PERF_TEST_P(Sz_Depth_Cn, Core_Sum,
//////////////////////////////////////////////////////////////////////
// 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);
@ -1929,10 +2014,16 @@ PERF_TEST_P(Sz_Depth_Cn, Core_SumAbs,
//////////////////////////////////////////////////////////////////////
// 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);
@ -1962,9 +2053,14 @@ PERF_TEST_P(Sz_Depth_Cn, Core_SumSqr,
//////////////////////////////////////////////////////////////////////
// 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);
@ -2000,9 +2096,14 @@ PERF_TEST_P(Sz_Depth, Core_MinMax,
//////////////////////////////////////////////////////////////////////
// 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);
@ -2040,9 +2141,14 @@ PERF_TEST_P(Sz_Depth, Core_MinMaxLoc,
//////////////////////////////////////////////////////////////////////
// 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);
@ -2079,12 +2185,17 @@ CV_ENUM(ReduceDim, Rows, Cols)
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);
@ -2120,13 +2231,18 @@ PERF_TEST_P(Sz_Depth_Cn_Code_Dim, Core_Reduce,
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);

View File

@ -145,9 +145,14 @@ PERF_TEST_P(Image_NFeatures, Features2D_ORB,
DEF_PARAM_TEST(DescSize_Norm, int, NormType);
PERF_TEST_P(DescSize_Norm, Features2D_BFMatch,
Combine(Values(64, 128, 256),
Values(NormType(cv::NORM_L1), NormType(cv::NORM_L2), NormType(cv::NORM_HAMMING))))
PERF_TEST_P(DescSize_Norm, Features2D_BFMatch, Combine(
Values(64, 128, 256),
#ifdef OPENCV_TINY_GPU_MODULE
Values(NormType(cv::NORM_L2), NormType(cv::NORM_HAMMING))
#else
Values(NormType(cv::NORM_L1), NormType(cv::NORM_L2), NormType(cv::NORM_HAMMING))
#endif
))
{
declare.time(20.0);
@ -202,10 +207,15 @@ static void toOneRowMatches(const std::vector< std::vector<cv::DMatch> >& src, s
DEF_PARAM_TEST(DescSize_K_Norm, int, int, NormType);
PERF_TEST_P(DescSize_K_Norm, Features2D_BFKnnMatch,
Combine(Values(64, 128, 256),
Values(2, 3),
Values(NormType(cv::NORM_L1), NormType(cv::NORM_L2))))
PERF_TEST_P(DescSize_K_Norm, Features2D_BFKnnMatch, Combine(
Values(64, 128, 256),
Values(2, 3),
#ifdef OPENCV_TINY_GPU_MODULE
Values(NormType(cv::NORM_L2))
#else
Values(NormType(cv::NORM_L1), NormType(cv::NORM_L2))
#endif
))
{
declare.time(30.0);
@ -257,9 +267,14 @@ PERF_TEST_P(DescSize_K_Norm, Features2D_BFKnnMatch,
//////////////////////////////////////////////////////////////////////
// BFRadiusMatch
PERF_TEST_P(DescSize_Norm, Features2D_BFRadiusMatch,
Combine(Values(64, 128, 256),
Values(NormType(cv::NORM_L1), NormType(cv::NORM_L2))))
PERF_TEST_P(DescSize_Norm, Features2D_BFRadiusMatch, Combine(
Values(64, 128, 256),
#ifdef OPENCV_TINY_GPU_MODULE
Values(NormType(cv::NORM_L2))
#else
Values(NormType(cv::NORM_L1), NormType(cv::NORM_L2))
#endif
))
{
declare.time(30.0);

View File

@ -87,7 +87,11 @@ PERF_TEST_P(Sz_Type_KernelSz, Filters_Blur,
//////////////////////////////////////////////////////////////////////
// Sobel
#ifdef OPENCV_TINY_GPU_MODULE
PERF_TEST_P(Sz_Type_KernelSz, Filters_Sobel, Combine(GPU_TYPICAL_MAT_SIZES, Values(CV_8UC1, CV_8UC4, CV_32FC1), Values(3, 5, 7)))
#else
PERF_TEST_P(Sz_Type_KernelSz, Filters_Sobel, Combine(GPU_TYPICAL_MAT_SIZES, Values(CV_8UC1, CV_8UC4, CV_32FC1), Values(3, 5, 7, 9, 11, 13, 15)))
#endif
{
declare.time(20.0);
@ -154,7 +158,11 @@ PERF_TEST_P(Sz_Type, Filters_Scharr, Combine(GPU_TYPICAL_MAT_SIZES, Values(CV_8U
//////////////////////////////////////////////////////////////////////
// GaussianBlur
#ifdef OPENCV_TINY_GPU_MODULE
PERF_TEST_P(Sz_Type_KernelSz, Filters_GaussianBlur, Combine(GPU_TYPICAL_MAT_SIZES, Values(CV_8UC1, CV_8UC4, CV_32FC1), Values(3, 5, 7)))
#else
PERF_TEST_P(Sz_Type_KernelSz, Filters_GaussianBlur, Combine(GPU_TYPICAL_MAT_SIZES, Values(CV_8UC1, CV_8UC4, CV_32FC1), Values(3, 5, 7, 9, 11, 13, 15)))
#endif
{
declare.time(20.0);

View File

@ -93,9 +93,17 @@ DEF_PARAM_TEST(Sz_Depth_Cn_Inter_Border_Mode, cv::Size, MatDepth, MatCn, Interpo
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()))
{
@ -145,9 +153,17 @@ DEF_PARAM_TEST(Sz_Depth_Cn_Inter_Scale, cv::Size, MatDepth, MatCn, Interpolation
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);
@ -189,7 +205,11 @@ DEF_PARAM_TEST(Sz_Depth_Cn_Scale, cv::Size, MatDepth, MatCn, double);
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)))
{
@ -232,9 +252,17 @@ DEF_PARAM_TEST(Sz_Depth_Cn_Inter_Border, cv::Size, MatDepth, MatCn, Interpolatio
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);
@ -282,9 +310,17 @@ PERF_TEST_P(Sz_Depth_Cn_Inter_Border, ImgProc_WarpAffine,
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);
@ -332,7 +368,11 @@ DEF_PARAM_TEST(Sz_Depth_Cn_Border, cv::Size, MatDepth, MatCn, BorderMode);
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))
{
@ -374,7 +414,11 @@ DEF_PARAM_TEST(Sz_Depth_Op, cv::Size, MatDepth, ThreshOp);
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);
@ -674,7 +718,11 @@ DEF_PARAM_TEST(Image_AppertureSz_L2gradient, string, int, bool);
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);
@ -1302,7 +1350,11 @@ PERF_TEST_P(Sz_Depth_Cn_Inter, ImgProc_Rotate,
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);
@ -1338,7 +1390,11 @@ PERF_TEST_P(Sz_Depth_Cn, ImgProc_PyrDown,
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);

View File

@ -50,8 +50,13 @@
namespace perf
{
#ifdef OPENCV_TINY_GPU_MODULE
#define ALL_BORDER_MODES testing::Values(BorderMode(cv::BORDER_REFLECT101), BorderMode(cv::BORDER_REPLICATE), BorderMode(cv::BORDER_CONSTANT), BorderMode(cv::BORDER_REFLECT))
#define ALL_INTERPOLATIONS testing::Values(Interpolation(cv::INTER_NEAREST), Interpolation(cv::INTER_LINEAR), Interpolation(cv::INTER_AREA))
#else
#define ALL_BORDER_MODES BorderMode::all()
#define ALL_INTERPOLATIONS Interpolation::all()
#endif
CV_ENUM(BorderMode, BORDER_REFLECT101, BORDER_REPLICATE, BORDER_CONSTANT, BORDER_REFLECT, BORDER_WRAP)
CV_ENUM(Interpolation, INTER_NEAREST, INTER_LINEAR, INTER_CUBIC, INTER_AREA)