Lane departure warning algorithm based on probability statistics of driving habits
For the different degrees of danger caused by different driving habits, a lane departure warning algorithm based on probability statistics of driving habits is proposed in this paper. According to the different driving habits of different drivers, the early warning mechanism can be adaptively adjusted through the method of probability statistics to make lane departure warning more targeted and accurate. Firstly, each frame of image is preprocessed, including gray treatment, edge detection and binarization. Then, Canny operator is used to detect the edge, and Hough transform is applied to detect the lines. And the lane median line equation for the detection and identification of lane also can be calculated. After that, the image coordinate system is transformed into the world coordinate system by means of the formula and matrix of coordinate conversion. According to the theory of Kalman filter, the statistics of lateral acceleration and lateral velocity are updated continuously, and the position of the vehicle in the next moment is predicted by the state transition equation and the forecast equation. From the results of experiments and the comparison with exhaustive algorithms, the advantages of using Kalman filter to predict the location of vehicles and the improved time to lane crossing combined with probabilistic statistics to warning are illustrated clearly.