# Evolutionary Optimization for Robust Epipolar-Geometry Estimation and Outlier Detection
## 3 Problem Formulation
### Fundamental Theories: Two-View Epipolar Geometry
Technically, to compute the SVD of the matrix \(A\in\mathbb{R}^{m\times 9}\), \(8019+162m\) flops (amount of arithmetic operations) are at least required [45]. In the second case (\(F_{33}=1\)), a set of non-homogeneous linear equations with equation matrix \(A\in\mathbb{R}^{m\times 8}\) is produced, the solving of which requires \(170+64\) m flops [45]. Therefore, applying the linear scale constraint (\(F_{33}=1\)) is computationally 13-times faster than the non-linear constraint for the minimal case of\(m=8\). In addition, it would be possible to add the observation weights directly and to use weighted linear least-squares techniques [46]. However, using this option is quite risky, as it influences the estimation of \(F\) if the coefficient \(F_{33}\) approaches zero ([47]. Such situations (\(F_{33}\to 0\)) can be raised in cases that we will call poor camera models. In these cases, the above-mentioned assumption (\(F_{33}=1\)) fails; e.g., the rotation of the second camera coordinate system with respect to the first one is mainly planar, the camera motion contains pure translation or two cameras are only shifted along each other's optical axes. A way to avoid such exceptions is to examine all nine elements of the fundamental matrix for setting them to a constant non-zero value (i.e., \(F_{ij}=1\)) and choosing the best solution [48]. However, this increases the computational time. In this study, Gaussian elimination with partial pivoting is used to detect the free variable of the consistent linear system of Equation (2) and to solve it. The free variable corresponds to the element of the fundamental matrix, whose corresponding column in the coefficient matrix (\(A\)) is not a pivot column. Therefore, that element cannot be zero and can take a fixed value, e.g., one, to resolve the scale deficiency of the fundamental matrix. In terms of complexity, partial pivoting requires \(2/3\) m\({}^{3}\) flops. Therefore, its application is not efficient for large datasets. However, in the case of robust estimation where only a minimal number of eight points is used, this method requires only 341 flops (compared to 9351 flops for SVD decomposition). Given an estimated fundamental matrix, it is possible to express how well the correspondences fit to it by calculating the residuals of the correspondences [19]. There are various error measures to represent the residuals, including algebraic distance, epipolar-weighted distance, two-sided point to epipolar line distance and the Sampson distance:  
\[d_{S}=\frac{|\boldsymbol{u}^{\prime\intercal}F\boldsymbol{u}|}{\sqrt{l_{1}^{2 }+l_{2}^{2}+{l_{1}^{\prime}}^{2}+{l_{2}^{\prime}}^{2}}}, \tag{4}\]  
where \((l_{1},l_{2},l_{3})^{\intercal}=F\boldsymbol{u}\) and \((l_{1}^{\prime},l_{2}^{\prime},l_{3}^{\prime})^{\intercal}=\boldsymbol{u}^{ \prime\intercal}F\). The ideal measure for robust estimation should not be highly sensitive to image noise. As the previous studies have shown, the Sampson distance is less sensitive to image noise in comparison with other error measures. Therefore, the Sampson distance is used in this study to represent the residuals.