You can use this file as a template for your writeup if you want to submit it as a markdown file. But feel free to use some other method and submit a pdf if you prefer.
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
1. Describe your pipeline. As part of the description, explain how you modified the draw_lines() function.
My pipeline has 8 steps:
In order to draw a single line on the left and right lanes, I modified the draw_lines() function by getting the slope, averaging it and calculating new points for x1
, y1
, x2
and y2
. If the slope is ± infinite I simply skip those points. If no suitable points are found I don't draw a line.
See the Jupyter notebook for code. See the test_videos
directory for output videos.
There are a couple of shortcoming:
- When lines from canny come into the masked area they're wrongly identified as part of the lane lines
- Lines or texture in the road that are not part of the lane lines are detected as lane lines, this could be overcome by adding a second mask on the inside of the lane lines so that only the lane lines themselves are considered at, not the road.
- Shadows over the lane lines make them harder to detect
- Heavily curved road falls outside of the mask, or can't be detected at all, or of it is detected might be wrongly selected as belonging to the opposite lane line
Ways to improve:
- Add a second mask on the inside
- Try a totally different approach in combination with this one
- Keep a record of a couple of previously detected lines and use that to update the mask. Look an offset to either side of the previously detected line
- Tune the hyperparameters