mi_pose Class Reference
[Public interface]

Pose of a micro-object. More...

#include <mi_pose.hh>

Inheritance diagram for mi_pose:

Inheritance graph
[legend]
Collaboration diagram for mi_pose:

Collaboration graph
[legend]
List of all members.

Public Types

typedef boost::numeric::ublas::matrix<
double > 
Matrix
 Type-definition for convenience.
typedef boost::numeric::ublas::vector<
double > 
Vector
 Type-definition for convenience.

Public Member Functions

 mi_pose (const mimas::mm_xml_reference< XalanElement > &configuration)
 Construct by loading from XML-DOM.
 mi_pose (int dim=3)
 Constructor for identity transform.
 mi_pose (const double w, const double t1, const double t2)
 Constructor for a two-dimensional transformation.
 mi_pose (double yaw, double pitch, double roll, double t1, double t2, double t3)
 Constructor for a three-dimensional transformation.
 mi_pose (const Matrix &_rotation, const Vector &_translation)
 Construct from given matrix and vector.
 mi_pose (const mi_pose &_pose)
 Copy constructor.
mi_pose inv (void) const
 Compute inverse of transform.
Vector map (const Vector &x) const
 Perform transformation.
mi_pose operator * (const mi_pose &a) const
 Concatenate two transformations.
const MatrixgetRotation (void) const
 Get const-reference to rotational matrix.
const VectorgetTranslation (void) const
 Get const-reference to translational vector.
MatrixgetRotation (void)
 Get reference to rotational matrix.
VectorgetTranslation (void)
 Get reference to translational vector.

Static Public Member Functions

static mi_pose scale_2d (double sx, double sy)
 Scaling 2-d transform.
static mi_pose scale_3d (double sx, double sy, double sz)
 Scaling 2-d transform.
static mi_pose translate_2d (double tx, double ty)
 Translating 2-d transform.
static mi_pose translate_3d (double tx, double ty, double tz)
 Translating 3-d transform.
static mi_pose rotate_2d (double w)
 Rotating 2-d transform.

Protected Member Functions

Matrix rotationBlock (int i1, int i2, int dim, double w)
 Generate matrix with a single rotation block.

Protected Attributes

Matrix rotation
 Matrix of transformation.
Vector translation
 Vector of transformation.

Detailed Description

Pose of a micro-object.

The pose of a micro-object is defined by the affine transformation between it's coordinate-system and the superior coordinate-system (the camera's coordinate-system):

\[ \vec{x}^\prime=A\,\vec{x}+\vec{t} \]

where $\vec{x}=\vec{OX}$ specifies the position of the point $X$ in the coordinate-system of the micro-object.

This class is part of the public interface.

Author:
Jan Wedekind (j.wedekind@shu.ac.uk)


Constructor & Destructor Documentation

mi_pose::mi_pose const mimas::mm_xml_reference< XalanElement > &  configuration  ) 
 

Construct by loading from XML-DOM.

Initialise 6-DOF pose from XML-data.

Parameters:
configuration root-node of XML-subtree.

mi_pose::mi_pose int  dim = 3  )  [inline]
 

Constructor for identity transform.

Create an identity transformation with $A:=I$ ($I_{i,j}:=\delta_{i,j}$ , $\delta_{i,j}$ is Kronecker-function) and $\vec{t}=\vec{o}$ .

Parameters:
dim Dimension of coordinate systems (default is 3).

mi_pose::mi_pose const double  w,
const double  t1,
const double  t2
 

Constructor for a two-dimensional transformation.

Counter-clockwise rotation followed by a translation.

           [  cos(y) -sin(y) ] 
      A := [  sin(y)  cos(y) ]
      
$\vec{t}=(t_1\ t_2)^\top$ .
Parameters:
w Angle of rotation (in radian).
t1 First element of translation-vector.
t2 Second element of translation-vector.

mi_pose::mi_pose double  yaw,
double  pitch,
double  roll,
double  t1,
double  t2,
double  t3
 

Constructor for a three-dimensional transformation.

Note that the rotation around the z-axis (yaw-angle) is clockwise by convention.

           [  cos(y)  sin(y) 0 ] 
      Y := [ -sin(y)  cos(y) 0 ]
           [    0       0    1 ]

           [  cos(p) 0 -sin(p) ] 
      P := [    0    1    0    ]
           [  sin(p) 0  cos(p) ]

           [ 1    0       0    ]
      R := [ 0  cos(r)  sin(r) ]
           [ 0 -sin(r)  cos(r) ]

      A := Y * P * R
      
Parameters:
yaw Rotation around z-axis (radian).
pitch Pitch angle (radian).
roll Roll angle (radian).
t1 First element of translation-vector.
t2 Second element of translation-vector.
t3 Third element of translation-vector.

mi_pose::mi_pose const Matrix _rotation,
const Vector _translation
 

Construct from given matrix and vector.

Parameters:
_rotation Matrix $A$ of transformation.
_translation Vector $\vec{t}$ of transformation.

mi_pose::mi_pose const mi_pose _pose  )  [inline]
 

Copy constructor.

Parameters:
_pose Object to copy from.


Member Function Documentation

Matrix& mi_pose::getRotation void   )  [inline]
 

Get reference to rotational matrix.

Returns:
The matrix $A$ .

const Matrix& mi_pose::getRotation void   )  const [inline]
 

Get const-reference to rotational matrix.

Returns:
The matrix $A$ .

Vector& mi_pose::getTranslation void   )  [inline]
 

Get reference to translational vector.

Returns:
The vector $\vec{t}$ .

const Vector& mi_pose::getTranslation void   )  const [inline]
 

Get const-reference to translational vector.

Returns:
The vector $\vec{t}$ .

mi_pose mi_pose::inv void   )  const
 

Compute inverse of transform.

Computes the transform $(A^\prime,\vec{t}^\prime)$ , such that

\[ \forall\vec{x}:\,\vec{x}=A^\prime\,(A\,\vec{x}+\vec{t})+\vec{t}^\prime \]

holds.

Returns:
The inverse transformation.

Vector mi_pose::map const Vector x  )  const [inline]
 

Perform transformation.

Computes

\[ \vec{x}^\prime=A\,\vec{x}+\vec{t} \]

Parameters:
x The vector $\vec{x}$
Returns:
The vector $\vec{x}^\prime$ .

mi_pose mi_pose::operator * const mi_pose a  )  const
 

Concatenate two transformations.

Parameters:
a right argument of multiplication.

static mi_pose mi_pose::rotate_2d double  w  )  [static]
 

Rotating 2-d transform.

Parameters:
w angle.

Matrix mi_pose::rotationBlock int  i1,
int  i2,
int  dim,
double  w
[protected]
 

Generate matrix with a single rotation block.

Parameters:
i1 major index of rotation-block.
i2 minor index of rotation-block.
dim Dimensionality of matrix.
w Angle of rotation.

static mi_pose mi_pose::scale_2d double  sx,
double  sy
[static]
 

Scaling 2-d transform.

Parameters:
sx scale-factor for x-coordinates.
sy scale-factor for y-coordinates.

static mi_pose mi_pose::scale_3d double  sx,
double  sy,
double  sz
[static]
 

Scaling 2-d transform.

Parameters:
sx scale-factor for x-coordinates.
sy scale-factor for y-coordinates.
sz scale-factor for z-coordinates.

static mi_pose mi_pose::translate_2d double  tx,
double  ty
[static]
 

Translating 2-d transform.

Parameters:
tx translation for x-coordinates.
ty translation for y-coordinates.

static mi_pose mi_pose::translate_3d double  tx,
double  ty,
double  tz
[static]
 

Translating 3-d transform.

Parameters:
tx translation for x-coordinates.
ty translation for y-coordinates.
tz translation for y-coordinates.


The documentation for this class was generated from the following file:
doxygen-1.4.5 documentation for micron-vision - Tue Jan 17 15:29:15 2006