To obtain the epipolar geometry, we need to estimate F. This can be done using some initial point correspondences between the images. Equation (5.3) shows that each matching pair of points between the two images provides a single linear constraint on F. This allows F to be estimated linearly (up to the usual arbitrary scale factor) from 8 independent correspondences. However, F as defined has only seven degrees of freedom: 2 from C (the epipole position) and 5 from A. Algebraically, F has 9 linear coefficients modulo one overall scale factor, but the rank 2 condition implies the additional constraint . Hence, F can actually be computed from only 7 matches in general position plus the rank constraint. However, since the latter is a cubic there will generally be three possible solutions in this case.
Figure 5.2 shows what can be done with a good automatic epipolar geometry algorithm. However, for good results, some care is needed. The discussion below is inspired by a paper of R. Hartley [8].
Assume that we have already found some matches
between the images. Each correspondence provides a linear constraint
on the coefficients of F:
.
Expanding, we get:
The above method is standard, but if applied naïvely it is quite unstable. A typical image coordinate in a image might be . Some of the entries in a typical row of A are , others are , and the last entry is , so there is a variation in size of among the entries of A, and hence of among the entries of AtA. This means that numerically, AtA is extremely ill-conditioned: the solution contains an implicit least squares trade off, but it is nothing like the trade off we would actually like for maximum stability.
A simple solution to this is to normalize the pixel coordinates from [0,512] to [-1,1] before proceeding. This provides a well-balanced matrix A and much more stable and accurate results for F. In a practical implementation, a considerable effort must also be spent on rejecting false correspondences in the input data [27].
In summary, the procedure for estimating the epipolar geometry is:
-- Extract points from the images
-- Find an initial set of point correspondences (typically using correlation)
-- Use the above fundamental matrix estimation algorithm
-- Embed everything in a robust estimation framework resistant to
outliers (e.g using Least Median Squares).
For a detailed discussion of alternatives to this scheme, see [12].