Go to the documentation of this file.00001 #ifndef rgrl_est_homography2d_h_
00002 #define rgrl_est_homography2d_h_
00003
00004
00005
00006
00007
00008
00009 #include <rgrl/rgrl_estimator.h>
00010
00011
00012
00013 class rgrl_est_homography2d
00014 : public rgrl_linear_estimator
00015 {
00016 public:
00017
00018
00019 rgrl_est_homography2d( double condition_num_thrd = 0.0 );
00020
00021
00022
00023
00024
00025
00026
00027 rgrl_transformation_sptr
00028 estimate( rgrl_set_of<rgrl_match_set_sptr> const& matches,
00029 rgrl_transformation const& cur_transform ) const;
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 rgrl_transformation_sptr
00040 estimate( rgrl_match_set_sptr matches,
00041 rgrl_transformation const& cur_transform ) const;
00042
00043
00044 const vcl_type_info& transformation_type() const;
00045
00046
00047 rgrl_type_macro( rgrl_est_homography2d, rgrl_linear_estimator );
00048
00049 private:
00050 bool normalize( rgrl_set_of<rgrl_match_set_sptr> const& matches,
00051 vcl_vector< vnl_vector<double> >& norm_froms,
00052 vcl_vector< vnl_vector<double> >& norm_tos,
00053 vcl_vector< double >& wgts,
00054 double& from_scale,
00055 double& to_scale,
00056 vnl_vector< double > & from_center,
00057 vnl_vector< double > & to_center ) const;
00058 void estimate_covariance( const vcl_vector< vnl_vector<double> >& norm_froms,
00059 const vcl_vector< vnl_vector<double> >& norm_tos,
00060 const vcl_vector< double >& wgts,
00061 double from_scale,
00062 double to_scale,
00063 vnl_matrix<double>& covar ) const;
00064
00065 private:
00066 double condition_num_thrd_;
00067 };
00068
00069 #endif