Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
5eff4f83
Commit
5eff4f83
authored
Apr 17, 2013
by
Andrey Kamaev
Committed by
OpenCV Buildbot
Apr 17, 2013
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #822 from taka-no-me:better_cv_enum
parents
c02095ae
96b008cd
Show whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
163 additions
and
184 deletions
+163
-184
perf_compare.cpp
modules/core/perf/perf_compare.cpp
+2
-2
perf_reduce.cpp
modules/core/perf/perf_reduce.cpp
+2
-2
perf_fast.cpp
modules/features2d/perf/perf_fast.cpp
+1
-1
perf_core.cpp
modules/gpu/perf/perf_core.cpp
+8
-13
perf_filters.cpp
modules/gpu/perf/perf_filters.cpp
+2
-3
perf_imgproc.cpp
modules/gpu/perf/perf_imgproc.cpp
+14
-18
test_core.cpp
modules/gpu/test/test_core.cpp
+4
-5
test_features2d.cpp
modules/gpu/test/test_features2d.cpp
+1
-1
test_filters.cpp
modules/gpu/test/test_filters.cpp
+2
-3
test_imgproc.cpp
modules/gpu/test/test_imgproc.cpp
+3
-4
test_optflow.cpp
modules/gpu/test/test_optflow.cpp
+1
-1
test_threshold.cpp
modules/gpu/test/test_threshold.cpp
+2
-3
perf_bilateral.cpp
modules/imgproc/perf/perf_bilateral.cpp
+1
-1
perf_blur.cpp
modules/imgproc/perf/perf_blur.cpp
+7
-7
perf_cornerEigenValsAndVecs.cpp
modules/imgproc/perf/perf_cornerEigenValsAndVecs.cpp
+1
-1
perf_cornerHarris.cpp
modules/imgproc/perf/perf_cornerHarris.cpp
+1
-1
perf_cvt_color.cpp
modules/imgproc/perf/perf_cvt_color.cpp
+4
-4
perf_filter2d.cpp
modules/imgproc/perf/perf_filter2d.cpp
+1
-1
perf_matchTemplate.cpp
modules/imgproc/perf/perf_matchTemplate.cpp
+2
-2
perf_remap.cpp
modules/imgproc/perf/perf_remap.cpp
+1
-1
perf_sepfilters.cpp
modules/imgproc/perf/perf_sepfilters.cpp
+8
-8
perf_threshold.cpp
modules/imgproc/perf/perf_threshold.cpp
+3
-3
perf_warp.cpp
modules/imgproc/perf/perf_warp.cpp
+9
-9
test_brute_force_matcher.cpp
modules/ocl/test/test_brute_force_matcher.cpp
+3
-3
utility.hpp
modules/ocl/test/utility.hpp
+11
-20
perf_inpaint.cpp
modules/photo/perf/perf_inpaint.cpp
+1
-1
gpu_perf.hpp
modules/ts/include/opencv2/ts/gpu_perf.hpp
+6
-6
gpu_test.hpp
modules/ts/include/opencv2/ts/gpu_test.hpp
+4
-4
ts_perf.hpp
modules/ts/include/opencv2/ts/ts_perf.hpp
+57
-55
perf_optflowpyrlk.cpp
modules/video/perf/perf_optflowpyrlk.cpp
+1
-1
No files found.
modules/core/perf/perf_compare.cpp
View file @
5eff4f83
...
...
@@ -15,7 +15,7 @@ PERF_TEST_P( Size_MatType_CmpType, compare,
testing
::
Combine
(
testing
::
Values
(
::
perf
::
szVGA
,
::
perf
::
sz1080p
),
testing
::
Values
(
CV_8UC1
,
CV_8UC4
,
CV_8SC1
,
CV_16UC1
,
CV_16SC1
,
CV_32SC1
,
CV_32FC1
),
testing
::
ValuesIn
(
CmpType
::
all
()
)
CmpType
::
all
(
)
)
)
{
...
...
@@ -38,7 +38,7 @@ PERF_TEST_P( Size_MatType_CmpType, compareScalar,
testing
::
Combine
(
testing
::
Values
(
TYPICAL_MAT_SIZES
),
testing
::
Values
(
TYPICAL_MAT_TYPES
),
testing
::
ValuesIn
(
CmpType
::
all
()
)
CmpType
::
all
(
)
)
)
{
...
...
modules/core/perf/perf_reduce.cpp
View file @
5eff4f83
...
...
@@ -16,7 +16,7 @@ PERF_TEST_P(Size_MatType_ROp, reduceR,
testing
::
Combine
(
testing
::
Values
(
TYPICAL_MAT_SIZES
),
testing
::
Values
(
TYPICAL_MAT_TYPES
),
testing
::
ValuesIn
(
ROp
::
all
()
)
ROp
::
all
(
)
)
)
{
...
...
@@ -43,7 +43,7 @@ PERF_TEST_P(Size_MatType_ROp, reduceC,
testing
::
Combine
(
testing
::
Values
(
TYPICAL_MAT_SIZES
),
testing
::
Values
(
TYPICAL_MAT_TYPES
),
testing
::
ValuesIn
(
ROp
::
all
()
)
ROp
::
all
(
)
)
)
{
...
...
modules/features2d/perf/perf_fast.cpp
View file @
5eff4f83
...
...
@@ -18,7 +18,7 @@ typedef perf::TestBaseWithParam<File_Type_t> fast;
PERF_TEST_P
(
fast
,
detect
,
testing
::
Combine
(
testing
::
Values
(
FAST_IMAGES
),
testing
::
ValuesIn
(
FastType
::
all
()
)
FastType
::
all
(
)
))
{
String
filename
=
getDataPath
(
get
<
0
>
(
GetParam
()));
...
...
modules/gpu/perf/perf_core.cpp
View file @
5eff4f83
...
...
@@ -712,15 +712,14 @@ PERF_TEST_P(Sz_Depth_Power, Core_Pow,
//////////////////////////////////////////////////////////////////////
// CompareMat
CV_ENUM
(
CmpCode
,
cv
::
CMP_EQ
,
cv
::
CMP_GT
,
cv
::
CMP_GE
,
cv
::
CMP_LT
,
cv
::
CMP_LE
,
cv
::
CMP_NE
)
#define ALL_CMP_CODES ValuesIn(CmpCode::all())
CV_ENUM
(
CmpCode
,
CMP_EQ
,
CMP_GT
,
CMP_GE
,
CMP_LT
,
CMP_LE
,
CMP_NE
)
DEF_PARAM_TEST
(
Sz_Depth_Code
,
cv
::
Size
,
MatDepth
,
CmpCode
);
PERF_TEST_P
(
Sz_Depth_Code
,
Core_CompareMat
,
Combine
(
GPU_TYPICAL_MAT_SIZES
,
ARITHM_MAT_DEPTH
,
ALL_CMP_CODES
))
CmpCode
::
all
()
))
{
const
cv
::
Size
size
=
GET_PARAM
(
0
);
const
int
depth
=
GET_PARAM
(
1
);
...
...
@@ -758,7 +757,7 @@ PERF_TEST_P(Sz_Depth_Code, Core_CompareMat,
PERF_TEST_P
(
Sz_Depth_Code
,
Core_CompareScalar
,
Combine
(
GPU_TYPICAL_MAT_SIZES
,
ARITHM_MAT_DEPTH
,
ALL_CMP_CODES
))
CmpCode
::
all
()
))
{
const
cv
::
Size
size
=
GET_PARAM
(
0
);
const
int
depth
=
GET_PARAM
(
1
);
...
...
@@ -1304,7 +1303,7 @@ PERF_TEST_P(Sz_3Depth, Core_AddWeighted,
//////////////////////////////////////////////////////////////////////
// GEMM
CV_FLAGS
(
GemmFlags
,
0
,
cv
::
GEMM_1_T
,
cv
::
GEMM_2_T
,
cv
::
GEMM_3_T
)
CV_FLAGS
(
GemmFlags
,
0
,
GEMM_1_T
,
GEMM_2_T
,
GEMM_3_T
)
#define ALL_GEMM_FLAGS Values(0, CV_GEMM_A_T, CV_GEMM_B_T, CV_GEMM_C_T, CV_GEMM_A_T | CV_GEMM_B_T, CV_GEMM_A_T | CV_GEMM_C_T, CV_GEMM_A_T | CV_GEMM_B_T | CV_GEMM_C_T)
DEF_PARAM_TEST
(
Sz_Type_Flags
,
cv
::
Size
,
MatType
,
GemmFlags
);
...
...
@@ -1389,7 +1388,6 @@ PERF_TEST_P(Sz_Type, Core_Transpose,
enum
{
FLIP_BOTH
=
0
,
FLIP_X
=
1
,
FLIP_Y
=
-
1
};
CV_ENUM
(
FlipCode
,
FLIP_BOTH
,
FLIP_X
,
FLIP_Y
)
#define ALL_FLIP_CODES ValuesIn(FlipCode::all())
DEF_PARAM_TEST
(
Sz_Depth_Cn_Code
,
cv
::
Size
,
MatDepth
,
MatCn
,
FlipCode
);
...
...
@@ -1397,7 +1395,7 @@ PERF_TEST_P(Sz_Depth_Cn_Code, Core_Flip,
Combine
(
GPU_TYPICAL_MAT_SIZES
,
Values
(
CV_8U
,
CV_16U
,
CV_32F
),
GPU_CHANNELS_1_3_4
,
ALL_FLIP_CODES
))
FlipCode
::
all
()
))
{
const
cv
::
Size
size
=
GET_PARAM
(
0
);
const
int
depth
=
GET_PARAM
(
1
);
...
...
@@ -2071,12 +2069,9 @@ PERF_TEST_P(Sz_Depth, Core_CountNonZero,
//////////////////////////////////////////////////////////////////////
// Reduce
CV_ENUM
(
ReduceCode
,
CV_REDUCE_SUM
,
CV_REDUCE_AVG
,
CV_REDUCE_MAX
,
CV_REDUCE_MIN
)
#define ALL_REDUCE_CODES ValuesIn(ReduceCode::all())
enum
{
Rows
=
0
,
Cols
=
1
};
CV_ENUM
(
ReduceCode
,
CV_REDUCE_SUM
,
CV_REDUCE_AVG
,
CV_REDUCE_MAX
,
CV_REDUCE_MIN
)
CV_ENUM
(
ReduceDim
,
Rows
,
Cols
)
#define ALL_REDUCE_DIMS ValuesIn(ReduceDim::all())
DEF_PARAM_TEST
(
Sz_Depth_Cn_Code_Dim
,
cv
::
Size
,
MatDepth
,
MatCn
,
ReduceCode
,
ReduceDim
);
...
...
@@ -2084,8 +2079,8 @@ 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
),
ALL_REDUCE_CODES
,
ALL_REDUCE_DIMS
))
ReduceCode
::
all
()
,
ReduceDim
::
all
()
))
{
const
cv
::
Size
size
=
GET_PARAM
(
0
);
const
int
depth
=
GET_PARAM
(
1
);
...
...
modules/gpu/perf/perf_filters.cpp
View file @
5eff4f83
...
...
@@ -291,12 +291,11 @@ PERF_TEST_P(Sz_Type, Filters_Dilate, Combine(GPU_TYPICAL_MAT_SIZES, Values(CV_8U
//////////////////////////////////////////////////////////////////////
// MorphologyEx
CV_ENUM
(
MorphOp
,
cv
::
MORPH_OPEN
,
cv
::
MORPH_CLOSE
,
cv
::
MORPH_GRADIENT
,
cv
::
MORPH_TOPHAT
,
cv
::
MORPH_BLACKHAT
)
#define ALL_MORPH_OPS ValuesIn(MorphOp::all())
CV_ENUM
(
MorphOp
,
MORPH_OPEN
,
MORPH_CLOSE
,
MORPH_GRADIENT
,
MORPH_TOPHAT
,
MORPH_BLACKHAT
)
DEF_PARAM_TEST
(
Sz_Type_Op
,
cv
::
Size
,
MatType
,
MorphOp
);
PERF_TEST_P
(
Sz_Type_Op
,
Filters_MorphologyEx
,
Combine
(
GPU_TYPICAL_MAT_SIZES
,
Values
(
CV_8UC1
,
CV_8UC4
),
ALL_MORPH_OPS
))
PERF_TEST_P
(
Sz_Type_Op
,
Filters_MorphologyEx
,
Combine
(
GPU_TYPICAL_MAT_SIZES
,
Values
(
CV_8UC1
,
CV_8UC4
),
MorphOp
::
all
()
))
{
declare
.
time
(
20.0
);
...
...
modules/gpu/perf/perf_imgproc.cpp
View file @
5eff4f83
...
...
@@ -51,7 +51,6 @@ using namespace perf;
enum
{
HALF_SIZE
=
0
,
UPSIDE_DOWN
,
REFLECTION_X
,
REFLECTION_BOTH
};
CV_ENUM
(
RemapMode
,
HALF_SIZE
,
UPSIDE_DOWN
,
REFLECTION_X
,
REFLECTION_BOTH
);
#define ALL_REMAP_MODES ValuesIn(RemapMode::all())
void
generateMap
(
cv
::
Mat
&
map_x
,
cv
::
Mat
&
map_y
,
int
remapMode
)
{
...
...
@@ -98,7 +97,7 @@ PERF_TEST_P(Sz_Depth_Cn_Inter_Border_Mode, ImgProc_Remap,
GPU_CHANNELS_1_3_4
,
Values
(
Interpolation
(
cv
::
INTER_NEAREST
),
Interpolation
(
cv
::
INTER_LINEAR
),
Interpolation
(
cv
::
INTER_CUBIC
)),
ALL_BORDER_MODES
,
ALL_REMAP_MODES
))
RemapMode
::
all
()
))
{
declare
.
time
(
20.0
);
...
...
@@ -369,15 +368,14 @@ PERF_TEST_P(Sz_Depth_Cn_Border, ImgProc_CopyMakeBorder,
//////////////////////////////////////////////////////////////////////
// Threshold
CV_ENUM
(
ThreshOp
,
cv
::
THRESH_BINARY
,
cv
::
THRESH_BINARY_INV
,
cv
::
THRESH_TRUNC
,
cv
::
THRESH_TOZERO
,
cv
::
THRESH_TOZERO_INV
)
#define ALL_THRESH_OPS ValuesIn(ThreshOp::all())
CV_ENUM
(
ThreshOp
,
THRESH_BINARY
,
THRESH_BINARY_INV
,
THRESH_TRUNC
,
THRESH_TOZERO
,
THRESH_TOZERO_INV
)
DEF_PARAM_TEST
(
Sz_Depth_Op
,
cv
::
Size
,
MatDepth
,
ThreshOp
);
PERF_TEST_P
(
Sz_Depth_Op
,
ImgProc_Threshold
,
Combine
(
GPU_TYPICAL_MAT_SIZES
,
Values
(
CV_8U
,
CV_16U
,
CV_32F
,
CV_64F
),
ALL_THRESH_OPS
))
ThreshOp
::
all
()
))
{
const
cv
::
Size
size
=
GET_PARAM
(
0
);
const
int
depth
=
GET_PARAM
(
1
);
...
...
@@ -894,8 +892,7 @@ PERF_TEST_P(Sz_KernelSz_Ccorr, ImgProc_Convolve,
////////////////////////////////////////////////////////////////////////////////
// MatchTemplate8U
CV_ENUM
(
TemplateMethod
,
cv
::
TM_SQDIFF
,
cv
::
TM_SQDIFF_NORMED
,
cv
::
TM_CCORR
,
cv
::
TM_CCORR_NORMED
,
cv
::
TM_CCOEFF
,
cv
::
TM_CCOEFF_NORMED
)
#define ALL_TEMPLATE_METHODS ValuesIn(TemplateMethod::all())
CV_ENUM
(
TemplateMethod
,
TM_SQDIFF
,
TM_SQDIFF_NORMED
,
TM_CCORR
,
TM_CCORR_NORMED
,
TM_CCOEFF
,
TM_CCOEFF_NORMED
)
DEF_PARAM_TEST
(
Sz_TemplateSz_Cn_Method
,
cv
::
Size
,
cv
::
Size
,
MatCn
,
TemplateMethod
);
...
...
@@ -903,7 +900,7 @@ PERF_TEST_P(Sz_TemplateSz_Cn_Method, ImgProc_MatchTemplate8U,
Combine
(
GPU_TYPICAL_MAT_SIZES
,
Values
(
cv
::
Size
(
5
,
5
),
cv
::
Size
(
16
,
16
),
cv
::
Size
(
30
,
30
)),
GPU_CHANNELS_1_3_4
,
ALL_TEMPLATE_METHODS
))
TemplateMethod
::
all
()
))
{
declare
.
time
(
300.0
);
...
...
@@ -979,7 +976,7 @@ PERF_TEST_P(Sz_TemplateSz_Cn_Method, ImgProc_MatchTemplate32F,
//////////////////////////////////////////////////////////////////////
// MulSpectrums
CV_FLAGS
(
DftFlags
,
0
,
cv
::
DFT_INVERSE
,
cv
::
DFT_SCALE
,
cv
::
DFT_ROWS
,
cv
::
DFT_COMPLEX_OUTPUT
,
cv
::
DFT_REAL_OUTPUT
)
CV_FLAGS
(
DftFlags
,
0
,
DFT_INVERSE
,
DFT_SCALE
,
DFT_ROWS
,
DFT_COMPLEX_OUTPUT
,
DFT_REAL_OUTPUT
)
DEF_PARAM_TEST
(
Sz_Flags
,
cv
::
Size
,
DftFlags
);
...
...
@@ -1454,16 +1451,16 @@ PERF_TEST_P(Sz_Depth_Code, ImgProc_CvtColorBayer,
}
CV_ENUM
(
DemosaicingCode
,
cv
::
COLOR_BayerBG2BGR
,
cv
::
COLOR_BayerGB2BGR
,
cv
::
COLOR_BayerRG2BGR
,
cv
::
COLOR_BayerGR2BGR
,
cv
::
COLOR_BayerBG2GRAY
,
cv
::
COLOR_BayerGB2GRAY
,
cv
::
COLOR_BayerRG2GRAY
,
cv
::
COLOR_BayerGR2GRAY
,
cv
::
gpu
::
COLOR_BayerBG2BGR_MHT
,
cv
::
gpu
::
COLOR_BayerGB2BGR_MHT
,
cv
::
gpu
::
COLOR_BayerRG2BGR_MHT
,
cv
::
gpu
::
COLOR_BayerGR2BGR_MHT
,
cv
::
gpu
::
COLOR_BayerBG2GRAY_MHT
,
cv
::
gpu
::
COLOR_BayerGB2GRAY_MHT
,
cv
::
gpu
::
COLOR_BayerRG2GRAY_MHT
,
cv
::
gpu
::
COLOR_BayerGR2GRAY_MHT
)
COLOR_BayerBG2BGR
,
COLOR_BayerGB2BGR
,
COLOR_BayerRG2BGR
,
COLOR_BayerGR2BGR
,
COLOR_BayerBG2GRAY
,
COLOR_BayerGB2GRAY
,
COLOR_BayerRG2GRAY
,
COLOR_BayerGR2GRAY
,
COLOR_BayerBG2BGR_MHT
,
COLOR_BayerGB2BGR_MHT
,
COLOR_BayerRG2BGR_MHT
,
COLOR_BayerGR2BGR_MHT
,
COLOR_BayerBG2GRAY_MHT
,
COLOR_BayerGB2GRAY_MHT
,
COLOR_BayerRG2GRAY_MHT
,
COLOR_BayerGR2GRAY_MHT
)
DEF_PARAM_TEST
(
Sz_Code
,
cv
::
Size
,
DemosaicingCode
);
PERF_TEST_P
(
Sz_Code
,
ImgProc_Demosaicing
,
Combine
(
GPU_TYPICAL_MAT_SIZES
,
ValuesIn
(
DemosaicingCode
::
all
()
)))
DemosaicingCode
::
all
(
)))
{
const
cv
::
Size
size
=
GET_PARAM
(
0
);
const
int
code
=
GET_PARAM
(
1
);
...
...
@@ -1527,15 +1524,14 @@ PERF_TEST_P(Sz, ImgProc_SwapChannels,
//////////////////////////////////////////////////////////////////////
// AlphaComp
CV_ENUM
(
AlphaOp
,
cv
::
gpu
::
ALPHA_OVER
,
cv
::
gpu
::
ALPHA_IN
,
cv
::
gpu
::
ALPHA_OUT
,
cv
::
gpu
::
ALPHA_ATOP
,
cv
::
gpu
::
ALPHA_XOR
,
cv
::
gpu
::
ALPHA_PLUS
,
cv
::
gpu
::
ALPHA_OVER_PREMUL
,
cv
::
gpu
::
ALPHA_IN_PREMUL
,
cv
::
gpu
::
ALPHA_OUT_PREMUL
,
cv
::
gpu
::
ALPHA_ATOP_PREMUL
,
cv
::
gpu
::
ALPHA_XOR_PREMUL
,
cv
::
gpu
::
ALPHA_PLUS_PREMUL
,
cv
::
gpu
::
ALPHA_PREMUL
)
#define ALL_ALPHA_OPS ValuesIn(AlphaOp::all())
CV_ENUM
(
AlphaOp
,
ALPHA_OVER
,
ALPHA_IN
,
ALPHA_OUT
,
ALPHA_ATOP
,
ALPHA_XOR
,
ALPHA_PLUS
,
ALPHA_OVER_PREMUL
,
ALPHA_IN_PREMUL
,
ALPHA_OUT_PREMUL
,
ALPHA_ATOP_PREMUL
,
ALPHA_XOR_PREMUL
,
ALPHA_PLUS_PREMUL
,
ALPHA_PREMUL
)
DEF_PARAM_TEST
(
Sz_Type_Op
,
cv
::
Size
,
MatType
,
AlphaOp
);
PERF_TEST_P
(
Sz_Type_Op
,
ImgProc_AlphaComp
,
Combine
(
GPU_TYPICAL_MAT_SIZES
,
Values
(
CV_8UC4
,
CV_16UC4
,
CV_32SC4
,
CV_32FC4
),
A
LL_ALPHA_OPS
))
A
lphaOp
::
all
()
))
{
const
cv
::
Size
size
=
GET_PARAM
(
0
);
const
int
type
=
GET_PARAM
(
1
);
...
...
@@ -1815,7 +1811,7 @@ PERF_TEST_P(Sz_Dp_MinDist, ImgProc_HoughCircles,
//////////////////////////////////////////////////////////////////////
// GeneralizedHough
CV_FLAGS
(
GHMethod
,
cv
::
GHT_POSITION
,
cv
::
GHT_SCALE
,
cv
::
GHT_ROTATION
);
CV_FLAGS
(
GHMethod
,
GHT_POSITION
,
GHT_SCALE
,
GHT_ROTATION
);
DEF_PARAM_TEST
(
Method_Sz
,
GHMethod
,
cv
::
Size
);
...
...
modules/gpu/test/test_core.cpp
View file @
5eff4f83
...
...
@@ -1613,8 +1613,7 @@ INSTANTIATE_TEST_CASE_P(GPU_Core, Exp, testing::Combine(
////////////////////////////////////////////////////////////////////////////////
// Compare_Array
CV_ENUM
(
CmpCode
,
cv
::
CMP_EQ
,
cv
::
CMP_GT
,
cv
::
CMP_GE
,
cv
::
CMP_LT
,
cv
::
CMP_LE
,
cv
::
CMP_NE
)
#define ALL_CMP_CODES testing::Values(CmpCode(cv::CMP_EQ), CmpCode(cv::CMP_NE), CmpCode(cv::CMP_GT), CmpCode(cv::CMP_GE), CmpCode(cv::CMP_LT), CmpCode(cv::CMP_LE))
CV_ENUM
(
CmpCode
,
CMP_EQ
,
CMP_NE
,
CMP_GT
,
CMP_GE
,
CMP_LT
,
CMP_LE
)
PARAM_TEST_CASE
(
Compare_Array
,
cv
::
gpu
::
DeviceInfo
,
cv
::
Size
,
MatDepth
,
CmpCode
,
UseRoi
)
{
...
...
@@ -1669,7 +1668,7 @@ INSTANTIATE_TEST_CASE_P(GPU_Core, Compare_Array, testing::Combine(
ALL_DEVICES
,
DIFFERENT_SIZES
,
ALL_DEPTH
,
ALL_CMP_CODES
,
CmpCode
::
all
()
,
WHOLE_SUBMAT
));
////////////////////////////////////////////////////////////////////////////////
...
...
@@ -1780,7 +1779,7 @@ INSTANTIATE_TEST_CASE_P(GPU_Core, Compare_Scalar, testing::Combine(
ALL_DEVICES
,
DIFFERENT_SIZES
,
TYPES
(
CV_8U
,
CV_64F
,
1
,
4
),
ALL_CMP_CODES
,
CmpCode
::
all
()
,
WHOLE_SUBMAT
));
//////////////////////////////////////////////////////////////////////////////
...
...
@@ -2371,7 +2370,7 @@ INSTANTIATE_TEST_CASE_P(GPU_Core, AddWeighted, testing::Combine(
#ifdef HAVE_CUBLAS
CV_FLAGS
(
GemmFlags
,
0
,
cv
::
GEMM_1_T
,
cv
::
GEMM_2_T
,
cv
::
GEMM_3_T
);
CV_FLAGS
(
GemmFlags
,
0
,
GEMM_1_T
,
GEMM_2_T
,
GEMM_3_T
);
#define ALL_GEMM_FLAGS testing::Values(GemmFlags(0), GemmFlags(cv::GEMM_1_T), GemmFlags(cv::GEMM_2_T), GemmFlags(cv::GEMM_3_T), GemmFlags(cv::GEMM_1_T | cv::GEMM_2_T), GemmFlags(cv::GEMM_1_T | cv::GEMM_3_T), GemmFlags(cv::GEMM_1_T | cv::GEMM_2_T | cv::GEMM_3_T))
PARAM_TEST_CASE
(
GEMM
,
cv
::
gpu
::
DeviceInfo
,
cv
::
Size
,
MatType
,
GemmFlags
,
UseRoi
)
...
...
modules/gpu/test/test_features2d.cpp
View file @
5eff4f83
...
...
@@ -123,7 +123,7 @@ namespace
IMPLEMENT_PARAM_CLASS
(
ORB_BlurForDescriptor
,
bool
)
}
CV_ENUM
(
ORB_ScoreType
,
cv
::
ORB
::
HARRIS_SCORE
,
cv
::
ORB
::
FAST_SCORE
)
CV_ENUM
(
ORB_ScoreType
,
ORB
::
HARRIS_SCORE
,
ORB
::
FAST_SCORE
)
PARAM_TEST_CASE
(
ORB
,
cv
::
gpu
::
DeviceInfo
,
ORB_FeaturesCount
,
ORB_ScaleFactor
,
ORB_LevelsCount
,
ORB_EdgeThreshold
,
ORB_firstLevel
,
ORB_WTA_K
,
ORB_ScoreType
,
ORB_PatchSize
,
ORB_BlurForDescriptor
)
{
...
...
modules/gpu/test/test_filters.cpp
View file @
5eff4f83
...
...
@@ -471,8 +471,7 @@ INSTANTIATE_TEST_CASE_P(GPU_Filter, Dilate, testing::Combine(
/////////////////////////////////////////////////////////////////////////////////////////////////
// MorphEx
CV_ENUM
(
MorphOp
,
cv
::
MORPH_OPEN
,
cv
::
MORPH_CLOSE
,
cv
::
MORPH_GRADIENT
,
cv
::
MORPH_TOPHAT
,
cv
::
MORPH_BLACKHAT
)
#define ALL_MORPH_OPS testing::Values(MorphOp(cv::MORPH_OPEN), MorphOp(cv::MORPH_CLOSE), MorphOp(cv::MORPH_GRADIENT), MorphOp(cv::MORPH_TOPHAT), MorphOp(cv::MORPH_BLACKHAT))
CV_ENUM
(
MorphOp
,
MORPH_OPEN
,
MORPH_CLOSE
,
MORPH_GRADIENT
,
MORPH_TOPHAT
,
MORPH_BLACKHAT
)
PARAM_TEST_CASE
(
MorphEx
,
cv
::
gpu
::
DeviceInfo
,
cv
::
Size
,
MatType
,
MorphOp
,
Anchor
,
Iterations
,
UseRoi
)
{
...
...
@@ -518,7 +517,7 @@ INSTANTIATE_TEST_CASE_P(GPU_Filter, MorphEx, testing::Combine(
ALL_DEVICES
,
DIFFERENT_SIZES
,
testing
::
Values
(
MatType
(
CV_8UC1
),
MatType
(
CV_8UC4
)),
ALL_MORPH_OPS
,
MorphOp
::
all
()
,
testing
::
Values
(
Anchor
(
cv
::
Point
(
-
1
,
-
1
)),
Anchor
(
cv
::
Point
(
0
,
0
)),
Anchor
(
cv
::
Point
(
2
,
2
))),
testing
::
Values
(
Iterations
(
1
),
Iterations
(
2
),
Iterations
(
3
)),
WHOLE_SUBMAT
));
...
...
modules/gpu/test/test_imgproc.cpp
View file @
5eff4f83
...
...
@@ -663,8 +663,7 @@ INSTANTIATE_TEST_CASE_P(GPU_ImgProc, Convolve, testing::Combine(
////////////////////////////////////////////////////////////////////////////////
// MatchTemplate8U
CV_ENUM
(
TemplateMethod
,
cv
::
TM_SQDIFF
,
cv
::
TM_SQDIFF_NORMED
,
cv
::
TM_CCORR
,
cv
::
TM_CCORR_NORMED
,
cv
::
TM_CCOEFF
,
cv
::
TM_CCOEFF_NORMED
)
#define ALL_TEMPLATE_METHODS testing::Values(TemplateMethod(cv::TM_SQDIFF), TemplateMethod(cv::TM_SQDIFF_NORMED), TemplateMethod(cv::TM_CCORR), TemplateMethod(cv::TM_CCORR_NORMED), TemplateMethod(cv::TM_CCOEFF), TemplateMethod(cv::TM_CCOEFF_NORMED))
CV_ENUM
(
TemplateMethod
,
TM_SQDIFF
,
TM_SQDIFF_NORMED
,
TM_CCORR
,
TM_CCORR_NORMED
,
TM_CCOEFF
,
TM_CCOEFF_NORMED
)
namespace
{
...
...
@@ -710,7 +709,7 @@ INSTANTIATE_TEST_CASE_P(GPU_ImgProc, MatchTemplate8U, testing::Combine(
DIFFERENT_SIZES
,
testing
::
Values
(
TemplateSize
(
cv
::
Size
(
5
,
5
)),
TemplateSize
(
cv
::
Size
(
16
,
16
)),
TemplateSize
(
cv
::
Size
(
30
,
30
))),
testing
::
Values
(
Channels
(
1
),
Channels
(
3
),
Channels
(
4
)),
ALL_TEMPLATE_METHODS
));
TemplateMethod
::
all
()
));
////////////////////////////////////////////////////////////////////////////////
// MatchTemplate32F
...
...
@@ -919,7 +918,7 @@ INSTANTIATE_TEST_CASE_P(GPU_ImgProc, MatchTemplate_CanFindBigTemplate, ALL_DEVIC
////////////////////////////////////////////////////////////////////////////
// MulSpectrums
CV_FLAGS
(
DftFlags
,
0
,
cv
::
DFT_INVERSE
,
cv
::
DFT_SCALE
,
cv
::
DFT_ROWS
,
cv
::
DFT_COMPLEX_OUTPUT
,
cv
::
DFT_REAL_OUTPUT
)
CV_FLAGS
(
DftFlags
,
0
,
DFT_INVERSE
,
DFT_SCALE
,
DFT_ROWS
,
DFT_COMPLEX_OUTPUT
,
DFT_REAL_OUTPUT
)
PARAM_TEST_CASE
(
MulSpectrums
,
cv
::
gpu
::
DeviceInfo
,
cv
::
Size
,
DftFlags
)
{
...
...
modules/gpu/test/test_optflow.cpp
View file @
5eff4f83
...
...
@@ -333,7 +333,7 @@ namespace
{
IMPLEMENT_PARAM_CLASS
(
PyrScale
,
double
)
IMPLEMENT_PARAM_CLASS
(
PolyN
,
int
)
CV_FLAGS
(
FarnebackOptFlowFlags
,
0
,
cv
::
OPTFLOW_FARNEBACK_GAUSSIAN
)
CV_FLAGS
(
FarnebackOptFlowFlags
,
0
,
OPTFLOW_FARNEBACK_GAUSSIAN
)
IMPLEMENT_PARAM_CLASS
(
UseInitFlow
,
bool
)
}
...
...
modules/gpu/test/test_threshold.cpp
View file @
5eff4f83
...
...
@@ -46,8 +46,7 @@
using
namespace
cvtest
;
CV_ENUM
(
ThreshOp
,
cv
::
THRESH_BINARY
,
cv
::
THRESH_BINARY_INV
,
cv
::
THRESH_TRUNC
,
cv
::
THRESH_TOZERO
,
cv
::
THRESH_TOZERO_INV
)
#define ALL_THRESH_OPS testing::Values(ThreshOp(cv::THRESH_BINARY), ThreshOp(cv::THRESH_BINARY_INV), ThreshOp(cv::THRESH_TRUNC), ThreshOp(cv::THRESH_TOZERO), ThreshOp(cv::THRESH_TOZERO_INV))
CV_ENUM
(
ThreshOp
,
THRESH_BINARY
,
THRESH_BINARY_INV
,
THRESH_TRUNC
,
THRESH_TOZERO
,
THRESH_TOZERO_INV
)
PARAM_TEST_CASE
(
Threshold
,
cv
::
gpu
::
DeviceInfo
,
cv
::
Size
,
MatType
,
ThreshOp
,
UseRoi
)
{
...
...
@@ -88,7 +87,7 @@ INSTANTIATE_TEST_CASE_P(GPU_ImgProc, Threshold, testing::Combine(
ALL_DEVICES
,
DIFFERENT_SIZES
,
testing
::
Values
(
MatType
(
CV_8UC1
),
MatType
(
CV_16SC1
),
MatType
(
CV_32FC1
)),
ALL_THRESH_OPS
,
ThreshOp
::
all
()
,
WHOLE_SUBMAT
));
#endif // HAVE_CUDA
modules/imgproc/perf/perf_bilateral.cpp
View file @
5eff4f83
...
...
@@ -15,7 +15,7 @@ PERF_TEST_P( TestBilateralFilter, BilateralFilter,
Combine
(
Values
(
szVGA
,
sz1080p
),
// image size
Values
(
3
,
5
),
// d
ValuesIn
(
Mat_Type
::
all
()
)
// image type
Mat_Type
::
all
(
)
// image type
)
)
{
...
...
modules/imgproc/perf/perf_blur.cpp
View file @
5eff4f83
...
...
@@ -48,7 +48,7 @@ PERF_TEST_P(Size_MatType_BorderType3x3, gaussianBlur3x3,
testing
::
Combine
(
testing
::
Values
(
szODD
,
szQVGA
,
szVGA
,
sz720p
),
testing
::
Values
(
CV_8UC1
,
CV_8UC4
,
CV_16UC1
,
CV_16SC1
,
CV_32FC1
),
testing
::
ValuesIn
(
BorderType3x3
::
all
()
)
BorderType3x3
::
all
(
)
)
)
{
...
...
@@ -70,7 +70,7 @@ PERF_TEST_P(Size_MatType_BorderType3x3, blur3x3,
testing
::
Combine
(
testing
::
Values
(
szODD
,
szQVGA
,
szVGA
,
sz720p
),
testing
::
Values
(
CV_8UC1
,
CV_8UC4
,
CV_16UC1
,
CV_16SC1
,
CV_32FC1
),
testing
::
ValuesIn
(
BorderType3x3
::
all
()
)
BorderType3x3
::
all
(
)
)
)
{
...
...
@@ -92,7 +92,7 @@ PERF_TEST_P(Size_MatType_BorderType, blur16x16,
testing
::
Combine
(
testing
::
Values
(
szVGA
,
sz720p
),
testing
::
Values
(
CV_8UC1
,
CV_8UC4
,
CV_16UC1
,
CV_16SC1
,
CV_32FC1
),
testing
::
ValuesIn
(
BorderType
::
all
()
)
BorderType
::
all
(
)
)
)
{
...
...
@@ -114,7 +114,7 @@ PERF_TEST_P(Size_MatType_BorderType3x3, box3x3,
testing
::
Combine
(
testing
::
Values
(
szODD
,
szQVGA
,
szVGA
,
sz720p
),
testing
::
Values
(
CV_8UC1
,
CV_16SC1
,
CV_32SC1
,
CV_32FC1
,
CV_32FC3
),
testing
::
ValuesIn
(
BorderType3x3
::
all
()
)
BorderType3x3
::
all
(
)
)
)
{
...
...
@@ -136,7 +136,7 @@ PERF_TEST_P(Size_MatType_BorderType3x3, box3x3_inplace,
testing
::
Combine
(
testing
::
Values
(
szODD
,
szQVGA
,
szVGA
,
sz720p
),
testing
::
Values
(
CV_8UC1
,
CV_16SC1
,
CV_32SC1
,
CV_32FC1
,
CV_32FC3
),
testing
::
ValuesIn
(
BorderType3x3
::
all
()
)
BorderType3x3
::
all
(
)
)
)
{
...
...
@@ -164,7 +164,7 @@ PERF_TEST_P(Size_MatType_BorderType, gaussianBlur5x5,
testing
::
Combine
(
testing
::
Values
(
szODD
,
szQVGA
,
szVGA
,
sz720p
),
testing
::
Values
(
CV_8UC1
,
CV_8UC4
,
CV_16UC1
,
CV_16SC1
,
CV_32FC1
),
testing
::
ValuesIn
(
BorderType
::
all
()
)
BorderType
::
all
(
)
)
)
{
...
...
@@ -186,7 +186,7 @@ PERF_TEST_P(Size_MatType_BorderType, blur5x5,
testing
::
Combine
(
testing
::
Values
(
szVGA
,
sz720p
),
testing
::
Values
(
CV_8UC1
,
CV_8UC4
,
CV_16UC1
,
CV_16SC1
,
CV_32FC1
,
CV_32FC3
),
testing
::
ValuesIn
(
BorderType
::
all
()
)
BorderType
::
all
(
)
)
)
{
...
...
modules/imgproc/perf/perf_cornerEigenValsAndVecs.cpp
View file @
5eff4f83
...
...
@@ -16,7 +16,7 @@ PERF_TEST_P(Img_BlockSize_ApertureSize_BorderType, cornerEigenValsAndVecs,
testing
::
Values
(
"stitching/a1.png"
,
"cv/shared/pic5.png"
),
testing
::
Values
(
3
,
5
),
testing
::
Values
(
3
,
5
),
testing
::
ValuesIn
(
BorderType
::
all
()
)
BorderType
::
all
(
)
)
)
{
...
...
modules/imgproc/perf/perf_cornerHarris.cpp
View file @
5eff4f83
...
...
@@ -17,7 +17,7 @@ PERF_TEST_P(Img_BlockSize_ApertureSize_k_BorderType, cornerHarris,
testing
::
Values
(
3
,
5
),
testing
::
Values
(
3
,
5
),
testing
::
Values
(
0.04
,
0.1
),
testing
::
ValuesIn
(
BorderType
::
all
()
)
BorderType
::
all
(
)
)
)
{
...
...
modules/imgproc/perf/perf_cvt_color.cpp
View file @
5eff4f83
...
...
@@ -243,7 +243,7 @@ typedef perf::TestBaseWithParam<Size_CvtMode_t> Size_CvtMode;
PERF_TEST_P
(
Size_CvtMode
,
cvtColor8u
,
testing
::
Combine
(
testing
::
Values
(
::
perf
::
szODD
,
::
perf
::
szVGA
,
::
perf
::
sz1080p
),
testing
::
ValuesIn
(
CvtMode
::
all
()
)
CvtMode
::
all
(
)
)
)
{
...
...
@@ -269,7 +269,7 @@ typedef perf::TestBaseWithParam<Size_CvtMode_Bayer_t> Size_CvtMode_Bayer;
PERF_TEST_P
(
Size_CvtMode_Bayer
,
cvtColorBayer8u
,
testing
::
Combine
(
testing
::
Values
(
::
perf
::
szODD
,
::
perf
::
szVGA
),
testing
::
ValuesIn
(
CvtModeBayer
::
all
()
)
CvtModeBayer
::
all
(
)
)
)
{
...
...
@@ -295,7 +295,7 @@ typedef perf::TestBaseWithParam<Size_CvtMode2_t> Size_CvtMode2;
PERF_TEST_P
(
Size_CvtMode2
,
cvtColorYUV420
,
testing
::
Combine
(
testing
::
Values
(
szVGA
,
sz1080p
,
Size
(
130
,
60
)),
testing
::
ValuesIn
(
CvtMode2
::
all
()
)
CvtMode2
::
all
(
)
)
)
{
...
...
@@ -320,7 +320,7 @@ typedef perf::TestBaseWithParam<Size_CvtMode3_t> Size_CvtMode3;
PERF_TEST_P
(
Size_CvtMode3
,
cvtColorRGB2YUV420p
,
testing
::
Combine
(
testing
::
Values
(
szVGA
,
sz720p
,
sz1080p
,
Size
(
130
,
60
)),
testing
::
ValuesIn
(
CvtMode3
::
all
()
)
CvtMode3
::
all
(
)
)
)
{
...
...
modules/imgproc/perf/perf_filter2d.cpp
View file @
5eff4f83
...
...
@@ -17,7 +17,7 @@ PERF_TEST_P( TestFilter2d, Filter2d,
Combine
(
Values
(
Size
(
320
,
240
),
sz1080p
),
Values
(
3
,
5
),
ValuesIn
(
BorderMode
::
all
()
)
BorderMode
::
all
(
)
)
)
{
...
...
modules/imgproc/perf/perf_matchTemplate.cpp
View file @
5eff4f83
...
...
@@ -18,7 +18,7 @@ PERF_TEST_P(ImgSize_TmplSize_Method, matchTemplateSmall,
cv
::
Size
(
1024
,
768
),
cv
::
Size
(
1280
,
1024
)),
testing
::
Values
(
cv
::
Size
(
12
,
12
),
cv
::
Size
(
28
,
9
),
cv
::
Size
(
8
,
30
),
cv
::
Size
(
16
,
16
)),
testing
::
ValuesIn
(
MethodType
::
all
()
)
MethodType
::
all
(
)
)
)
{
...
...
@@ -52,7 +52,7 @@ PERF_TEST_P(ImgSize_TmplSize_Method, matchTemplateBig,
testing
::
Combine
(
testing
::
Values
(
cv
::
Size
(
1280
,
1024
)),
testing
::
Values
(
cv
::
Size
(
1260
,
1000
),
cv
::
Size
(
1261
,
1013
)),
testing
::
ValuesIn
(
MethodType
::
all
()
)
MethodType
::
all
(
)
)
)
{
...
...
modules/imgproc/perf/perf_remap.cpp
View file @
5eff4f83
...
...
@@ -16,7 +16,7 @@ PERF_TEST_P( TestRemap, Remap,
Values
(
szVGA
,
sz1080p
),
Values
(
CV_16UC1
,
CV_16SC1
,
CV_32FC1
),
Values
(
CV_16SC2
,
CV_32FC1
,
CV_32FC2
),
ValuesIn
(
InterType
::
all
()
)
InterType
::
all
(
)
)
)
{
...
...
modules/imgproc/perf/perf_sepfilters.cpp
View file @
5eff4f83
...
...
@@ -34,7 +34,7 @@ PERF_TEST_P(Size_MatType_dx_dy_Border3x3, sobelFilter,
testing
::
Values
(
FILTER_SRC_SIZES
),
testing
::
Values
(
CV_16S
,
CV_32F
),
testing
::
Values
(
make_tuple
(
0
,
1
),
make_tuple
(
1
,
0
),
make_tuple
(
1
,
1
),
make_tuple
(
0
,
2
),
make_tuple
(
2
,
0
),
make_tuple
(
2
,
2
)),
testing
::
ValuesIn
(
BorderType3x3
::
all
()
)
BorderType3x3
::
all
(
)
)
)
{
...
...
@@ -59,7 +59,7 @@ PERF_TEST_P(Size_MatType_dx_dy_Border3x3ROI, sobelFilter,
testing
::
Values
(
FILTER_SRC_SIZES
),
testing
::
Values
(
CV_16S
,
CV_32F
),
testing
::
Values
(
make_tuple
(
0
,
1
),
make_tuple
(
1
,
0
),
make_tuple
(
1
,
1
),
make_tuple
(
0
,
2
),
make_tuple
(
2
,
0
),
make_tuple
(
2
,
2
)),
testing
::
ValuesIn
(
BorderType3x3ROI
::
all
()
)
BorderType3x3ROI
::
all
(
)
)
)
{
...
...
@@ -87,7 +87,7 @@ PERF_TEST_P(Size_MatType_dx_dy_Border5x5, sobelFilter,
testing
::
Values
(
FILTER_SRC_SIZES
),
testing
::
Values
(
CV_16S
,
CV_32F
),
testing
::
Values
(
make_tuple
(
0
,
1
),
make_tuple
(
1
,
0
),
make_tuple
(
1
,
1
),
make_tuple
(
0
,
2
),
make_tuple
(
2
,
0
)),
testing
::
ValuesIn
(
BorderType
::
all
()
)
BorderType
::
all
(
)
)
)
{
...
...
@@ -112,7 +112,7 @@ PERF_TEST_P(Size_MatType_dx_dy_Border5x5ROI, sobelFilter,
testing
::
Values
(
FILTER_SRC_SIZES
),
testing
::
Values
(
CV_16S
,
CV_32F
),
testing
::
Values
(
make_tuple
(
0
,
1
),
make_tuple
(
1
,
0
),
make_tuple
(
1
,
1
),
make_tuple
(
0
,
2
),
make_tuple
(
2
,
0
)),
testing
::
ValuesIn
(
BorderTypeROI
::
all
()
)
BorderTypeROI
::
all
(
)
)
)
{
...
...
@@ -142,7 +142,7 @@ PERF_TEST_P(Size_MatType_dx_dy_Border3x3, scharrFilter,
testing
::
Values
(
FILTER_SRC_SIZES
),
testing
::
Values
(
CV_16S
,
CV_32F
),
testing
::
Values
(
make_tuple
(
0
,
1
),
make_tuple
(
1
,
0
)),
testing
::
ValuesIn
(
BorderType3x3
::
all
()
)
BorderType3x3
::
all
(
)
)
)
{
...
...
@@ -167,7 +167,7 @@ PERF_TEST_P(Size_MatType_dx_dy_Border3x3ROI, scharrFilter,
testing
::
Values
(
FILTER_SRC_SIZES
),
testing
::
Values
(
CV_16S
,
CV_32F
),
testing
::
Values
(
make_tuple
(
0
,
1
),
make_tuple
(
1
,
0
)),
testing
::
ValuesIn
(
BorderType3x3ROI
::
all
()
)
BorderType3x3ROI
::
all
(
)
)
)
{
...
...
@@ -195,7 +195,7 @@ PERF_TEST_P(Size_MatType_dx_dy_Border3x3, scharrViaSobelFilter,
testing
::
Values
(
FILTER_SRC_SIZES
),
testing
::
Values
(
CV_16S
,
CV_32F
),
testing
::
Values
(
make_tuple
(
0
,
1
),
make_tuple
(
1
,
0
)),
testing
::
ValuesIn
(
BorderType3x3
::
all
()
)
BorderType3x3
::
all
(
)
)
)
{
...
...
@@ -220,7 +220,7 @@ PERF_TEST_P(Size_MatType_dx_dy_Border3x3ROI, scharrViaSobelFilter,
testing
::
Values
(
FILTER_SRC_SIZES
),
testing
::
Values
(
CV_16S
,
CV_32F
),
testing
::
Values
(
make_tuple
(
0
,
1
),
make_tuple
(
1
,
0
)),
testing
::
ValuesIn
(
BorderType3x3ROI
::
all
()
)
BorderType3x3ROI
::
all
(
)
)
)
{
...
...
modules/imgproc/perf/perf_threshold.cpp
View file @
5eff4f83
...
...
@@ -15,7 +15,7 @@ PERF_TEST_P(Size_MatType_ThreshType, threshold,
testing
::
Combine
(
testing
::
Values
(
TYPICAL_MAT_SIZES
),
testing
::
Values
(
CV_8UC1
,
CV_16SC1
),
testing
::
ValuesIn
(
ThreshType
::
all
()
)
ThreshType
::
all
(
)
)
)
{
...
...
@@ -65,8 +65,8 @@ typedef perf::TestBaseWithParam<Size_AdaptThreshType_AdaptThreshMethod_BlockSize
PERF_TEST_P
(
Size_AdaptThreshType_AdaptThreshMethod_BlockSize
,
adaptiveThreshold
,
testing
::
Combine
(
testing
::
Values
(
TYPICAL_MAT_SIZES
),
testing
::
ValuesIn
(
AdaptThreshType
::
all
()
),
testing
::
ValuesIn
(
AdaptThreshMethod
::
all
()
),
AdaptThreshType
::
all
(
),
AdaptThreshMethod
::
all
(
),
testing
::
Values
(
3
,
5
)
)
)
...
...
modules/imgproc/perf/perf_warp.cpp
View file @
5eff4f83
...
...
@@ -23,8 +23,8 @@ void update_map(const Mat& src, Mat& map_x, Mat& map_y, const int remapMode );
PERF_TEST_P
(
TestWarpAffine
,
WarpAffine
,
Combine
(
Values
(
szVGA
,
sz720p
,
sz1080p
),
ValuesIn
(
InterType
::
all
()
),
ValuesIn
(
BorderMode
::
all
()
)
InterType
::
all
(
),
BorderMode
::
all
(
)
)
)
{
...
...
@@ -53,8 +53,8 @@ PERF_TEST_P( TestWarpAffine, WarpAffine,
PERF_TEST_P
(
TestWarpPerspective
,
WarpPerspective
,
Combine
(
Values
(
szVGA
,
sz720p
,
sz1080p
),
ValuesIn
(
InterType
::
all
()
),
ValuesIn
(
BorderMode
::
all
()
)
InterType
::
all
(
),
BorderMode
::
all
(
)
)
)
{
...
...
@@ -91,8 +91,8 @@ PERF_TEST_P( TestWarpPerspective, WarpPerspective,
PERF_TEST_P
(
TestWarpPerspectiveNear_t
,
WarpPerspectiveNear
,
Combine
(
Values
(
Size
(
640
,
480
),
Size
(
1920
,
1080
),
Size
(
2592
,
1944
)
),
ValuesIn
(
InterType
::
all
()
),
ValuesIn
(
BorderMode
::
all
()
),
InterType
::
all
(
),
BorderMode
::
all
(
),
Values
(
CV_8UC1
,
CV_8UC4
)
)
)
...
...
@@ -138,9 +138,9 @@ PERF_TEST_P( TestRemap, remap,
Combine
(
Values
(
TYPICAL_MAT_TYPES
),
Values
(
szVGA
,
sz720p
,
sz1080p
),
ValuesIn
(
InterType
::
all
()
),
ValuesIn
(
BorderMode
::
all
()
),
ValuesIn
(
RemapMode
::
all
()
)
InterType
::
all
(
),
BorderMode
::
all
(
),
RemapMode
::
all
(
)
)
)
{
...
...
modules/ocl/test/test_brute_force_matcher.cpp
View file @
5eff4f83
...
...
@@ -45,9 +45,9 @@ namespace
{
/////////////////////////////////////////////////////////////////////////////////////////////////
// BruteForceMatcher
CV_ENUM
(
DistType
,
cv
::
ocl
::
BruteForceMatcher_OCL_base
::
L1Dist
,
\
cv
::
ocl
::
BruteForceMatcher_OCL_base
::
L2Dist
,
\
cv
::
ocl
::
BruteForceMatcher_OCL_base
::
HammingDist
)
CV_ENUM
(
DistType
,
BruteForceMatcher_OCL_base
::
L1Dist
,
BruteForceMatcher_OCL_base
::
L2Dist
,
BruteForceMatcher_OCL_base
::
HammingDist
)
IMPLEMENT_PARAM_CLASS
(
DescriptorSize
,
int
)
PARAM_TEST_CASE
(
BruteForceMatcher
,
DistType
,
DescriptorSize
)
{
...
...
modules/ocl/test/utility.hpp
View file @
5eff4f83
...
...
@@ -130,30 +130,21 @@ private:
void
PrintTo
(
const
Inverse
&
useRoi
,
std
::
ostream
*
os
);
CV_ENUM
(
CmpCode
,
cv
::
CMP_EQ
,
cv
::
CMP_GT
,
cv
::
CMP_GE
,
cv
::
CMP_LT
,
cv
::
CMP_LE
,
cv
::
CMP_NE
)
CV_ENUM
(
NormCode
,
cv
::
NORM_INF
,
cv
::
NORM_L1
,
cv
::
NORM_L2
,
cv
::
NORM_TYPE_MASK
,
cv
::
NORM_RELATIVE
,
cv
::
NORM_MINMAX
)
enum
{
FLIP_BOTH
=
0
,
FLIP_X
=
1
,
FLIP_Y
=
-
1
};
CV_ENUM
(
FlipCode
,
FLIP_BOTH
,
FLIP_X
,
FLIP_Y
)
CV_ENUM
(
CmpCode
,
CMP_EQ
,
CMP_GT
,
CMP_GE
,
CMP_LT
,
CMP_LE
,
CMP_NE
)
CV_ENUM
(
NormCode
,
NORM_INF
,
NORM_L1
,
NORM_L2
,
NORM_TYPE_MASK
,
NORM_RELATIVE
,
NORM_MINMAX
)
CV_ENUM
(
ReduceOp
,
CV_REDUCE_SUM
,
CV_REDUCE_AVG
,
CV_REDUCE_MAX
,
CV_REDUCE_MIN
)
CV_FLAGS
(
GemmFlags
,
cv
::
GEMM_1_T
,
cv
::
GEMM_2_T
,
cv
::
GEMM_3_T
);
CV_ENUM
(
MorphOp
,
cv
::
MORPH_OPEN
,
cv
::
MORPH_CLOSE
,
cv
::
MORPH_GRADIENT
,
cv
::
MORPH_TOPHAT
,
cv
::
MORPH_BLACKHAT
)
CV_ENUM
(
ThreshOp
,
cv
::
THRESH_BINARY
,
cv
::
THRESH_BINARY_INV
,
cv
::
THRESH_TRUNC
,
cv
::
THRESH_TOZERO
,
cv
::
THRESH_TOZERO_INV
)
CV_ENUM
(
Interpolation
,
cv
::
INTER_NEAREST
,
cv
::
INTER_LINEAR
,
cv
::
INTER_CUBIC
)
CV_ENUM
(
Border
,
cv
::
BORDER_REFLECT101
,
cv
::
BORDER_REPLICATE
,
cv
::
BORDER_CONSTANT
,
cv
::
BORDER_REFLECT
,
cv
::
BORDER_WRAP
)
CV_FLAGS
(
WarpFlags
,
cv
::
INTER_NEAREST
,
cv
::
INTER_LINEAR
,
cv
::
INTER_CUBIC
,
cv
::
WARP_INVERSE_MAP
)
CV_ENUM
(
TemplateMethod
,
cv
::
TM_SQDIFF
,
cv
::
TM_SQDIFF_NORMED
,
cv
::
TM_CCORR
,
cv
::
TM_CCORR_NORMED
,
cv
::
TM_CCOEFF
,
cv
::
TM_CCOEFF_NORMED
)
CV_FLAGS
(
DftFlags
,
cv
::
DFT_INVERSE
,
cv
::
DFT_SCALE
,
cv
::
DFT_ROWS
,
cv
::
DFT_COMPLEX_OUTPUT
,
cv
::
DFT_REAL_OUTPUT
)
CV_ENUM
(
MorphOp
,
MORPH_OPEN
,
MORPH_CLOSE
,
MORPH_GRADIENT
,
MORPH_TOPHAT
,
MORPH_BLACKHAT
)
CV_ENUM
(
ThreshOp
,
THRESH_BINARY
,
THRESH_BINARY_INV
,
THRESH_TRUNC
,
THRESH_TOZERO
,
THRESH_TOZERO_INV
)
CV_ENUM
(
Interpolation
,
INTER_NEAREST
,
INTER_LINEAR
,
INTER_CUBIC
)
CV_ENUM
(
Border
,
BORDER_REFLECT101
,
BORDER_REPLICATE
,
BORDER_CONSTANT
,
BORDER_REFLECT
,
BORDER_WRAP
)
CV_ENUM
(
TemplateMethod
,
TM_SQDIFF
,
TM_SQDIFF_NORMED
,
TM_CCORR
,
TM_CCORR_NORMED
,
TM_CCOEFF
,
TM_CCOEFF_NORMED
)
CV_FLAGS
(
GemmFlags
,
GEMM_1_T
,
GEMM_2_T
,
GEMM_3_T
);
CV_FLAGS
(
WarpFlags
,
INTER_NEAREST
,
INTER_LINEAR
,
INTER_CUBIC
,
WARP_INVERSE_MAP
)
CV_FLAGS
(
DftFlags
,
DFT_INVERSE
,
DFT_SCALE
,
DFT_ROWS
,
DFT_COMPLEX_OUTPUT
,
DFT_REAL_OUTPUT
)
void
run_perf_test
();
...
...
modules/photo/perf/perf_inpaint.cpp
View file @
5eff4f83
...
...
@@ -14,7 +14,7 @@ typedef perf::TestBaseWithParam<InpaintArea_InpaintingMethod_t> InpaintArea_Inpa
PERF_TEST_P
(
InpaintArea_InpaintingMethod
,
inpaint
,
testing
::
Combine
(
testing
::
Values
(
::
perf
::
szSmall24
,
::
perf
::
szSmall32
,
::
perf
::
szSmall64
),
testing
::
ValuesIn
(
InpaintingMethod
::
all
()
)
InpaintingMethod
::
all
(
)
)
)
{
...
...
modules/ts/include/opencv2/ts/gpu_perf.hpp
View file @
5eff4f83
...
...
@@ -50,16 +50,16 @@
namespace
perf
{
CV_ENUM
(
BorderMode
,
cv
::
BORDER_REFLECT101
,
cv
::
BORDER_REPLICATE
,
cv
::
BORDER_CONSTANT
,
cv
::
BORDER_REFLECT
,
cv
::
BORDER_WRAP
)
#define ALL_
BORDER_MODES testing::ValuesIn(BorderMode::all()
)
#define ALL_BORDER_MODES BorderMode::all(
)
#define ALL_
INTERPOLATIONS Interpolation::all(
)
CV_ENUM
(
Interpolation
,
cv
::
INTER_NEAREST
,
cv
::
INTER_LINEAR
,
cv
::
INTER_CUBIC
,
cv
::
INTER_AREA
)
#define ALL_INTERPOLATIONS testing::ValuesIn(Interpolation::all())
CV_ENUM
(
NormType
,
cv
::
NORM_INF
,
cv
::
NORM_L1
,
cv
::
NORM_L2
,
cv
::
NORM_HAMMING
,
cv
::
NORM_MINMAX
)
CV_ENUM
(
BorderMode
,
BORDER_REFLECT101
,
BORDER_REPLICATE
,
BORDER_CONSTANT
,
BORDER_REFLECT
,
BORDER_WRAP
)
CV_ENUM
(
Interpolation
,
INTER_NEAREST
,
INTER_LINEAR
,
INTER_CUBIC
,
INTER_AREA
)
CV_ENUM
(
NormType
,
NORM_INF
,
NORM_L1
,
NORM_L2
,
NORM_HAMMING
,
NORM_MINMAX
)
enum
{
Gray
=
1
,
TwoChannel
=
2
,
BGR
=
3
,
BGRA
=
4
};
CV_ENUM
(
MatCn
,
Gray
,
TwoChannel
,
BGR
,
BGRA
)
#define GPU_CHANNELS_1_3_4 testing::Values(MatCn(Gray), MatCn(BGR), MatCn(BGRA))
#define GPU_CHANNELS_1_3 testing::Values(MatCn(Gray), MatCn(BGR))
...
...
modules/ts/include/opencv2/ts/gpu_test.hpp
View file @
5eff4f83
...
...
@@ -313,14 +313,14 @@ namespace cvtest
// Flags and enums
CV_ENUM
(
NormCode
,
cv
::
NORM_INF
,
cv
::
NORM_L1
,
cv
::
NORM_L2
,
cv
::
NORM_TYPE_MASK
,
cv
::
NORM_RELATIVE
,
cv
::
NORM_MINMAX
)
CV_ENUM
(
NormCode
,
NORM_INF
,
NORM_L1
,
NORM_L2
,
NORM_TYPE_MASK
,
NORM_RELATIVE
,
NORM_MINMAX
)
CV_ENUM
(
Interpolation
,
cv
::
INTER_NEAREST
,
cv
::
INTER_LINEAR
,
cv
::
INTER_CUBIC
,
cv
::
INTER_AREA
)
CV_ENUM
(
Interpolation
,
INTER_NEAREST
,
INTER_LINEAR
,
INTER_CUBIC
,
INTER_AREA
)
CV_ENUM
(
BorderType
,
cv
::
BORDER_REFLECT101
,
cv
::
BORDER_REPLICATE
,
cv
::
BORDER_CONSTANT
,
cv
::
BORDER_REFLECT
,
cv
::
BORDER_WRAP
)
CV_ENUM
(
BorderType
,
BORDER_REFLECT101
,
BORDER_REPLICATE
,
BORDER_CONSTANT
,
BORDER_REFLECT
,
BORDER_WRAP
)
#define ALL_BORDER_TYPES testing::Values(BorderType(cv::BORDER_REFLECT101), BorderType(cv::BORDER_REPLICATE), BorderType(cv::BORDER_CONSTANT), BorderType(cv::BORDER_REFLECT), BorderType(cv::BORDER_WRAP))
CV_FLAGS
(
WarpFlags
,
cv
::
INTER_NEAREST
,
cv
::
INTER_LINEAR
,
cv
::
INTER_CUBIC
,
cv
::
WARP_INVERSE_MAP
)
CV_FLAGS
(
WarpFlags
,
INTER_NEAREST
,
INTER_LINEAR
,
INTER_CUBIC
,
WARP_INVERSE_MAP
)
//////////////////////////////////////////////////////////////////////
// Features2D
...
...
modules/ts/include/opencv2/ts/ts_perf.hpp
View file @
5eff4f83
...
...
@@ -2,6 +2,7 @@
#define __OPENCV_TS_PERF_HPP__
#include "opencv2/core/core.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/features2d/features2d.hpp"
#include "ts_gtest.h"
...
...
@@ -26,6 +27,9 @@
# endif
#endif
// declare major namespaces to avoid errors on unknown namespace
namespace
cv
{
namespace
gpu
{}
namespace
ocl
{}
}
namespace
perf
{
class
TestBase
;
...
...
@@ -93,65 +97,63 @@ private:
\*****************************************************************************************/
#define CV_ENUM(class_name, ...) \
namespace { class CV_EXPORTS class_name {\
public:\
class_name(int val = 0) : _val(val) {}\
operator int() const {return _val;}\
void PrintTo(std::ostream* os) const {\
const int vals[] = {__VA_ARGS__};\
const char* svals = #__VA_ARGS__;\
for(int i = 0, pos = 0; i < (int)(sizeof(vals)/sizeof(int)); ++i){\
while(isspace(svals[pos]) || svals[pos] == ',') ++pos;\
int start = pos;\
while(!(isspace(svals[pos]) || svals[pos] == ',' || svals[pos] == 0)) ++pos;\
if (_val == vals[i]) {\
*os << std::string(svals + start, svals + pos);\
return;\
}\
}\
*os << "UNKNOWN";\
}\
struct Container{\
typedef class_name value_type;\
Container(class_name* first, size_t len): _begin(first), _end(first+len){}\
const class_name* begin() const {return _begin;}\
const class_name* end() const {return _end;}\
private: class_name *_begin, *_end;\
};\
static Container all(){\
static int vals[] = {__VA_ARGS__};\
return Container((class_name*)vals, sizeof(vals)/sizeof(vals[0]));\
}\
private: int _val;\
};\
inline void PrintTo(const class_name& t, std::ostream* os) { t.PrintTo(os); } }
namespace { \
struct class_name { \
class_name(int val = 0) : val_(val) {} \
operator int() const { return val_; } \
void PrintTo(std::ostream* os) const { \
using namespace cv;using namespace cv::gpu; using namespace cv::ocl; \
const int vals[] = { __VA_ARGS__ }; \
const char* svals = #__VA_ARGS__; \
for(int i = 0, pos = 0; i < (int)(sizeof(vals)/sizeof(int)); ++i) { \
while(isspace(svals[pos]) || svals[pos] == ',') ++pos; \
int start = pos; \
while(!(isspace(svals[pos]) || svals[pos] == ',' || svals[pos] == 0)) \
++pos; \
if (val_ == vals[i]) { \
*os << std::string(svals + start, svals + pos); \
return; \
} \
} \
*os << "UNKNOWN"; \
} \
static ::testing::internal::ParamGenerator<class_name> all() { \
using namespace cv;using namespace cv::gpu; using namespace cv::ocl; \
static class_name vals[] = { __VA_ARGS__ }; \
return ::testing::ValuesIn(vals); \
} \
private: int val_; \
}; \
inline void PrintTo(const class_name& t, std::ostream* os) { t.PrintTo(os); } }
#define CV_FLAGS(class_name, ...) \
class CV_EXPORTS class_name {\
public:\
class_name(int val = 0) : _val(val) {}\
operator int() const {return _val;}\
void PrintTo(std::ostream* os) const {\
const int vals[] = {__VA_ARGS__};\
const char* svals = #__VA_ARGS__;\
int value = _val;\
bool first = true;\
for(int i = 0, pos = 0; i < (int)(sizeof(vals)/sizeof(int)); ++i){\
while(isspace(svals[pos]) || svals[pos] == ',') ++pos;\
int start = pos;\
while(!(isspace(svals[pos]) || svals[pos] == ',' || svals[pos] == 0)) ++pos;\
if ((value & vals[i]) == vals[i]) {\
namespace { \
struct class_name { \
class_name(int val = 0) : val_(val) {} \
operator int() const { return val_; } \
void PrintTo(std::ostream* os) const { \
using namespace cv;using namespace cv::gpu; using namespace cv::ocl; \
const int vals[] = { __VA_ARGS__ }; \
const char* svals = #__VA_ARGS__; \
int value = val_; \
bool first = true; \
for(int i = 0, pos = 0; i < (int)(sizeof(vals)/sizeof(int)); ++i) { \
while(isspace(svals[pos]) || svals[pos] == ',') ++pos; \
int start = pos; \
while(!(isspace(svals[pos]) || svals[pos] == ',' || svals[pos] == 0)) \
++pos; \
if ((value & vals[i]) == vals[i]) { \
value &= ~vals[i]; \
if (first) first = false; else *os << "|"; \
*os << std::string(svals + start, svals + pos);
\
if (!value) return;
\
}
\
}
\
if (first) *os << "UNKNOWN";
\
}
\
private: int _val;
\
};
\
inline void PrintTo(const class_name& t, std::ostream* os) { t.PrintTo(os);
}
*os << std::string(svals + start, svals + pos);
\
if (!value) return;
\
}
\
}
\
if (first) *os << "UNKNOWN";
\
}
\
private: int val_;
\
};
\
inline void PrintTo(const class_name& t, std::ostream* os) { t.PrintTo(os); }
}
CV_ENUM
(
MatDepth
,
CV_8U
,
CV_8S
,
CV_16U
,
CV_16S
,
CV_32S
,
CV_32F
,
CV_64F
,
CV_USRTYPE1
)
...
...
modules/video/perf/perf_optflowpyrlk.cpp
View file @
5eff4f83
...
...
@@ -185,7 +185,7 @@ PERF_TEST_P(Path_Win_Deriv_Border_Reuse, OpticalFlowPyrLK_pyr, testing::Combine(
testing
::
Values
<
std
::
string
>
(
"cv/optflow/frames/720p_01.png"
),
testing
::
Values
(
7
,
11
),
testing
::
Bool
(),
testing
::
ValuesIn
(
PyrBorderMode
::
all
()
),
PyrBorderMode
::
all
(
),
testing
::
Bool
()
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment