Finding Lane Lines on the Road

Here is a brief description of the image processing pipeline I built to detect the lines on both sides of the lane a car is driving in.


Combined Image


Reflection

1. Here are the few steps that each image goes through

My pipeline consists of of 9 steps. Let’s see the result of each of them on this image.

alt text

  1. I extract an image with only the yellow component.

alt text

  1. I extract an image with only the white component.

alt text

  1. I extract a grayscale image.

alt text

  1. I merge these 3 images into 1. It visually gives the same image as above.
  2. I blur a little bit the image to smooth out the contours to enhance the result of the next step.
  3. I detect the edges (strong gradient in the pixel values) using the canny edges algorithm.

alt text

  1. I mask the region of the image where I do not expect the lines to be.

alt text

  1. I perform a hough transform to detect where the lines are.

alt text

  1. I average, extrapolate and filter the lines I obtain before drawing them on the image with a slight transparency. Here is the final result.

alt text

2. Potential shortcomings with my current pipeline

I detect the lanes quite far but I do not have stability when the road color changes. The lanes go far off target on the challenge.mp4 video. My other implementation where I do not take into account the grayscale image and only rely on the white and yellow images is very robust but do not detect the lanes as far. Here is the output on the same image :

alt text

I did not try to feed some video input where the car is changing lane. This would probably show how rigid my solution is (expecting a left and a right line).

I represent the lanes by straight lines. There is an obvious shortcoming to that representation: I do not extract information regarding the curve of both lines.

3. Suggest possible improvements to your pipeline

I have the problem that I do not detect the lines very far with the solution where I only use the yellow and white pixels of the image but since I have a very good stability and accuracy with this implementation, I could use that as “Ground Truth” and try to extrapolate both lines to detect further away with the input where I use the grayscale image.