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
74294541
Commit
74294541
authored
Oct 02, 2014
by
edgarriba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add UPNP acc_test and perf_test
parent
a5b3a205
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
perf_pnp.cpp
modules/calib3d/perf/perf_pnp.cpp
+2
-2
test_solvepnp_ransac.cpp
modules/calib3d/test/test_solvepnp_ransac.cpp
+6
-2
No files found.
modules/calib3d/perf/perf_pnp.cpp
View file @
74294541
...
...
@@ -10,7 +10,7 @@ using namespace perf;
using
std
::
tr1
::
make_tuple
;
using
std
::
tr1
::
get
;
CV_ENUM
(
pnpAlgo
,
SOLVEPNP_ITERATIVE
,
SOLVEPNP_EPNP
,
SOLVEPNP_P3P
,
SOLVEPNP_DLS
)
CV_ENUM
(
pnpAlgo
,
SOLVEPNP_ITERATIVE
,
SOLVEPNP_EPNP
,
SOLVEPNP_P3P
,
SOLVEPNP_DLS
,
SOLVEPNP_UPNP
)
typedef
std
::
tr1
::
tuple
<
int
,
pnpAlgo
>
PointsNum_Algo_t
;
typedef
perf
::
TestBaseWithParam
<
PointsNum_Algo_t
>
PointsNum_Algo
;
...
...
@@ -20,7 +20,7 @@ typedef perf::TestBaseWithParam<int> PointsNum;
PERF_TEST_P
(
PointsNum_Algo
,
solvePnP
,
testing
::
Combine
(
testing
::
Values
(
4
,
3
*
9
,
7
*
13
),
//TODO: find why results on 4 points are too unstable
testing
::
Values
((
int
)
SOLVEPNP_ITERATIVE
,
(
int
)
SOLVEPNP_EPNP
)
testing
::
Values
((
int
)
SOLVEPNP_ITERATIVE
,
(
int
)
SOLVEPNP_EPNP
,
(
int
)
SOLVEPNP_UPNP
)
)
)
{
...
...
modules/calib3d/test/test_solvepnp_ransac.cpp
View file @
74294541
...
...
@@ -58,6 +58,7 @@ public:
eps
[
SOLVEPNP_EPNP
]
=
1.0e-2
;
eps
[
SOLVEPNP_P3P
]
=
1.0e-2
;
eps
[
SOLVEPNP_DLS
]
=
1.0e-2
;
eps
[
SOLVEPNP_UPNP
]
=
1.0e-2
;
totalTestsCount
=
10
;
}
~
CV_solvePnPRansac_Test
()
{}
...
...
@@ -118,6 +119,7 @@ protected:
Mat
trueRvec
,
trueTvec
;
Mat
intrinsics
,
distCoeffs
;
generateCameraMatrix
(
intrinsics
,
rng
);
if
(
method
==
4
)
intrinsics
.
at
<
double
>
(
1
,
1
)
=
intrinsics
.
at
<
double
>
(
0
,
0
);
if
(
mode
==
0
)
distCoeffs
=
Mat
::
zeros
(
4
,
1
,
CV_64FC1
);
else
...
...
@@ -159,7 +161,7 @@ protected:
points
.
resize
(
pointsCount
);
generate3DPointCloud
(
points
);
const
int
methodsCount
=
4
;
const
int
methodsCount
=
5
;
RNG
rng
=
ts
->
get_rng
();
...
...
@@ -184,7 +186,7 @@ protected:
}
}
}
double
eps
[
4
];
double
eps
[
5
];
int
totalTestsCount
;
};
...
...
@@ -197,6 +199,7 @@ public:
eps
[
SOLVEPNP_EPNP
]
=
1.0e-6
;
eps
[
SOLVEPNP_P3P
]
=
1.0e-4
;
eps
[
SOLVEPNP_DLS
]
=
1.0e-4
;
eps
[
SOLVEPNP_UPNP
]
=
1.0e-4
;
totalTestsCount
=
1000
;
}
...
...
@@ -208,6 +211,7 @@ protected:
Mat
trueRvec
,
trueTvec
;
Mat
intrinsics
,
distCoeffs
;
generateCameraMatrix
(
intrinsics
,
rng
);
if
(
method
==
4
)
intrinsics
.
at
<
double
>
(
1
,
1
)
=
intrinsics
.
at
<
double
>
(
0
,
0
);
if
(
mode
==
0
)
distCoeffs
=
Mat
::
zeros
(
4
,
1
,
CV_64FC1
);
else
...
...
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