vgl_norm_trans_2d< T > Class Template Reference

#include <vgl_norm_trans_2d.h>

Inheritance diagram for vgl_norm_trans_2d< T >:

vgl_h_matrix_2d< T > List of all members.

Detailed Description

template<class T>
class vgl_norm_trans_2d< T >

Definition at line 38 of file vgl_norm_trans_2d.h.


Public Member Functions

 vgl_norm_trans_2d ()
 vgl_norm_trans_2d (const vgl_norm_trans_2d< T > &M)
 vgl_norm_trans_2d (vnl_matrix_fixed< T, 3, 3 > const &M)
 vgl_norm_trans_2d (const T *t_matrix)
 vgl_norm_trans_2d (vcl_istream &s)
 vgl_norm_trans_2d (char const *filename)
 ~vgl_norm_trans_2d ()
bool compute_from_points (vcl_vector< vgl_homg_point_2d< T > > const &points, bool isotropic=true)
 compute the normalizing transform.
bool compute_from_lines (vcl_vector< vgl_homg_line_2d< T > > const &lines, bool isotropic=true)
 The normalizing transform for lines is computed from the set of points defined by the intersection of the perpendicular from the origin with the line.
bool compute_from_points_and_lines (vcl_vector< vgl_homg_point_2d< T > > const &pts, vcl_vector< vgl_homg_line_2d< T > > const &lines, bool isotropic=true)
 The normalizing transform for points and lines is computed from the set of points used by compute_from_points() & the one used by compute_from_lines().
vgl_homg_point_2d< T > operator() (vgl_homg_point_2d< T > const &p) const
vgl_conic< T > operator() (vgl_conic< T > const &C) const
 assumed to be a point conic.
vgl_homg_line_2d< T > operator() (vgl_homg_line_2d< T > const &l) const
vgl_homg_point_2d< T > operator * (vgl_homg_point_2d< T > const &p) const
vgl_homg_line_2d< T > operator * (vgl_homg_line_2d< T > const &l) const
vgl_h_matrix_2d operator * (const vgl_h_matrix_2d &h2) const
 Composition.
bool operator== (vgl_h_matrix_2d< T > const &M)
vgl_homg_line_2d< T > preimage (vgl_homg_line_2d< T > const &l) const
vgl_homg_point_2d< T > preimage (vgl_homg_point_2d< T > const &p) const
vgl_conic< T > preimage (vgl_conic< T > const &C) const
vgl_homg_line_2d< T > correlation (vgl_homg_point_2d< T > const &p) const
vgl_homg_point_2d< T > correlation (vgl_homg_line_2d< T > const &l) const
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 H with contents of this.
void get (vnl_matrix< T > *t_matrix) const
 Fill H with contents of this.
const vnl_matrix_fixed< T, 3, 3 > & get_matrix () const
const vgl_h_matrix_2d get_inverse () const
 Return the inverse.
void set (const T *t_matrix)
 Set to 3x3 row-stored matrix.
void set (vnl_matrix_fixed< T, 3, 3 > const &t_matrix)
 Set to given vnl_matrix.
void set_identity ()
 initialize the transformation to identity.
void set_translation (const T tx, const T ty)
 set T[0][2] = tx and T[1][2] = ty, other elements unaltered.
void set_rotation (const T theta)
 the upper 2x2 part of the matrix is replaced by a rotation matrix.
void set_scale (const T scale)
 initialize the transform to a scaling transform.
void set_aspect_ratio (const T aspect_ratio)
 initialize the transform to a diagonal aspect transform.
bool projective_basis (vcl_vector< vgl_homg_point_2d< T > > const &four_points)
 transformation to projective basis (canonical frame).
bool projective_basis (vcl_vector< vgl_homg_line_2d< T > > const &four_lines)
 transformation to projective basis (canonical frame).
bool read (vcl_istream &s)
 Read H from vcl_istream.
bool read (char const *filename)
 Read H from file.

Static Protected Member Functions

static bool scale_xyroot2 (vcl_vector< vgl_homg_point_2d< T > > const &in, T &radius)
static void center_of_mass (vcl_vector< vgl_homg_point_2d< T > > const &points, T &cx, T &cy)
static bool scale_aniostropic (vcl_vector< vgl_homg_point_2d< T > > const &in, T &sdx, T &sdy, T &c, T &s)

Protected Attributes

vnl_matrix_fixed< T, 3, 3 > t12_matrix_

Constructor & Destructor Documentation

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

Definition at line 17 of file vgl_norm_trans_2d.txx.

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

Definition at line 23 of file vgl_norm_trans_2d.txx.

template<class T>
vgl_norm_trans_2d< T >::vgl_norm_trans_2d ( vnl_matrix_fixed< T, 3, 3 > const &  M  ) 

Definition at line 46 of file vgl_norm_trans_2d.txx.

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

Definition at line 54 of file vgl_norm_trans_2d.txx.

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

Definition at line 31 of file vgl_norm_trans_2d.txx.

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

Definition at line 38 of file vgl_norm_trans_2d.txx.

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

Definition at line 61 of file vgl_norm_trans_2d.txx.


Member Function Documentation

template<class T>
bool vgl_norm_trans_2d< T >::compute_from_points ( vcl_vector< vgl_homg_point_2d< T > > const &  points,
bool  isotropic = true 
)

compute the normalizing transform.

Definition at line 74 of file vgl_norm_trans_2d.txx.

template<class T>
bool vgl_norm_trans_2d< T >::compute_from_lines ( vcl_vector< vgl_homg_line_2d< T > > const &  lines,
bool  isotropic = true 
)

The normalizing transform for lines is computed from the set of points defined by the intersection of the perpendicular from the origin with the line.

Each such point is given by: $p = [-a*c, -b*c, \sqrt(a^2+b^2)]^T$ If we assume the line is normalized then: $p = [-a*c, -b*c, 1]^T$

Definition at line 125 of file vgl_norm_trans_2d.txx.

template<class T>
bool vgl_norm_trans_2d< T >::compute_from_points_and_lines ( vcl_vector< vgl_homg_point_2d< T > > const &  pts,
vcl_vector< vgl_homg_line_2d< T > > const &  lines,
bool  isotropic = true 
)

The normalizing transform for points and lines is computed from the set of points used by compute_from_points() & the one used by compute_from_lines().

Definition at line 146 of file vgl_norm_trans_2d.txx.

template<class T>
bool vgl_norm_trans_2d< T >::scale_xyroot2 ( vcl_vector< vgl_homg_point_2d< T > > const &  in,
T &  radius 
) [static, protected]

Definition at line 199 of file vgl_norm_trans_2d.txx.

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

Definition at line 166 of file vgl_norm_trans_2d.txx.

template<class T>
bool vgl_norm_trans_2d< T >::scale_aniostropic ( vcl_vector< vgl_homg_point_2d< T > > const &  in,
T &  sdx,
T &  sdy,
T &  c,
T &  s 
) [static, protected]

Definition at line 229 of file vgl_norm_trans_2d.txx.

template<class T>
vgl_homg_point_2d< T > vgl_h_matrix_2d< T >::operator() ( vgl_homg_point_2d< T > const &  p  )  const [inherited]

Definition at line 75 of file vgl_h_matrix_2d.txx.

template<class T>
vgl_conic< T > vgl_h_matrix_2d< T >::operator() ( vgl_conic< T > const &  C  )  const [inherited]

assumed to be a point conic.

Definition at line 110 of file vgl_h_matrix_2d.txx.

template<class T>
vgl_homg_line_2d< T > vgl_h_matrix_2d< T >::operator() ( vgl_homg_line_2d< T > const &  l  )  const [inherited]

Definition at line 147 of file vgl_h_matrix_2d.txx.

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

Definition at line 52 of file vgl_h_matrix_2d.h.

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

Definition at line 66 of file vgl_h_matrix_2d.h.

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

Composition.

Definition at line 69 of file vgl_h_matrix_2d.h.

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

Definition at line 53 of file vgl_h_matrix_2d.h.

template<class T>
vgl_homg_line_2d< T > vgl_h_matrix_2d< T >::preimage ( vgl_homg_line_2d< T > const &  l  )  const [inherited]

Definition at line 84 of file vgl_h_matrix_2d.txx.

template<class T>
vgl_homg_point_2d< T > vgl_h_matrix_2d< T >::preimage ( vgl_homg_point_2d< T > const &  p  )  const [inherited]

Definition at line 138 of file vgl_h_matrix_2d.txx.

template<class T>
vgl_conic< T > vgl_h_matrix_2d< T >::preimage ( vgl_conic< T > const &  C  )  const [inherited]

Definition at line 123 of file vgl_h_matrix_2d.txx.

template<class T>
vgl_homg_line_2d< T > vgl_h_matrix_2d< T >::correlation ( vgl_homg_point_2d< T > const &  p  )  const [inherited]

Definition at line 93 of file vgl_h_matrix_2d.txx.

template<class T>
vgl_homg_point_2d< T > vgl_h_matrix_2d< T >::correlation ( vgl_homg_line_2d< T > const &  l  )  const [inherited]

Definition at line 102 of file vgl_h_matrix_2d.txx.

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

Get matrix element at (row_index, col_index).

Definition at line 192 of file vgl_h_matrix_2d.txx.

template<class T>
void vgl_h_matrix_2d< T >::get ( T *  t_matrix  )  const [inherited]

Fill H with contents of this.

Definition at line 199 of file vgl_h_matrix_2d.txx.

template<class T>
void vgl_h_matrix_2d< T >::get ( vnl_matrix< T > *  t_matrix  )  const [inherited]

Fill H with contents of this.

Definition at line 208 of file vgl_h_matrix_2d.txx.

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

Definition at line 76 of file vgl_h_matrix_2d.h.

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

Return the inverse.

Definition at line 354 of file vgl_h_matrix_2d.txx.

template<class T>
void vgl_h_matrix_2d< T >::set ( const T *  t_matrix  )  [inherited]

Set to 3x3 row-stored matrix.

Definition at line 222 of file vgl_h_matrix_2d.txx.

template<class T>
void vgl_h_matrix_2d< T >::set ( vnl_matrix_fixed< T, 3, 3 > const &  t_matrix  )  [inherited]

Set to given vnl_matrix.

Definition at line 231 of file vgl_h_matrix_2d.txx.

template<class T>
void vgl_h_matrix_2d< T >::set_identity (  )  [inherited]

initialize the transformation to identity.

Definition at line 215 of file vgl_h_matrix_2d.txx.

template<class T>
void vgl_h_matrix_2d< T >::set_translation ( const T  tx,
const T  ty 
) [inherited]

set T[0][2] = tx and T[1][2] = ty, other elements unaltered.

Definition at line 363 of file vgl_h_matrix_2d.txx.

template<class T>
void vgl_h_matrix_2d< T >::set_rotation ( const T  theta  )  [inherited]

the upper 2x2 part of the matrix is replaced by a rotation matrix.

theta is in radians

Definition at line 370 of file vgl_h_matrix_2d.txx.

template<class T>
void vgl_h_matrix_2d< T >::set_scale ( const T  scale  )  [inherited]

initialize the transform to a scaling transform.

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

Definition at line 386 of file vgl_h_matrix_2d.txx.

template<class T>
void vgl_h_matrix_2d< T >::set_aspect_ratio ( const T  aspect_ratio  )  [inherited]

initialize the transform to a diagonal aspect transform.

$A = [ {array}{ccc} 1 & 0 & 0 \% 0 & a & 0 \% 0 & 0 & 1 {array}]$ , Ta = A*T.

Definition at line 401 of file vgl_h_matrix_2d.txx.

template<class T>
bool vgl_h_matrix_2d< T >::projective_basis ( vcl_vector< vgl_homg_point_2d< T > > const &  four_points  )  [inherited]

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] \% 1 & 0 & 0 & 1 \% 0 & 1 & 0 & 1 \% 0 & 0 & 1 & 1 {array}$

Definition at line 239 of file vgl_h_matrix_2d.txx.

template<class T>
bool vgl_h_matrix_2d< T >::projective_basis ( vcl_vector< vgl_homg_line_2d< T > > const &  four_lines  )  [inherited]

transformation to projective basis (canonical frame).

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

Definition at line 294 of file vgl_h_matrix_2d.txx.

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

Read H from vcl_istream.

Definition at line 172 of file vgl_h_matrix_2d.txx.

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

Read H from file.

Definition at line 179 of file vgl_h_matrix_2d.txx.


Member Data Documentation

template<class T>
vnl_matrix_fixed<T,3,3> vgl_h_matrix_2d< T >::t12_matrix_ [protected, inherited]

Definition at line 34 of file vgl_h_matrix_2d.h.


The documentation for this class was generated from the following files:
Generated on Mon Mar 8 05:07:56 2010 for core/vgl by  doxygen 1.5.1