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