Keywords

1 Introduction

Safe driving has always been a research hotspot in intelligent traffic. Using Otsu method, Xu Meihua performed lane detection based on the geometric characteristics of lanes on the road, Hough voting results, the correction among road images and the width of lane lines and then monitored lane departure in combination with the measured yaw angle values [1]. Chen Benzhi performed lane fitting with the use of hyperbolic model; based on the acquired lane information, the mapping relationship between world coordinate system and image coordinate system was established through camera parameters, and the lane departure warning in world coordinate system was converted to the warning in image coordinate system; finally, the departure decision was made using space-time warning system [2]. Peng Jun measured the relative distance and the relative velocity, and thereby calculated the time to collision (TTC) with the barriers in front; then, they compared the calculated results with the decision-making threshold values calculated using equal-step method and made the safety warning [3]. Liu Zhiqiang first detected the lane markings based on edge distraction function (EDF), identified vehicles according to the textures underneath the vehicles and the symmetry characteristics, measured the distance on the basis of the geometrical mapping relation between image coordinate system and world coordinate system, and made the anti-collision warning in combination with the calculation of critical safe vehicle distance [4, 5]. Feng Zhong-Xiang and Guo Yingshi made the decisions based on the driving behaviors or personal driving experiences [6, 7].

In previous studies, safety warning was mainly made based on a single factor in driving, while the effects of the multiple-factor fusion on driving warning evaluation scheme were poorly investigated. This study proposed a multiparameter driving danger evaluation model for comprehensively analyzing the effects of lane, vehicle type and distance on the danger degree in driving.

2 Evaluation Parameters in the Model

2.1 Lane Detection

Figure 1 illustrates the procedures of lane detection. Firstly, using LDA [8] (Linear Discriminant Analysis) the optimal discriminant vector space between road and lane was calculated as below

Fig. 1
figure 1

Flow chart of lane detection results (below)

$$ \varphi = \left[ {\begin{array}{*{20}l} {0.540} \hfill & { - 0.841} \hfill & {0.024} \hfill \\ \end{array} } \right]^{\text{T}} $$
(1)

The region of interest (ROI) was projected to the optimal discriminant vector space for generating the gray images adapted to road images [9], as shown in Fig. 2.

Fig. 2
figure 2

Comparison between traditional gray processing results (above) and LDA processing (below)

We conducted gray-value sampling analysis on the images after LDA gray processing. After lane gray information and width were acquired, the seed points were detected by guided interlaced scanning algorithm [10]. Finally, the lanes were fitted by least square method according to line-parabola model (Figs. 3 and 4).

Fig. 3
figure 3

Flow chart of scanning algorithm

Fig. 4
figure 4

Scanning results of seed points

Lane detection results should be corrected by calculating the data center (DC). When the threshold deviated from the DC to a certain degree, the current results can be corrected by the detection results of the last frame. Figure 5 compares the detection results before and after optimization.

Fig. 5
figure 5

Comparison between the results before and after video sequence continuous optimization

2.2 Vehicle Distance Detection

The P4P [11] model was used for calculating the distance between the vehicle and the vehicle in front. Firstly, based on the principle of Zhang’s camera calibration algorithm [12], the camera’s intrinsic parameters can be solved using the combination of singular value decomposition [13] and PLS:

$$ {\text{M}} = \left[ {\begin{array}{*{20}c} {{\text{f}}_{x} } & 0 & {{\text{c}}_{x} } \\ 0 & {{\text{f}}_{y} } & {{\text{c}}_{y} } \\ 0 & 0 & 1 \\ \end{array} } \right] = \left[ {\begin{array}{*{20}c} {953.66269} & 0 & {656.14355} \\ 0 & {956.86172} & {382.61027} \\ 0 & 0 & 1 \\ \end{array} } \right] $$
(2)

Next, the vehicle license plate image was located through color space conversion and Sobel comprehensive searching [14]. Based on the size, length-to-width ratio and the inclination angle of the minimum enclosing rectangle, several candidate vehicle license plate regions were selected, which were then classified by a support vector machine (SVM) classifier. The results are shown in Fig. 6.

Fig. 6
figure 6

Vehicle license plate detection results

After the camera’s intrinsic parameters and vehicle’s license plate information were determined, the model was reestablished using PNP theory in projective geometry. The length information was integrated into the model. Then, the rotation matrix R and translation matrix T between the world coordinate system where the vehicle’s license plate was located and the world coordinate system where the camera was located were constructed. The translation matrix T was used for calculating the relative distance between the two vehicles. The establishment of model was detailedly described in Ref. [15]. The calculation results are shown in Fig. 7.

Fig. 7
figure 7

Calculation of the vehicle distance

2.3 Vehicle Type Detection

The input images were preliminarily screened using LBP feature classifier trained by Adaboost algorithm [16], and then further use HOG classifier trained by SVM for identifying the preliminary selection results [17, 18]. In this study, 10,256 samples were used for the training of LBP feature classifier. For SVM training 1130 small vehicle samples, 1206 medium vehicle samples and 1282 oversize vehicle samples were used. Additionally, 2549 negative samples were also included in the training process. Figure 8 shows the multi-classification results of vehicle types.

Fig. 8
figure 8

Multi-classification identification results of vehicle types

3 Establishment of the Evaluation Model of Driving Danger Degree

The dangers of driving lie in multiple driving factors. In this study, lane, vehicle type, and vehicle distance were taken into overall consideration for evaluating the driving danger. Furthermore, these indexes should be quantified in actual modeling. The qualification criterion is described below.

  1. 1.

    Lane module: during the driving process, the front vehicle and the following vehicles can run in a same lane or different lanes, which were quantified as 0 and 1, respectively.

  2. 2.

    Vehicle type module: According to actual conditions, this index can also be divided into four conditions, no vehicle in front, small vehicle in front, medium vehicle in front and oversize vehicle in front, which were quantified as 0, 1, 2, and 3, respectively.

  3. 3.

    Vehicle distance module: According to Highway Traffic Management Regulations in People’s Republic of China, the following distance should be no less than 50 m when driving on a highway at a speed of below 70 km/h; No less than 100 m when driving on a highway at a speed of over 70 km/h. Therefore, the vehicle distance can be discussed according to the following three conditions: over 100 m, 50–100 m and smaller than 50 m, respectively, which were quantified as 0, 1 and 2, respectively.

3.1 Basic Principle in Evaluation Model Establishment

  1. 1.

    In case of no vehicle in front, the output of vehicle type detection module was 0, i.e., the danger coefficient equaled to 0.

  2. 2.

    When the distance from the vehicle in front exceeded or equaled to 100 m, the current vehicle distance can guarantee the safe driving of these two vehicles in a safe distance, i.e., the output of vehicle distance was 0 and the danger coefficient was 0.

When the vehicle in front and the object vehicle were not in a same lane, and meanwhile, the detected was small vehicle and the distance between two vehicles exceeded 50 m, these cases show the lowest danger level, with the corresponding danger coefficient of 1 (Tables 1 and 2).

Table 1 Danger coefficient in case of standard driving
Table 2 Relationship between vehicle type and danger coefficient
  1. 3.

    Effects of the difference in vehicle type on danger coefficient

Vehicle weight and volume can affect the safety in driving. Under the same other conditions, the passengers in heavier and larger vehicles can be well protected than those in lighter and smaller vehicles. Therefore, when the vehicle type was increased by a level, the danger coefficient of driving was doubled compared with the standard driving condition.

  1. 4.

    Effects of the difference in vehicle distance on danger coefficient

In this regard, whether the vehicle behind can successfully braked within the current distance can affect the safety in driving. The energy conversion in a vehicle’s braking can be written as:

$$ E_{0} - f \cdot S = E_{1} $$
(3)

where \( E_{0} \) denotes the vehicle’s initial kinetic energy, \( E_{1} \) denotes the vehicle’s remaining kinetic energy, and \( f \cdot S \) denotes the energy produced by friction in braking process. After the braking, the vehicle’s remaining kinetic energy decreased gradually with the decrease of the driving speed. As described in Eq. (3), the vehicle’s remaining kinetic energy is linearly and inversely proportional to the traveling distance. Therefore, the risk was doubled as the vehicle distance was increased by a level (Tables 3 and 4).

Table 3 Relationship between distance and danger coefficient
Table 4 Relationship between lane and danger coefficient
  1. 5.

    Effects of lane condition on danger coefficient

The lane where the vehicle runs can also affect the safety in driving. Specifically, for the vehicles in different lanes, the common accidents are scratching; for the vehicle in a same lane, the common accidents are rear-end. In generally, collision is more dangerous than scratching, and thereby, the danger coefficient when the vehicles are in same lanes is greater than that when the vehicles in a same lane. In this study, the former was set as double of the latter.

3.2 Multiple Regression

After the effects of lane, vehicle type and distance on driving safety were comprehensively evaluated, we performed cross-over analysis on these three factors. Assuming that the combination of two or three factors overall affected the driving safety, finally the driving danger degree was defined as the sum of the danger degrees under the above four conditions:

$$ {\text{Danger}} = A \cdot d_{\text{lane}} + B \cdot d_{\text{vehicle}} + C \cdot d_{\text{distance}} + D \cdot D_{\text{lv}} + E \cdot D_{\text{vd}} + F \cdot D_{\text{ld}} + G \cdot D_{\text{lvd}} + H $$
(4)

where

D lv :

\( = d_{\text{lane}} \cdot d_{\text{vehicle}} \)

D vd :

\( = d_{\text{vehicle}} \cdot d_{\text{distance}} \)

D lv :

\( = d_{\text{lane}} \cdot d_{\text{distance}} \)

D lvd :

\( = d_{\text{lane}} \cdot d_{\text{vehicle}} \cdot d_{\text{distance}} \)

In addition, a constant term H was introduced for reducing the effects of random error. Finally, the driving danger degree was defined as the sum of the danger degrees under the above four conditions:

4 Results and Discussion

Using multiple regression [19, 20], the model was solved and the acquired coefficients are listed in Table 5.

Table 5 Parameters in multiple regression model

Accordingly, the established model is written as:

$$ {\text{Danger}} = D_{\text{vd}} + D_{\text{lvd}} $$
(5)

It can be concluded that, whether for lane, vehicle type or vehicle distance, the combined effects of two or three factors on driving should be considered, among which vehicle distance and type were main influential factors of danger. The effect of lane condition on danger degree should be established on the basis of vehicle type and distance.

5 Conclusions

This study merged the lane detection results into the evaluation model of driving danger and performed multiple regression to establish the model based on the reasonable quantification of lane detection results, vehicle type recognition results and vehicle distance results and the analysis of energy conversion in collision. Results show that the model can reasonably account for the effects of three factors (lane condition, vehicle type and vehicle distance) on the safety in driving.