The eight-point algorithm is an algorithm used in computer vision to estimate the essential matrix or the fundamental matrix related to a stereo camera pair from a set of corresponding image points. It was introduced by Christopher Longuet-Higgins in 1981 for the case of the essential matrix. In theory, this algorithm can be used also for the fundamental matrix, but in practice the normalized eight-point algorithm, described by Richard Hartley in 1997, is better suited for this case. The algorithm's name derives from the fact that it estimates the essential matrix or the fundamental matrix from a set of eight (or more) corresponding image points. However, variations of the algorithm can be used for fewer than eight points.
Coplanarity constraint
One may express the epipolar geometry of two cameras and a point in space with an algebraic equation. Observe that, no matter where the point P is in space, the vectors OLP‾, ORP‾ and OROL‾ belong to the same plane. Call XL the coordinates of point P in the left eye's reference frame and call XR the coordinates of P in the right eye's reference frame and call R,T the rotation and translation between the two reference frames s.t. XR=R(XL−T) is the relationship between the coordinates of P in the two reference frames. The following equation always holds because the vector generated from T∧XL is orthogonal to both T and XL :
XLTT∧XL−TTT∧XL=(XL−T)TT∧XL=0 Because I=RTR, we get
(XL−T)TRTRT∧XL=0. Replacing (XL−T)TRT with XRT, we get
XRTRT∧XL=XRTRSXL=XRTEXL=0 Observe that T∧ may be thought of as a matrix; Longuet-Higgins used the symbol S to denote it. The product RT∧=RS is often called essential matrix and denoted with E. The vectors OLpL‾,ORpR‾ are parallel to the vectors OLP‾,ORP‾ and therefore the coplanarity constraint holds if we substitute these vectors. If we call y,y′ the coordinates of the projections of P onto the left and right image planes, then the coplanarity constraint may be written as
y'T𝐄y=0
Basic algorithm The basic eight-point algorithm is here described for the case of estimating the essential matrix 𝐄. It consists of three steps. First, it formulates a homogeneous linear equation, where the solution is directly related to 𝐄, and then solves the equation, taking into account that it may not have an exact solution. Finally, the internal constraints of the resulting matrix are managed. The first step is described in Longuet-Higgins' paper, the second and third steps are standard approaches in estimation theory. The constraint defined by the essential matrix 𝐄 is
(𝐲′)T𝐄𝐲=0 for corresponding image points represented in normalized image coordinates 𝐲,𝐲′. The problem which the algorithm solves is to determine 𝐄 for a set of matching image points. In practice, the image coordinates of the image points are affected by noise and the solution may also be over-determined which means that it may not be possible to find 𝐄 which satisfies the above constraint exactly for all points. This issue is addressed in the second step of the algorithm.
Step 1: Formulating a homogeneous linear equation With
𝐲=(y1y21) and 𝐲′=(y'1y'21) and 𝐄=(e11e12e13e21e22e23e31e32e33) the constraint can also be rewritten as
y'1y1e11+y'1y2e12+y'1e13+y'2y1e21+y'2y2e22+y'2e23+y1e31+y2e32+e33=0 or
𝐞⋅𝐲~=0 where
𝐲~=(y'1y1y'1y2y'1y'2y1y'2y2y'2y1y21) and 𝐞=(e11e12e13e21e22e23e31e32e33) that is, 𝐞 represents the essential matrix in the form of a 9-dimensional vector and this vector must be orthogonal to the vector 𝐲~ which can be seen as a vector representation of the 3×3 matrix 𝐲′𝐲T. Each pair of corresponding image points produces a vector 𝐲~. Given a set of 3D points 𝐏k this corresponds to a set of vectors 𝐲~k and all of them must satisfy
𝐞⋅𝐲~k=0 for the vector 𝐞. Given sufficiently many (at least eight) linearly independent vectors 𝐲~k it is possible to determine 𝐞 in a straightforward way. Collect all vectors 𝐲~k as the columns of a matrix 𝐘 and it must then be the case that
𝐞T𝐘=𝟎 This means that 𝐞 is the solution to a homogeneous linear equation.
Step 2: Solving the equation A standard approach to solving this equation implies that 𝐞 is a right singular vector of 𝐘 corresponding to a singular value that equals zero. Provided that at least eight linearly independent vectors 𝐲~k are used to construct 𝐘 it follows that this singular vector is unique (disregarding scalar multiplication) and, consequently, 𝐞 and then 𝐄 can be determined. In the case that more than eight corresponding points are used to construct 𝐘 it is possible that it does not have any singular value equal to zero. This case occurs in practice when the image coordinates are affected by various types of noise. A common approach to deal with this situation is to describe it as a total least squares problem; find 𝐞 which minimizes
‖𝐞T𝐘‖ when ‖𝐞‖=1. The solution is to choose 𝐞 as the left singular vector corresponding to the smallest singular value of 𝐘. A reordering of this 𝐞 back into a 3×3 matrix gives the result of this step, here referred to as 𝐄est.
Step 3: Enforcing the internal constraint Another consequence of dealing with noisy image coordinates is that the resulting matrix may not satisfy the internal constraint of the essential matrix, that is, two of its singular values are equal and nonzero and the other is zero. Depending on the application, smaller or larger deviations from the internal constraint may or may not be a problem. If it is critical that the estimated matrix satisfies the internal constraints, this can be accomplished by finding the matrix 𝐄′ of rank 2 which minimizes
‖𝐄′−𝐄est‖ where 𝐄est is the resulting matrix from Step 2 and the Frobenius matrix norm is used. The solution to the problem is given by first computing a singular value decomposition of 𝐄est:
𝐄est=𝐔𝐒𝐕T where 𝐔,𝐕 are orthogonal matrices and 𝐒 is a diagonal matrix which contains the singular values of 𝐄est. In the ideal case, one of the diagonal elements of 𝐒 should be zero, or at least small compared to the other two which should be equal. In any case, set
𝐒′=(s1000s20000), where s1,s2 are the largest and second largest singular values in 𝐒 respectively. Finally, 𝐄′ is given by
𝐄′=𝐔𝐒′𝐕T The matrix 𝐄′ is the resulting estimate of the essential matrix provided by the algorithm.
… excerpt ends here. Continue reading the full article.
