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
d156f5af
Commit
d156f5af
authored
May 29, 2014
by
Ilya Lavrenov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added missed tests for cv::norm, cv::normalize
parent
c9db91ac
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
perf_arithm.cpp
modules/core/perf/opencl/perf_arithm.cpp
+38
-0
No files found.
modules/core/perf/opencl/perf_arithm.cpp
View file @
d156f5af
...
...
@@ -738,6 +738,26 @@ CV_ENUM(NormType, NORM_INF, NORM_L1, NORM_L2)
typedef
std
::
tr1
::
tuple
<
Size
,
MatType
,
NormType
>
NormParams
;
typedef
TestBaseWithParam
<
NormParams
>
NormFixture
;
OCL_PERF_TEST_P
(
NormFixture
,
Norm1Arg
,
::
testing
::
Combine
(
OCL_PERF_ENUM
(
OCL_SIZE_1
,
OCL_SIZE_2
,
OCL_SIZE_3
),
OCL_TEST_TYPES_134
,
NormType
::
all
()))
{
const
NormParams
params
=
GetParam
();
const
Size
srcSize
=
get
<
0
>
(
params
);
const
int
type
=
get
<
1
>
(
params
);
const
int
normType
=
get
<
2
>
(
params
);
checkDeviceMaxMemoryAllocSize
(
srcSize
,
type
);
UMat
src1
(
srcSize
,
type
);
double
res
;
declare
.
in
(
src1
,
WARMUP_RNG
);
OCL_TEST_CYCLE
()
res
=
cv
::
norm
(
src1
,
normType
);
SANITY_CHECK
(
res
,
1e-5
,
ERROR_RELATIVE
);
}
OCL_PERF_TEST_P
(
NormFixture
,
Norm
,
::
testing
::
Combine
(
OCL_PERF_ENUM
(
OCL_SIZE_1
,
OCL_SIZE_2
,
OCL_SIZE_3
),
OCL_TEST_TYPES_134
,
NormType
::
all
()))
...
...
@@ -910,6 +930,24 @@ OCL_PERF_TEST_P(NormalizeFixture, Normalize,
SANITY_CHECK
(
dst
,
5e-2
);
}
OCL_PERF_TEST_P
(
NormalizeFixture
,
NormalizeWithMask
,
::
testing
::
Combine
(
OCL_TEST_SIZES
,
OCL_PERF_ENUM
(
CV_8UC1
,
CV_32FC1
),
NormalizeModes
::
all
()))
{
const
NormalizeParams
params
=
GetParam
();
const
Size
srcSize
=
get
<
0
>
(
params
);
const
int
type
=
get
<
1
>
(
params
),
mode
=
get
<
2
>
(
params
);
checkDeviceMaxMemoryAllocSize
(
srcSize
,
type
);
UMat
src
(
srcSize
,
type
),
mask
(
srcSize
,
CV_8UC1
),
dst
(
srcSize
,
type
);
declare
.
in
(
src
,
mask
,
WARMUP_RNG
).
out
(
dst
);
OCL_TEST_CYCLE
()
cv
::
normalize
(
src
,
dst
,
10
,
110
,
mode
,
-
1
,
mask
);
SANITY_CHECK
(
dst
,
5e-2
);
}
///////////// ConvertScaleAbs ////////////////////////
typedef
Size_MatType
ConvertScaleAbsFixture
;
...
...
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