# Evolutionary Optimization for Robust Epipolar-Geometry Estimation and Outlier Detection
## 4 Robust Estimation via the Genetic Algorithm
### Genetic Operators  
Once the individuals are evaluated, a selection operator is applied to the population to allocate the instances of fitter individuals for entering a mating pool as parents to reproduce a new generation (a generation in the context of genetic algorithms is equivalent to an iteration in the context of RANSAC). The tournament selection is used here due to its higher computational efficiency over other selection techniques [50]. Afterwards, new individuals are generated from the selected parents by applying crossover and mutation operators during a reproduction process. Crossover means creating two new individuals (called offspring) by combining two selected parents. Mutation means randomly changing the genes inside a chromosome. These procedures are explained below. Let \(M^{parent_{1}}=\left\{\mathbf{m}_{i}^{p_{1}}=(k_{i}^{p_{1}},h_{i}^{p_{1}},v_{i}^{p_ {1}}),\ i=1,\ldots,12\right\}\) and \(M^{parent_{2}}=\left\{\mathbf{m}_{i}^{p_{2}}=(k_{i}^{p_{2}},h_{i}^{p_{2}},v_{i}^{p _{2}}),\ i=1,\ldots,12\right\}\) be two selected parents. Furthermore, let the followings auxiliary variables be defined as \(x_{i}^{p_{1}}=(x_{i_{1}}^{p_{1}},x_{i_{2}}^{p_{1}}):=(h_{i}^{p_{1}},v_{i}^{p_ {1}})\) and \(x_{i}^{p_{2}}=(x_{i_{1}}^{p_{2}},x_{i_{2}}^{p_{2}}):=(h_{i}^{p_{2}},v_{i}^{p_ {2}})\). The parameter \(\beta_{i}=(\beta_{i_{1}},\beta_{i_{2}})\) is defined via Equation (7) in order to respect the bounds of correspondences on the images. \[\beta_{j=1,2}=\frac{1-\min(x_{ij}^{p_{1}},x_{ij}^{p_{2}})+\xi_{j}-\big{(}\max (x_{ij}^{p_{1}},x_{ij}^{p_{2}})-1+\min(x_{ij}^{p_{1}},x_{ij}^{p_{2}})\big{)}u_ {j}}{\xi_{j}-1} \tag{7}\]  
In Equation (7), \(\mathbf{u}=(u_{1},u_{2})\) includes two uniformly-distributed random numbers between zero and one, and \(\mathbf{\xi}=(\xi_{1},\xi_{2}):=(\eta,\varpi)\). The crossover operator combines the two parents to produce two offspring, \(\mathbf{M}^{offspring_{1}}=\left\{\mathbf{m}_{i}^{o_{1}}=(k_{i}^{o_{1}},h_{i}^{o_{1}},v _{i}^{o_{1}}),\ i=1,\ldots,12\right\}\) and \(\mathbf{M}^{offspring_{2}}=\left\{\mathbf{m}_{i}^{o_{2}}=(k_{i}^{o_{2}},h_{i}^{o_{2}},v _{i}^{o_{2}}),\ i=1,\ldots,12\right\}\), via Equations (8) and (9). \[k_{i}^{o_{1}}=\mathrm{T}(h,v)\] \[\text{where }\mathbf{x}=(x_{1},x_{2}):=(h,v)\text{ and}\] \[x_{j=1,2}=\text{round}\big{(}x_{ij}^{p_{1}}+\beta_{j}|x_{ij}^{p_ {1}}-x_{ij}^{p_{2}}|\big{)}, \tag{8}\] \[k_{i}^{o_{2}}=\mathrm{T}(h,v)\] \[\text{where }\mathbf{x}=(x_{1},x_{2}):=(h,v)\text{ and}\] \[x_{j=1,2}=\text{round}\big{(}x_{ij}^{p_{2}}+\beta_{j}|x_{ij}^{p_ {1}}-x_{ij}^{p_{2}}|\big{)} \tag{9}\]  
The mutation operation should be applied with caution to not highly distort sound solutions [52]. Furthermore, it should take into account the fact that usually inliers tend to be closer to each other than outliers (as assumed in the N Adjacent Points Sample Consensus (NAPSAC) robust estimation method by [53]). Therefore, mutation should perform a random local search for possibly finding more inliers in the vicinity of the currently-sampled points. A mutated solution, \(\mathbf{M}^{mutated}=\left\{\mathbf{m}_{i}^{m}=(k_{i}^{m},h_{i}^{m},v_{i}^{m}),\ i=1, \ldots,12\right\}\) is created from a recently-produced offspring solution \(\mathbf{M}^{offspring}=\left\{\mathbf{m}_{i}^{o}=(k_{i}^{o},h_{i}^{o},v_{i}^{o}),\ i=1, \ldots,12\right\}\) using Equation (10):\[k_{i}^{mut}=\mathrm{T}(h,v) \tag{10}\] \[\text{where }\mathbf{x}=(x_{1},x_{2}):=(h,v)\text{ and }\] \[x_{j=1,2}= \begin{cases}\text{round}\Big{(}x_{i_{j}}^{o}-s_{j} \big{(}x_{i_{j}}^{o}-\min_{k=1,\ldots,12}(x_{k_{j}}^{o})\big{)}\Big{)},&\text{ if }\tau_{i_{j}}<u_{j}\\ \text{round}\Big{(}x_{i_{j}}^{o}+s_{j}\big{(}\max_{k=1,\ldots,12}(x_{k_{j}}^{o })-x_{i_{j}}^{o}\big{)}\Big{)},&\text{if }\tau_{i_{j}}\geq u_{j}\end{cases} \]  
where \(x_{i}^{o}=(x_{i_{1}}^{o},x_{i_{2}}^{o}):=(h_{i}^{o},v_{i}^{o})\) and \(\mathbf{x}_{i}^{o}=(x_{i_{1}}^{m},x_{i_{2}}^{m}):=(h_{i}^{m},v_{i}^{m})\).