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
5a5c477b
Commit
5a5c477b
authored
Oct 09, 2012
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make performance tests for solvePnPRansec more determenistic
parent
d4cf9e22
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
6 deletions
+17
-6
perf_pnp.cpp
modules/calib3d/perf/perf_pnp.cpp
+13
-5
solvepnp.cpp
modules/calib3d/src/solvepnp.cpp
+2
-0
ts_perf.cpp
modules/ts/src/ts_perf.cpp
+2
-1
No files found.
modules/calib3d/perf/perf_pnp.cpp
View file @
5a5c477b
#include "perf_precomp.hpp"
#include "opencv2/core/internal.hpp"
using
namespace
std
;
using
namespace
cv
;
...
...
@@ -48,7 +49,10 @@ PERF_TEST_P(PointsNum_Algo, solvePnP,
declare
.
in
(
points3d
,
points2d
);
TEST_CYCLE_N
(
1000
)
solvePnP
(
points3d
,
points2d
,
intrinsics
,
distortion
,
rvec
,
tvec
,
false
,
algo
);
TEST_CYCLE_N
(
1000
)
{
solvePnP
(
points3d
,
points2d
,
intrinsics
,
distortion
,
rvec
,
tvec
,
false
,
algo
);
}
SANITY_CHECK
(
rvec
,
1e-6
);
SANITY_CHECK
(
tvec
,
1e-6
);
...
...
@@ -83,7 +87,10 @@ PERF_TEST(PointsNum_Algo, solveP3P)
declare
.
in
(
points3d
,
points2d
);
TEST_CYCLE_N
(
1000
)
solvePnP
(
points3d
,
points2d
,
intrinsics
,
distortion
,
rvec
,
tvec
,
false
,
CV_P3P
);
TEST_CYCLE_N
(
1000
)
{
solvePnP
(
points3d
,
points2d
,
intrinsics
,
distortion
,
rvec
,
tvec
,
false
,
CV_P3P
);
}
SANITY_CHECK
(
rvec
,
1e-6
);
SANITY_CHECK
(
tvec
,
1e-6
);
...
...
@@ -117,9 +124,10 @@ PERF_TEST_P(PointsNum, SolvePnPRansac, testing::Values(4, 3*9, 7*13))
Mat
rvec
;
Mat
tvec
;
solvePnPRansac
(
object
,
image
,
camera_mat
,
dist_coef
,
rvec
,
tvec
);
declare
.
time
(
3.0
);
#ifdef HAVE_TBB
// limit concurrency to get determenistic result
cv
::
Ptr
<
tbb
::
task_scheduler_init
>
one_thread
=
new
tbb
::
task_scheduler_init
(
1
);
#endif
TEST_CYCLE
()
{
...
...
modules/calib3d/src/solvepnp.cpp
View file @
5a5c477b
...
...
@@ -260,6 +260,8 @@ namespace cv
{
rvec
.
copyTo
(
initRvec
);
tvec
.
copyTo
(
initTvec
);
generator
.
state
=
theRNG
().
state
;
//to control it somehow...
}
private
:
PnPSolver
&
operator
=
(
const
PnPSolver
&
);
...
...
modules/ts/src/ts_perf.cpp
View file @
5a5c477b
...
...
@@ -674,6 +674,8 @@ cv::Size TestBase::getSize(cv::InputArray a)
bool
TestBase
::
next
()
{
bool
has_next
=
++
currentIter
<
nIters
&&
totalTime
<
timeLimit
;
cv
::
theRNG
().
state
=
param_seed
;
//this rng should generate same numbers for each run
#ifdef ANDROID
if
(
log_power_checkpoints
)
{
...
...
@@ -948,7 +950,6 @@ void TestBase::SetUp()
currentIter
=
(
unsigned
int
)
-
1
;
timeLimit
=
timeLimitDefault
;
times
.
clear
();
cv
::
theRNG
().
state
=
param_seed
;
//this rng should generate same numbers for each run
}
void
TestBase
::
TearDown
()
...
...
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