Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

vgl_h_matrix_3d< T > Class Template Reference

#include <vgl_h_matrix_3d.h>

Inheritance diagram for vgl_h_matrix_3d< T >:

Inheritance graph
[legend]
List of all members.

Detailed Description

template<class T>
class vgl_h_matrix_3d< T >

A class to hold a 3-d projective transformation matrix and to perform common operations using it e.g.

transform point.

Definition at line 29 of file vgl_h_matrix_3d.h.

Public Member Functions

 vgl_h_matrix_3d ()
 ~vgl_h_matrix_3d ()
 vgl_h_matrix_3d (const vgl_h_matrix_3d &M)
 vgl_h_matrix_3d (vnl_matrix_fixed< T, 4, 4 > const &M)
 Constructor.
 vgl_h_matrix_3d (vnl_matrix_fixed< T, 3, 3 > const &M, vnl_vector_fixed< T, 3 > const &m)
 Construct an affine vgl_h_matrix_3d from 3x3 M and 3x1 m.
 vgl_h_matrix_3d (const T *t_matrix)
 Construct from a 16-element row-storage array of double.
 vgl_h_matrix_3d (vcl_istream &)
 Load H from ASCII vcl_istream.
 vgl_h_matrix_3d (char const *filename)
 Load from file.
 vgl_h_matrix_3d (vcl_vector< vgl_homg_point_3d< T > > const &points1, vcl_vector< vgl_homg_point_3d< T > > const &points2)
 Constructor - calculate homography between two sets of 3D points (minimum 5).
vgl_homg_point_3d< T > operator() (vgl_homg_point_3d< T > const &x) const
 return the transformed point.
vgl_homg_point_3d< T > operator * (vgl_homg_point_3d< T > const &x) const
vgl_homg_plane_3d< T > preimage (vgl_homg_plane_3d< T > const &p)
 Return the preimage of a transformed plane.
vgl_homg_point_3d< T > preimage (vgl_homg_point_3d< T > const &x) const
 Return the preimage of a transformed point (requires an inverse).
vgl_homg_plane_3d< T > operator() (vgl_homg_plane_3d< T > const &x) const
 Transform a plane (requires an inverse).
vgl_h_matrix_3d< T > operator * (vgl_h_matrix_3d< T > const &H) const
 composition (*this) * H.
bool read (vcl_istream &)
 Load H from ASCII file.
get (unsigned int row_index, unsigned int col_index) const
 Get matrix element at (row_index, col_index).
void get (T *t_matrix) const
 Fill t_matrix with contents of H.
void get (vnl_matrix_fixed< T, 4, 4 > *t_matrix) const
 Fill t_matrix with contents of H.
const vnl_matrix_fixed< T, 4, 4 > & get_matrix () const
vgl_h_matrix_3d get_inverse () const
 Return the inverse of this vgl_h_matrix_3d<T>.
void set (unsigned int row_index, unsigned int col_index, const T value)
void set (const T *t_matrix)
 Set to 4x4 row-stored matrix.
void set (vnl_matrix_fixed< T, 4, 4 > const &t_matrix)
 Set to given vnl_matrix.
bool projective_basis (vcl_vector< vgl_homg_point_3d< T > > const &five_points)
 Compute transform to projective basis given five points, no 4 coplanar.
void set_identity ()
 Set to identity.
void set_translation (T tx, T ty, T tz)
 Set to translation.
void set_rotation_about_axis (const vnl_vector_fixed< T, 3 > &axis, T angle)
 rotation angle is in radians.
void set_rotation_roll_pitch_yaw (T yaw, T pitch, T roll)
 Set to roll, pitch and yaw specified rotation.
void set_rotation_euler (T rz1, T ry, T rz2)
 Set to rotation specified by Euler angles.
bool is_rotation () const
bool is_euclidean () const
vgl_h_matrix_3d< T > get_upper_3x3 () const
 corresponds to rotation for Euclidan 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

Protected Attributes

vnl_matrix_fixed< T, 4, 4 > t12_matrix_


Constructor & Destructor Documentation

template<class T>
vgl_h_matrix_3d< T >::vgl_h_matrix_3d  )  [inline]
 

Definition at line 34 of file vgl_h_matrix_3d.h.

template<class T>
vgl_h_matrix_3d< T >::~vgl_h_matrix_3d  )  [inline]
 

Definition at line 35 of file vgl_h_matrix_3d.h.

template<class T>
vgl_h_matrix_3d< T >::vgl_h_matrix_3d const vgl_h_matrix_3d< T > &  M  ) 
 

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

Constructor.

Definition at line 33 of file vgl_h_matrix_3d.txx.

template<class T>
vgl_h_matrix_3d< T >::vgl_h_matrix_3d vnl_matrix_fixed< T, 3, 3 > const &  M,
vnl_vector_fixed< T, 3 > const &  m
 

Construct an affine vgl_h_matrix_3d from 3x3 M and 3x1 m.

Definition at line 108 of file vgl_h_matrix_3d.txx.

template<class T>
vgl_h_matrix_3d< T >::vgl_h_matrix_3d const T *  t_matrix  ) 
 

Construct from a 16-element row-storage array of double.

Definition at line 125 of file vgl_h_matrix_3d.txx.

template<class T>
vgl_h_matrix_3d< T >::vgl_h_matrix_3d vcl_istream &   ) 
 

Load H from ASCII vcl_istream.

Definition at line 85 of file vgl_h_matrix_3d.txx.

template<class T>
vgl_h_matrix_3d< T >::vgl_h_matrix_3d char const *  filename  ) 
 

Load from file.

Definition at line 94 of file vgl_h_matrix_3d.txx.

template<class T>
vgl_h_matrix_3d< T >::vgl_h_matrix_3d vcl_vector< vgl_homg_point_3d< T > > const &  points1,
vcl_vector< vgl_homg_point_3d< T > > const &  points2
 

Constructor - calculate homography between two sets of 3D points (minimum 5).

Definition at line 42 of file vgl_h_matrix_3d.txx.


Member Function Documentation

template<class T>
void vgl_h_matrix_3d< T >::get vnl_matrix_fixed< T, 4, 4 > *  t_matrix  )  const
 

Fill t_matrix with contents of H.

Definition at line 235 of file vgl_h_matrix_3d.txx.

template<class T>
void vgl_h_matrix_3d< T >::get T *  t_matrix  )  const
 

Fill t_matrix with contents of H.

Definition at line 224 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
 

Get matrix element at (row_index, col_index).

Definition at line 215 of file vgl_h_matrix_3d.txx.

template<class T>
vgl_h_matrix_3d< T > vgl_h_matrix_3d< T >::get_inverse  )  const
 

Return the inverse of this vgl_h_matrix_3d<T>.

Definition at line 244 of file vgl_h_matrix_3d.txx.

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

Definition at line 68 of file vgl_h_matrix_3d.h.

template<class T>
vgl_homg_point_3d< T > vgl_h_matrix_3d< T >::get_translation  )  const
 

corresponds to translation for affine transformations.

Definition at line 423 of file vgl_h_matrix_3d.txx.

template<class T>
vnl_vector_fixed< T, 3 > vgl_h_matrix_3d< T >::get_translation_vector  )  const
 

Definition at line 437 of file vgl_h_matrix_3d.txx.

template<class T>
vgl_h_matrix_3d< T > vgl_h_matrix_3d< T >::get_upper_3x3  )  const
 

corresponds to rotation for Euclidan transformations.

Definition at line 396 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
 

Definition at line 411 of file vgl_h_matrix_3d.txx.

template<class T>
bool vgl_h_matrix_3d< T >::is_euclidean  )  const
 

Definition at line 372 of file vgl_h_matrix_3d.txx.

template<class T>
bool vgl_h_matrix_3d< T >::is_rotation  )  const
 

Definition at line 358 of file vgl_h_matrix_3d.txx.

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

composition (*this) * H.

Definition at line 58 of file vgl_h_matrix_3d.h.

template<class T>
vgl_homg_point_3d<T> vgl_h_matrix_3d< T >::operator * vgl_homg_point_3d< T > const &  x  )  const [inline]
 

Definition at line 49 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 &  x  )  const
 

Transform a plane (requires an inverse).

Definition at line 176 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 &  x  )  const
 

return the transformed point.

Definition at line 137 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 &  x  )  const
 

Return the preimage of a transformed point (requires an inverse).

Definition at line 163 of file vgl_h_matrix_3d.txx.

template<class T>
vgl_homg_plane_3d< T > vgl_h_matrix_3d< T >::preimage vgl_homg_plane_3d< T > const &  p  ) 
 

Return the preimage of a transformed plane.

Definition at line 150 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  ) 
 

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

Definition at line 272 of file vgl_h_matrix_3d.txx.

template<class T>
bool vgl_h_matrix_3d< T >::read vcl_istream &   ) 
 

Load H from ASCII file.

Definition at line 195 of file vgl_h_matrix_3d.txx.

template<class T>
void vgl_h_matrix_3d< T >::set vnl_matrix_fixed< T, 4, 4 > const &  t_matrix  ) 
 

Set to given vnl_matrix.

Definition at line 263 of file vgl_h_matrix_3d.txx.

template<class T>
void vgl_h_matrix_3d< T >::set const T *  t_matrix  ) 
 

Set to 4x4 row-stored matrix.

Definition at line 253 of file vgl_h_matrix_3d.txx.

template<class T>
void vgl_h_matrix_3d< T >::set unsigned int  row_index,
unsigned int  col_index,
const T  value
[inline]
 

Definition at line 71 of file vgl_h_matrix_3d.h.

template<class T>
void vgl_h_matrix_3d< T >::set_identity  ) 
 

Set to identity.

Definition at line 281 of file vgl_h_matrix_3d.txx.

template<class T>
void vgl_h_matrix_3d< T >::set_rotation_about_axis const vnl_vector_fixed< T, 3 > &  axis,
angle
 

rotation angle is in radians.

Definition at line 300 of file vgl_h_matrix_3d.txx.

template<class T>
void vgl_h_matrix_3d< T >::set_rotation_euler rz1,
ry,
rz2
 

Set to rotation specified by Euler angles.

Definition at line 339 of file vgl_h_matrix_3d.txx.

template<class T>
void vgl_h_matrix_3d< T >::set_rotation_roll_pitch_yaw yaw,
pitch,
roll
 

Set to roll, pitch and yaw specified rotation.

  • roll is rotation about z
  • pitch is rotation about y
  • yaw is rotation about x

Definition at line 318 of file vgl_h_matrix_3d.txx.

template<class T>
void vgl_h_matrix_3d< T >::set_translation tx,
ty,
tz
 

Set to translation.

Definition at line 289 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]
 

Definition at line 32 of file vgl_h_matrix_3d.h.


The documentation for this class was generated from the following files:
Generated on Thu Jan 10 14:39:27 2008 for core/vgl by  doxygen 1.4.4