# estimateFundamentalMatrix

Estimate fundamental matrix from corresponding points in stereo images

## Syntax

## Description

`estimateFundamentalMatrix`

estimates the
fundamental matrix from corresponding points in stereo images. This
function can be configured to use all corresponding points or to exclude
outliers. You can exclude outliers by using a robust estimation technique
such as random-sample consensus (RANSAC). When you use robust estimation,
results may not be identical between runs because of the randomized
nature of the algorithm.

returns the 3-by-3 fundamental matrix, `F`

= estimateFundamentalMatrix(`matchedPoints1`

,`matchedPoints2`

)`F`

, using the least
median of squares (LMedS) method. The input points can be
*M*-by-2 matrices of *M* number of [x y]
coordinates, or `KAZEPoints`

, `SIFTPoints`

, `SURFPoints`

, `MSERRegions`

, `ORBPoints`

, or `cornerPoints`

object.

`[`

additionally
returns logical indices, `F`

,`inliersIndex`

]
= estimateFundamentalMatrix(`matchedPoints1`

,`matchedPoints2`

)`inliersIndex`

, for the
inliers used to compute the fundamental matrix. The `inliersIndex`

output
is an *M*-by-1 vector. The function sets the elements
of the vector to `true`

when the corresponding point
was used to compute the fundamental matrix. The elements are set to `false`

if
they are not used.

`[`

additionally
returns a status code.`F`

,`inliersIndex`

,`status`

]
= estimateFundamentalMatrix(`matchedPoints1`

,`matchedPoints2`

)

`[`

specifies options using one or more name-value arguments in addition to any
combination of arguments from previous syntaxes. For example,
`F`

,`inliersIndex`

,`status`

]
= estimateFundamentalMatrix(`matchedPoints1`

,`matchedPoints2`

,`Name=Value`

)`estimateFundamentalMatrix(`

specifies MSAC as the method to compute the fundamental matrix.`matchedPoints1`

,`matchedPoints2`

,Method="MSAC")

## Examples

## Input Arguments

## Output Arguments

## Tips

Use `estimateEssentialMatrix`

when
you know the camera intrinsics. You can obtain the intrinsics using
the **Camera Calibrator** app.
Otherwise, you can use the `estimateFundamentalMatrix`

function
that does not require camera intrinsics. Note that the fundamental
matrix cannot be estimated from coplanar world points.

## Algorithms

## References

[1] Hartley, R., A. Zisserman, *Multiple
View Geometry in Computer Vision*, Cambridge University
Press, 2003.

[2] Rousseeuw, P., A. Leroy, *Robust
Regression and Outlier Detection*, John Wiley & Sons,
1987.

[3] Torr, P. H. S., and A. Zisserman, *MLESAC:
A New Robust Estimator with Application to Estimating Image Geometry*,
Computer Vision and Image Understanding, 2000.

## Extended Capabilities

## Version History

**Introduced in R2012b**