• No se han encontrado resultados

5. Análisis de la información

5.2 Análisis de las historias

5.2.11 El final de las historias

In the last two decades, many methods to estimate the fundamental matrix have been proposed and can be classified into two major categories: linear methods and iterative methods (See [Har-04] and [Sze-11] for details).

The linear methods are closed formed but the accuracy may be rather poor in the presence of noise. Based on the discussion in Section 2.6, we know that the fundamental matrix is defined by the equation,

𝐦′T𝐅𝐦 = 0 (4-1)

For any pair of matching points 𝐦 ↔ 𝐦′ . If we have matching point pairs {𝐦𝐢 = (xi, yi, 1) ↔ 𝐦𝐢′= (xi′, yi′, 1), i = 1, … , n} and assume that 𝐅 = �fij�3×3, then we can

construct an over-determined linear system of the form

𝐀f = �𝑥1 ′𝑥 1 𝑥1′𝑦1 𝑥1′ 𝑦1′𝑥1 𝑦1′𝑦1 𝑦1′ 𝑥1 𝑦1 1 ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ 𝑥𝑛′𝑥𝑛 𝑥𝑛′𝑦𝑛 𝑥𝑛′ 𝑦𝑛′𝑥𝑛 𝑦𝑛′𝑦𝑛 𝑦𝑛′ 𝑥𝑛 𝑦𝑛 1 � f = 𝟎 (4-2)

Because F has a degree of freedom 7, if we have 𝑛 ≥ 7 pairs of corresponding points, we can generate an estimation of the fundamental matrix F.

In practices, the coordinates of the feature points are not exact because of the measure and computing error, the rank of matrix A will be full as 9. F is defined up to a scaling, so we can reduce the problem in (4-2) as equivalent to minimize ‖𝐀𝐟‖ subject to the condition‖𝐟‖ = 1 . This problem has a closed form solution as the singular vector corresponding to the smallest singular value of A, i.e., the last column of the matrix V in the SVD decomposition of 𝐀 = 𝐔𝐃𝐕𝐓.

This straightforward linear solution generally does not satisfy the rank 2 constraint, to make the rank of the fundamental matrix be 2, we can replace the F obtained above by the matrix F’ that minimizes the Frobenius norm ‖𝐅 − 𝐅′‖𝐹 subject to the condition that det(𝐅′) = 0. This matrix can be find by modify the SVD of F. Let 𝐅 = 𝐔𝐃𝐕𝐓, where

𝐃 = diag(r, s, t), 𝑟 ≥ 𝑠 ≥ 𝑡 . Then 𝐅′= 𝐔diag(r, s, 0)𝐕𝐓 will be the matrix we deduce.

This algorithm will be applicable when more than 8 feature points’ pairs are available, which is generally satisfied in practice.

According to Hartley [Har-97], this algorithm can perform extremely well if appropriate normalization if the input data is conducted. The suggested normalization is a translation and scaling of each image so that the centroid of the feature points set is send to the origin of the coordinate and the RMS distance of the points from the origin is equal to √2. Given

n > 8 image point correspondences {𝐦𝐢= (xi, yi, 1) ↔ 𝐦𝐢′= (xi′, yi, 1), i = 1, … , n}, the

normalized 8-point algorithm to estimate the fundamental matrix F, such that 𝐦′Ti𝐅𝐦𝐢 = 0 , is as followed,

Normalized 8-point algorithm

(i) Normalization: Transform the image coordinates according to 𝐦�𝐢 = 𝐓𝐦𝐢 and 𝐦�′𝐢 = 𝐓′𝐦′𝐢, where T and T' are normalizing transformations.

(ii) Find the fundamental matrix 𝐅�′ corresponding to the matches 𝐦�𝐢 ↔ 𝐦�′𝐢 by

a) Linear solution: Determine 𝐅� from the singular vector corresponding to the smallest singular value of A, where A is composed from the

normalized matches as in (4-2).

b) Constraint enforcement: Replace 𝐅� by 𝐅�′ such that det(𝐅�′) = 0 using the SVD, as explained before.

(iii) Denormalization: Finally, 𝐅 = 𝐓′𝐓𝐅�′ 𝐓 is the fundamental matrix corresponding to the original data set.

In practice, we can also introduce robust statistics strategy to iteratively enhance both the matching results and the estimation of fundamental matrix. Three robust methods: M- Estimators, Least-Median-Squares (LMedS) and Random Sampling (RANSAC) are widely used in practice (See [Har-04] for details). The M-estimators try to reduce the effect of outliers by weighting the residual of each point. The LMedS and RANSAC techniques are very similar. The RANSAC calculates the number of inliers for each F and the chosen F is the one that maximizes it. Once the outliers are eliminated, F is recalculated with the aim of obtaining a better approach.

In this research, we will use automatic fundamental matrix estimation algorithm with RANSAC. The outline of the algorithm is as follow:

Automatic fundamental matrix estimation algorithm using RANSAC

(i) Feature points Detection: Compute feature points in each image. (ii) Putative correspondences: Compute a set of feature point matches. (iii) RANSAC robust estimation: Repeat for N samples,

(a) Select a random sample of 8 correspondences and compute the fundamental matrix F as described in the normalized 8 points algorithm.

(b) Calculate the distance d± for each putative correspondence. (c) Compute the number of inliers consistent with F by the number of

correspondences for which d± < t pixels.

(d) If there are three real solutions for F the number of inliers is computed for each solution, and the solution with most inliers retained.

Choose the F with the largest number of inliers.

(iv) Non-linear estimation: re-estimate F from all correspondences classified as inliers by minimizing a cost function.

(v) Guided matching: Further feature point correspondences are now determined using the estimated F to define a search strip about the epipolar line.