## 4 Processing
### RANSAC Method to Road Lane Recognition  
After the development of the RANSAC code, several strands have been developed. All RANSAC codes contain two main bases, the hypothesis and the test. The hypothesis stage consists of the model's definition that is sought using the minimum sufficient quantity of the input sample to obtain such a model. Concerning the RANSAC code in this investigation, we used parabolic and linear models, which require at least three and two samples of the input group, respectively. After the sample selection, the coefficients of the characteristic equation are extracted by the inverse matrix method as shown for the parabolic model in Equation (12). \[XC=Y\ \ \rightarrow\ \left[ \begin{array}{cc}{x_{1}}^{2}&{x_{1}}&1\\ {x_{2}}^{2}&{x_{2}}&1\\ {x_{3}}^{2}&{x_{3}}&1\end{array} \right]\left[ \begin{array}{c}c_{1}\\ c_{2}\\ c_{3}\end{array} \right]=\ \left[ \begin{array}{c}y_{1}\\ y_{2}\\ y_{3}\end{array} \right]\ \rightarrow\ \ C=X^{-1}Y\ \ \rightarrow C=\left[ \begin{array}{c}c_{1}\\ c_{2}\\ c_{3}\end{array} \right], \tag{12}\]  
Then, the X-axis values of all points '1' are used to find the corresponding Y-values through the coefficients of the equation found (\(Y_{fit\_n}\)) and then the real Y-values (\(Y_{n}\)) are compared with the values found. Figure 16 exemplifies the divergence of the model found in the interaction with the entire sample group. Subsequently, the quadratic error values of each element are compared with a threshold for classification between inliers (belonging to the sought-after model) or outliers (not belonging to the sought-after model). At the end of an interaction of the algorithm, we have values of the coefficients of the model to be searched along with the number of inlier and outlier points. The interaction that obtains the coefficients with more inlier points is allocated as a response [27]. The number of interactions of the code is defined by Equation (13), which takes into account the probability that a point is not in the desired model (e), the number of points in a sample (s), and the desired probability in a representative interaction (\(p\)), that is, an interaction that represents the model sought through the coefficients found. Therefore, the value \(p\) is set to 0.99, stipulating that the chosen random points are not out of the sought pattern in at least one interaction. \[I=\frac{\log(1-p)}{\log\bigl{(}1-(1-e)^{s}\bigr{)}} \tag{13}\]  
However, to use Equation (12), the number of outlier points must be known, which impaired their application in this work because this number of points is variable for each frame analyzed. Therefore, we used Equation (14), which is calculated in the whole interaction as limiting the number of total interactions of the algorithm. In this equation, the coefficient \(\varepsilon\) is used, representing the probability of not selecting minimum samples representing the searched model, labeled as a false alarm rate. Additionally, the coefficient  
Figure 16: Calculation of the quadratic error for all analyzed points. \(q\) that approximately represents the probability of selection by \(k\) (degree of the sought model) times of point inliers of the total of points is used. The coefficient q can be obtained through Equation (15), which considers the number of inliers of the interaction (\(N_{I}\)) and the total number of analyzed points (\(N\)). \[T_{inter}=\frac{\log(\epsilon)}{\log(1-q)} \tag{14}\]  
\[q=\prod_{i=0}^{k-1}\frac{N_{I}-i}{N-i} \tag{15}\]  
If the current interaction is greater than the coefficient \(T_{inter}\), the code is interrupted, and the interaction coefficients with the most significant number of inlier points are sent as the final response.