Image Component Library (ICL)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions | Private Types
icl::math::LeastSquareModelFitting2D Class Reference

Direct Least Square Fitting specialization for 2D input data. More...

#include <LeastSquareModelFitting2D.h>

Inheritance diagram for icl::math::LeastSquareModelFitting2D:
icl::math::LeastSquareModelFitting< double, utils::Point32f >

List of all members.

Public Member Functions

 LeastSquareModelFitting2D ()
 Default constructor for creating dummy instances.
 LeastSquareModelFitting2D (int modelDim, DesignMatrixGen gen, DynMatrix< double > *constraintMatrix=0)
 Constructor with given parameters.
std::vector< double > fit (const std::vector< utils::Point32f > &points)
 fits the model to the given data points and returns optimal parameter set
icl64f getError (const std::vector< double > &model, const utils::Point32f &p)
 computes the error for a given data point

Static Public Member Functions

static void line_gen (const utils::Point32f &p, double *d)
 DesignMatrixGenerator for the 3-parameter line model.
static void circle_gen (const utils::Point32f &p, double *d)
 DesignMatrixGenerator for the 4 parameter circle model.
static void restr_ellipse_gen (const utils::Point32f &p, double *d)
 DesignMatrixGenerator for the 5 parameter restricted ellipse model.
static void ellipse_gen (const utils::Point32f &p, double *d)
 DesignMatrixGenerator for the 6 parameter general ellipse model.

Private Types

typedef
LeastSquareModelFitting
< double, utils::Point32f
Super
 super type

Detailed Description

Direct Least Square Fitting specialization for 2D input data.

Specialized least square model fitting for 2D data. Also some special desing matrix creation methods are provided


Member Typedef Documentation

super type


Constructor & Destructor Documentation

Default constructor for creating dummy instances.

icl::math::LeastSquareModelFitting2D::LeastSquareModelFitting2D ( int  modelDim,
DesignMatrixGen  gen,
DynMatrix< double > *  constraintMatrix = 0 
) [inline]

Constructor with given parameters.


Member Function Documentation

static void icl::math::LeastSquareModelFitting2D::circle_gen ( const utils::Point32f p,
double *  d 
) [inline, static]

DesignMatrixGenerator for the 4 parameter circle model.

See also:
LeastSquareModelFitting
static void icl::math::LeastSquareModelFitting2D::ellipse_gen ( const utils::Point32f p,
double *  d 
) [inline, static]

DesignMatrixGenerator for the 6 parameter general ellipse model.

See also:
LeastSquareModelFitting
std::vector<double> icl::math::LeastSquareModelFitting2D::fit ( const std::vector< utils::Point32f > &  points) [inline]

fits the model to the given data points and returns optimal parameter set

Internally we use a workaround when the matrix inversion fails due to stability problems. If the standard matrix inversion fails, a SVD-based inversion is used

create design matrix D

create the scatter matrix S

use eigen vector for the largest eigen value

Reimplemented from icl::math::LeastSquareModelFitting< double, utils::Point32f >.

icl64f icl::math::LeastSquareModelFitting2D::getError ( const std::vector< double > &  model,
const utils::Point32f p 
) [inline]

computes the error for a given data point

if model is 0, the last fitted model is used

Reimplemented from icl::math::LeastSquareModelFitting< double, utils::Point32f >.

static void icl::math::LeastSquareModelFitting2D::line_gen ( const utils::Point32f p,
double *  d 
) [inline, static]

DesignMatrixGenerator for the 3-parameter line model.

See also:
LeastSquareModelFitting
static void icl::math::LeastSquareModelFitting2D::restr_ellipse_gen ( const utils::Point32f p,
double *  d 
) [inline, static]

DesignMatrixGenerator for the 5 parameter restricted ellipse model.

See also:
LeastSquareModelFitting

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines