## 3 Results
### Simulation and Experiment of Binocular Camera Range Measurement  
First, we fixed the binocular camera under the rearview mirror of the vehicle to take pictures of the lane line and conducted five sets of static ranging experiments for binocular camera ranging, taking pictures of the lane line and measuring the distance when the vehicle was stationary and parked next to the lane line. The results are shown in Table 5; the experimental diagram is shown in Figure 20. In Figure 20, the left side is the image taken by the binocular camera, and the right side is the parallax image. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{3}{*}{\begin{tabular}{c} **Lane Width** \\ **(m)** \\ \end{tabular} } & \multirow{3}{*}{\begin{tabular}{c} **The Real Time** \\ **of the First** \\ **Lane Change** \\ **(s)** \\ \end{tabular} } & \begin{tabular}{c} **The First Lane** \\ **Change Time** \\ **Judged by** \\ **Monocular** \\ **Camera** \\ **(Frame)** \\ \end{tabular} & \begin{tabular}{c} **The Real Time** \\ **of the Second** \\ **Lane Change** \\ **(s)** \\ \end{tabular} & \begin{tabular}{c} **The Second** \\ **Lane Change** \\ **Time Judged** \\ **by Monocular** \\ **Camera** \\ **(Frame)** \\ \end{tabular} & \
\begin{tabular}{c} **First Lag Time** \\ **(s)** \\ \end{tabular} &
\begin{tabular}{c} **Second Lag** \\ **Time (s)** \\ \end{tabular} \\ \hline
3 & 10 & 216 & 22.4 & 455 & 0.8 & 0.35 \\
3.5 & 10 & 221 & 22.7 & 455 & 1.05 & 0.05 \\
4 & 10 & 221 & 23.2 & 464 & 1.05 & 0 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Lag time for different lane widths. Figure 19: Lane changing judgment of monocular camera with different lane widths. It can be seen from Figure 20 that the parallax map is less effective when the vehicle is 670 mm away from the lane line. The main reason why the lane line in the parallax map cannot be clearly distinguished is the illumination, but the error is still within an acceptable range, so it is feasible to measure the distance between the vehicle and the lane line using a binocular camera mounted under the vehicle's rearview mirror and calculate the lane width from it. When the vehicle is moving, we need to dynamically measure the distance between the vehicle and the lane line. For static distance measurement, the pixel points in the lane lines are manually selected by us. For dynamic distance measurement, we need to do some processing to obtain the pixel points in the lane lines. In this paper, the origin of coordinates used for distance measurement by the binocular camera are all based on the optical center of the left camera, so all image processing is performed for the left image in the binocular camera. Firstly, the image should be processed for noise reduction, then the image should be binarized and the contours in the image should be detected, the image should be ROI processed and masked, the purpose of doing so is to remove the influence of the vehicle contour lines, then the distance of the contour points of the lane line should be calculated and screened to remove some obviously unreasonable distance values, and finally the average value of these values should be calculated as the distance of the vehicle from the lane line, the specific process is shown in Figure 21.  
Figure 21: Flow chart of dynamic distance measurement using binocular camera. Figure 20: Experimental diagram of binocular camera static distance measurement. According to the dynamic distance measurement process described in the previous section, we conducted a real-world experiment in which we mounted a binocular camera under the right side mirror of the vehicle to take pictures of the lane lines while the vehicle was moving. Considering that the lane lines taken by the left camera were already incomplete when the vehicle was 67 cm away from the lane lines in the static experiment, we reinstalled and re-calibrated the binocular camera. The video shot by the binocular camera is put into OpenCV for processing.