# Vehicle Distance Measurement Method of Two-Way Two-Lane Roads Based on Monocular Vision
## 2 Methods
### Establishment of Vehicle Distance Measurement Model
#### 2.2.4 Improved Geometric Ranging Method
Combining Equations (8), (9), (11), (12), and (15), the following formula can be obtained:  
Figure 5:1  
Figure 5:2  
Therefore, the position of the feature point of the vehicle on the camera's imaging plane changes when the camera produces a roll angle \(\theta\); the change of its position will change the ranging results calculated by the traditional geometric ranging method. In order to analyze the influence of \(\theta\) on ranging results using a traditional geometric ranging method, this paper simulated the ranging results based on the above analysis to observe how \(\theta\) affects the ranging results using the traditional geometric ranging method. The settings of the camera's height from the ground \(h\), focal length \(f\), image geometric center (\(u_{0}\), \(v_{0}\)), pitch angle \(\alpha\), roll angle \(\theta\), and coordinate of the feature point of vehicle (\(u_{p}\), \(v_{p}\)) are shown in Table 1, and the simulation results are shown in Figure 5:3  
Figure 7a shows the result of simulation 1, which shows that the ranging result using the traditional geometric ranging method changes with the position of the feature point of the vehicle when \(\theta\) is the left deflection angle. The ranging result of the feature point of the vehicle using the traditional geometric ranging method is the normal value when \(\theta\) does not exist. However, it can be seen from the figure that the ranging result deviates from the normal value when \(\theta\) exists. If the feature point of the vehicle appears on the left side of the image plane (\(u_{p}<u_{0}\)), the smaller the ordinate \(v_{p}\) of the feature point of the vehicle, the greater the positive deviation of the ranging result from the normal value. In addition, the smaller the abscissa \(u_{p}\) of the feature point of the vehicle, the more obvious the above impact. If the feature point of the vehicle appears on the right side of the camera plane (\(u_{p}>u_{0}\)), the smaller the value \(v_{p}\), the greater the negative deviation of the ranging result from the normal value. Moreover, the larger the value \(u_{p}\), the more obvious the above impact. The situation is the opposite when \(\theta\) is the right deflection angle, and this paper will not repeat it. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Relevant Parameters**} & \multicolumn{5}{c}{**Global Parameters**} & \multicolumn{2}{c}{**Simulation 1**} & **Simulation 2** \\ \cline{2-7}  & \(h\) **(m)** & \(f\) **(Pixel)** & \((u_{0},v_{0})\) & **Image Size (Pixel)** & \(\alpha\) (\({}^{\circ}\))** & \(\theta\) (\({}^{\circ}\)) & \((u_{p},v_{p})\) \\ \hline value & 1.3 & 1200 & \((640,360)\) & 1280 \(\times\) 720 & \(-2\) * & \(+20\) * & \((600,400)\) \\ \hline \hline \end{tabular}  
* The positive and negative signs indicate that the camera rotates counterclockwise and clockwise around the optical axis, respectively.  
\end{table} 
Table 1: Setting of relevant parameters. Figure 7: Simulation results. (**a**) Change of ranging result with vehicle position; (**b**) Change of ranging result with \(\theta\). Figure 7b is the result of simulation 2, which shows that the ranging result using the traditional geometric ranging method changes with \(\theta\) when the position of the feature point of the vehicle is fixed and appears on the left side of the image plane. Similarly, the ranging result deviates from the normal value when \(\theta\) exists. If \(\theta\) is the left deflection angle, the larger the value \(\theta\), the greater the positive deviation of the ranging result from the normal value. If \(\theta\) is the right deviation angle, the larger the value \(\theta\), the greater the negative deviation of the ranging result from the normal value. The situation is the opposite when the feature point of the vehicle is fixed and appears on the right side of the camera plane, and this paper will not repeat it.