Research on adaptive lane line detection algorithm based on OpenCV-Python

Jingjing Zhang, Wenjun Ding, Yi Xin Xu, Xu Yao · 2025

Accurate and efficient detection and recognition of lane lines is one of the prerequisites for achieving autonomous driving in automobiles. To eliminate the influence of traditional algorithms on complex road conditions such as lane line wear and shadow interference, a color segmentation method and adaptive sliding window lane line detection algorithm based on OpenCV-python are proposed. The color segmentation method uses python to segment the L channel in the color space HLS and the b channel in the color space Lab, which are used as white and yellow lane lines respectively, and merge them to form a new bird's-eye view, eliminating the interference of other edges and noise; Adaptive sliding window is an improved algorithm for extracting lane lines from histogram sliding windows. The minimum effective pixel value is pre-set, and the number of lane line pixels in the first rectangular window is counted. By comparing with the minimum effective pixel value, the position of the sliding window is adaptively adjusted to accurately extract lanelines. Real car recording of video data under different environmental road conditions, using this algorithm for lane line detection and recognition of video frame images, shows good performance.

Read the paper · More papers on PaperTik