Class FundamentalLinear7
Computes the essential or fundamental matrix using exactly 7 points with linear algebra. The number of required points is reduced from 8 to 7 by enforcing the singularity constraint, det(F) = 0. The number of solutions found is either one or three depending on the number of real roots found in the quadratic.
The computed fundamental matrix follow the following convention (with no noise) for the associated pair:
x2T*F*x1 = 0
x1 = keyLoc and x2 = currLoc.
References:
- R. Hartley, and A. Zisserman, "Multiple View Geometry in Computer Vision", 2nd Ed, Cambridge 2003
-
Field Summary
Fields inherited from class boofcv.alg.geo.f.FundamentalLinear
A, massger, N1, N2, opEssential, opFundamental, solverNull
-
Constructor Summary
ConstructorDescriptionFundamentalLinear7
(boolean computeFundamental) When computing the essential matrix normalization is optional because pixel coordinates -
Method Summary
Modifier and TypeMethodDescriptionstatic void
computeCoefficients
(double x1, double y1, double z1, double x2, double y2, double z2, double[] coefs) static void
computeCoefficients
(DMatrixRMaj F1, DMatrixRMaj F2, double[] coefs) Computes the coefficients such that the following is true:
det(&alpha*F1 + (1-α)*F2 ) = c0 + c1*α + c2*α2 + c2*α3static void
computeCoefficients
(DMatrixRMaj F1, DMatrixRMaj F2, int i, int j, int k, double[] coefs, boolean minus) static void
computeCoefficientsMinus
(double x1, double y1, double z1, double x2, double y2, double z2, double[] coefs) void
computeSolutions
(DogArray<DMatrixRMaj> solutions) Find the polynomial roots and for each root compute the Fundamental matrix.boolean
process
(List<AssociatedPair> points, DogArray<DMatrixRMaj> solutions) Computes a fundamental or essential matrix from a set of associated point correspondences.Methods inherited from class boofcv.alg.geo.f.FundamentalLinear
createA, projectOntoEssential, projectOntoFundamentalSpace
-
Field Details
-
F1
-
F2
-
-
Constructor Details
-
FundamentalLinear7
public FundamentalLinear7(boolean computeFundamental) When computing the essential matrix normalization is optional because pixel coordinates- Parameters:
computeFundamental
- true it computes a fundamental matrix and false for essential
-
-
Method Details
-
process
Computes a fundamental or essential matrix from a set of associated point correspondences.
- Parameters:
points
- Input: List of corresponding image coordinates. In pixel for fundamental matrix or normalized coordinates for essential matrix.solutions
- Output: Storage for the found solutions.- Returns:
- true If successful or false if it failed
-
computeSolutions
Find the polynomial roots and for each root compute the Fundamental matrix. Given the two matrices it will compute an alpha such that the determinant is zero.
det(&alpha*F1 + (1-α)*F2 ) = 0 -
computeCoefficients
Computes the coefficients such that the following is true:
det(&alpha*F1 + (1-α)*F2 ) = c0 + c1*α + c2*α2 + c2*α3
- Parameters:
F1
- a fundamental matrixF2
- a fundamental matrixcoefs
- Where results are returned.
-
computeCoefficients
public static void computeCoefficients(DMatrixRMaj F1, DMatrixRMaj F2, int i, int j, int k, double[] coefs, boolean minus) -
computeCoefficients
public static void computeCoefficients(double x1, double y1, double z1, double x2, double y2, double z2, double[] coefs) -
computeCoefficientsMinus
public static void computeCoefficientsMinus(double x1, double y1, double z1, double x2, double y2, double z2, double[] coefs)
-