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
42ab7fd8
Commit
42ab7fd8
authored
Jul 15, 2014
by
edgarriba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dls() no compiles
parent
fb67ab12
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
9 deletions
+23
-9
dls.cpp
modules/calib3d/src/dls.cpp
+0
-0
dls.h
modules/calib3d/src/dls.h
+19
-6
solvepnp.cpp
modules/calib3d/src/solvepnp.cpp
+4
-3
No files found.
modules/calib3d/src/dls.cpp
View file @
42ab7fd8
This diff is collapsed.
Click to expand it.
modules/calib3d/src/dls.h
View file @
42ab7fd8
#ifndef
dls_h
#ifndef
DLS_H
#define
dls_h
#define
DLS_H
#include "
opencv2/core/core_c.h
"
#include "
precomp.hpp
"
class
dls
class
dls
{
{
public
:
public
:
dls
();
dls
(
const
cv
::
Mat
&
opoints
,
const
cv
::
Mat
&
ipoints
);
~
dls
();
~
dls
();
private
:
void
init_vectors
(
const
cv
::
Mat
&
opoints
,
const
cv
::
Mat
&
ipoints
);
void
build_coeff_mattrix
();
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
;
// coeff matrix
cv
::
Mat
A
;
cv
::
Mat
D_mat
;
std
::
vector
<
double
>
f1coeff
;
std
::
vector
<
double
>
f2coeff
;
std
::
vector
<
double
>
f3coeff
;
cv
::
Mat
p
;
// object points
cv
::
Mat
z
;
// image points
int
N
;
// number of input points
};
};
#endif
#endif
// DLS_H
modules/calib3d/src/solvepnp.cpp
View file @
42ab7fd8
...
@@ -41,10 +41,10 @@
...
@@ -41,10 +41,10 @@
//M*/
//M*/
#include "precomp.hpp"
#include "precomp.hpp"
#include "dls.h"
#include "epnp.h"
#include "epnp.h"
#include "p3p.h"
#include "p3p.h"
#include "opencv2/calib3d/calib3d_c.h"
#include "opencv2/calib3d/calib3d_c.h"
#include "dls.h"
#include <iostream>
#include <iostream>
using
namespace
cv
;
using
namespace
cv
;
...
@@ -100,12 +100,13 @@ bool cv::solvePnP( InputArray _opoints, InputArray _ipoints,
...
@@ -100,12 +100,13 @@ bool cv::solvePnP( InputArray _opoints, InputArray _ipoints,
cv
::
Mat
undistortedPoints
;
cv
::
Mat
undistortedPoints
;
cv
::
undistortPoints
(
ipoints
,
undistortedPoints
,
cameraMatrix
,
distCoeffs
);
cv
::
undistortPoints
(
ipoints
,
undistortedPoints
,
cameraMatrix
,
distCoeffs
);
//dls PnP;
dls
PnP
(
opoints
,
undistortedPoints
);
// DO SOMETHING
// DO SOMETHING
cv
::
Mat
R
,
rvec
=
_rvec
.
getMat
(),
tvec
=
_tvec
.
getMat
();
cv
::
Mat
R
,
rvec
=
_rvec
.
getMat
(),
tvec
=
_tvec
.
getMat
();
return
true
;
}
}
else
else
CV_Error
(
CV_StsBadArg
,
"The flags argument must be one of CV_ITERATIVE, CV_P3P or CV_EPNP"
);
CV_Error
(
CV_StsBadArg
,
"The flags argument must be one of CV_ITERATIVE, CV_P3P or CV_EPNP"
);
...
...
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