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 the following five steps:
1. Convert the image to grayscale
2. Apply Gaussian Blur
3. Apply Canny edge detection
4. Apply Region Masking
5. Apply Hough transformation
6. Draw lines on the left and right lanes in front of the car
I converted the image to grayscale image using opencv
cv2.cvtColor(image, cv2.COLOR_RGB2GRAY)
Applied gaussian blur with kernel size 3
cv2.GaussianBlur(img, (3, 3), 0)
Applied Canny edge detection with low and high thresholds = 75, 150
cv2.Canny(img, low_threshold, high_threshold)
Applied region masking to detect the region infront of the car
Applied hough transformation. Here I experimented with multiple parameters to get smooth detection.
This was the most time consuming step.
First I calculated average slope and based on the sign of the slope value, I determined whether the line falls on the left side or right side considering the axis (0,0) starts at the top right.
The I extrapolated the lines to join them as a single line in the output.
Current shortcoming is the final optional challenge. Apart from this, if there are no lanes at all on the road, or if there are multiple lines.
More experiments with parameters for Gaussian Blur, Hough transformation and Region masking.