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
213241c0
Commit
213241c0
authored
Aug 11, 2014
by
edgarriba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DLS test update
parent
2d26f601
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
solvepnp.cpp
modules/calib3d/src/solvepnp.cpp
+1
-1
test_solvepnp_ransac.cpp
modules/calib3d/test/test_solvepnp_ransac.cpp
+7
-6
No files found.
modules/calib3d/src/solvepnp.cpp
View file @
213241c0
...
...
@@ -161,7 +161,7 @@ public:
float
*
err
=
_err
.
getMat
().
ptr
<
float
>
();
for
(
i
=
0
;
i
<
count
;
++
i
)
err
[
i
]
=
cv
::
norm
(
ipoints_ptr
[
i
]
-
projpoints_ptr
[
i
]
);
err
[
i
]
=
(
float
)
cv
::
norm
(
ipoints_ptr
[
i
]
-
projpoints_ptr
[
i
]
);
}
...
...
modules/calib3d/test/test_solvepnp_ransac.cpp
View file @
213241c0
...
...
@@ -136,7 +136,7 @@ protected:
}
solvePnPRansac
(
points
,
projectedPoints
,
intrinsics
,
distCoeffs
,
rvec
,
tvec
,
false
,
500
,
0.5
,
0.9
9
,
inliers
,
method
);
false
,
500
,
0.5
,
0.9
,
inliers
,
method
);
bool
isTestSuccess
=
inliers
.
size
()
>=
points
.
size
()
*
0.95
;
...
...
@@ -155,11 +155,9 @@ protected:
ts
->
set_failed_test_info
(
cvtest
::
TS
::
OK
);
vector
<
Point3f
>
points
,
points_dls
;
const
int
pointsCount
=
500
,
pointsCount2
=
100
;
const
int
pointsCount
=
500
;
points
.
resize
(
pointsCount
);
points_dls
.
resize
(
pointsCount2
);
generate3DPointCloud
(
points
);
generate3DPointCloud
(
points_dls
);
const
int
methodsCount
=
4
;
RNG
rng
=
ts
->
get_rng
();
...
...
@@ -173,8 +171,7 @@ protected:
int
successfulTestsCount
=
0
;
for
(
int
testIndex
=
0
;
testIndex
<
totalTestsCount
;
testIndex
++
)
{
vector
<
Point3f
>
points_
=
method
!=
3
?
points
:
points_dls
;
if
(
runTest
(
rng
,
mode
,
method
,
points_
,
eps
,
maxError
))
if
(
runTest
(
rng
,
mode
,
method
,
points
,
eps
,
maxError
))
successfulTestsCount
++
;
}
//cout << maxError << " " << successfulTestsCount << endl;
...
...
@@ -222,6 +219,10 @@ protected:
{
opoints
=
std
::
vector
<
Point3f
>
(
points
.
begin
(),
points
.
begin
()
+
4
);
}
else
if
(
method
==
3
)
{
opoints
=
std
::
vector
<
Point3f
>
(
points
.
begin
(),
points
.
begin
()
+
20
);
}
else
opoints
=
points
;
...
...
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