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
730fe9e5
Commit
730fe9e5
authored
Jul 22, 2014
by
edgarriba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hessian+ cayley2rotbar
parent
b1b9a29e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
7 deletions
+23
-7
dls.cpp
modules/calib3d/src/dls.cpp
+0
-0
dls.h
modules/calib3d/src/dls.h
+16
-7
solvepnp.cpp
modules/calib3d/src/solvepnp.cpp
+7
-0
No files found.
modules/calib3d/src/dls.cpp
View file @
730fe9e5
This diff is collapsed.
Click to expand it.
modules/calib3d/src/dls.h
View file @
730fe9e5
...
...
@@ -10,7 +10,11 @@ class dls
{
public
:
dls
(
const
cv
::
Mat
&
opoints
,
const
cv
::
Mat
&
ipoints
);
virtual
~
dls
();
~
dls
();
void
compute_pose
(
cv
::
Mat
&
R
,
cv
::
Mat
&
t
);
private
:
template
<
typename
OpointType
,
typename
O
,
typename
IpointType
,
typename
I
>
void
init_points
(
const
cv
::
Mat
&
opoints
,
const
cv
::
Mat
&
ipoints
)
...
...
@@ -29,15 +33,20 @@ public:
void
norm_z_vector
();
void
build_coeff_matrix
();
void
fill_coeff
(
const
cv
::
Mat
*
D
);
cv
::
Mat
LeftMultVec
(
const
cv
::
Mat
&
v
);
cv
::
Mat
cayley_LS_M
(
const
std
::
vector
<
double
>&
a
,
const
std
::
vector
<
double
>&
b
,
const
std
::
vector
<
double
>&
c
,
const
std
::
vector
<
double
>&
u
);
private
:
cv
::
Mat
H
,
A
,
D_mat
;
// coeff matrix
cv
::
Mat
p
;
// object points
cv
::
Mat
z
;
// image points
int
N
;
// number of input points
bool
positive_eigenvalues
(
const
cv
::
Mat
&
eigenvalues
);
cv
::
Mat
Hessian
(
const
double
s
[]);
cv
::
Mat
cayley2rotbar
(
const
double
s
[]);
cv
::
Mat
skewsymm
(
const
double
X1
[]);
cv
::
Mat
Mtilde
;
// coeff matrix
cv
::
Mat
V_r
,
V_c
;
// eigen
cv
::
Mat
p
;
// object points
cv
::
Mat
z
;
// image points
int
N
;
// number of input points
std
::
vector
<
double
>
f1coeff
,
f2coeff
,
f3coeff
;
};
...
...
modules/calib3d/src/solvepnp.cpp
View file @
730fe9e5
...
...
@@ -100,10 +100,17 @@ bool cv::solvePnP( InputArray _opoints, InputArray _ipoints,
cv
::
Mat
undistortedPoints
;
cv
::
undistortPoints
(
ipoints
,
undistortedPoints
,
cameraMatrix
,
distCoeffs
);
cv
::
Mat
R
,
rvec
=
_rvec
.
getMat
(),
tvec
=
_tvec
.
getMat
();
//dls PnP(opoints, undistortedPoints);
dls
PnP
(
opoints
,
ipoints
);
// FOR TESTING
PnP
.
compute_pose
(
R
,
tvec
);
cout
<<
"after dls compute pose"
<<
endl
;
//TODO: DO SOMETHING WITH R and t
//cv::Rodrigues(R, rvec);
return
true
;
}
...
...
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