## 2 Materials and Methods
### Micro-Scale Surface Contouring via Micro-Laser Line Projection  
The micro-scale surface is retrieved by the microscope vision system shown in Figure 3(a). This setup consists of an optical microscope, a laser diode, a CCD camera, a slider device, and a computer. The surface plane is located on the \(x\)-axis and \(y\)-axis, and the surface topography is parallel to the z-axis. The lateral configuration of the microscope vision system in the \(x\)-axis is depicted by the geometry shown in Figure 3(b), where a 42 \(\upmu\)m laser line is projected perpendicularly on the target surface and the optical microscope is aligned at an angle. The symbol \(\theta\) indicates the angle between the laser line and the optical axis. The distance between the objective lens and the surface is represented by \(d\). The objective focal length is depicted by \(f_{1}\) and the objective focus is represented by \(F_{1}\). The distance between the intermediate image plane and the ocular lens is depicted by \(L\). The ocular focal length is indicated by \(f_{2}\) and the ocular focus is represented by \(F_{2}\). The lateral configuration of the microscope vision system in the \(y\)-axis is described by means of the geometry shown in Figure 4c. The laser line coordinates in the CCD array are denoted by \((x_{i,j},y_{i,j})\) in the \(x\)-axis and \(y\)-axis, respectively. The surface coordinates \(y_{i,j}\) and \(z_{ij}\) are defined via geometry shown in Figure 4b,c by means of the expressions  
\[z_{i,j}=\frac{\eta(x_{c}-x_{i,j})F_{1}F_{2}}{(f_{1}-F_{1})(f_{2}-F_{2})sint}+O \tag{22}\]  
\[y_{i,j}=\eta y_{c}-\frac{\eta(y_{c}-y_{i,j})F_{1}F_{2}}{(f_{1}-F_{1})(f_{2}-F_ {2})} \tag{23}\]  
The surface coordinate \(x_{i,j}\) is defined by the position where the laser line is projected in the \(x\)-axis. This coordinate is provided by the slider device. In this way, the surface topography is computed based on the vision parameters \((x_{c},y_{c},\eta,\theta,f_{1},F_{1},f_{2},F_{2})\). These parameters are determined via genetic algorithm by means of Equations (22) and (23), and surface data. The genetic algorithm determines the vision parameters in five steps, which are described as follows. The first step is to determine the initial population. To do so, the search space is deduced via the maximum and minimum of each parameter. The maximum and minimum of the parameters \((x_{c},\,y_{c},\,\eta)\) are deduced via image size. The maximum and minimum of the parameters \((\theta,f_{1},F_{1},f_{2},F_{2})\) are defined via microscope geometry. The minimum \(F_{2}\) is defined by a distance more than half of the ocular lens diameter, and the maximum \(F_{2}\) is two times the minimum \(F_{2}\). The minimum\(f_{2}\) is defined as the minimum \(F_{2}\) and the maximum \(f_{2}\) is four times the minimum \(F_{2}\). In the same way, the minimum \(F_{1}\) is defined by a distance more than half of the objective lens diameter, and the maximum \(F_{1}\) is two times the minimum \(F_{2}\). The minimum \(f_{1}\) is determined as the minimum \(F_{1}\) and the maximum \(f_{1}\) is four times the minimum \(F_{1}\). The minimum \(\theta\) is defined as an angle more than \(10^{\circ}\) and  
Figure 4: (**a**) Optical microscope vision system to perform micro-scale spherical and cylindrical surface modeling. (**b**) Lateral configuration of the microscope vision system in \(x\)-axis. (**c**) Lateral configuration of the microscope vision system in \(y\)-axis. the maximum \(\theta\) is defined as an angle less than 45\({}^{\circ}\). Thus, the search space is determined. Then, four parents (\(P_{1,t}\), \(P_{2,t}\), \(P_{3,t}\), \(P_{4,t}\)) are created in random form from the search space. In this way, four values of the vision parameters (\(x_{c}\), \(y_{c}\), \(\eta\), \(\theta\), \(f_{1}\), \(F_{1}\), \(f_{2}\), \(F_{2}\)) are obtained and they are defined as the initial population. The second step is to create the current children via crossover.