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
770a466d
Commit
770a466d
authored
Dec 12, 2012
by
Andrey Kamaev
Committed by
OpenCV Buildbot
Dec 12, 2012
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #223 from taka-no-me:perf_tests
parents
b876308d
6e244c83
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
11 deletions
+30
-11
perf_pnp.cpp
modules/calib3d/perf/perf_pnp.cpp
+1
-1
perf_output.cpp
modules/highgui/perf/perf_output.cpp
+1
-1
perf_stich.cpp
modules/stitching/perf/perf_stich.cpp
+22
-4
ts_perf.cpp
modules/ts/src/ts_perf.cpp
+6
-5
No files found.
modules/calib3d/perf/perf_pnp.cpp
View file @
770a466d
...
@@ -16,7 +16,7 @@ typedef perf::TestBaseWithParam<int> PointsNum;
...
@@ -16,7 +16,7 @@ typedef perf::TestBaseWithParam<int> PointsNum;
PERF_TEST_P
(
PointsNum_Algo
,
solvePnP
,
PERF_TEST_P
(
PointsNum_Algo
,
solvePnP
,
testing
::
Combine
(
testing
::
Combine
(
testing
::
Values
(
4
,
3
*
9
,
7
*
13
),
testing
::
Values
(
/*4,*/
3
*
9
,
7
*
13
),
//TODO: find why results on 4 points are too unstable
testing
::
Values
((
int
)
CV_ITERATIVE
,
(
int
)
CV_EPNP
)
testing
::
Values
((
int
)
CV_ITERATIVE
,
(
int
)
CV_EPNP
)
)
)
)
)
...
...
modules/highgui/perf/perf_output.cpp
View file @
770a466d
...
@@ -23,7 +23,7 @@ PERF_TEST_P(VideoWriter_Writing, WriteFrame,
...
@@ -23,7 +23,7 @@ PERF_TEST_P(VideoWriter_Writing, WriteFrame,
string
filename
=
getDataPath
(
get
<
0
>
(
GetParam
()));
string
filename
=
getDataPath
(
get
<
0
>
(
GetParam
()));
bool
isColor
=
get
<
1
>
(
GetParam
());
bool
isColor
=
get
<
1
>
(
GetParam
());
VideoWriter
writer
(
"perf_writer.avi"
,
CV_FOURCC
(
'X'
,
'V'
,
'I'
,
'D'
),
25
,
cv
::
Size
(
640
,
480
),
isColor
);
VideoWriter
writer
(
cv
::
tempfile
(
".avi"
)
,
CV_FOURCC
(
'X'
,
'V'
,
'I'
,
'D'
),
25
,
cv
::
Size
(
640
,
480
),
isColor
);
TEST_CYCLE
()
{
Mat
image
=
imread
(
filename
,
1
);
writer
<<
image
;
}
TEST_CYCLE
()
{
Mat
image
=
imread
(
filename
,
1
);
writer
<<
image
;
}
...
...
modules/stitching/perf/perf_stich.cpp
View file @
770a466d
...
@@ -57,7 +57,13 @@ PERF_TEST_P(stitch, a123, TEST_DETECTORS)
...
@@ -57,7 +57,13 @@ PERF_TEST_P(stitch, a123, TEST_DETECTORS)
stopTimer
();
stopTimer
();
}
}
SANITY_CHECK
(
pano
,
2
);
Mat
pano_small
;
if
(
!
pano
.
empty
())
resize
(
pano
,
pano_small
,
Size
(
320
,
240
),
0
,
0
,
INTER_AREA
);
else
pano_small
=
pano
;
SANITY_CHECK
(
pano_small
,
5
);
}
}
PERF_TEST_P
(
stitch
,
b12
,
TEST_DETECTORS
)
PERF_TEST_P
(
stitch
,
b12
,
TEST_DETECTORS
)
...
@@ -91,7 +97,13 @@ PERF_TEST_P(stitch, b12, TEST_DETECTORS)
...
@@ -91,7 +97,13 @@ PERF_TEST_P(stitch, b12, TEST_DETECTORS)
stopTimer
();
stopTimer
();
}
}
SANITY_CHECK
(
pano
,
2
);
Mat
pano_small
;
if
(
!
pano
.
empty
())
resize
(
pano
,
pano_small
,
Size
(
320
,
240
),
0
,
0
,
INTER_AREA
);
else
pano_small
=
pano
;
SANITY_CHECK
(
pano_small
,
5
);
}
}
PERF_TEST_P
(
match
,
bestOf2Nearest
,
TEST_DETECTORS
)
PERF_TEST_P
(
match
,
bestOf2Nearest
,
TEST_DETECTORS
)
...
@@ -137,7 +149,11 @@ PERF_TEST_P( match, bestOf2Nearest, TEST_DETECTORS)
...
@@ -137,7 +149,11 @@ PERF_TEST_P( match, bestOf2Nearest, TEST_DETECTORS)
matcher
->
collectGarbage
();
matcher
->
collectGarbage
();
}
}
SANITY_CHECK_MATCHES
(
pairwise_matches
.
matches
);
std
::
vector
<
DMatch
>&
matches
=
pairwise_matches
.
matches
;
if
(
GetParam
()
==
"orb"
)
matches
.
resize
(
0
);
for
(
size_t
q
=
0
;
q
<
matches
.
size
();
++
q
)
if
(
matches
[
q
].
imgIdx
<
0
)
{
matches
.
resize
(
q
);
break
;}
SANITY_CHECK_MATCHES
(
matches
);
}
}
PERF_TEST_P
(
matchVector
,
bestOf2NearestVectorFeatures
,
testing
::
Combine
(
PERF_TEST_P
(
matchVector
,
bestOf2NearestVectorFeatures
,
testing
::
Combine
(
...
@@ -193,6 +209,8 @@ PERF_TEST_P( matchVector, bestOf2NearestVectorFeatures, testing::Combine(
...
@@ -193,6 +209,8 @@ PERF_TEST_P( matchVector, bestOf2NearestVectorFeatures, testing::Combine(
}
}
std
::
vector
<
DMatch
>&
matches
=
pairwise_matches
[
0
].
matches
;
std
::
vector
<
DMatch
>&
matches
=
pairwise_matches
[
detectorName
==
"surf"
?
1
:
0
].
matches
;
for
(
size_t
q
=
0
;
q
<
matches
.
size
();
++
q
)
if
(
matches
[
q
].
imgIdx
<
0
)
{
matches
.
resize
(
q
);
break
;}
SANITY_CHECK_MATCHES
(
matches
);
SANITY_CHECK_MATCHES
(
matches
);
}
}
modules/ts/src/ts_perf.cpp
View file @
770a466d
...
@@ -491,7 +491,7 @@ void Regression::verify(cv::FileNode node, cv::InputArray array, double eps, ERR
...
@@ -491,7 +491,7 @@ void Regression::verify(cv::FileNode node, cv::InputArray array, double eps, ERR
cv
::
minMaxLoc
(
diff
.
reshape
(
1
),
0
,
&
max
);
cv
::
minMaxLoc
(
diff
.
reshape
(
1
),
0
,
&
max
);
FAIL
()
<<
" Absolute difference (="
<<
max
<<
") between argument
\"
"
FAIL
()
<<
" Absolute difference (="
<<
max
<<
") between argument
\"
"
<<
node
.
name
()
<<
"["
<<
idx
<<
"]
\"
and expected value is
bugg
er than "
<<
eps
;
<<
node
.
name
()
<<
"["
<<
idx
<<
"]
\"
and expected value is
great
er than "
<<
eps
;
}
}
}
}
else
if
(
err
==
ERROR_RELATIVE
)
else
if
(
err
==
ERROR_RELATIVE
)
...
@@ -501,7 +501,7 @@ void Regression::verify(cv::FileNode node, cv::InputArray array, double eps, ERR
...
@@ -501,7 +501,7 @@ void Regression::verify(cv::FileNode node, cv::InputArray array, double eps, ERR
if
(
violations
>
0
)
if
(
violations
>
0
)
{
{
FAIL
()
<<
" Relative difference ("
<<
maxv
<<
" of "
<<
maxa
<<
" allowed) between argument
\"
"
FAIL
()
<<
" Relative difference ("
<<
maxv
<<
" of "
<<
maxa
<<
" allowed) between argument
\"
"
<<
node
.
name
()
<<
"["
<<
idx
<<
"]
\"
and expected value is
bugg
er than "
<<
eps
<<
" in "
<<
violations
<<
" points"
;
<<
node
.
name
()
<<
"["
<<
idx
<<
"]
\"
and expected value is
great
er than "
<<
eps
<<
" in "
<<
violations
<<
" points"
;
}
}
}
}
}
}
...
@@ -545,7 +545,7 @@ void Regression::verify(cv::FileNode node, cv::InputArray array, double eps, ERR
...
@@ -545,7 +545,7 @@ void Regression::verify(cv::FileNode node, cv::InputArray array, double eps, ERR
cv
::
minMaxLoc
(
diff
.
reshape
(
1
),
0
,
&
max
);
cv
::
minMaxLoc
(
diff
.
reshape
(
1
),
0
,
&
max
);
FAIL
()
<<
" Difference (="
<<
max
<<
") between argument1
\"
"
<<
node
.
name
()
FAIL
()
<<
" Difference (="
<<
max
<<
") between argument1
\"
"
<<
node
.
name
()
<<
"
\"
and expected value is
bugg
er than "
<<
eps
;
<<
"
\"
and expected value is
great
er than "
<<
eps
;
}
}
}
}
else
if
(
err
==
ERROR_RELATIVE
)
else
if
(
err
==
ERROR_RELATIVE
)
...
@@ -555,7 +555,7 @@ void Regression::verify(cv::FileNode node, cv::InputArray array, double eps, ERR
...
@@ -555,7 +555,7 @@ void Regression::verify(cv::FileNode node, cv::InputArray array, double eps, ERR
if
(
violations
>
0
)
if
(
violations
>
0
)
{
{
FAIL
()
<<
" Relative difference ("
<<
maxv
<<
" of "
<<
maxa
<<
" allowed) between argument
\"
"
<<
node
.
name
()
FAIL
()
<<
" Relative difference ("
<<
maxv
<<
" of "
<<
maxa
<<
" allowed) between argument
\"
"
<<
node
.
name
()
<<
"
\"
and expected value is
bugg
er than "
<<
eps
<<
" in "
<<
violations
<<
" points"
;
<<
"
\"
and expected value is
great
er than "
<<
eps
<<
" in "
<<
violations
<<
" points"
;
}
}
}
}
}
}
...
@@ -595,6 +595,7 @@ Regression& Regression::operator() (const std::string& name, cv::InputArray arra
...
@@ -595,6 +595,7 @@ Regression& Regression::operator() (const std::string& name, cv::InputArray arra
write
()
<<
nodename
<<
"{"
;
write
()
<<
nodename
<<
"{"
;
}
}
// TODO: verify that name is alphanumeric, current error message is useless
write
()
<<
name
<<
"{"
;
write
()
<<
name
<<
"{"
;
write
(
array
);
write
(
array
);
write
()
<<
"}"
;
write
()
<<
"}"
;
...
@@ -971,7 +972,7 @@ void TestBase::validateMetrics()
...
@@ -971,7 +972,7 @@ void TestBase::validateMetrics()
if
(
m
.
gstddev
>
DBL_EPSILON
)
if
(
m
.
gstddev
>
DBL_EPSILON
)
{
{
EXPECT_GT
(
/*m.gmean * */
1.
,
/*m.gmean * */
2
*
sinh
(
m
.
gstddev
*
param_max_deviation
))
EXPECT_GT
(
/*m.gmean * */
1.
,
/*m.gmean * */
2
*
sinh
(
m
.
gstddev
*
param_max_deviation
))
<<
" Test results are not reliable ((mean-sigma,mean+sigma) deviation interval is
bigg
er than measured time interval)."
;
<<
" Test results are not reliable ((mean-sigma,mean+sigma) deviation interval is
great
er than measured time interval)."
;
}
}
EXPECT_LE
(
m
.
outliers
,
std
::
max
((
unsigned
int
)
cvCeil
(
m
.
samples
*
param_max_outliers
/
100.
),
1u
))
EXPECT_LE
(
m
.
outliers
,
std
::
max
((
unsigned
int
)
cvCeil
(
m
.
samples
*
param_max_outliers
/
100.
),
1u
))
...
...
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