Abstract:In order to quickly and accurately identify the driving area of cars and distinguish lanes,achieving autonomous driving.This paper proposes a method for lane detection using an object detection and tracking model that combines visual OpenCV algorithm and improved YOLOv5 algorithm.In the image preprocessing stage,Firstly,read the video image and convert each frame of RGB image into a grayscale image.secondly,uses the Canny operator to extract the edge contour of the image,and then combines the masked area of lane lines with edge detection,Using ROI technology to extract regions of interest.Finally,perform probability Hough transform and least squares fitting to draw the obtained straight line into the original image,and finally output the processed image for each frame.The target recognition module adopts convolutional neural network(CNN)deep learning method and YOLOv5 algorithm for target recognition processing.The experimental results show that the proposed detection algorithm can achieve accurate lane detection,with much higher real-time and accuracy than traditional algorithms,and this method has good robustness.