## 4 Taillight Detection and Light Signal Identification Based on Image Processing
### Taillight Signal Identification
#### 4.3.3 Identification Method of the Direction Light  
The direction light of the vehicle flashes intermittently when it is on. The taillight images is shown in Figure 17. In this paper, the statistical results of the histogram distribution of the directional lights in the taillights on state are shown in Figure 18a, and the histogram distribution statistics of the directional lights in the taillights off state are shown in Figure 18b. The histogram distribution characteristics are obviously different when the direction light is on compared to when it is off. Therefore, the method of statistical histogram characteristic parameters can be used to analyze the lighting color and characteristics of the direction lights. The flickering of the direction lights causes a periodic change in the histogram characteristic parameters.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline \multicolumn{1}{c}{**-**} & **Mean Value** & **Energy** & **Entropy** & **Variance** \\ \hline
1 & 119.9437 & 0.0096 & 7.1629 & \(3.4068\times 10^{3}+03\) \\
2 & 112.1328 & 0.0104 & 7.0349 & \(3.0960\times 10^{3}+03\) \\
3 & 128.5328 & 0.0083 & 7.4066 & \(4.2965\times 10^{3}+03\) \\
4 & 123.1580 & 0.0064 & 7.5766 & \(4.3271\times 10^{3}+03\) \\
5 & 126.6490 & 0.0071 & 7.3157 & \(4.8005\times 10^{3}+03\) \\ \hline \hline \end{tabular}
\end{table}
Table 6: Correlation coefficient for taillight candidate region.  
Figure 16: Brake light brightness change chart during on and off processes.  
Figure 17: Vehicle taillight area image. (**a**) Unlit left taillight image; (**b**) Illuminated left taillight image.  
Figure 15: The change of the vehicle’s brake lights.  
Another important feature of the turn signal light is that there is an alternating process of turn-on and turn-off with a period of 1 s, as shown in Figure 19a-e. From the figure, it can be seen clearly that the direction light has a periodic on and off characteristic.  
The 5 frames of the left taillight in Figure 19 are segmented as images which are shown in Figure 20, and the characteristic parameters are shown in Table 7. By analyzing the data in the histogram characteristic parameter list, the mean value, energy, and variance are more sensitive to the direction lights. Therefore, these three parameters are selected as the conditions for determining the direction light's on or off state. Within 5 s after determining the background frame, the histogram feature parameters are calculated once per second. If the parameters of the taillight area on both sides of the vehicle are greater than the parameters of the background frame, the direction light of the preceding vehicle is recognized as lit.  
According to the 5 images extracted at equal intervals within 5 s, the histogram feature parameter list mentioned above can be obtained. The first two points are the parameters corresponding to the two frames when the light is off, and the last three points are the parameters corresponding to the three frames when the light is on. By analyzing the histogram characteristic parameters, we find that the mean value, energy, and variance when the light is off are less than their values when the light is on, and the entropy value is not sensitive to whether the lamp is on.  
\begin{table}
\begin{tabular}{l l l l l} \hline \hline - & Mean Value & Energy & Entropy & Variance \\ \hline
1 & 65.5098 & 0.0097 & 7.1047 & \(3.3507\times 10^{3}\) + 03 \\
2 & 93.5233 & 0.0193 & 7.0696 & \(5.9075\times 10^{3}\) + 03 \\
3 & 74.0808 & 0.0033 & 6.1351 & \(3.6327\times 10^{3}\) + 03 \\
4 & 89.4964 & 0.0258 & 6.8357 & \(6.9519\times 10^{3}\) + 03 \\
5 & 93.1196 & 0.0234 & 6.9524 & \(6.5517\times 10^{3}\) + 03 \\ \hline \hline \end{tabular}
\end{table}
Table 7: Histogram characteristic parameter list.  
Figure 19: Brightness change chart of the direction light during on and off process.  
Figure 20: On and off process change chart of the direction light.