Public Types | Public Member Functions | Public Attributes | Protected Attributes

TRTK::EstimateTransformation2D< T > Class Template Reference

Base class for 2D transformation estimations from two point sets. More...

#include <EstimateTransformation2D.hpp>

Inheritance diagram for TRTK::EstimateTransformation2D< T >:
Collaboration diagram for TRTK::EstimateTransformation2D< T >:

List of all members.

Public Types

typedef super::ArrayXT ArrayXT
 General-purpose array of arbitrary size with value type T.
typedef super::MatrixXT MatrixXT
 Matrix of arbitrary size with value type T.
typedef super::VectorXT VectorXT
 Column vector of arbitrary size with value type T.
typedef super::Vector2T Vector2T
 2D column vector with value type T.
typedef super::Vector3T Vector3T
 3D column vector with value type T.
typedef super::Vector4T Vector4T
 4D column vector with value type T.
typedef super::RowVector2T RowVector2T
 2D row vector with value type T.
typedef super::RowVector3T RowVector3T
 3D row vector with value type T.
typedef super::Matrix2T Matrix2T
 2 x 2 matrix with value type T.
typedef super::Matrix3T Matrix3T
 3 x 3 matrix with value type T.
typedef super::Matrix4T Matrix4T
 4 x 4 matrix with value type T.
enum  Error { NOT_ENOUGH_POINTS, UNEQUAL_NUMBER_OF_POINTS, UNKNOWN_ERROR, WRONG_POINT_SIZE }

Public Member Functions

 EstimateTransformation2D ()
 Constructs a new initialized instance of this class.
virtual ~EstimateTransformation2D ()
 Deletes the instance.
virtual void compute ()=0
 Performs the transformation estimation.
virtual value_type getRMS () const
 Returns the root mean square (RMS) error of the estimated transformation.
virtual const Matrix3TgetTransformationMatrix () const
void setSourcePoints (const std::vector< Coordinate< T > > &)
 Sets the source points.
void setSourcePoints (const std::vector< Vector2T, Eigen::aligned_allocator< Vector2T > > &)
 Sets the source points.
void setSourcePoints (const std::vector< Vector3T > &)
 Sets the source points.
void setTargetPoints (const std::vector< Coordinate< T > > &)
 Sets the target points.
void setTargetPoints (const std::vector< Vector2T, Eigen::aligned_allocator< Vector2T > > &)
 Sets the target points.
void setTargetPoints (const std::vector< Vector3T > &)
 Sets the target points.

Public Attributes

EIGEN_MAKE_ALIGNED_OPERATOR_NEW
typedef T 
value_type
 Internally used value type (should be a floating point type).

Protected Attributes

MatrixXT m_source_points
MatrixXT m_target_points
Matrix3T m_transformation_matrix

Detailed Description

template<class T>
class TRTK::EstimateTransformation2D< T >

Base class for 2D transformation estimations from two point sets.

Note:
Some functions might throw an error object. See the appropriate function for more details.
See also:
EstimateTransformation
Author:
Christoph Haenisch
Version:
0.1.1
Date:
2011-08-05

Definition at line 53 of file EstimateTransformation2D.hpp.


Member Enumeration Documentation

template<class T>
enum TRTK::EstimateTransformation::Error [inherited]
Enumerator:
NOT_ENOUGH_POINTS 

More points are required to estimate the transformation.

UNEQUAL_NUMBER_OF_POINTS 

The two point sets do not have the same cardinality.

UNKNOWN_ERROR 

An unknown error occured.

WRONG_POINT_SIZE 

One or more points have a wrong size.

Definition at line 62 of file EstimateTransformation.hpp.


Constructor & Destructor Documentation

Constructs a new initialized instance of this class.

Template Parameters:
Tscalar type of the coordinates

Definition at line 113 of file EstimateTransformation2D.hpp.

template<class T >
TRTK::EstimateTransformation2D< T >::~EstimateTransformation2D (  ) [virtual]

Deletes the instance.

Template Parameters:
Tscalar type of the coordinates

Definition at line 125 of file EstimateTransformation2D.hpp.


Member Function Documentation

template<class T >
EstimateTransformation2D< T >::value_type TRTK::EstimateTransformation2D< T >::getRMS (  ) const [virtual]

Returns the root mean square (RMS) error of the estimated transformation.

Template Parameters:
Tscalar type of the coordinates

It is assumed, that the computation was done before.

The value type T must provide a function T sqrt(T value) which yields the square root of value.

Exceptions:
ErrorObjIf the point sets do not have the same cardinality, an error object is thrown and its error code is set to UNEQUAL_NUMBER_OF_POINTS.
See also:
compute()

Implements TRTK::EstimateTransformation< T >.

Definition at line 148 of file EstimateTransformation2D.hpp.

template<class T >
const EstimateTransformation2D< T >::Matrix3T & TRTK::EstimateTransformation2D< T >::getTransformationMatrix (  ) const [virtual]
Template Parameters:
Tscalar type of the coordinates
Returns:
Returns the sought transformation matrix in the form of a homogeneous 3x3 matrix. (This comprises the rotation as well as the translation, for instance.)
See also:
compute()

Definition at line 194 of file EstimateTransformation2D.hpp.

template<class T >
void TRTK::EstimateTransformation2D< T >::setSourcePoints ( const std::vector< Coordinate< T > > &  source_points )

Sets the source points.

Template Parameters:
Tscalar type of the coordinates
Parameters:
[in]source_pointsThe points can either be plain 2D or 3D homogeneous coordinates.
Exceptions:
ErrorObjIf there are any coordinates other than 2D or 3D coordinates, an error object is thrown and its error code is set to WRONG_POINT_SIZE.

Definition at line 214 of file EstimateTransformation2D.hpp.

template<class T >
void TRTK::EstimateTransformation2D< T >::setSourcePoints ( const std::vector< Vector2T, Eigen::aligned_allocator< Vector2T > > &  source_points )

Sets the source points.

Template Parameters:
Tscalar type of the coordinates
Parameters:
[in]source_points2D coordinates.

Definition at line 246 of file EstimateTransformation2D.hpp.

template<class T >
void TRTK::EstimateTransformation2D< T >::setSourcePoints ( const std::vector< Vector3T > &  source_points )

Sets the source points.

Template Parameters:
Tscalar type of the coordinates
Parameters:
[in]source_points3D homogeneous coordinates.

Definition at line 264 of file EstimateTransformation2D.hpp.

template<class T >
void TRTK::EstimateTransformation2D< T >::setTargetPoints ( const std::vector< Vector3T > &  target_points )

Sets the target points.

Template Parameters:
Tscalar type of the coordinates
Parameters:
[in]target_points3D homogeneous coordinates.

Definition at line 342 of file EstimateTransformation2D.hpp.

template<class T >
void TRTK::EstimateTransformation2D< T >::setTargetPoints ( const std::vector< Coordinate< T > > &  target_points )

Sets the target points.

Template Parameters:
Tscalar type of the coordinates
Parameters:
[in]target_pointsThe points can either be plain 2D or 3D homogeneous coordinates.
Exceptions:
ErrorObjIf there are any coordinates other than 2D or 3D coordinates, an error object is thrown and its error code is set to WRONG_POINT_SIZE.

Definition at line 292 of file EstimateTransformation2D.hpp.

template<class T >
void TRTK::EstimateTransformation2D< T >::setTargetPoints ( const std::vector< Vector2T, Eigen::aligned_allocator< Vector2T > > &  target_points )

Sets the target points.

Template Parameters:
Tscalar type of the coordinates
Parameters:
[in]target_points2D coordinates.

Definition at line 324 of file EstimateTransformation2D.hpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines