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 6 steps.
- Converted the images to grayscale.
- Applied the gaussian noise kernel.
- Applied Canny transform
- Applied an image mask
- Applied hough lines transform
- Draw transparent lines on the image
- (Optional) Save image to the subdirectory "test_images_output" with prefix "output_"
In order to draw a single line on the left and right lanes, I modified the draw_lines() function by seperating the lines by slope, removing horizontal and vertical lines and averaging the lines then getiing the slope and offset. Finally, I extrapolated the lines to the botton of the image and the top of the lane.
Below it is one of my output images. You can find more under the subdirectory "test_images_output"
One potential shortcoming would be what would happen when there is no lines was detected in the image, my code will ignore that and draw no line.
Another shortcoming could be when the vehicle is entering a curve, my draw_line() will be mess up.
A possible improvement would be to perserve the last drawn line in the image when there is no line was drawn. After a specific timeout (means no new line was drawn), it should raiseup a warning flag.
Another potential improvement could be to sorting the lines by region, using those lines in the near botton region which will be close to the vehicle. Then we can average the lines position then calculate the slope and offset. Finally we can get the correct lanes.
Video recordings for success cases.
Success to plot lane lines on solid white right video.
Success to plot lane lines on solid yellow left video.
End-of-File