Go to the documentation of this file.00001 #ifndef rgrl_scale_est_closest_h_
00002 #define rgrl_scale_est_closest_h_
00003
00004
00005
00006
00007
00008
00009 #include "rgrl_scale_estimator.h"
00010
00011 #include <vcl_memory.h>
00012 #include <vnl/vnl_matrix.h>
00013
00014 class rrel_objective;
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 class rgrl_scale_est_closest
00029 : public rgrl_scale_estimator
00030 {
00031 public:
00032
00033
00034
00035
00036
00037 rgrl_scale_est_closest( vcl_auto_ptr<rrel_objective> obj,
00038 bool do_signature_scale = false );
00039
00040 ~rgrl_scale_est_closest();
00041
00042 rgrl_scale_sptr
00043 estimate_unweighted( rgrl_match_set const& match_set,
00044 rgrl_scale_sptr const& current_scales,
00045 bool penalize_scaling = false ) const;
00046
00047 rgrl_scale_sptr
00048 estimate_weighted( rgrl_match_set const& match_set,
00049 rgrl_scale_sptr const& current_scales,
00050 bool use_signature_only = false,
00051 bool penalize_scaling = false) const;
00052
00053
00054 rgrl_type_macro( rgrl_scale_est_closest, rgrl_scale_estimator );
00055
00056 private:
00057
00058 rgrl_scale_est_closest( rgrl_scale_est_closest const& );
00059 rgrl_scale_est_closest& operator=( rgrl_scale_est_closest const& );
00060
00061 bool
00062 compute_geometric_scale( double& scale,
00063 rgrl_match_set const& match_set,
00064 bool penalize_scaling ) const;
00065
00066 bool
00067 compute_signature_inv_covar( vnl_matrix<double>&covar,
00068 rgrl_match_set const& match_set ) const;
00069
00070 protected:
00071 bool do_signature_scale_;
00072 vcl_auto_ptr<rrel_objective> obj_;
00073 };
00074
00075 #endif // rgrl_scale_est_closest_h_