00001 #ifndef rgrl_est_homo2d_proj_rad_h_ 00002 #define rgrl_est_homo2d_proj_rad_h_ 00003 //: 00004 // \file 00005 // \author Gehua Yang 00006 // \date March 2007 00007 00008 #include <rgrl/rgrl_estimator.h> 00009 #include <vnl/vnl_double_2.h> 00010 00011 //: homography2D transform estimator using the new proj function defined in rgrl_est_proj_func 00012 class rgrl_est_homo2d_proj_rad 00013 : public rgrl_nonlinear_estimator 00014 { 00015 public: 00016 //: Default constructor 00017 rgrl_est_homo2d_proj_rad( unsigned int rad_dof, 00018 vnl_vector_fixed<double, 2> const& to_camera_centre, 00019 bool with_grad = true ); 00020 00021 //: Estimates homography transformation 00022 // \sa rgrl_estimator::estimate 00023 rgrl_transformation_sptr 00024 estimate( rgrl_set_of<rgrl_match_set_sptr> const& matches, 00025 rgrl_transformation const& cur_transform ) const; 00026 00027 // import base class estimate function 00028 using rgrl_nonlinear_estimator::estimate; 00029 00030 //: Type of transformation estimated by this estimator. 00031 const vcl_type_info& transformation_type() const; 00032 00033 //: Name of transformation estimated by this estimator. 00034 const vcl_string transformation_name() const 00035 { return transform_name_; } 00036 00037 // Defines type-related functions 00038 rgrl_type_macro( rgrl_est_homo2d_proj_rad, rgrl_nonlinear_estimator ); 00039 00040 private: 00041 vnl_double_2 to_camera_centre_; 00042 unsigned int camera_dof_; 00043 vcl_string transform_name_; 00044 bool with_grad_; 00045 }; 00046 00047 #endif // rgrl_est_homo2d_proj_rad_h_