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
8fdab9f6
Commit
8fdab9f6
authored
Apr 17, 2013
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2.4'
parents
974f1f48
f6848b66
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
38 changed files
with
276 additions
and
262 deletions
+276
-262
CONTRIBUTING.md
CONTRIBUTING.md
+12
-0
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
+13
-17
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
+5
-5
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
util.hpp
modules/ocl/include/opencv2/ocl/private/util.hpp
+1
-1
brute_force_matcher.cpp
modules/ocl/src/brute_force_matcher.cpp
+0
-0
initialization.cpp
modules/ocl/src/initialization.cpp
+7
-0
brute_force_match.cl
modules/ocl/src/opencl/brute_force_match.cl
+0
-0
imgproc_canny.cl
modules/ocl/src/opencl/imgproc_canny.cl
+72
-63
test_brute_force_matcher.cpp
modules/ocl/test/test_brute_force_matcher.cpp
+19
-11
utility.hpp
modules/ocl/test/utility.hpp
+12
-21
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_gtest.h
modules/ts/include/opencv2/ts/ts_gtest.h
+0
-0
ts_perf.hpp
modules/ts/include/opencv2/ts/ts_perf.hpp
+61
-60
ts_gtest.cpp
modules/ts/src/ts_gtest.cpp
+0
-0
perf_optflowpyrlk.cpp
modules/video/perf/perf_optflowpyrlk.cpp
+1
-1
No files found.
CONTRIBUTING.md
0 → 100644
View file @
8fdab9f6
We greatly appreciate your support and contributions and they are always welcomed!
Github pull requests are the convenient way to contribute to OpenCV project. Good pull requests have all of these attributes:
*
Are scoped to one specific issue
*
Include a test to demonstrate the correctness
*
Update the docs if relevant
*
Match the
[
coding style guidelines
](
http://code.opencv.org/projects/opencv/wiki/CodingStyleGuide
)
*
Don't messed by "oops" commits
You can find more detailes about contributing process on http://opencv.org/contribute.html
\ No newline at end of file
modules/core/perf/perf_compare.cpp
View file @
8fdab9f6
...
...
@@ -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 @
8fdab9f6
...
...
@@ -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 @
8fdab9f6
...
...
@@ -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 @
8fdab9f6
...
...
@@ -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, (int)cv::GEMM_1_T, (int)cv::GEMM_2_T, (int)cv::GEMM_3_T, \
(int)cv::GEMM_1_T | cv::GEMM_2_T, (int)cv::GEMM_1_T | cv::GEMM_3_T, \
(int)cv::GEMM_1_T | cv::GEMM_2_T | cv::GEMM_3_T)
...
...
@@ -1391,7 +1390,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
);
...
...
@@ -1399,7 +1397,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
);
...
...
@@ -2073,12 +2071,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
,
REDUCE_SUM
,
REDUCE_AVG
,
REDUCE_MAX
,
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
);
...
...
@@ -2086,8 +2081,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 @
8fdab9f6
...
...
@@ -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 @
8fdab9f6
...
...
@@ -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
);
...
...
modules/gpu/test/test_core.cpp
View file @
8fdab9f6
...
...
@@ -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 @
8fdab9f6
...
...
@@ -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 @
8fdab9f6
...
...
@@ -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 @
8fdab9f6
...
...
@@ -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 @
8fdab9f6
...
...
@@ -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 @
8fdab9f6
...
...
@@ -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 @
8fdab9f6
...
...
@@ -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 @
8fdab9f6
...
...
@@ -47,7 +47,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
(
)
)
)
{
...
...
@@ -69,7 +69,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
(
)
)
)
{
...
...
@@ -91,7 +91,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
(
)
)
)
{
...
...
@@ -113,7 +113,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
(
)
)
)
{
...
...
@@ -135,7 +135,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
(
)
)
)
{
...
...
@@ -163,7 +163,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
(
)
)
)
{
...
...
@@ -185,7 +185,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 @
8fdab9f6
...
...
@@ -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 @
8fdab9f6
...
...
@@ -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 @
8fdab9f6
...
...
@@ -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
(
)
)
)
{
...
...
@@ -347,7 +347,7 @@ typedef perf::TestBaseWithParam<EdgeAwareParams> EdgeAwareDemosaicingTest;
PERF_TEST_P
(
EdgeAwareDemosaicingTest
,
demosaicingEA
,
testing
::
Combine
(
testing
::
Values
(
szVGA
,
sz720p
,
sz1080p
,
Size
(
130
,
60
)),
testing
::
ValuesIn
(
EdgeAwareBayerMode
::
all
()
)
EdgeAwareBayerMode
::
all
(
)
)
)
{
...
...
modules/imgproc/perf/perf_filter2d.cpp
View file @
8fdab9f6
...
...
@@ -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 @
8fdab9f6
...
...
@@ -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 @
8fdab9f6
...
...
@@ -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 @
8fdab9f6
...
...
@@ -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 @
8fdab9f6
...
...
@@ -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 @
8fdab9f6
...
...
@@ -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/include/opencv2/ocl/private/util.hpp
View file @
8fdab9f6
...
...
@@ -68,7 +68,7 @@ namespace cv
void
CV_EXPORTS
openCLMallocPitch
(
Context
*
clCxt
,
void
**
dev_ptr
,
size_t
*
pitch
,
size_t
widthInBytes
,
size_t
height
);
void
CV_EXPORTS
openCLMallocPitchEx
(
Context
*
clCxt
,
void
**
dev_ptr
,
size_t
*
pitch
,
size_t
widthInBytes
,
size_t
height
,
size_t
widthInBytes
,
size_t
height
,
DevMemRW
rw_type
,
DevMemType
mem_type
,
void
*
hptr
=
0
);
void
CV_EXPORTS
openCLMemcpy2D
(
Context
*
clCxt
,
void
*
dst
,
size_t
dpitch
,
const
void
*
src
,
size_t
spitch
,
...
...
modules/ocl/src/brute_force_matcher.cpp
View file @
8fdab9f6
This diff is collapsed.
Click to expand it.
modules/ocl/src/initialization.cpp
View file @
8fdab9f6
...
...
@@ -362,6 +362,13 @@ namespace cv
{
case
WAVEFRONT_SIZE
:
{
bool
is_cpu
=
false
;
queryDeviceInfo
(
IS_CPU_DEVICE
,
&
is_cpu
);
if
(
is_cpu
)
{
*
(
int
*
)
info
=
1
;
return
;
}
#ifdef CL_DEVICE_WAVEFRONT_WIDTH_AMD
try
{
...
...
modules/ocl/src/opencl/brute_force_match.cl
View file @
8fdab9f6
This diff is collapsed.
Click to expand it.
modules/ocl/src/opencl/imgproc_canny.cl
View file @
8fdab9f6
...
...
@@ -69,8 +69,10 @@ inline float calc(int x, int y)
//
dx_buf
output
dx
buffer
//
dy_buf
output
dy
buffer
__kernel
void
calcSobelRowPass
(
void
__attribute__
((
reqd_work_group_size
(
16
,
16
,
1
)))
calcSobelRowPass
(
__global
const
uchar
*
src,
__global
int
*
dx_buf,
__global
int
*
dy_buf,
...
...
@@ -82,10 +84,8 @@ __kernel
int
dx_buf_offset,
int
dy_buf_step,
int
dy_buf_offset
)
)
{
//src_step
/=
sizeof
(
*src
)
;
//src_offset
/=
sizeof
(
*src
)
;
dx_buf_step
/=
sizeof
(
*dx_buf
)
;
dx_buf_offset
/=
sizeof
(
*dx_buf
)
;
dy_buf_step
/=
sizeof
(
*dy_buf
)
;
...
...
@@ -99,24 +99,23 @@ __kernel
__local
int
smem[16][18]
;
smem[lidy][lidx
+
1]
=
src[gidx
+
gidy
*
src_step
+
src_offset]
;
smem[lidy][lidx
+
1]
=
src[gidx
+
min
(
gidy,
rows
-
1
)
*
src_step
+
src_offset]
;
if
(
lidx
==
0
)
{
smem[lidy][0]
=
src[max
(
gidx
-
1
,
0
)
+
gidy
*
src_step
+
src_offset]
;
smem[lidy][17]
=
src[min
(
gidx
+
16
,
cols
-
1
)
+
gidy
*
src_step
+
src_offset]
;
smem[lidy][0]
=
src[max
(
gidx
-
1
,
0
)
+
min
(
gidy,
rows
-
1
)
*
src_step
+
src_offset]
;
smem[lidy][17]
=
src[min
(
gidx
+
16
,
cols
-
1
)
+
min
(
gidy,
rows
-
1
)
*
src_step
+
src_offset]
;
}
barrier
(
CLK_LOCAL_MEM_FENCE
)
;
if
(
gidy
<
rows
)
if
(
gidy
<
rows
&&
gidx
<
cols
)
{
if
(
gidx
<
cols
)
{
dx_buf[gidx
+
gidy
*
dx_buf_step
+
dx_buf_offset]
=
-smem[lidy][lidx]
+
smem[lidy][lidx
+
2]
;
dy_buf[gidx
+
gidy
*
dy_buf_step
+
dy_buf_offset]
=
smem[lidy][lidx]
+
2
*
smem[lidy][lidx
+
1]
+
smem[lidy][lidx
+
2]
;
}
dx_buf[gidx
+
gidy
*
dx_buf_step
+
dx_buf_offset]
=
-smem[lidy][lidx]
+
smem[lidy][lidx
+
2]
;
dy_buf[gidx
+
gidy
*
dy_buf_step
+
dy_buf_offset]
=
smem[lidy][lidx]
+
2
*
smem[lidy][lidx
+
1]
+
smem[lidy][lidx
+
2]
;
}
}
...
...
@@ -129,8 +128,10 @@ __kernel
//
dy
direvitive
in
y
direction
output
//
mag
magnitude
direvitive
of
xy
output
__kernel
void
calcMagnitude_buf
(
void
__attribute__
((
reqd_work_group_size
(
16
,
16
,
1
)))
calcMagnitude_buf
(
__global
const
int
*
dx_buf,
__global
const
int
*
dy_buf,
__global
int
*
dx,
...
...
@@ -148,7 +149,7 @@ __kernel
int
dy_offset,
int
mag_step,
int
mag_offset
)
)
{
dx_buf_step
/=
sizeof
(
*dx_buf
)
;
dx_buf_offset
/=
sizeof
(
*dx_buf
)
;
...
...
@@ -170,30 +171,33 @@ __kernel
__local
int
sdx[18][16]
;
__local
int
sdy[18][16]
;
sdx[lidy
+
1][lidx]
=
dx_buf[gidx
+
gidy
*
dx_buf_step
+
dx_buf_offset]
;
sdy[lidy
+
1][lidx]
=
dy_buf[gidx
+
gidy
*
dy_buf_step
+
dy_buf_offset]
;
sdx[lidy
+
1][lidx]
=
dx_buf[gidx
+
min
(
gidy,
rows
-
1
)
*
dx_buf_step
+
dx_buf_offset]
;
sdy[lidy
+
1][lidx]
=
dy_buf[gidx
+
min
(
gidy,
rows
-
1
)
*
dy_buf_step
+
dy_buf_offset]
;
if
(
lidy
==
0
)
{
sdx[0][lidx]
=
dx_buf[gidx
+
max
(
gidy
-
1
,
0
)
*
dx_buf_step
+
dx_buf_offset]
;
sdx[17][lidx]
=
dx_buf[gidx
+
min
(
gidy
+
16
,
rows
-
1
)
*
dx_buf_step
+
dx_buf_offset]
;
sdy[0][lidx]
=
dy_buf[gidx
+
max
(
gidy
-
1
,
0
)
*
dy_buf_step
+
dy_buf_offset]
;
sdy[17][lidx]
=
dy_buf[gidx
+
min
(
gidy
+
16
,
rows
-
1
)
*
dy_buf_step
+
dy_buf_offset]
;
sdx[0][lidx]
=
dx_buf[gidx
+
min
(
max
(
gidy-1,0
)
,
rows-1
)
*
dx_buf_step
+
dx_buf_offset]
;
sdx[17][lidx]
=
dx_buf[gidx
+
min
(
gidy
+
16
,
rows
-
1
)
*
dx_buf_step
+
dx_buf_offset]
;
sdy[0][lidx]
=
dy_buf[gidx
+
min
(
max
(
gidy-1,0
)
,
rows-1
)
*
dy_buf_step
+
dy_buf_offset]
;
sdy[17][lidx]
=
dy_buf[gidx
+
min
(
gidy
+
16
,
rows
-
1
)
*
dy_buf_step
+
dy_buf_offset]
;
}
barrier
(
CLK_LOCAL_MEM_FENCE
)
;
if
(
gidx
<
cols
)
if
(
gidx
<
cols
&&
gidy
<
rows
)
{
if
(
gidy
<
rows
)
{
int
x
=
sdx[lidy][lidx]
+
2
*
sdx[lidy
+
1][lidx]
+
sdx[lidy
+
2][lidx]
;
int
y
=
-sdy[lidy][lidx]
+
sdy[lidy
+
2][lidx]
;
int
x
=
sdx[lidy][lidx]
+
2
*
sdx[lidy
+
1][lidx]
+
sdx[lidy
+
2][lidx]
;
int
y
=
-sdy[lidy][lidx]
+
sdy[lidy
+
2][lidx]
;
dx[gidx
+
gidy
*
dx_step
+
dx_offset]
=
x
;
dy[gidx
+
gidy
*
dy_step
+
dy_offset]
=
y
;
dx[gidx
+
gidy
*
dx_step
+
dx_offset]
=
x
;
dy[gidx
+
gidy
*
dy_step
+
dy_offset]
=
y
;
mag[
(
gidx
+
1
)
+
(
gidy
+
1
)
*
mag_step
+
mag_offset]
=
calc
(
x,
y
)
;
}
mag[
(
gidx
+
1
)
+
(
gidy
+
1
)
*
mag_step
+
mag_offset]
=
calc
(
x,
y
)
;
}
}
...
...
@@ -206,8 +210,8 @@ __kernel
//
dy
direvitive
in
y
direction
output
//
mag
magnitude
direvitive
of
xy
output
__kernel
void
calcMagnitude
(
void
calcMagnitude
(
__global
const
int
*
dx,
__global
const
int
*
dy,
__global
float
*
mag,
...
...
@@ -219,7 +223,7 @@ __kernel
int
dy_offset,
int
mag_step,
int
mag_offset
)
)
{
dx_step
/=
sizeof
(
*dx
)
;
dx_offset
/=
sizeof
(
*dx
)
;
...
...
@@ -235,9 +239,9 @@ __kernel
{
mag[
(
gidx
+
1
)
+
(
gidy
+
1
)
*
mag_step
+
mag_offset]
=
calc
(
dx[gidx
+
gidy
*
dx_step
+
dx_offset],
dy[gidx
+
gidy
*
dy_step
+
dy_offset]
)
;
dx[gidx
+
gidy
*
dx_step
+
dx_offset],
dy[gidx
+
gidy
*
dy_step
+
dy_offset]
)
;
}
}
...
...
@@ -262,8 +266,10 @@ __kernel
//
mag
magnitudes
calculated
from
calcMagnitude
function
//
map
output
containing
raw
edge
types
__kernel
void
calcMap
(
void
__attribute__
((
reqd_work_group_size
(
16
,
16
,
1
)))
calcMap
(
__global
const
int
*
dx,
__global
const
int
*
dy,
__global
const
float
*
mag,
...
...
@@ -280,7 +286,7 @@ __kernel
int
mag_offset,
int
map_step,
int
map_offset
)
)
{
dx_step
/=
sizeof
(
*dx
)
;
dx_offset
/=
sizeof
(
*dx
)
;
...
...
@@ -307,11 +313,13 @@ __kernel
int
ly
=
tid
/
18
;
if
(
ly
<
14
)
{
smem[ly][lx]
=
mag[grp_idx
+
lx
+
(
grp_idy
+
ly
)
*
mag_step]
;
smem[ly][lx]
=
mag[grp_idx
+
lx
+
min
(
grp_idy
+
ly,
rows
-
1
)
*
mag_step]
;
}
if
(
ly
<
4
&&
grp_idy
+
ly
+
14
<=
rows
&&
grp_idx
+
lx
<=
cols
)
{
smem[ly
+
14][lx]
=
mag[grp_idx
+
lx
+
(
grp_idy
+
ly
+
14
)
*
mag_step]
;
smem[ly
+
14][lx]
=
mag[grp_idx
+
lx
+
min
(
grp_idy
+
ly
+
14
,
rows
-1
)
*
mag_step]
;
}
barrier
(
CLK_LOCAL_MEM_FENCE
)
;
...
...
@@ -375,8 +383,10 @@ __kernel
//
st
the
potiential
edge
points
found
in
this
kernel
call
//
counter
the
number
of
potiential
edge
points
__kernel
void
edgesHysteresisLocal
(
void
__attribute__
((
reqd_work_group_size
(
16
,
16
,
1
)))
edgesHysteresisLocal
(
__global
int
*
map,
__global
ushort2
*
st,
volatile
__global
unsigned
int
*
counter,
...
...
@@ -384,7 +394,7 @@ __kernel
int
cols,
int
map_step,
int
map_offset
)
)
{
map_step
/=
sizeof
(
*map
)
;
map_offset
/=
sizeof
(
*map
)
;
...
...
@@ -405,11 +415,13 @@ __kernel
int
ly
=
tid
/
18
;
if
(
ly
<
14
)
{
smem[ly][lx]
=
map[grp_idx
+
lx
+
(
grp_idy
+
ly
)
*
map_step
+
map_offset]
;
smem[ly][lx]
=
map[grp_idx
+
lx
+
min
(
grp_idy
+
ly,
rows
-
1
)
*
map_step
+
map_offset]
;
}
if
(
ly
<
4
&&
grp_idy
+
ly
+
14
<=
rows
&&
grp_idx
+
lx
<=
cols
)
{
smem[ly
+
14][lx]
=
map[grp_idx
+
lx
+
(
grp_idy
+
ly
+
14
)
*
map_step
+
map_offset]
;
smem[ly
+
14][lx]
=
map[grp_idx
+
lx
+
min
(
grp_idy
+
ly
+
14
,
rows
-
1
)
*
map_step
+
map_offset]
;
}
barrier
(
CLK_LOCAL_MEM_FENCE
)
;
...
...
@@ -472,8 +484,8 @@ __constant int c_dy[8] = {-1, -1, -1, 0, 0, 1, 1, 1};
#
define
stack_size
512
__kernel
void
edgesHysteresisGlobal
(
void
edgesHysteresisGlobal
(
__global
int
*
map,
__global
ushort2
*
st1,
__global
ushort2
*
st2,
...
...
@@ -483,7 +495,7 @@ __kernel
int
count,
int
map_step,
int
map_offset
)
)
{
map_step
/=
sizeof
(
*map
)
;
...
...
@@ -535,7 +547,7 @@ __kernel
while
(
s_counter
>
0
&&
s_counter
<=
stack_size
-
get_local_size
(
0
))
{
const
int
subTaskIdx
=
lidx
>>
3
;
const
int
portion
=
min
(
s_counter,
get_local_size
(
0
)
>>
3
)
;
const
int
portion
=
min
(
s_counter,
(
uint
)(
get_local_size
(
0
)
>>
3
)
)
;
pos.x
=
pos.y
=
0
;
...
...
@@ -589,8 +601,8 @@ __kernel
//
map
edge
type
mappings
//
dst
edge
output
__kernel
void
getEdges
(
void
getEdges
(
__global
const
int
*
map,
__global
uchar
*
dst,
int
rows,
...
...
@@ -599,19 +611,16 @@ __kernel
int
map_offset,
int
dst_step,
int
dst_offset
)
)
{
map_step
/=
sizeof
(
*map
)
;
map_offset
/=
sizeof
(
*map
)
;
//dst_step
/=
sizeof
(
*dst
)
;
//dst_offset
/=
sizeof
(
*dst
)
;
int
gidx
=
get_global_id
(
0
)
;
int
gidy
=
get_global_id
(
1
)
;
if
(
gidy
<
rows
&&
gidx
<
cols
)
{
//dst[gidx
+
gidy
*
dst_step]
=
map[gidx
+
1
+
(
gidy
+
1
)
*
map_step]
==
2
?
255:
0
;
dst[gidx
+
gidy
*
dst_step]
=
(
uchar
)(
-
(
map[gidx
+
1
+
(
gidy
+
1
)
*
map_step]
/
2
))
;
dst[gidx
+
gidy
*
dst_step]
=
(
uchar
)(
-
(
map[gidx
+
1
+
(
gidy
+
1
)
*
map_step]
>>
1
))
;
}
}
modules/ocl/test/test_brute_force_matcher.cpp
View file @
8fdab9f6
...
...
@@ -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
)
{
...
...
@@ -158,11 +158,7 @@ namespace
TEST_P
(
BruteForceMatcher
,
RadiusMatch_Single
)
{
float
radius
;
if
(
distType
==
cv
::
ocl
::
BruteForceMatcher_OCL_base
::
L2Dist
)
radius
=
1.
f
/
countFactor
/
countFactor
;
else
radius
=
1.
f
/
countFactor
;
float
radius
=
1.
f
/
countFactor
;
cv
::
ocl
::
BruteForceMatcher_OCL_base
matcher
(
distType
);
...
...
@@ -191,8 +187,20 @@ namespace
INSTANTIATE_TEST_CASE_P
(
OCL_Features2D
,
BruteForceMatcher
,
testing
::
Combine
(
testing
::
Values
(
DistType
(
cv
::
ocl
::
BruteForceMatcher_OCL_base
::
L1Dist
),
DistType
(
cv
::
ocl
::
BruteForceMatcher_OCL_base
::
L2Dist
)),
testing
::
Values
(
DescriptorSize
(
57
),
DescriptorSize
(
64
),
DescriptorSize
(
83
),
DescriptorSize
(
128
),
DescriptorSize
(
179
),
DescriptorSize
(
256
),
DescriptorSize
(
304
))));
testing
::
Values
(
DistType
(
cv
::
ocl
::
BruteForceMatcher_OCL_base
::
L1Dist
),
DistType
(
cv
::
ocl
::
BruteForceMatcher_OCL_base
::
L2Dist
)
/*,
DistType(cv::ocl::BruteForceMatcher_OCL_base::HammingDist)*/
),
testing
::
Values
(
DescriptorSize
(
57
),
DescriptorSize
(
64
),
DescriptorSize
(
83
),
DescriptorSize
(
128
),
DescriptorSize
(
179
),
DescriptorSize
(
256
),
DescriptorSize
(
304
))
)
);
}
// namespace
#endif
modules/ocl/test/utility.hpp
View file @
8fdab9f6
...
...
@@ -132,30 +132,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
(
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
(
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
,
REDUCE_SUM
,
REDUCE_AVG
,
REDUCE_MAX
,
REDUCE_MIN
)
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 @
8fdab9f6
...
...
@@ -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 @
8fdab9f6
...
...
@@ -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 @
8fdab9f6
...
...
@@ -312,14 +312,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_gtest.h
View file @
8fdab9f6
This diff is collapsed.
Click to expand it.
modules/ts/include/opencv2/ts/ts_perf.hpp
View file @
8fdab9f6
...
...
@@ -31,6 +31,9 @@
# endif
#endif
// declare major namespaces to avoid errors on unknown namespace
namespace
cv
{
namespace
gpu
{}
namespace
ocl
{}
}
namespace
perf
{
class
TestBase
;
...
...
@@ -97,66 +100,64 @@ private:
* CV_ENUM and CV_FLAGS - macro to create printable wrappers for defines and enums *
\*****************************************************************************************/
#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); } }
#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]) {\
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); }
#define CV_ENUM(class_name, ...) \
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, ...) \
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); } }
CV_ENUM
(
MatDepth
,
CV_8U
,
CV_8S
,
CV_16U
,
CV_16S
,
CV_32S
,
CV_32F
,
CV_64F
,
CV_USRTYPE1
)
...
...
modules/ts/src/ts_gtest.cpp
View file @
8fdab9f6
This diff is collapsed.
Click to expand it.
modules/video/perf/perf_optflowpyrlk.cpp
View file @
8fdab9f6
...
...
@@ -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