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
90f6e319
Commit
90f6e319
authored
Mar 11, 2012
by
Maria Dimashova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed compilation with eigen2
parent
57c76045
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
rgbdodometry.cpp
modules/contrib/src/rgbdodometry.cpp
+14
-14
No files found.
modules/contrib/src/rgbdodometry.cpp
View file @
90f6e319
...
...
@@ -47,9 +47,9 @@
#include <iostream>
#if
def HAVE_EIGEN
#if
defined(HAVE_EIGEN) && EIGEN_WORLD_VERSION == 3
#include <Eigen/Core>
//
#include <unsupported/Eigen/MatrixFunctions>
#include <unsupported/Eigen/MatrixFunctions>
#include <Eigen/Dense>
#endif
...
...
@@ -77,18 +77,18 @@ void computeProjectiveMatrix( const Mat& ksi, Mat& Rt )
{
CV_Assert
(
ksi
.
size
()
==
Size
(
1
,
6
)
&&
ksi
.
type
()
==
CV_64FC1
);
//#ifdef HAVE_EIGEN
//
const double* ksi_ptr = reinterpret_cast<const double*>(ksi.ptr(0));
//
Eigen::Matrix<double,4,4> twist, g;
//
twist << 0., -ksi_ptr[2], ksi_ptr[1], ksi_ptr[3],
//
ksi_ptr[2], 0., -ksi_ptr[0], ksi_ptr[4],
//
-ksi_ptr[1], ksi_ptr[0], 0, ksi_ptr[5],
//
0., 0., 0., 0.;
//
g = twist.exp();
#if defined(HAVE_EIGEN) && EIGEN_WORLD_VERSION == 3
const
double
*
ksi_ptr
=
reinterpret_cast
<
const
double
*>
(
ksi
.
ptr
(
0
));
Eigen
::
Matrix
<
double
,
4
,
4
>
twist
,
g
;
twist
<<
0.
,
-
ksi_ptr
[
2
],
ksi_ptr
[
1
],
ksi_ptr
[
3
],
ksi_ptr
[
2
],
0.
,
-
ksi_ptr
[
0
],
ksi_ptr
[
4
],
-
ksi_ptr
[
1
],
ksi_ptr
[
0
],
0
,
ksi_ptr
[
5
],
0.
,
0.
,
0.
,
0.
;
g
=
twist
.
exp
();
//
eigen2cv(g, Rt);
//
#else
eigen2cv
(
g
,
Rt
);
#else
// for infinitesimal transformation
Rt
=
Mat
::
eye
(
4
,
4
,
CV_64FC1
);
...
...
@@ -100,7 +100,7 @@ void computeProjectiveMatrix( const Mat& ksi, Mat& Rt )
Rt
.
at
<
double
>
(
0
,
3
)
=
ksi
.
at
<
double
>
(
3
);
Rt
.
at
<
double
>
(
1
,
3
)
=
ksi
.
at
<
double
>
(
4
);
Rt
.
at
<
double
>
(
2
,
3
)
=
ksi
.
at
<
double
>
(
5
);
//
#endif
#endif
}
static
...
...
@@ -286,7 +286,7 @@ static
bool
solveSystem
(
const
Mat
&
C
,
const
Mat
&
dI_dt
,
double
detThreshold
,
Mat
&
Rt
)
{
Mat
ksi
;
#if
def HAVE_EIGEN
#if
defined(HAVE_EIGEN) && EIGEN_WORLD_VERSION == 3
Eigen
::
Matrix
<
double
,
Eigen
::
Dynamic
,
Eigen
::
Dynamic
>
eC
,
eCt
,
edI_dt
;
cv2eigen
(
C
,
eC
);
cv2eigen
(
dI_dt
,
edI_dt
);
...
...
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