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

The objective function for RANSAC. More...

#include <rrel_ransac_obj.h>

Inheritance diagram for rrel_ransac_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_ransac_obj (double scale_mult=2.0)
 Constructor.
 ~rrel_ransac_obj ()
 Destructor.
virtual double fcn (vect_const_iter res_begin, vect_const_iter res_end, vect_const_iter scale_begin, vnl_vector< double > *=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 > *=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 scale_mult_

Detailed Description

The objective function for RANSAC.

The RANSAC objective function is 0 for residuals whose magnitude is less than a threshold, and 1 otherwise. This loss function is really here only for historical purposes and should not be used in practice. Smooth loss functions should be used. This is shown in a practical sense in Torr and Zisserman, CVIU, April 2000 and in a theoretical sense in Stewart, PAMI, August 1997.

Definition at line 19 of file rrel_ransac_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_ransac_obj::rrel_ransac_obj ( double  scale_mult = 2.0)

Constructor.

The threshold is scale_mult*prior_scale, where prior scale is supplied by the problem.

Definition at line 4 of file rrel_ransac_obj.cxx.

rrel_ransac_obj::~rrel_ransac_obj ( )

Destructor.

Definition at line 9 of file rrel_ransac_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_ransac_obj::fcn ( vect_const_iter  res_begin,
vect_const_iter  res_end,
vect_const_iter  scale_begin,
vnl_vector< double > *  = 0 
) const [virtual]

Evaluate the objective function on heteroscedastic residuals.

See also:
rrel_objective::fcn.

Implements rrel_objective.

Definition at line 15 of file rrel_ransac_obj.cxx.

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

Evaluate the objective function on homoscedastic residuals.

See also:
rrel_objective::fcn.

Implements rrel_objective.

Definition at line 31 of file rrel_ransac_obj.cxx.

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

True.

Using a RANSAC objective with an estimated scale doesn't make sense, because the any scale estimate tends to be inaccurate and RANSAC is sensitive to the threshold (and hence the scale).

Implements rrel_objective.

Definition at line 45 of file rrel_ransac_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_ransac_obj::scale_mult_ [protected]

Definition at line 49 of file rrel_ransac_obj.h.


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