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
48c4a79d
Commit
48c4a79d
authored
Jul 23, 2014
by
edgarriba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DLS full algorithm compiling
parent
730fe9e5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
8 deletions
+17
-8
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
+1
-1
No files found.
modules/calib3d/src/dls.cpp
View file @
48c4a79d
This diff is collapsed.
Click to expand it.
modules/calib3d/src/dls.h
View file @
48c4a79d
...
...
@@ -32,7 +32,14 @@ private:
}
void
norm_z_vector
();
void
build_coeff_matrix
();
void
build_coeff_matrix
(
const
cv
::
Mat
&
pp
,
cv
::
Mat
&
Mtilde
,
cv
::
Mat
&
D
);
void
compute_eigenvec
(
const
cv
::
Mat
&
Mtilde
,
cv
::
Mat
&
eigenval_real
,
cv
::
Mat
&
eigenval_imag
,
cv
::
Mat
&
eigenvec_real
,
cv
::
Mat
&
eigenvec_imag
);
double
min_val
(
const
std
::
vector
<
double
>&
values
);
cv
::
Mat
rotx
(
const
double
t
);
cv
::
Mat
roty
(
const
double
t
);
cv
::
Mat
rotz
(
const
double
t
);
cv
::
Mat
mean
(
const
cv
::
Mat
&
M
);
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
,
...
...
@@ -41,14 +48,16 @@ private:
cv
::
Mat
Hessian
(
const
double
s
[]);
cv
::
Mat
cayley2rotbar
(
const
double
s
[]);
cv
::
Mat
skewsymm
(
const
double
X1
[]);
bool
is_empty
(
const
cv
::
Mat
*
v
);
void
run_kernel
(
const
cv
::
Mat
&
pp
);
cv
::
Mat
Mtilde
;
// coeff matrix
cv
::
Mat
V_r
,
V_c
;
// eigen
cv
::
Mat
p
;
// object points
cv
::
Mat
z
;
// image points
cv
::
Mat
p
,
z
;
// object-image points
int
N
;
// number of input points
std
::
vector
<
double
>
f1coeff
,
f2coeff
,
f3coeff
;
};
std
::
vector
<
double
>
f1coeff
,
f2coeff
,
f3coeff
,
cost_
;
std
::
vector
<
cv
::
Mat
>
C_est_
,
t_est_
;
// vector to store candidate
cv
::
Mat
C_est__
,
t_est__
;
// best found solution
double
cost__
;
};
#endif // DLS_H
modules/calib3d/src/solvepnp.cpp
View file @
48c4a79d
...
...
@@ -98,7 +98,7 @@ bool cv::solvePnP( InputArray _opoints, InputArray _ipoints,
{
std
::
cout
<<
"DLS"
<<
std
::
endl
;
cv
::
Mat
undistortedPoints
;
cv
::
undistortPoints
(
ipoints
,
undistortedPoints
,
cameraMatrix
,
distCoeffs
);
//
cv::undistortPoints(ipoints, undistortedPoints, cameraMatrix, distCoeffs);
cv
::
Mat
R
,
rvec
=
_rvec
.
getMat
(),
tvec
=
_tvec
.
getMat
();
...
...
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