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:
| Modifier and Type | Field and Description |
|---|---|
protected org.ejml.data.DenseMatrix64F |
F1 |
protected org.ejml.data.DenseMatrix64F |
F2 |
A, N1, N2, svdConstraints, svdNull, svdS, svdU, svdV, temp0| Constructor and Description |
|---|
FundamentalLinear7(boolean computeFundamental)
When computing the essential matrix normalization is optional because pixel coordinates
|
| Modifier and Type | Method and Description |
|---|---|
static void |
computeCoefficients(org.ejml.data.DenseMatrix64F F1,
org.ejml.data.DenseMatrix64F F2,
double[] coefs)
Computes the coefficients such that the following is true:
det(&alpha*F1 + (1-α)*F2 ) = c0 + c1*α + c2*α2 + c2*α3 |
static void |
computeCoefficients(org.ejml.data.DenseMatrix64F F1,
org.ejml.data.DenseMatrix64F F2,
int i,
int j,
int k,
double[] coefs,
boolean minus) |
static void |
computeCoefficients(double x1,
double y1,
double z1,
double x2,
double y2,
double z2,
double[] coefs) |
static void |
computeCoefficientsMinus(double x1,
double y1,
double z1,
double x2,
double y2,
double z2,
double[] coefs) |
void |
computeSolutions(org.ddogleg.struct.FastQueue<org.ejml.data.DenseMatrix64F> solutions)
Find the polynomial roots and for each root compute the Fundamental matrix.
|
boolean |
process(java.util.List<AssociatedPair> points,
org.ddogleg.struct.FastQueue<org.ejml.data.DenseMatrix64F> solutions)
Computes a fundamental or essential matrix from a set of associated point correspondences.
|
createA, getSvdS, getSvdU, getSvdV, isComputeFundamental, projectOntoEssential, projectOntoFundamentalSpace, undoNormalizationFprotected org.ejml.data.DenseMatrix64F F1
protected org.ejml.data.DenseMatrix64F F2
public FundamentalLinear7(boolean computeFundamental)
computeFundamental - true it computes a fundamental matrix and false for essentialpublic boolean process(java.util.List<AssociatedPair> points, org.ddogleg.struct.FastQueue<org.ejml.data.DenseMatrix64F> solutions)
Computes a fundamental or essential matrix from a set of associated point correspondences.
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.public void computeSolutions(org.ddogleg.struct.FastQueue<org.ejml.data.DenseMatrix64F> 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
public static void computeCoefficients(org.ejml.data.DenseMatrix64F F1,
org.ejml.data.DenseMatrix64F F2,
double[] coefs)
Computes the coefficients such that the following is true:
det(&alpha*F1 + (1-α)*F2 ) = c0 + c1*α + c2*α2 + c2*α3
F1 - a fundamental matrixF2 - a fundamental matrixcoefs - Where results are returned.public static void computeCoefficients(org.ejml.data.DenseMatrix64F F1,
org.ejml.data.DenseMatrix64F F2,
int i,
int j,
int k,
double[] coefs,
boolean minus)
public static void computeCoefficients(double x1,
double y1,
double z1,
double x2,
double y2,
double z2,
double[] coefs)
public static void computeCoefficientsMinus(double x1,
double y1,
double z1,
double x2,
double y2,
double z2,
double[] coefs)