## 3 Application of Genetic Algorithm for Optimization of the Camera-Intrinsic Parameters  
Metaheuristic algorithms has been developing rapidly in recent years to solve real-life complex problems in various fields [20; 21]. Most of the metaheuristic algorithms are inspired from biological evolution, swarm behavior, and laws of physics and can be classified into two categories such as single solution and population-based metaheuristics [22]. In comparison with the single solution approach that improve the solution by using local search, the population-based metaheuristics maintain the diversity in the population and avoid sucking in local optima [23]. Among the population-based metaheuristic algorithms, genetic algorithm (GA), which is one of the well-known algorithms, is used to find the parameter sets in the homography equation. GA, introduced by [PERSON] in 1957, is guaranteed to converge to an optimal solution in multivariable function by repeating population generation, fitness/penalty evaluation, selection, reproduction, crossover, and mutation [24; 25]. Compared to other optimization methods, it is capable of solving any optimization problem based on a chromosome approach, and of handling a multiple solution search space with less complexity, and in a more straightforward manner [26]. GA is widely used in various research fields due to its advantage in creating models in a probabilistic manner. It includes new information in a non-arbitrary way, despite the limitation of being time-consuming and computationally intensive. Algorithm 1 shows the entire procedure of optimizing the intrinsic parameters of the homography equation by using GA. The algorithm shows that the initial population of chromosomes, composed of parameters of the homography equation, such as \(P_{set}=[f_{u}f_{v},\epsilon_{u},\epsilon_{v},\mathbf{K}]\), where \(\mathbf{K}\) includes the radial distortion coefficients (\(K_{1}\) and \(K_{2}\)), and tangential distortion coefficients (\(K_{3}\) and \(K_{4}\)) is generated. After the generation, the penalty of each chromosome is evaluated, and the best chromosome is obtained that minimizes the difference between the estimated and previously given translational and rotation displacements, which are extrinsic parameters of the vision sensor. The objective function to optimize the translational and rotational displacements of different units is set as a normalized vector objective function, as follows [27]:  
\[F_{penalty}=\underset{\hat{P}_{set}}{\text{argmin}}\sum_{i=1}^{N_{\text{max}, gen}}\frac{\left(\hat{D}_{i}-D_{i}\right)}{\text{max}D_{i}-\text{min}D_{i}} \tag{7}\]  
where \(\hat{D}_{i}\) and \(D_{i}\) are the true and estimated displacements. The chromosome with the lowest penalty value has a higher probability of being selected in the next generation. The selected best chromosome is reproduced to form a new population, and crossover and mutation are performed to prevent GA from converging on local minima. Based on the updated population, Steps 2-4 are looped until the stopping criteria are satisfied, or the number of generations reaches the maximum number of generations. The parameter set with minimum penalty value is selected, and the constituted equation is automatically tuned. In this study, a single point crossover, proportional roulette wheel selection, and single point mutation method are used [28; 29]. The population size of 150, percent probability of crossover of 0.6%, percent probability of mutation of 0.05%, and maximum number of generations of 200 are used. To set the searching range of the parameters to be tuned, intrinsic parameters calculated by using checkerboards are analyzed, and the coefficient of variation, also called relative standard deviation, is calculated [30]. Figure 4 shows the checkerboards with different sizes. Table 1 shows the intrinsic parameters of each case with the combinations of one or two different sized checkerboards that are estimated. Figure 5 shows the box plots and coefficient of variations that are calculated.