MATLAB File Help: cv.findFundamentalMat Index
cv.findFundamentalMat

Calculates a fundamental matrix from the corresponding points in two images

F = cv.findFundamentalMat(points1, points2)
[F, mask] = cv.findFundamentalMat(...)
[...] = cv.findFundamentalMat(..., 'OptionName', optionValue, ...)

Input

Output

Options

The epipolar geometry is described by the following equation:

[p2;1]^T * F * [p1;1] = 0

where F is a fundamental matrix, p1 and p2 are corresponding points in the first and the second images, respectively.

The function calculates the fundamental matrix using one of four methods listed above and returns the found fundamental matrix. Normally just one matrix is found. But in case of the 7-point algorithm, the function may return up to 3 solutions (9x3 matrix that stores all 3 matrices sequentially).

The calculated fundamental matrix may be passed further to cv.computeCorrespondEpilines that finds the epipolar lines corresponding to the specified points. It can also be passed to cv.stereoRectifyUncalibrated to compute the rectification transformation.

Example

Estimation of fundamental matrix using the RANSAC algorithm:

% initialize the points here
points1 = {[1,1],[3,1],[5,1],...}
points2 = {[2,3],[4,3],[6,3],...}
% estimate fundamental matrix
[F, mask] = cv.findFundamentalMat(points1, points2, 'Method','Ransac');
See also