Geometry_Module

Topics

 Global aligned box typedefs
 

Classes

class  AlignedBox< _Scalar, _AmbientDim >
 An axis aligned box. More...
 
class  AngleAxis< _Scalar >
 Represents a 3D rotation as a rotation angle around an arbitrary 3D axis. More...
 
class  Homogeneous< MatrixType, _Direction >
 Expression of one (or a set of) homogeneous vector(s) More...
 
class  Hyperplane< _Scalar, _AmbientDim, _Options >
 A hyperplane. More...
 
class  Map< const Quaternion< _Scalar >, _Options >
 Quaternion expression mapping a constant memory buffer. More...
 
class  Map< Quaternion< _Scalar >, _Options >
 Expression of a quaternion from a memory buffer. More...
 
class  ParametrizedLine< _Scalar, _AmbientDim, _Options >
 A parametrized line. More...
 
class  Quaternion< _Scalar, _Options >
 The quaternion class used to represent 3D orientations and rotations. More...
 
class  QuaternionBase< Derived >
 Base class for quaternion expressions. More...
 
class  Rotation2D< _Scalar >
 Represents a rotation/orientation in a 2 dimensional space. More...
 
class  Scaling
 Represents a generic uniform scaling transformation. More...
 
class  Transform< _Scalar, _Dim, _Mode, _Options >
 Represents an homogeneous transformation in a N dimensional space. More...
 
class  Translation< _Scalar, _Dim >
 Represents a translation transformation. More...
 

Typedefs

typedef AngleAxis< double > AngleAxisd
 
typedef AngleAxis< float > AngleAxisf
 
typedef Quaternion< double > Quaterniond
 
typedef Quaternion< float > Quaternionf
 
typedef Map< Quaternion< double >, AlignedQuaternionMapAlignedd
 
typedef Map< Quaternion< float >, AlignedQuaternionMapAlignedf
 
typedef Map< Quaternion< double >, 0 > QuaternionMapd
 
typedef Map< Quaternion< float >, 0 > QuaternionMapf
 
typedef Rotation2D< double > Rotation2Dd
 
typedef Rotation2D< float > Rotation2Df
 

Functions

Matrix< Scalar, 3, 1 > eulerAngles (Index a0, Index a1, Index a2) const
 
template<typename Derived, typename OtherDerived>
internal::umeyama_transform_matrix_type< Derived, OtherDerived >::type umeyama (const MatrixBase< Derived > &src, const MatrixBase< OtherDerived > &dst, bool with_scaling=true)
 Returns the transformation between two point sets.
 

Detailed Description

Typedef Documentation

◆ AngleAxisd

typedef AngleAxis<double> AngleAxisd

double precision angle-axis type

◆ AngleAxisf

typedef AngleAxis<float> AngleAxisf

single precision angle-axis type

◆ Quaterniond

typedef Quaternion<double> Quaterniond

double precision quaternion type

◆ Quaternionf

typedef Quaternion<float> Quaternionf

single precision quaternion type

◆ QuaternionMapAlignedd

Map a 16-bits aligned array of double precision scalars as a quaternion

◆ QuaternionMapAlignedf

Map a 16-bits aligned array of double precision scalars as a quaternion

◆ QuaternionMapd

typedef Map<Quaternion<double>, 0> QuaternionMapd

Map an unaligned array of double precision scalar as a quaternion

◆ QuaternionMapf

typedef Map<Quaternion<float>, 0> QuaternionMapf

Map an unaligned array of single precision scalar as a quaternion

◆ Rotation2Dd

typedef Rotation2D<double> Rotation2Dd

double precision 2D rotation type

◆ Rotation2Df

typedef Rotation2D<float> Rotation2Df

single precision 2D rotation type

Function Documentation

◆ eulerAngles()

template<typename Derived>
Matrix< typename MatrixBase< Derived >::Scalar, 3, 1 > eulerAngles ( Index a0,
Index a1,
Index a2 ) const
inline

This is defined in the Geometry module.

#include <Eigen/Geometry>
Returns
the Euler-angles of the rotation matrix *this using the convention defined by the triplet (a0,a1,a2)

Each of the three parameters a0,a1,a2 represents the respective rotation axis as an integer in {0,1,2}. For instance, in:

Vector3f ea = mat.eulerAngles(2, 0, 2);

"2" represents the z axis and "0" the x axis, etc. The returned angles are such that we have the following equality:

mat == AngleAxisf(ea[0], Vector3f::UnitZ())
static const BasisReturnType UnitZ()
Definition CwiseNullaryOp.h:849
static const BasisReturnType UnitX()
Definition CwiseNullaryOp.h:829
AngleAxis< float > AngleAxisf
Definition AngleAxis.h:146

This corresponds to the right-multiply conventions (with right hand side frames).

◆ umeyama()

template<typename Derived, typename OtherDerived>
internal::umeyama_transform_matrix_type< Derived, OtherDerived >::type umeyama ( const MatrixBase< Derived > & src,
const MatrixBase< OtherDerived > & dst,
bool with_scaling = true )

Returns the transformation between two point sets.

This is defined in the Geometry module.

#include <Eigen/Geometry>

The algorithm is based on: "Least-squares estimation of transformation parameters between two point patterns", Shinji Umeyama, PAMI 1991, DOI: 10.1109/34.88573

It estimates parameters $ c, \mathbf{R}, $ and $ \mathbf{t} $ such that

\begin{align*}  \frac{1}{n} \sum_{i=1}^n \vert\vert y_i - (c\mathbf{R}x_i + \mathbf{t}) \vert\vert_2^2
\end{align*}

is minimized.

The algorithm is based on the analysis of the covariance matrix $ \Sigma_{\mathbf{x}\mathbf{y}} \in \mathbb{R}^{d \times d} $ of the input point sets $ \mathbf{x} $ and $ \mathbf{y} $ where $d$ is corresponding to the dimension (which is typically small). The analysis is involving the SVD having a complexity of $O(d^3)$ though the actual computational effort lies in the covariance matrix computation which has an asymptotic lower bound of $O(dm)$ when the input point sets have dimension $d \times m$.

Currently the method is working only for floating point matrices.

Parameters
srcSource points $ \mathbf{x} = \left( x_1, \hdots, x_n \right) $.
dstDestination points $ \mathbf{y} = \left( y_1, \hdots, y_n \right) $.
with_scalingSets $ c=1 $ when false is passed.
Returns
The homogeneous transformation

\begin{align*}  T = \begin{bmatrix} c\mathbf{R} & \mathbf{t} \\ \mathbf{0} & 1 \end{bmatrix}
\end{align*}

minimizing the resudiual above. This transformation is always returned as an Eigen::Matrix.

References MatrixBase< Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::asDiagonal(), DenseBase< Derived >::colwise(), ComputeFullU, ComputeFullV, MatrixBase< Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::determinant(), JacobiSVD< _MatrixType, QRPreconditioner >::matrixU(), JacobiSVD< _MatrixType, QRPreconditioner >::matrixV(), DenseBase< Derived >::rowwise(), JacobiSVD< _MatrixType, QRPreconditioner >::singularValues(), VectorwiseOp< ExpressionType, Direction >::squaredNorm(), VectorwiseOp< ExpressionType, Direction >::sum(), and MatrixBase< Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::transpose().