Class FundamentalLinear7
- java.lang.Object
-
- boofcv.alg.geo.f.FundamentalLinear
-
- boofcv.alg.geo.f.FundamentalLinear7
-
public class FundamentalLinear7 extends FundamentalLinear
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 Modifier and Type Field Description protected org.ejml.data.DMatrixRMajF1protected org.ejml.data.DMatrixRMajF2-
Fields inherited from class boofcv.alg.geo.f.FundamentalLinear
A, N1, N2, solverNull, svdConstraints, svdS, svdU, svdV, temp0
-
-
Constructor Summary
Constructors Constructor Description FundamentalLinear7(boolean computeFundamental)When computing the essential matrix normalization is optional because pixel coordinates
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidcomputeCoefficients(double x1, double y1, double z1, double x2, double y2, double z2, double[] coefs)static voidcomputeCoefficients(org.ejml.data.DMatrixRMaj F1, org.ejml.data.DMatrixRMaj F2, double[] coefs)Computes the coefficients such that the following is true:
det(&alpha*F1 + (1-α)*F2 ) = c0 + c1*α + c2*α2 + c2*α3static voidcomputeCoefficients(org.ejml.data.DMatrixRMaj F1, org.ejml.data.DMatrixRMaj F2, int i, int j, int k, double[] coefs, boolean minus)static voidcomputeCoefficientsMinus(double x1, double y1, double z1, double x2, double y2, double z2, double[] coefs)voidcomputeSolutions(org.ddogleg.struct.FastQueue<org.ejml.data.DMatrixRMaj> solutions)Find the polynomial roots and for each root compute the Fundamental matrix.booleanprocess(java.util.List<AssociatedPair> points, org.ddogleg.struct.FastQueue<org.ejml.data.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, getSvdS, getSvdU, getSvdV, isComputeFundamental, projectOntoEssential, projectOntoFundamentalSpace
-
-
-
-
Method Detail
-
process
public boolean process(java.util.List<AssociatedPair> points, org.ddogleg.struct.FastQueue<org.ejml.data.DMatrixRMaj> solutions)
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
public void computeSolutions(org.ddogleg.struct.FastQueue<org.ejml.data.DMatrixRMaj> solutions)
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
public static void computeCoefficients(org.ejml.data.DMatrixRMaj F1, org.ejml.data.DMatrixRMaj F2, double[] coefs)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(org.ejml.data.DMatrixRMaj F1, org.ejml.data.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)
-
-