LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::fundamentalMatrixSolverLMS Class Reference

This Algorithm determines the fundamental matrix from point correnspondences in two images. More...

#include <ltiFMatrixSolverLMS.h>

Inheritance diagram for lti::fundamentalMatrixSolverLMS:
Inheritance graph
[legend]
Collaboration diagram for lti::fundamentalMatrixSolverLMS:
Collaboration graph
[legend]

List of all members.

Classes

class  parameters
 the parameters for the class fundamentalMatrixSolverLMS More...

Public Member Functions

 fundamentalMatrixSolverLMS ()
 fundamentalMatrixSolverLMS (const fundamentalMatrixSolverLMS &other)
virtual ~fundamentalMatrixSolverLMS ()
virtual const char * getTypeName () const
bool apply (const tpointList< double > &l1, const tpointList< double > &l2, matrix< double > &fMatrix) const
bool apply (const pointList &l1, const pointList &l2, matrix< double > &fMatrix) const
fundamentalMatrixSolverLMScopy (const fundamentalMatrixSolverLMS &other)
fundamentalMatrixSolverLMSoperator= (const fundamentalMatrixSolverLMS &other)
virtual functorclone () const
const parametersgetParameters () const
void buildPointMatrix (const tpointList< double > &l1, const tpointList< double > &l2, matrix< double > &pointMatrix) const
double calcResidual (const matrix< double > &pointMatrix, const matrix< double > &fundMatrix, vector< double > &resid) const

Detailed Description

This Algorithm determines the fundamental matrix from point correnspondences in two images.

It is the least median of squares method (LMS).

Algorithm outline:

For each iteration

  1. choose a subset of 8 points randomly the algorithm also works with more than 8 points, what could be interesting to increase the accuracy of the result when the used samples are all inliers (sub-pixel-accuracy)
  1. estimate the fundamental matrix for this subset using singular value decomposition
  1. calculate the residual for all samples (we have choosen to take the distance from the epipolar line in image 2)
  1. take the median of the resulting distances and compare it with the best previous median (and maybe swap) it would also be possible to count the number of conform samples and take the maximum of them this is called RANSAC

This is repeated until a threshold for the median of the residuals or the maximum number of iterations is reached

enforce the rank 2 constraint of the resulting fmatrix


Constructor & Destructor Documentation

lti::fundamentalMatrixSolverLMS::fundamentalMatrixSolverLMS (  ) 

default constructor

lti::fundamentalMatrixSolverLMS::fundamentalMatrixSolverLMS ( const fundamentalMatrixSolverLMS other  ) 

copy constructor

Parameters:
other the object to be copied
virtual lti::fundamentalMatrixSolverLMS::~fundamentalMatrixSolverLMS (  )  [virtual]

destructor


Member Function Documentation

bool lti::fundamentalMatrixSolverLMS::apply ( const pointList l1,
const pointList l2,
matrix< double > &  fMatrix 
) const

operates on the given parameter.

integer vesion (data is converted to floatingpoint)

Returns:
true if apply successful or false otherwise.
bool lti::fundamentalMatrixSolverLMS::apply ( const tpointList< double > &  l1,
const tpointList< double > &  l2,
matrix< double > &  fMatrix 
) const

Computes the fundamental matrix assuming the the corresponding points occupies the same relative position in the lists l1 and l2.

Parameters:
l1 first list of points. It must have the same length t
l2 second list of points
fMatrix the resulting fundamental matrix. It will be a a 3x3 matrix, the fundamental matrix
Returns:
true if apply successful or false otherwise.
void lti::fundamentalMatrixSolverLMS::buildPointMatrix ( const tpointList< double > &  l1,
const tpointList< double > &  l2,
matrix< double > &  pointMatrix 
) const

builds the pointMatrix from the point-correspondences needed for the calculation of the residual

double lti::fundamentalMatrixSolverLMS::calcResidual ( const matrix< double > &  pointMatrix,
const matrix< double > &  fundMatrix,
vector< double > &  resid 
) const

calculates the residual for each point correspondence in our case the residual is the distance of the point to its corresponding epipolar line

virtual functor* lti::fundamentalMatrixSolverLMS::clone (  )  const [virtual]

returns a pointer to a clone of this functor.

Implements lti::functor.

fundamentalMatrixSolverLMS& lti::fundamentalMatrixSolverLMS::copy ( const fundamentalMatrixSolverLMS other  ) 

copy data of "other" functor.

Parameters:
other the functor to be copied
Returns:
a reference to this functor object

Reimplemented from lti::functor.

const parameters& lti::fundamentalMatrixSolverLMS::getParameters (  )  const

returns used parameters

Reimplemented from lti::transform.

virtual const char* lti::fundamentalMatrixSolverLMS::getTypeName (  )  const [virtual]

returns the name of this type ("fundamentalMatrixSolverLMS")

Reimplemented from lti::transform.

fundamentalMatrixSolverLMS& lti::fundamentalMatrixSolverLMS::operator= ( const fundamentalMatrixSolverLMS other  ) 

alias for copy member

Parameters:
other the functor to be copied
Returns:
a reference to this functor object

Reimplemented from lti::functor.


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

Generated on Sat Apr 10 15:27:19 2010 for LTI-Lib by Doxygen 1.6.1