Finding Lane Lines on the Road
The goals / steps of this project are the following:
- Make a pipeline that finds lane lines on the road
- Reflect on your work in a written report
My pipeline consisted of 5 steps.
Preview of all 6 images:
Pipeline worked fairly well on the first two videos.
Video 1
Video 2
Video 3: Challenge Video (This video is not completely perfect, but did fairly well except for areas where there is little contrast between the lane lines and the road):
In order to draw a single line on the left and right lanes, I modified the draw_lines() function by applying following logic and modifying the algorithm.
- Calculate slope and intercept for each line
- If slope < 0; it is a negative slope. Append slope to neg_slope and intercept(b) to neg_intercept.
- If slope > 0; it has a positive slope. Append slope to pos_slope and intercept(b) to pos_intercept.
- Calculate average of neg_slope, pos_slope, neg_intercept, pos_intercept
- Use the parameters to line equation to get values for line start and end points and finally draw the line.
If you'd like to include images to show how the pipeline works, here is how to include an image:
One potential shortcoming would be when there is little contrast between the lane lines and road surface. This issue was observed in the challenge video wherein for a short span the lane detection went jittery.
Another potential shortcoming could be when the road conditions are not smooth. Currently, the pipeline works good on the first two videos, and apart from the issue happening during brightness with the challenge video, the pipeline works fairly well.
A possible improvement would be to change the parameters for better fit in a generic sense.
Another improvement could be to make use of information from previous frames of the video while processing.