contrib/rpl/rgrl/rgrl_est_quadratic.h
Go to the documentation of this file.
00001 #ifndef rgrl_est_quadratic_h_
00002 #define rgrl_est_quadratic_h_
00003 
00004 //:
00005 // \file
00006 // \author Amitha Perera
00007 // \date   Feb 2003
00008 
00009 #include "rgrl_estimator.h"
00010 
00011 //: Quadratic transform estimator
00012 //
00013 class rgrl_est_quadratic
00014   : public rgrl_linear_estimator
00015 {
00016 public:
00017   //: Default constructor
00018   //
00019   // Does nothing. This constructor is adequate for algorithms that
00020   // call \a estimate(.) fucntion only. An example of the algorithm is
00021   // the rgrl_feature_based_registration.
00022   rgrl_est_quadratic();
00023 
00024   // Constructor which takes the dimension of the dataset that the
00025   // estimator will be applied on.
00026   //
00027   rgrl_est_quadratic( unsigned int dimension,
00028                       double condition_num_thrd = 0.0);
00029 
00030   //: Estimates an quadratic transform.
00031   //
00032   // The return pointer is to a rgrl_trans_quadratic object.
00033   //
00034   // \sa rgrl_estimator::estimate
00035   //
00036   rgrl_transformation_sptr
00037   estimate( rgrl_set_of<rgrl_match_set_sptr> const& matches,
00038             rgrl_transformation const& cur_transform ) const;
00039 
00040 
00041   //: Estimates an quadratic transform.
00042   //
00043   // The return pointer is to a rgrl_trans_quadratic object.
00044   //
00045   // \sa rgrl_estimator::estimate
00046   //
00047   rgrl_transformation_sptr
00048   estimate( rgrl_match_set_sptr matches,
00049             rgrl_transformation const& cur_transform ) const;
00050 
00051   //: Type of transformation estimated by this estimator.
00052   const vcl_type_info& transformation_type() const;
00053 
00054   // Defines type-related functions
00055   rgrl_type_macro( rgrl_est_quadratic, rgrl_linear_estimator );
00056   
00057 private:
00058   //: Return maximum of 9 elements
00059   double max_of_9_elements(double elt1, double elt2, double elt3, 
00060                            double elt4, double elt5, double elt6,  
00061                            double elt7, double elt8, double elt9 ) const;
00062 private:
00063   double condition_num_thrd_;
00064 
00065 };
00066 
00067 #endif // rgrl_est_quadratic_h_