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 consisted of 5 steps.
- I converted the images to grayscale.
- Apply gaussian blur with kernel size of 5 to remove noise.
- Apply canny to detect edges which are lanes in this case.
- Apply a mask to select only regions of interest, which are more likely to be visible lanes.
- Apply hough transform to vote on edges that are more likely to be lanes.
In order to draw a single line on the left and right lanes, I modified the draw_lines() function by:
- Separate lines into left and right lanes by their slope
- Apply Least squares polynomial fit on each set of lines to get two 1-degree polynomial functions
- Draw the above polynomial functions on the image
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 it may not detect lanes correctly when there is big curves, since current solution assume the polygon position to be centered in the image/video, also it is detecting straight lines and it would fail on big curves.
A possible improvement would be to calculate polygon position based on camara position;
Another potential improvement could be to find a better algorithm to detect curves.