contrib/oxl/mvl/HMatrix2DComputeMLESAC.h
Go to the documentation of this file.
00001 #ifndef HMatrix2DComputeMLESAC_h_
00002 #define HMatrix2DComputeMLESAC_h_
00003 //:
00004 // \file
00005 // \brief Robust HMatrix computation
00006 //
00007 //  HMatrix2DComputeMLESAC implements
00008 //  Phil Torr's MLESAC (Maximum Likelihood Estimation) of the projective matrix.
00009 //  (or homography)
00010 //
00011 //  Points are preconditioned as described in [Hartley, ``In defense of
00012 //  the 8-point algorithm'', ICCV95].
00013 //    The conditioning and truncation are optional and may be
00014 //  omitted. The MLESAC class is also responsible for maintaining the inliers
00015 //  passed in the PairMatchSetCorner class.
00016 //
00017 // \author
00018 //     David N. McKinnon, UQ I.R.I.S., 23.01.2001
00019 //
00020 // \verbatim
00021 //  Modifications
00022 //   22 Oct 2002 - Peter Vanroose - added vgl_homg_point_2d interface
00023 // \endverbatim
00024 //
00025 //-----------------------------------------------------------------------------
00026 
00027 #include <vgl/vgl_fwd.h>
00028 #include <mvl/HMatrix2DComputeRobust.h>
00029 #include <mvl/HMatrix2DCompute4Point.h>
00030 #include <mvl/HMatrix2D.h>
00031 #include <mvl/AffineMetric.h>
00032 #include <vcl_vector.h>
00033 
00034 class HMatrix2DComputeMLESAC : public HMatrix2DComputeRobust
00035 {
00036  public:
00037   //: Initialize HMatrix2DComputeRobust object.
00038   HMatrix2DComputeMLESAC(double std);
00039   virtual ~HMatrix2DComputeMLESAC();
00040 
00041   virtual double calculate_term(vcl_vector<double>& residuals,
00042                                 vcl_vector<bool>& inlier_list,
00043                                 int& count);
00044   virtual double calculate_residual(HomgPoint2D& one,
00045                                     HomgPoint2D& two,
00046                                     HMatrix2D* F);
00047   virtual double calculate_residual(vgl_homg_point_2d<double>& one,
00048                                     vgl_homg_point_2d<double>& two,
00049                                     HMatrix2D* F);
00050 };
00051 
00052 #endif // HMatrix2DComputeMLESAC_h_