00001 #ifndef rrel_homography2d_est_aff_h_ 00002 #define rrel_homography2d_est_aff_h_ 00003 //: 00004 // \file 00005 00006 #include <rrel/rrel_homography2d_est.h> 00007 #include <vgl/vgl_fwd.h> 00008 00009 //: Subclass of the generalized 8-DOF homography estimator for affine transformations (6 DOF). 00010 00011 class rrel_homography2d_est_aff : public rrel_homography2d_est 00012 { 00013 public: 00014 00015 //: Constructor from vgl_homg_point_2d's 00016 rrel_homography2d_est_aff( const vcl_vector< vgl_homg_point_2d<double> > & from_pts, 00017 const vcl_vector< vgl_homg_point_2d<double> > & to_pts ); 00018 00019 //: Constructor from vnl_vectors 00020 rrel_homography2d_est_aff( const vcl_vector< vnl_vector<double> > & from_pts, 00021 const vcl_vector< vnl_vector<double> > & to_pts ); 00022 00023 //: Destructor. 00024 virtual ~rrel_homography2d_est_aff(); 00025 00026 //: Convert a homography to a linear parameter list (for estimation). 00027 virtual void homography_to_parameters(const vnl_matrix<double>& m, 00028 vnl_vector<double>& p) const; 00029 00030 //: Convert a linear parameter list (from estimation) to a homography. 00031 virtual void parameters_to_homography(const vnl_vector<double>& p, 00032 vnl_matrix<double>& m) const; 00033 }; 00034 00035 #endif // rrel_homography2d_est_aff_h_