latest version v1.9 - last update 10 Apr 2010 |
This Algorithm determines the fundamental matrix from point correnspondences in two images. More...
#include <ltiFMatrixSolverLMS.h>
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 |
fundamentalMatrixSolverLMS & | copy (const fundamentalMatrixSolverLMS &other) |
fundamentalMatrixSolverLMS & | operator= (const fundamentalMatrixSolverLMS &other) |
virtual functor * | clone () const |
const parameters & | getParameters () 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 |
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
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
lti::fundamentalMatrixSolverLMS::fundamentalMatrixSolverLMS | ( | ) |
default constructor
lti::fundamentalMatrixSolverLMS::fundamentalMatrixSolverLMS | ( | const fundamentalMatrixSolverLMS & | other | ) |
copy constructor
other | the object to be copied |
virtual lti::fundamentalMatrixSolverLMS::~fundamentalMatrixSolverLMS | ( | ) | [virtual] |
destructor
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)
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.
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 |
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.
other | the functor to be copied |
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 | ) |