#include <FMatrixCompute7Point.h>
Public Member Functions | |
FMatrixCompute7Point (bool precondition=true, bool rank2_truncate=true) | |
Initialize FMatrixCompute7Point object. | |
bool | compute (PairMatchSetCorner &, vcl_vector< FMatrix * > &) |
Compute a fundamental matrix for a set of point matches. | |
bool | compute (vcl_vector< HomgPoint2D > &, vcl_vector< HomgPoint2D > &, vcl_vector< FMatrix * > &) |
Interface to above using arrays of HomgPoint2D. | |
bool | compute (vcl_vector< vgl_homg_point_2d< double > > &points1, vcl_vector< vgl_homg_point_2d< double > > &points2, vcl_vector< FMatrix * > &) |
Interface to above using arrays of vgl_homg_point_2d. | |
bool | compute_preconditioned (vcl_vector< HomgPoint2D > &, vcl_vector< HomgPoint2D > &, vcl_vector< FMatrix * > &) |
Interface to above using preconditioned points. | |
bool | compute_preconditioned (vcl_vector< vgl_homg_point_2d< double > > &points1, vcl_vector< vgl_homg_point_2d< double > > &points2, vcl_vector< FMatrix * > &) |
Interface to above using preconditioned points. | |
Static Protected Member Functions | |
static vcl_vector< double > | GetCoef (FMatrix const &F1, FMatrix const &F2) |
static vcl_vector< double > | solve_quadratic (vcl_vector< double > v) |
Gives solutions to 0x^3 + ax^2 + bx + c = 0. | |
static vcl_vector< double > | solve_cubic (vcl_vector< double > v) |
Solves a cubic and returns the real solutions. | |
Protected Attributes | |
bool | precondition_ |
bool | rank2_truncate_ |
Definition at line 34 of file FMatrixCompute7Point.h.
FMatrixCompute7Point::FMatrixCompute7Point | ( | bool | precondition = true , |
bool | rank2_truncate = true |
||
) |
Initialize FMatrixCompute7Point object.
If precondition = false, points are not conditioned prior to computation. If rank2_truncate = false, the resulting solution is not forced to rank 2 using the vnl_svd<double>.
Definition at line 21 of file FMatrixCompute7Point.cxx.
bool FMatrixCompute7Point::compute | ( | PairMatchSetCorner & | matches, |
vcl_vector< FMatrix * > & | F | ||
) |
Compute a fundamental matrix for a set of point matches.
Compute a fundamental matrix for a set of 7 point matches.
Return false if the calculation fails or there are fewer than seven point matches in the list.
Return false if the calculation fails or there are fewer than eight point matches in the list.
Definition at line 34 of file FMatrixCompute7Point.cxx.
bool FMatrixCompute7Point::compute | ( | vcl_vector< HomgPoint2D > & | points1, |
vcl_vector< HomgPoint2D > & | points2, | ||
vcl_vector< FMatrix * > & | F | ||
) |
Interface to above using arrays of HomgPoint2D.
Makes a PairMatchSetCorner, and then calls the compute method above.
Definition at line 80 of file FMatrixCompute7Point.cxx.
bool FMatrixCompute7Point::compute | ( | vcl_vector< vgl_homg_point_2d< double > > & | points1, |
vcl_vector< vgl_homg_point_2d< double > > & | points2, | ||
vcl_vector< FMatrix * > & | F | ||
) |
Interface to above using arrays of vgl_homg_point_2d.
Makes a PairMatchSetCorner, and then calls the compute method with PairMatchSetCorner argument.
Definition at line 44 of file FMatrixCompute7Point.cxx.
bool FMatrixCompute7Point::compute_preconditioned | ( | vcl_vector< HomgPoint2D > & | points1, |
vcl_vector< HomgPoint2D > & | points2, | ||
vcl_vector< FMatrix * > & | F | ||
) |
Interface to above using preconditioned points.
Definition at line 157 of file FMatrixCompute7Point.cxx.
bool FMatrixCompute7Point::compute_preconditioned | ( | vcl_vector< vgl_homg_point_2d< double > > & | points1, |
vcl_vector< vgl_homg_point_2d< double > > & | points2, | ||
vcl_vector< FMatrix * > & | F | ||
) |
Interface to above using preconditioned points.
Definition at line 113 of file FMatrixCompute7Point.cxx.
vcl_vector< double > FMatrixCompute7Point::GetCoef | ( | FMatrix const & | F1, |
FMatrix const & | F2 | ||
) | [static, protected] |
Definition at line 201 of file FMatrixCompute7Point.cxx.
vcl_vector< double > FMatrixCompute7Point::solve_cubic | ( | vcl_vector< double > | v | ) | [static, protected] |
Solves a cubic and returns the real solutions.
Thus it returns a list of length 1 if there are 2 complex roots and 1 real, of length 2 if it is in fact a quadratic with 2 solutions, of length 3 if there are 3 real solutions a x^3 + b x^2 + c x + d = 0 Rewritten and documented by Peter Vanroose, 23 October 2001.
Definition at line 266 of file FMatrixCompute7Point.cxx.
vcl_vector< double > FMatrixCompute7Point::solve_quadratic | ( | vcl_vector< double > | v | ) | [static, protected] |
Gives solutions to 0x^3 + ax^2 + bx + c = 0.
Returns the set of real solutions, so if both are imaginary it returns an empty list, otherwise a list of length two. v is a 4-vector of which the first element is ignored.
Definition at line 232 of file FMatrixCompute7Point.cxx.
bool FMatrixCompute7Point::precondition_ [protected] |
Definition at line 73 of file FMatrixCompute7Point.h.
bool FMatrixCompute7Point::rank2_truncate_ [protected] |
Definition at line 74 of file FMatrixCompute7Point.h.