Finding Lane Lines on the Road
This is my first project with Udacity’s SDCND
The goal of this project is to build a pipeline that finds lane lines on the road.
The pipeline consists of following steps:
- Convert RGB image to Grayscale image
- Apply a slight Gaussian blur to smooth the image by setting a kernel size of 3
- Perform Canny Edge detection
- Define region of interest & mask away undesired portions of the image
- Retrieve Hough lines
- Apply lines to the original image
Steps followed to draw a single line on the left and right lanes:
- Classify left & right lanes based on the slope.
- Compute average of lines each side
- Calculate the slope & intercept of each average line
- Using the slope & intercept, extrapolate the line to the bottom and apex of the lane
- Plot the extrapolated line
Solid White Right Lane Lines
Solid Yellow Left Lane Lines
Shortcomings with the current pipeline
Although the pipeline works on the first two videos, Some changes are required for third video to work. It currently works only for straight lanes. If the road has bends / curves, the lane detection fails.
Possible improvements to the pipeline
- Applying ML to this problem could optimize it by looking at the past frames.
- The tuning of hough transform & edge detection has to be improved & should be automated.
- Calculation of region & color mask range can be automated