| Economic development and continuous population growth have made cars a common means of transportation in every household,but the number of road accidents is also increasing year by year,among which road accidents caused by drivers’ inability to react promptly to unexpected situations and lack of wrong assessment of road conditions,these accidents account for more than 80% of all road accidents.During daytime driving,traffic accidents are caused by drivers’ vision being disturbed by bright lights that affect driving operations.In order to avoid generating more casualties,this paper proposes a vehicle distance detection system based on a monocular vision deep learning algorithm in a bright light background,which first uses the improved YOLOv5 s algorithm to detect and identify the target vehicle in the image,measures its distance based on the detection and identification of the vehicle in the image,and uses an image brightness correction algorithm to suppress the vehicle image glare to enhance The image contrast is enhanced by using the image brightness correction algorithm to suppress the vehicle image glare in order to achieve the system’s recognition and distance measurement of the vehicle under the glare background.Firstly,this paper uses the improved algorithm model based on YOLOv5 s to recognize and detect the vehicle ahead.Based on the YOLOv5 s algorithm model,the Hardswish activation function is used to replace the original activation function.The replacement activation function aims to solve the problems of poor vehicle detection accuracy and difficult detection of small targets caused by the disappearance of the training gradient of the YOLOv5 s algorithm,so as to improve and optimize the algorithm detection model.The PAN network is replaced by the BiFPN network structure in the Neck network.The attention mechanism module is added to the YOLOv5 s algorithm backbone network to improve the feature extraction capability of the network model for small and medium-sized objects.The algorithm model is trained using both homemade and public datasets in the paper,and the improved algorithm model is tested by experimental data.Compared with the unimproved algorithm model,the improved algorithm model is effectively improved for vehicle detection and recognition accuracy.Secondly,a geometric distance measurement model based on monocular vision is used to measure the vehicle distance.The distance measurement model includes not only the geometric relationship between the measured target and pixel points,but also the conversion relationship between pixel coordinates and world coordinates.The distance measurement model is combined with the vehicle recognition and detection model to identify the vehicles in the image and complete the distance measurement of the vehicles ahead.Finally,for the safety hazard of bright light interference affecting the driver’s vision and thus affecting the driving operation,this paper uses an image adaptive luminance correction algorithm model,which is based on the Gamma algorithm for adaptive luminance correction of vehicle images,the main function of which is to suppress the high-frequency component of light in the image,improve the low-frequency part,and increase the contrast of the image.In the experiment combined with the improved vehicle detection model and distance measurement model,before and after the vehicle image brightness correction were experimented and compared and analyzed,and the experiment verified that the accuracy of vehicle recognition after the vehicle image brightness correction by the improved vehicle detection and distance measurement model was improved compared with that before the image brightness correction,and the accuracy of the distance measurement of the vehicle ahead in the vehicle image was improved. |