Path Optimization for Autonomous Driving Using Lane Detection in Python
Keywords:
Autonomous driving, Canny edge detection, computer vision, Hough Line Transform, lane detection, OpenCV, path optimization, region of interest.Abstract
Autonomous driving depends on real-time perception and decision-making for safe navigation, and one of the central
problems in that pipeline is path optimization, which requires accurate lane detection and tracking. This paper
describes a computer vision approach to lane detection implemented in Python with OpenCV. The system processes
video frames from multiple sources, applying grayscale conversion, Gaussian blurring, Canny edge detection and the
Hough Line Transform to identify lane boundaries. A region of interest is defined to focus on the section of the frame
where lanes actually appear, filtering out trees, signs and vehicles that would otherwise register as edges. The detected
lanes are overlaid on the original frames, giving a visual representation of the optimized path. The system handles
multiple video streams and was tested across different road conditions and lighting. The pipeline is deliberately built
from classical operations rather than a trained model, which keeps it fast enough to run per-frame on modest
hardware and keeps its failures interpretable: when detection breaks down, the stage responsible can be identified.
The limitations of that choice are also examined, since a rule-based pipeline is sensitive to lighting, cannot handle
sharply curved lanes well, and has no way to infer lane structure where markings are missing.
