contrib/rpl/rgrl/rgrl_est_rigid.h
Go to the documentation of this file.
00001 #ifndef rgrl_est_rigid_h_
00002 #define rgrl_est_rigid_h_
00003 
00004 //:
00005 // \file
00006 // \author Tomasz Malisiewicz
00007 // \date   March 2004
00008 
00009 #include "rgrl_estimator.h"
00010 #include <vcl_vector.h>
00011 #include "rgrl_trans_rigid.h"
00012 
00013 //: Rigid transform estimator
00014 //
00015 class rgrl_est_rigid
00016   : public rgrl_nonlinear_estimator
00017 {
00018  public:
00019   // Constructor which takes the dimension of the dataset that the
00020   // estimator will be applied on.
00021   rgrl_est_rigid( unsigned int dimension);
00022 
00023   //: Estimates a rigid transform.
00024   //
00025   // The return pointer is to a rgrl_trans_rigid object.
00026   //
00027   // \sa rgrl_estimator::estimate
00028   //
00029   rgrl_transformation_sptr
00030   estimate( rgrl_set_of<rgrl_match_set_sptr> const& matches,
00031             rgrl_transformation const& cur_transform ) const;
00032 
00033 
00034   //: Estimates a rigid transform.
00035   //
00036   // The return pointer is to a rgrl_trans_rigid object.
00037   //
00038   // \sa rgrl_estimator::estimate
00039   //
00040   rgrl_transformation_sptr
00041   estimate( rgrl_match_set_sptr matches,
00042             rgrl_transformation const& cur_transform ) const;
00043 
00044   //: Type of transformation estimated by this estimator.
00045   const vcl_type_info& transformation_type() const;
00046 
00047   //: Determine the covariance matrix of this rigid xform given the matches
00048   void determine_covariance( rgrl_set_of<rgrl_match_set_sptr> const& matches, rgrl_transformation_sptr current_trans) const;
00049 
00050   //: Return the estimation statistics
00051   //  for each iteration, the stats are
00052   //    "determinant of DeltaR before orthonormalization",
00053   //    "fro norm of orthonormalized DeltaR - I",
00054   //    "fro norm of DeltaTrans"
00055   inline vcl_vector<vcl_vector<double> > const& get_stats() { return this->stats; }
00056 
00057   // Defines type-related functions
00058   rgrl_type_macro( rgrl_est_rigid, rgrl_nonlinear_estimator );
00059 
00060  protected:
00061   vcl_vector<vcl_vector<double> > stats;
00062 };
00063 
00064 #endif // rgrl_est_rigid_h_