AVND_Project_01_Lanes_Lines

View the Project on GitHub

Lane Lines Detection

Goals

The main goal of this project is to develop a software pipeline in Python that annotates lane lines. The input is a video stream of a road produced by a forward facing camera, mounted at the dashboard or windshield of a moving vehicle. The output is the corresponding annotated video where two detection lines describing both the left and right lane boundaries are highlighted.

Results

In summary, the detection pipeline makes use of some of the tools discussed during Udacity course work: region masking, Canny edge detection, Hough transform, among others. My implementation specifically makes use of region masking in a more systematic way than what is discussed during classes. Specifically, I modified draw_lines() so to take the vertices that describe regions of interest (ROI) as part of its function call arguments (and renamed it as draw_lines_v). This new implementation uses the notion that the ROI ties in closely with the actual video that is being processed and as such is a fundamental piece of information just like the video itself. The ROI input is also used in the process of separating line segments into left and right boundaries, averaging them so that the edges of each segment are extrapolated accordingly. The end result is a guaranteed that each frame will contain at most two detected lines. That modification improved robustness of the detection pipeline as a whole.

I also created a function process_single_image to contain a pipeline for processing single images, rather than rewriting the same pieces of source code when processing videos. That helped troubleshooting and fine-tuning of hyper-parameters. I wrote a hough_lines_v function so the ROI information is passed accordingly, instead of any straightforward approaches that would for example hard code the information. I also used a lambda so to pass both arguments (video and ROI) at the video processing stage in the pipeline. The intent is to more consistently fine-tune ROIs that better assist processing each video.

The left and right lane lines are accurately annotated throughout most of the video provided by Udacity.