cv.findEssentialMat - MATLAB File Help |
Calculates an essential matrix from the corresponding points in two images
E = cv.findEssentialMat(points1, points2)
[E, mask] = cv.findEssentialMat(...)
[...] = cv.findEssentialMat(..., 'OptionName', optionValue, ...)
points1
.K = [fx 0 cx; 0 fy cy; 0 0 1]
. Note that
this function assumes that points1
and points2
are feature points from
cameras with the same camera matrix. default eye(3)
.This function estimates essential matrix based on the five-point algorithm solver in [Nister03]. [SteweniusCFS] is also a related. The epipolar geometry is described by the following equation:
[p2;1]' * inv(K)' * E * inv(K) * [p1;1] = 0
where E
is an essential matrix, p1
and p2
are corresponding points in
the first and the second images, respectively. The result of this function
may be passed further to cv.decomposeEssentialMat or cv.recoverPose to
recover the relative pose between cameras.
K
is the camera matrix with focal length fx
and fy
and principal point
[cx,cy]
:
K = [fx 0 cx;
0 fy cy;
0 0 1]
Estimation of essential matrix using the RANSAC algorithm:
% initialize the points here
points1 = {[1,1],[3,1],[5,1],...}
points2 = {[2,3],[4,3],[6,3],...}
% estimate essential matrix
[E, mask] = cv.findEssentialMat(points1, points2, 'Method','Ransac');
[Nister03]:
David Nister. "An efficient solution to the five-point relative pose problem". Pattern Analysis and Machine Intelligence, IEEE Transactions on, 26(6):756-770, 2004.
[SteweniusCFS]:
Henrik Stewenius. "Calibrated fivepoint solver".