Public Types | Public Member Functions | Protected Attributes
rrel_mlesac_obj Class Reference

MLESAC objective function. More...

#include <rrel_mlesac_obj.h>

Inheritance diagram for rrel_mlesac_obj:
Inheritance graph
[legend]

List of all members.

Public Types

typedef vcl_vector< double >
::const_iterator 
vect_const_iter
 The iterators used to pass in values.
typedef vcl_vector< double >
::iterator 
vect_iter
 The iterators used to pass out values.

Public Member Functions

 rrel_mlesac_obj (unsigned int residual_dof, double outlier_sigma=20.0, double outlier_frac=0.5)
 Constructor.
 ~rrel_mlesac_obj ()
 Destructor.
virtual double fcn (vect_const_iter res_begin, vect_const_iter res_end, vect_const_iter scale_begin, vnl_vector< double > *param_vector=0) const
 Evaluate the objective function on heteroscedastic residuals.
virtual double fcn (vect_const_iter begin, vect_const_iter end, double scale, vnl_vector< double > *param_vector=0) const
 Evaluate the objective function on homoscedastic residuals.
virtual bool requires_prior_scale () const
 True.
virtual bool can_estimate_scale () const
 True if the objective function can estimate scale.
virtual double scale (vect_const_iter, vect_const_iter) const
 Scale estimate.

Protected Attributes

double outlier_sigma_
double outlier_frac_
unsigned int residual_dof_

Detailed Description

MLESAC objective function.

Implements the MLESAC objective as presented in Torr and Zisserman, CVIU 2000. The "cost" is the negative log likelihood of the residuals, assuming that each residual is i.i.d. with a mixture distribution (zero-mean Gaussian modeling the inliers and uniform distribution modeling the outliers). The standard deviation of the Gaussian is the prior scale supplied by the problem or set in the search technique. The width of the uniform distribution is given by outlier_sigma. The mixing parameter is estimated via the EM algorithm.

residual_dof is the number of "error random variables" are combined in computing the residual. In the Torr and Zisserman paper, for example, the residual for homography estimation results from the combination of four errors: one in each coordinate of each point in the correspondence pair. In general, this should be set to rrel_estimation_problem::residual_dof().

Definition at line 35 of file rrel_mlesac_obj.h.


Member Typedef Documentation

typedef vcl_vector<double>::const_iterator rrel_objective::vect_const_iter [inherited]

The iterators used to pass in values.

Since we don't allow member templates, we have to fix on a particular type of container for residuals. Using this typedef will allow things to easily change when member templates are allowed.

Definition at line 27 of file rrel_objective.h.

typedef vcl_vector<double>::iterator rrel_objective::vect_iter [inherited]

The iterators used to pass out values.

Definition at line 30 of file rrel_objective.h.


Constructor & Destructor Documentation

rrel_mlesac_obj::rrel_mlesac_obj ( unsigned int  residual_dof,
double  outlier_sigma = 20.0,
double  outlier_frac = 0.5 
)

Constructor.

residual_dof is the number of "error random variables" are combined in computing the residual. In general, this should be set to rrel_estimation_problem::residual_dof(). outlier_sigma ( $ os $) is the width of the outlier uniform distribution, so that each residual has a $ (1-\gamma)/{os} $ probability of being an outlier, where $ \gamma $ is the fraction of inliers. outlier_frac is the initial value of the mixing parameter for the EM algorithm. It can safely be left at the default.

Definition at line 15 of file rrel_mlesac_obj.cxx.

rrel_mlesac_obj::~rrel_mlesac_obj ( ) [inline]

Destructor.

Definition at line 50 of file rrel_mlesac_obj.h.


Member Function Documentation

virtual bool rrel_objective::can_estimate_scale ( ) const [inline, virtual, inherited]

True if the objective function can estimate scale.

Some objective functions, such as MUSE, can provide an accurate inlier scale estimate.

Reimplemented in rrel_muset_obj, and rrel_lms_obj.

Definition at line 72 of file rrel_objective.h.

double rrel_mlesac_obj::fcn ( vect_const_iter  res_begin,
vect_const_iter  res_end,
vect_const_iter  scale_begin,
vnl_vector< double > *  param_vector = 0 
) const [virtual]

Evaluate the objective function on heteroscedastic residuals.

See also:
rrel_objective::fcn.

Implements rrel_objective.

Definition at line 23 of file rrel_mlesac_obj.cxx.

double rrel_mlesac_obj::fcn ( vect_const_iter  begin,
vect_const_iter  end,
double  scale,
vnl_vector< double > *  param_vector = 0 
) const [virtual]

Evaluate the objective function on homoscedastic residuals.

See also:
rrel_objective::fcn.

Implements rrel_objective.

Definition at line 66 of file rrel_mlesac_obj.cxx.

virtual bool rrel_mlesac_obj::requires_prior_scale ( ) const [inline, virtual]

True.

The MLESAC algorithm is sensitive to the scale, and requires a prior scale.

Implements rrel_objective.

Definition at line 66 of file rrel_mlesac_obj.h.

virtual double rrel_objective::scale ( vect_const_iter  ,
vect_const_iter   
) const [inline, virtual, inherited]

Scale estimate.

The result is undefined if can_estimate_scale() is false.

Reimplemented in rrel_muset_obj, and rrel_lms_obj.

Definition at line 76 of file rrel_objective.h.


Member Data Documentation

double rrel_mlesac_obj::outlier_frac_ [protected]

Definition at line 71 of file rrel_mlesac_obj.h.

double rrel_mlesac_obj::outlier_sigma_ [protected]

Definition at line 70 of file rrel_mlesac_obj.h.

unsigned int rrel_mlesac_obj::residual_dof_ [protected]

Definition at line 72 of file rrel_mlesac_obj.h.


The documentation for this class was generated from the following files: