Public Member Functions | Static Protected Member Functions | Protected Attributes
vgl_norm_trans_3d< T > Class Template Reference

#include <vgl_norm_trans_3d.h>

Inheritance diagram for vgl_norm_trans_3d< T >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 vgl_norm_trans_3d ()
 Default constructor.
 vgl_norm_trans_3d (const vgl_norm_trans_3d< T > &M)
 Copy constructor.
 vgl_norm_trans_3d (vnl_matrix_fixed< T, 4, 4 > const &M)
 Constructor.
 vgl_norm_trans_3d (const T *t_matrix)
 Constructor.
 vgl_norm_trans_3d (vcl_istream &s)
 Constructor from vcl_istream.
 vgl_norm_trans_3d (char const *filename)
 Constructor from file.
 ~vgl_norm_trans_3d ()
 Destructor.
bool compute_from_points (vcl_vector< vgl_homg_point_3d< T > > const &points)
 compute the normalizing transform.
vgl_homg_point_3d< T > operator() (vgl_homg_point_3d< T > const &p) const
 Return the transformed point given by $q = { H} p$.
vgl_homg_plane_3d< T > operator() (vgl_homg_plane_3d< T > const &l) const
 Return the transformed plane given by $m = { H}^{-1} l$.
vgl_homg_point_3d< T > operator* (vgl_homg_point_3d< T > const &p) const
 Return the transformed point given by $q = { H} p$.
vgl_homg_plane_3d< T > operator* (vgl_homg_plane_3d< T > const &l) const
 Return the transformed plane given by $m = { H}^{-1} l$.
vgl_h_matrix_3d< T > operator* (vgl_h_matrix_3d< T > const &H) const
 composition (*this) * H.
bool operator== (vgl_h_matrix_3d< T > const &M) const
vgl_homg_plane_3d< T > preimage (vgl_homg_plane_3d< T > const &l) const
 Return the preimage of a transformed plane: $m = { H} l$.
vgl_homg_point_3d< T > preimage (vgl_homg_point_3d< T > const &q) const
 Return the preimage of a transformed point: $p = { H}^{-1} q$.
vgl_homg_plane_3d< T > correlation (vgl_homg_point_3d< T > const &p) const
vgl_homg_point_3d< T > correlation (vgl_homg_plane_3d< T > const &l) const
vnl_matrix_fixed< T, 4, 4 > const & get_matrix () const
 Return the 4x4 homography matrix.
void get (vnl_matrix_fixed< T, 4, 4 > *M) const
 Fill M with contents of the 4x4 homography matrix.
void get (vnl_matrix< T > *M) const
void get (T *M) const
 Fill M with contents of the 4x4 homography matrix.
get (unsigned int row_index, unsigned int col_index) const
 Return an element from the 4x4 homography matrix.
vgl_h_matrix_3d get_inverse () const
 Return the inverse homography.
vgl_h_matrix_3dset (unsigned int row_index, unsigned int col_index, T value)
 Set an element of the 4x4 homography matrix.
vgl_h_matrix_3dset (T const *M)
 Set to 4x4 row-stored matrix.
vgl_h_matrix_3dset (vnl_matrix_fixed< T, 4, 4 > const &M)
 Set to given 4x4 matrix.
vgl_h_matrix_3dset_identity ()
 initialize the transformation to identity.
vgl_h_matrix_3dset_translation (T tx, T ty, T tz)
 set H[0][3] = tx, H[1][3] = ty, and H[2][3] = tz, other elements unaltered.
vgl_h_matrix_3dset_scale (T scale)
 compose the current transform with a uniform scaling transformation, S.
vgl_h_matrix_3dset_affine (vnl_matrix_fixed< T, 3, 4 > const &M34)
 set the transform to a general affine transform matrix.
vgl_h_matrix_3dset_rotation_matrix (vnl_matrix_fixed< T, 3, 3 > const &R)
 Just the upper 3x3 part of the matrix is replaced by a rotation matrix.
vgl_h_matrix_3dset_rotation_about_axis (vnl_vector_fixed< T, 3 > const &axis, T theta)
 Set to rotation about an axis.
vgl_h_matrix_3dset_rotation_roll_pitch_yaw (T yaw, T pitch, T roll)
 Set to roll, pitch and yaw specified rotation.
vgl_h_matrix_3dset_rotation_euler (T rz1, T ry, T rz2)
 Set to rotation specified by Euler angles.
void set_reflection_plane (vgl_plane_3d< double > const &p)
 set the transformation to a reflection about a plane.
bool is_rotation () const
bool is_identity () const
bool is_euclidean () const
bool projective_basis (vcl_vector< vgl_homg_point_3d< T > > const &five_points)
 Compute transform to projective basis given five points, no 4 of which coplanar.
bool projective_basis (vcl_vector< vgl_homg_plane_3d< T > > const &five_planes)
 transformation to projective basis (canonical frame).
vgl_h_matrix_3d< T > get_upper_3x3 () const
 corresponds to rotation for Euclidean transformations.
vnl_matrix_fixed< T, 3, 3 > get_upper_3x3_matrix () const
vgl_homg_point_3d< T > get_translation () const
 corresponds to translation for affine transformations.
vnl_vector_fixed< T, 3 > get_translation_vector () const
bool read (vcl_istream &s)
 Load H from ASCII file.
bool read (char const *filename)
 Read H from file.

Static Protected Member Functions

static bool scale_xyzroot2 (vcl_vector< vgl_homg_point_3d< T > > const &in, T &radius)
static void center_of_mass (vcl_vector< vgl_homg_point_3d< T > > const &points, T &cx, T &cy, T &cz)

Protected Attributes

vnl_matrix_fixed< T, 4, 4 > t12_matrix_

Detailed Description

template<class T>
class vgl_norm_trans_3d< T >

Definition at line 24 of file vgl_norm_trans_3d.h.


Constructor & Destructor Documentation

template<class T >
vgl_norm_trans_3d< T >::vgl_norm_trans_3d ( )

Default constructor.

Definition at line 17 of file vgl_norm_trans_3d.txx.

template<class T >
vgl_norm_trans_3d< T >::vgl_norm_trans_3d ( const vgl_norm_trans_3d< T > &  M)

Copy constructor.

Definition at line 23 of file vgl_norm_trans_3d.txx.

template<class T >
vgl_norm_trans_3d< T >::vgl_norm_trans_3d ( vnl_matrix_fixed< T, 4, 4 > const &  M)

Constructor.

Definition at line 46 of file vgl_norm_trans_3d.txx.

template<class T >
vgl_norm_trans_3d< T >::vgl_norm_trans_3d ( const T *  t_matrix)

Constructor.

Definition at line 54 of file vgl_norm_trans_3d.txx.

template<class T >
vgl_norm_trans_3d< T >::vgl_norm_trans_3d ( vcl_istream &  s)

Constructor from vcl_istream.

Definition at line 31 of file vgl_norm_trans_3d.txx.

template<class T >
vgl_norm_trans_3d< T >::vgl_norm_trans_3d ( char const *  filename)

Constructor from file.

Definition at line 38 of file vgl_norm_trans_3d.txx.

template<class T >
vgl_norm_trans_3d< T >::~vgl_norm_trans_3d ( )

Destructor.

Definition at line 61 of file vgl_norm_trans_3d.txx.


Member Function Documentation

template<class T >
void vgl_norm_trans_3d< T >::center_of_mass ( vcl_vector< vgl_homg_point_3d< T > > const &  points,
T &  cx,
T &  cy,
T &  cz 
) [static, protected]

Definition at line 99 of file vgl_norm_trans_3d.txx.

template<class T >
bool vgl_norm_trans_3d< T >::compute_from_points ( vcl_vector< vgl_homg_point_3d< T > > const &  points)

compute the normalizing transform.

Definition at line 75 of file vgl_norm_trans_3d.txx.

template<class T >
vgl_homg_plane_3d< T > vgl_h_matrix_3d< T >::correlation ( vgl_homg_point_3d< T > const &  p) const [inherited]

Definition at line 104 of file vgl_h_matrix_3d.txx.

template<class T >
vgl_homg_point_3d< T > vgl_h_matrix_3d< T >::correlation ( vgl_homg_plane_3d< T > const &  l) const [inherited]

Definition at line 120 of file vgl_h_matrix_3d.txx.

template<class T >
void vgl_h_matrix_3d< T >::get ( vnl_matrix_fixed< T, 4, 4 > *  M) const [inherited]

Fill M with contents of the 4x4 homography matrix.

Definition at line 180 of file vgl_h_matrix_3d.txx.

template<class T >
void vgl_h_matrix_3d< T >::get ( vnl_matrix< T > *  M) const [inherited]
Deprecated:
use the vnl_matrix_fixed variant instead

Definition at line 186 of file vgl_h_matrix_3d.txx.

template<class T >
void vgl_h_matrix_3d< T >::get ( T *  M) const [inherited]

Fill M with contents of the 4x4 homography matrix.

Definition at line 173 of file vgl_h_matrix_3d.txx.

template<class T >
T vgl_h_matrix_3d< T >::get ( unsigned int  row_index,
unsigned int  col_index 
) const [inherited]

Return an element from the 4x4 homography matrix.

Definition at line 167 of file vgl_h_matrix_3d.txx.

template<class T >
vgl_h_matrix_3d< T > vgl_h_matrix_3d< T >::get_inverse ( ) const [inherited]

Return the inverse homography.

Definition at line 194 of file vgl_h_matrix_3d.txx.

template<class T>
vnl_matrix_fixed<T,4,4> const& vgl_h_matrix_3d< T >::get_matrix ( ) const [inline, inherited]

Return the 4x4 homography matrix.

Definition at line 90 of file vgl_h_matrix_3d.h.

template<class T >
vgl_homg_point_3d< T > vgl_h_matrix_3d< T >::get_translation ( ) const [inherited]

corresponds to translation for affine transformations.

Definition at line 420 of file vgl_h_matrix_3d.txx.

template<class T >
vnl_vector_fixed< T, 3 > vgl_h_matrix_3d< T >::get_translation_vector ( ) const [inherited]

Definition at line 433 of file vgl_h_matrix_3d.txx.

template<class T >
vgl_h_matrix_3d< T > vgl_h_matrix_3d< T >::get_upper_3x3 ( ) const [inherited]

corresponds to rotation for Euclidean transformations.

Definition at line 393 of file vgl_h_matrix_3d.txx.

template<class T >
vnl_matrix_fixed< T, 3, 3 > vgl_h_matrix_3d< T >::get_upper_3x3_matrix ( ) const [inherited]

Definition at line 408 of file vgl_h_matrix_3d.txx.

template<class T >
bool vgl_h_matrix_3d< T >::is_euclidean ( ) const [inherited]

Definition at line 367 of file vgl_h_matrix_3d.txx.

template<class T >
bool vgl_h_matrix_3d< T >::is_identity ( ) const [inherited]

Definition at line 385 of file vgl_h_matrix_3d.txx.

template<class T >
bool vgl_h_matrix_3d< T >::is_rotation ( ) const [inherited]

Definition at line 357 of file vgl_h_matrix_3d.txx.

template<class T >
vgl_homg_point_3d< T > vgl_h_matrix_3d< T >::operator() ( vgl_homg_point_3d< T > const &  p) const [inherited]

Return the transformed point given by $q = { H} p$.

Definition at line 96 of file vgl_h_matrix_3d.txx.

template<class T >
vgl_homg_plane_3d< T > vgl_h_matrix_3d< T >::operator() ( vgl_homg_plane_3d< T > const &  l) const [inherited]

Return the transformed plane given by $m = { H}^{-1} l$.

(requires an inverse)

Definition at line 136 of file vgl_h_matrix_3d.txx.

template<class T>
vgl_homg_point_3d<T> vgl_h_matrix_3d< T >::operator* ( vgl_homg_point_3d< T > const &  p) const [inline, inherited]

Return the transformed point given by $q = { H} p$.

Definition at line 62 of file vgl_h_matrix_3d.h.

template<class T>
vgl_homg_plane_3d<T> vgl_h_matrix_3d< T >::operator* ( vgl_homg_plane_3d< T > const &  l) const [inline, inherited]

Return the transformed plane given by $m = { H}^{-1} l$.

(requires an inverse)

Definition at line 81 of file vgl_h_matrix_3d.h.

template<class T>
vgl_h_matrix_3d<T> vgl_h_matrix_3d< T >::operator* ( vgl_h_matrix_3d< T > const &  H) const [inline, inherited]

composition (*this) * H.

Definition at line 84 of file vgl_h_matrix_3d.h.

template<class T>
bool vgl_h_matrix_3d< T >::operator== ( vgl_h_matrix_3d< T > const &  M) const [inline, inherited]

Definition at line 64 of file vgl_h_matrix_3d.h.

template<class T >
vgl_homg_plane_3d< T > vgl_h_matrix_3d< T >::preimage ( vgl_homg_plane_3d< T > const &  l) const [inherited]

Return the preimage of a transformed plane: $m = { H} l$.

Definition at line 112 of file vgl_h_matrix_3d.txx.

template<class T >
vgl_homg_point_3d< T > vgl_h_matrix_3d< T >::preimage ( vgl_homg_point_3d< T > const &  q) const [inherited]

Return the preimage of a transformed point: $p = { H}^{-1} q$.

(requires an inverse)

Definition at line 128 of file vgl_h_matrix_3d.txx.

template<class T >
bool vgl_h_matrix_3d< T >::projective_basis ( vcl_vector< vgl_homg_point_3d< T > > const &  five_points) [inherited]

Compute transform to projective basis given five points, no 4 of which coplanar.

Transformation to projective basis (canonical frame) Compute the homography that takes the input set of points to the canonical frame. The points act as the projective basis for the canonical coordinate system. In the canonical frame the points have coordinates: ${array}{cccc} p[0] & p[1] & p[2] & p[3] & p[4] \% 1 & 0 & 0 & 0 & 1 \% 0 & 1 & 0 & 0 & 1 \% 0 & 0 & 1 & 0 & 1 \% 0 & 0 & 0 & 1 & 1 {array}$

Definition at line 217 of file vgl_h_matrix_3d.txx.

template<class T >
bool vgl_h_matrix_3d< T >::projective_basis ( vcl_vector< vgl_homg_plane_3d< T > > const &  five_planes) [inherited]

transformation to projective basis (canonical frame).

Compute the homography that takes the input set of planes to the canonical frame. The planes act as the dual projective basis for the canonical coordinate system. In the canonical frame the planes have equations: x=0; y=0; z=0; w=0; x+y+z+w=0. (The latter plane is the plane at infinity.)

Definition at line 224 of file vgl_h_matrix_3d.txx.

template<class T >
bool vgl_h_matrix_3d< T >::read ( vcl_istream &  s) [inherited]

Load H from ASCII file.

Definition at line 149 of file vgl_h_matrix_3d.txx.

template<class T >
bool vgl_h_matrix_3d< T >::read ( char const *  filename) [inherited]

Read H from file.

Definition at line 156 of file vgl_h_matrix_3d.txx.

template<class T >
bool vgl_norm_trans_3d< T >::scale_xyzroot2 ( vcl_vector< vgl_homg_point_3d< T > > const &  in,
T &  radius 
) [static, protected]

Definition at line 138 of file vgl_norm_trans_3d.txx.

template<class T>
vgl_h_matrix_3d& vgl_h_matrix_3d< T >::set ( unsigned int  row_index,
unsigned int  col_index,
value 
) [inline, inherited]

Set an element of the 4x4 homography matrix.

Definition at line 104 of file vgl_h_matrix_3d.h.

template<class T >
vgl_h_matrix_3d< T > & vgl_h_matrix_3d< T >::set ( T const *  M) [inherited]

Set to 4x4 row-stored matrix.

Definition at line 201 of file vgl_h_matrix_3d.txx.

template<class T >
vgl_h_matrix_3d< T > & vgl_h_matrix_3d< T >::set ( vnl_matrix_fixed< T, 4, 4 > const &  M) [inherited]

Set to given 4x4 matrix.

Definition at line 210 of file vgl_h_matrix_3d.txx.

template<class T >
vgl_h_matrix_3d< T > & vgl_h_matrix_3d< T >::set_affine ( vnl_matrix_fixed< T, 3, 4 > const &  M34) [inherited]

set the transform to a general affine transform matrix.

$A = [ {array}{ccc} a00 & a01 & a02 & a03 \% a10 & a11 & a12 & a13 \% a20 & a21 & a22 & a23 \% 0 & 0 & 0 & 1 {array}]$

Definition at line 260 of file vgl_h_matrix_3d.txx.

template<class T >
vgl_h_matrix_3d< T > & vgl_h_matrix_3d< T >::set_identity ( ) [inherited]

initialize the transformation to identity.

Definition at line 232 of file vgl_h_matrix_3d.txx.

template<class T >
void vgl_h_matrix_3d< T >::set_reflection_plane ( vgl_plane_3d< double > const &  p) [inherited]

set the transformation to a reflection about a plane.

Definition at line 336 of file vgl_h_matrix_3d.txx.

template<class T >
vgl_h_matrix_3d< T > & vgl_h_matrix_3d< T >::set_rotation_about_axis ( vnl_vector_fixed< T, 3 > const &  axis,
theta 
) [inherited]

Set to rotation about an axis.

Just the upper 3x3 part of the matrix is replaced by a rotation matrix. rotation angle theta is in radians

Definition at line 271 of file vgl_h_matrix_3d.txx.

template<class T >
vgl_h_matrix_3d< T > & vgl_h_matrix_3d< T >::set_rotation_euler ( rz1,
ry,
rz2 
) [inherited]

Set to rotation specified by Euler angles.

Just the upper 3x3 part of the matrix is replaced by a rotation matrix.

Definition at line 305 of file vgl_h_matrix_3d.txx.

template<class T >
vgl_h_matrix_3d< T > & vgl_h_matrix_3d< T >::set_rotation_matrix ( vnl_matrix_fixed< T, 3, 3 > const &  R) [inherited]

Just the upper 3x3 part of the matrix is replaced by a rotation matrix.

Definition at line 325 of file vgl_h_matrix_3d.txx.

template<class T >
vgl_h_matrix_3d< T > & vgl_h_matrix_3d< T >::set_rotation_roll_pitch_yaw ( yaw,
pitch,
roll 
) [inherited]

Set to roll, pitch and yaw specified rotation.

  • roll is rotation about z
  • pitch is rotation about y
  • yaw is rotation about x Just the upper 3x3 part of the matrix is replaced by a rotation matrix.

Definition at line 285 of file vgl_h_matrix_3d.txx.

template<class T >
vgl_h_matrix_3d< T > & vgl_h_matrix_3d< T >::set_scale ( scale) [inherited]

compose the current transform with a uniform scaling transformation, S.

$S = [ {array}{cccc} s & 0 & 0 & 0 \% 0 & s & 0 & 0 \% 0 & 0 & s & 0 \% 0 & 0 & 0 & 1 {array}]$ , Ts = S*T.

Definition at line 250 of file vgl_h_matrix_3d.txx.

template<class T >
vgl_h_matrix_3d< T > & vgl_h_matrix_3d< T >::set_translation ( tx,
ty,
tz 
) [inherited]

set H[0][3] = tx, H[1][3] = ty, and H[2][3] = tz, other elements unaltered.

Definition at line 240 of file vgl_h_matrix_3d.txx.


Member Data Documentation

template<class T>
vnl_matrix_fixed<T,4,4> vgl_h_matrix_3d< T >::t12_matrix_ [protected, inherited]

Definition at line 36 of file vgl_h_matrix_3d.h.


The documentation for this class was generated from the following files: