# 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 DMatrixRMaj`
`F1`

`protected DMatrixRMaj`
`F2`

### Fields inherited from class boofcv.alg.geo.f.FundamentalLinear

`A, massger, N1, N2, opEssential, opFundamental, solverNull`
• ## Constructor Summary

Constructors
Constructor
Description
`FundamentalLinear7(boolean computeFundamental)`
When computing the essential matrix normalization is optional because pixel coordinates
• ## Method Summary

Modifier and Type
Method
Description
`static 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*α + c22 + c23
`static 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`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

• ## 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

public boolean process(List<AssociatedPair> points, DogArray<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(DogArray<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(DMatrixRMaj F1, DMatrixRMaj F2, double[] coefs)

Computes the coefficients such that the following is true:
det(&alpha*F1 + (1-α)*F2 ) = c0 + c1*α + c22 + c23

Parameters:
`F1` - a fundamental matrix
`F2` - a fundamental matrix
`coefs` - 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)