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

The Least-Trimmed-Squares (LTS) objective function. More...

#include <rrel_lts_obj.h>

Inheritance diagram for rrel_lts_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_lts_obj (unsigned int num_sam_inst, double inlier_frac=0.5)
 Constructor.
 ~rrel_lts_obj ()
virtual double fcn (vect_const_iter res_begin, vect_const_iter res_end, vect_const_iter, vnl_vector< double > *=0) const
 Evaluate the objective function on heteroscedastic residuals.
virtual double fcn (vect_const_iter begin, vect_const_iter end, double=0, vnl_vector< double > *=0) const
 Evaluate the objective function on homoscedastic residuals.
virtual bool requires_prior_scale () const
 False.
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

unsigned int num_sam_inst_
 Number of samples needed for a unique fit = number of dependent residuals.
double inlier_frac_

Detailed Description

The Least-Trimmed-Squares (LTS) objective function.

The Least-Trimmed-of-Squares algorithm was defined in a 1984 Journal of the American Statistical Association paper by Peter Rousseeuw (vol 79, pp 871-880). (See Stewart, "Robust Parameter Estimation in Computer Vision", SIAM Reviews 41, Sept 1999.) The class implemented here gives the objective function for that algorithm. It is computed from a set of (signed) residuals. The objective function is the sum of the squares of the first (increased order) inlier_frac squared residuals. The default inlier_frac is 0.5, but it could be any value. The search algorithm is implemented in rrel_ran_sam_search.

Definition at line 22 of file rrel_lts_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_lts_obj::rrel_lts_obj ( unsigned int  num_sam_inst,
double  inlier_frac = 0.5 
)

Constructor.

num_sam_inst is the minimum number of samples needed for a unique parameter estimate. That is, num_sam_inst should be set to rrel_estimation_problem::num_samples_to_instantiate(). inlier_frac is the minimum expected number of inlier residuals. In general, inlier_frac should be 1 minus the maximum expected fraction of outliers. If the maximum expected fraction of outliers is not known, then the MUSE objective function should be used.

Definition at line 11 of file rrel_lts_obj.cxx.

rrel_lts_obj::~rrel_lts_obj ( )

Definition at line 17 of file rrel_lts_obj.cxx.


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_lts_obj::fcn ( vect_const_iter  res_begin,
vect_const_iter  res_end,
vect_const_iter  ,
vnl_vector< double > *  = 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_lts_obj.cxx.

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

Evaluate the objective function on homoscedastic residuals.

See also:
rrel_objective::fcn.

Implements rrel_objective.

Definition at line 32 of file rrel_lts_obj.cxx.

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

False.

The LTS objective is based on order statistics, and does not require any scale parameter, estimated or otherwise.

Implements rrel_objective.

Definition at line 53 of file rrel_lts_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_lts_obj::inlier_frac_ [protected]

Definition at line 59 of file rrel_lts_obj.h.

unsigned int rrel_lts_obj::num_sam_inst_ [protected]

Number of samples needed for a unique fit = number of dependent residuals.

Definition at line 58 of file rrel_lts_obj.h.


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