Go to the documentation of this file.00001
00002 #ifndef vgl_norm_trans_2d_h_
00003 #define vgl_norm_trans_2d_h_
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #include <vnl/vnl_matrix_fixed.h>
00032 #include <vgl/vgl_homg_point_2d.h>
00033 #include <vgl/vgl_homg_line_2d.h>
00034 #include <vcl_iosfwd.h>
00035 #include <vgl/algo/vgl_h_matrix_2d.h>
00036
00037 template <class T>
00038 class vgl_norm_trans_2d: public vgl_h_matrix_2d<T>
00039 {
00040 public:
00041
00042
00043
00044 vgl_norm_trans_2d();
00045 vgl_norm_trans_2d(const vgl_norm_trans_2d<T>& M);
00046 vgl_norm_trans_2d(vnl_matrix_fixed<T,3,3> const& M);
00047 vgl_norm_trans_2d(const T* t_matrix);
00048 vgl_norm_trans_2d(vcl_istream& s);
00049 vgl_norm_trans_2d(char const* filename);
00050 ~vgl_norm_trans_2d();
00051
00052
00053
00054
00055 bool compute_from_points(vcl_vector<vgl_homg_point_2d<T> > const& points,
00056 bool isotropic = true);
00057 bool compute_from_lines(vcl_vector<vgl_homg_line_2d<T> > const& lines,
00058 bool isotropic = true);
00059 bool
00060 compute_from_points_and_lines(vcl_vector<vgl_homg_point_2d<T> > const& pts,
00061 vcl_vector<vgl_homg_line_2d<T> > const& lines
00062 , bool isotropic = true);
00063
00064 protected :
00065
00066
00067 static bool scale_xyroot2(vcl_vector<vgl_homg_point_2d<T> > const& in,
00068 T& radius);
00069
00070 static void center_of_mass(vcl_vector<vgl_homg_point_2d<T> > const& points,
00071 T& cx, T& cy);
00072
00073 static bool scale_aniostropic(vcl_vector<vgl_homg_point_2d<T> > const& in,
00074 T& sdx, T& sdy, T& c, T& s);
00075 };
00076
00077 #define VGL_NORM_TRANS_2D_INSTANTIATE(T) extern "please include vgl/algo/vgl_norm_trans_2d.txx first"
00078
00079 #endif // vgl_norm_trans_2d_h_