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
d4e7bec2
Commit
d4e7bec2
authored
Feb 21, 2013
by
Andrey Kamaev
Committed by
OpenCV Buildbot
Feb 21, 2013
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #440 from AnnaKogan8:fixed-perfomance-tests
parents
decf04df
f6e0d327
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
24 additions
and
16 deletions
+24
-16
perf_compare.cpp
modules/core/perf/perf_compare.cpp
+2
-1
perf_convertTo.cpp
modules/core/perf/perf_convertTo.cpp
+2
-2
perf_mat.cpp
modules/core/perf/perf_mat.cpp
+4
-2
perf_merge.cpp
modules/core/perf/perf_merge.cpp
+3
-1
perf_split.cpp
modules/core/perf/perf_split.cpp
+2
-2
perf_stat.cpp
modules/core/perf/perf_stat.cpp
+2
-1
perf_cvt_color.cpp
modules/imgproc/perf/perf_cvt_color.cpp
+2
-2
perf_matchTemplate.cpp
modules/imgproc/perf/perf_matchTemplate.cpp
+4
-2
perf_threshold.cpp
modules/imgproc/perf/perf_threshold.cpp
+2
-2
perf_tvl1optflow.cpp
modules/video/perf/perf_tvl1optflow.cpp
+1
-1
No files found.
modules/core/perf/perf_compare.cpp
View file @
d4e7bec2
...
@@ -52,7 +52,8 @@ PERF_TEST_P( Size_MatType_CmpType, compareScalar,
...
@@ -52,7 +52,8 @@ PERF_TEST_P( Size_MatType_CmpType, compareScalar,
declare
.
in
(
src1
,
src2
,
WARMUP_RNG
).
out
(
dst
);
declare
.
in
(
src1
,
src2
,
WARMUP_RNG
).
out
(
dst
);
TEST_CYCLE
()
cv
::
compare
(
src1
,
src2
,
dst
,
cmpType
);
int
runs
=
(
sz
.
width
<=
640
)
?
8
:
1
;
TEST_CYCLE_MULTIRUN
(
runs
)
cv
::
compare
(
src1
,
src2
,
dst
,
cmpType
);
SANITY_CHECK
(
dst
);
SANITY_CHECK
(
dst
);
}
}
modules/core/perf/perf_convertTo.cpp
View file @
d4e7bec2
...
@@ -29,9 +29,9 @@ PERF_TEST_P( Size_DepthSrc_DepthDst_Channels_alpha, convertTo,
...
@@ -29,9 +29,9 @@ PERF_TEST_P( Size_DepthSrc_DepthDst_Channels_alpha, convertTo,
Mat
src
(
sz
,
CV_MAKETYPE
(
depthSrc
,
channels
));
Mat
src
(
sz
,
CV_MAKETYPE
(
depthSrc
,
channels
));
randu
(
src
,
0
,
255
);
randu
(
src
,
0
,
255
);
Mat
dst
(
sz
,
CV_MAKETYPE
(
depthDst
,
channels
));
Mat
dst
(
sz
,
CV_MAKETYPE
(
depthDst
,
channels
));
declare
.
iterations
(
500
);
TEST_CYCLE
()
src
.
convertTo
(
dst
,
depthDst
,
alpha
);
int
runs
=
(
sz
.
width
<=
640
)
?
8
:
1
;
TEST_CYCLE_MULTIRUN
(
runs
)
src
.
convertTo
(
dst
,
depthDst
,
alpha
);
SANITY_CHECK
(
dst
,
alpha
==
1.0
?
1e-12
:
1e-7
);
SANITY_CHECK
(
dst
,
alpha
==
1.0
?
1e-12
:
1e-7
);
}
}
modules/core/perf/perf_mat.cpp
View file @
d4e7bec2
...
@@ -18,7 +18,8 @@ PERF_TEST_P(Size_MatType, Mat_Eye,
...
@@ -18,7 +18,8 @@ PERF_TEST_P(Size_MatType, Mat_Eye,
declare
.
out
(
diagonalMatrix
);
declare
.
out
(
diagonalMatrix
);
TEST_CYCLE
()
int
runs
=
(
size
.
width
<=
640
)
?
15
:
5
;
TEST_CYCLE_MULTIRUN
(
runs
)
{
{
diagonalMatrix
=
Mat
::
eye
(
size
,
type
);
diagonalMatrix
=
Mat
::
eye
(
size
,
type
);
}
}
...
@@ -38,7 +39,8 @@ PERF_TEST_P(Size_MatType, Mat_Zeros,
...
@@ -38,7 +39,8 @@ PERF_TEST_P(Size_MatType, Mat_Zeros,
declare
.
out
(
zeroMatrix
);
declare
.
out
(
zeroMatrix
);
TEST_CYCLE
()
int
runs
=
(
size
.
width
<=
640
)
?
15
:
5
;
TEST_CYCLE_MULTIRUN
(
runs
)
{
{
zeroMatrix
=
Mat
::
zeros
(
size
,
type
);
zeroMatrix
=
Mat
::
zeros
(
size
,
type
);
}
}
...
...
modules/core/perf/perf_merge.cpp
View file @
d4e7bec2
...
@@ -30,7 +30,8 @@ PERF_TEST_P( Size_SrcDepth_DstChannels, merge,
...
@@ -30,7 +30,8 @@ PERF_TEST_P( Size_SrcDepth_DstChannels, merge,
}
}
Mat
dst
;
Mat
dst
;
TEST_CYCLE
()
merge
(
(
vector
<
Mat
>
&
)
mv
,
dst
);
int
runs
=
(
sz
.
width
<=
640
)
?
8
:
1
;
TEST_CYCLE_MULTIRUN
(
runs
)
merge
(
(
vector
<
Mat
>
&
)
mv
,
dst
);
SANITY_CHECK
(
dst
,
1e-12
);
SANITY_CHECK
(
dst
,
1e-12
);
}
}
\ No newline at end of file
modules/core/perf/perf_split.cpp
View file @
d4e7bec2
...
@@ -26,8 +26,8 @@ PERF_TEST_P( Size_Depth_Channels, split,
...
@@ -26,8 +26,8 @@ PERF_TEST_P( Size_Depth_Channels, split,
randu
(
m
,
0
,
255
);
randu
(
m
,
0
,
255
);
vector
<
Mat
>
mv
;
vector
<
Mat
>
mv
;
int
runs
=
(
sz
.
width
<=
640
)
?
8
:
1
;
TEST_CYCLE
(
)
split
(
m
,
(
vector
<
Mat
>&
)
mv
);
TEST_CYCLE
_MULTIRUN
(
runs
)
split
(
m
,
(
vector
<
Mat
>&
)
mv
);
SANITY_CHECK
(
mv
,
1e-12
);
SANITY_CHECK
(
mv
,
1e-12
);
}
}
modules/core/perf/perf_stat.cpp
View file @
d4e7bec2
...
@@ -97,7 +97,8 @@ PERF_TEST_P(Size_MatType, countNonZero, testing::Combine( testing::Values( TYPIC
...
@@ -97,7 +97,8 @@ PERF_TEST_P(Size_MatType, countNonZero, testing::Combine( testing::Values( TYPIC
declare
.
in
(
src
,
WARMUP_RNG
);
declare
.
in
(
src
,
WARMUP_RNG
);
TEST_CYCLE
()
cnt
=
countNonZero
(
src
);
int
runs
=
(
sz
.
width
<=
640
)
?
8
:
1
;
TEST_CYCLE_MULTIRUN
(
runs
)
cnt
=
countNonZero
(
src
);
SANITY_CHECK
(
cnt
);
SANITY_CHECK
(
cnt
);
}
}
modules/imgproc/perf/perf_cvt_color.cpp
View file @
d4e7bec2
...
@@ -299,10 +299,10 @@ PERF_TEST_P(Size_CvtMode2, cvtColorYUV420,
...
@@ -299,10 +299,10 @@ PERF_TEST_P(Size_CvtMode2, cvtColorYUV420,
Mat
src
(
sz
.
height
+
sz
.
height
/
2
,
sz
.
width
,
CV_8UC
(
ch
.
scn
));
Mat
src
(
sz
.
height
+
sz
.
height
/
2
,
sz
.
width
,
CV_8UC
(
ch
.
scn
));
Mat
dst
(
sz
,
CV_8UC
(
ch
.
dcn
));
Mat
dst
(
sz
,
CV_8UC
(
ch
.
dcn
));
declare
.
time
(
100
);
declare
.
in
(
src
,
WARMUP_RNG
).
out
(
dst
);
declare
.
in
(
src
,
WARMUP_RNG
).
out
(
dst
);
TEST_CYCLE
()
cvtColor
(
src
,
dst
,
mode
,
ch
.
dcn
);
int
runs
=
(
sz
.
width
<=
640
)
?
8
:
1
;
TEST_CYCLE_MULTIRUN
(
runs
)
cvtColor
(
src
,
dst
,
mode
,
ch
.
dcn
);
SANITY_CHECK
(
dst
,
1
);
SANITY_CHECK
(
dst
,
1
);
}
}
modules/imgproc/perf/perf_matchTemplate.cpp
View file @
d4e7bec2
...
@@ -33,7 +33,8 @@ PERF_TEST_P(ImgSize_TmplSize_Method, matchTemplateSmall,
...
@@ -33,7 +33,8 @@ PERF_TEST_P(ImgSize_TmplSize_Method, matchTemplateSmall,
declare
declare
.
in
(
img
,
WARMUP_RNG
)
.
in
(
img
,
WARMUP_RNG
)
.
in
(
tmpl
,
WARMUP_RNG
)
.
in
(
tmpl
,
WARMUP_RNG
)
.
out
(
result
);
.
out
(
result
)
.
time
(
30
);
TEST_CYCLE
()
matchTemplate
(
img
,
tmpl
,
result
,
method
);
TEST_CYCLE
()
matchTemplate
(
img
,
tmpl
,
result
,
method
);
...
@@ -66,7 +67,8 @@ PERF_TEST_P(ImgSize_TmplSize_Method, matchTemplateBig,
...
@@ -66,7 +67,8 @@ PERF_TEST_P(ImgSize_TmplSize_Method, matchTemplateBig,
declare
declare
.
in
(
img
,
WARMUP_RNG
)
.
in
(
img
,
WARMUP_RNG
)
.
in
(
tmpl
,
WARMUP_RNG
)
.
in
(
tmpl
,
WARMUP_RNG
)
.
out
(
result
);
.
out
(
result
)
.
time
(
30
);
TEST_CYCLE
()
matchTemplate
(
img
,
tmpl
,
result
,
method
);
TEST_CYCLE
()
matchTemplate
(
img
,
tmpl
,
result
,
method
);
...
...
modules/imgproc/perf/perf_threshold.cpp
View file @
d4e7bec2
...
@@ -31,9 +31,9 @@ PERF_TEST_P(Size_MatType_ThreshType, threshold,
...
@@ -31,9 +31,9 @@ PERF_TEST_P(Size_MatType_ThreshType, threshold,
double
maxval
=
theRNG
().
uniform
(
1
,
254
);
double
maxval
=
theRNG
().
uniform
(
1
,
254
);
declare
.
in
(
src
,
WARMUP_RNG
).
out
(
dst
);
declare
.
in
(
src
,
WARMUP_RNG
).
out
(
dst
);
declare
.
iterations
(
500
);
TEST_CYCLE
()
threshold
(
src
,
dst
,
thresh
,
maxval
,
threshType
);
int
runs
=
(
sz
.
width
<=
640
)
?
8
:
1
;
TEST_CYCLE_MULTIRUN
(
runs
)
threshold
(
src
,
dst
,
thresh
,
maxval
,
threshType
);
SANITY_CHECK
(
dst
);
SANITY_CHECK
(
dst
);
}
}
...
...
modules/video/perf/perf_tvl1optflow.cpp
View file @
d4e7bec2
...
@@ -13,7 +13,7 @@ pair<string, string> impair(const char* im1, const char* im2)
...
@@ -13,7 +13,7 @@ pair<string, string> impair(const char* im1, const char* im2)
PERF_TEST_P
(
ImagePair
,
OpticalFlowDual_TVL1
,
testing
::
Values
(
impair
(
"cv/optflow/RubberWhale1.png"
,
"cv/optflow/RubberWhale2.png"
)))
PERF_TEST_P
(
ImagePair
,
OpticalFlowDual_TVL1
,
testing
::
Values
(
impair
(
"cv/optflow/RubberWhale1.png"
,
"cv/optflow/RubberWhale2.png"
)))
{
{
declare
.
time
(
4
0
);
declare
.
time
(
26
0
);
Mat
frame1
=
imread
(
getDataPath
(
GetParam
().
first
),
IMREAD_GRAYSCALE
);
Mat
frame1
=
imread
(
getDataPath
(
GetParam
().
first
),
IMREAD_GRAYSCALE
);
Mat
frame2
=
imread
(
getDataPath
(
GetParam
().
second
),
IMREAD_GRAYSCALE
);
Mat
frame2
=
imread
(
getDataPath
(
GetParam
().
second
),
IMREAD_GRAYSCALE
);
...
...
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