With the rapid increase of China’s car ownership and the rapid popularization of new energy vehicles,road traffic safety has attracted more and more attention.Forward Collision Warning is one of the most typical applications in automotive assisted driving systems.The traditional collision avoidance warning system mainly uses ultrasonic or radar sensors to obtain multi-directional vehicle driving environment information,but high-precision sensors have the disadvantages of high cost and difficult maintenance.In this paper,the binocular camera composed of image sensor OV4689 is used as a environmental perception tool,and the image information obtained is more intuitive and comprehensive than the data obtained by ultrasonic or radar sensors.Moreover,in recent years,deep learning technology based on image detection has developed rapidly,and the performance of embedded processors based on GPU computing has been greatly improved.In this paper,a front-vehicle recognition and collision avoidance warning system based on image detection is designed,and the main research contents are as follows:1.In terms of vehicle recognition,this paper compares and analyzes typical deep learning object detection algorithms based on image detection,highlights the comprehensive performance of YOLO series algorithms based on regression in all aspects,and selects YOLOv5 s as the baseline network.According to the starting point of embedded applications,the lightweight improvement is carried out on the basis of it,and the improved model reduces the number of network parameters by 23.13% compared with the original model.In this paper,the vehicle target dataset is independently established and divided into four categories: car,bus,motorcycle and truck,and the dataset contains 4108 real traffic scenes.Experimental analysis is carried out on the basis of this dataset,and the results show that the weight file of the improved model is reduced by 3.1M compared with the original model,and the detection accuracy is slightly improved.2.In terms of vehicle distance measurement,the improved YOLOv5 s algorithm is combined with the SGBM semi-global binocular stereo matching algorithm with both real-time and accuracy.The target recognition of the left image is carried out,the detection result is stereoscopic matched with the right image,so as to obtain the parallax map,the actual distance between the target and the binocular camera is calculated according to the principle of binocular visual ranging,and finally the ranging error analysis is carried out in the actual scene,and the results show that the relative error is about 5% at a distance of15 m,which meets the functional requirements of the system;In this paper,the braking process of automobiles is analyzed,and a safe distance model of moving vehicles is designed on the basis of which a model of safe distance is designed.3.In order to meet the embedded operation of the system,this paper selects a128-core Maxwell architecture GPU through comparative analysis of the more popular GPU computing platforms on the market,and designs some peripheral circuits,and finally burns the Nvidia official Jetpack image to build a deep learning development environment in the Linux system.Then,according to the different power requirements of each module,the power supply circuit is designed to realize the embedded operation of the system.Finally,according to the overall system plan,the system is carried out in the real vehicle environment,and the early warning function test is carried out on the road around the school,and the results show that the early warning is accurate and there is no false alarm operation. |