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
In this first step we try to capture the relevant aspects of the picture. For that we apply color selection to the image, we processes all the white and yellow colors and then we convert it to grayscale. This strips most of the things away leaving us with the lanes and some noise to work on.
We apply Gaussian Blur to smooth out the picture.
We use canny algorithm for edge detection.
To remove noise from the picture (e.g. sky, trees, etc that we could not remove before) we crop the picture assuming that the camera is in the center of the car on a fixed position.
Next we apply hough transformation to detect the lines in the picture.
In here we use a linear regression to join all the lines provided by Hough's algorithm.
- It is not hard to recognize that the code would only work while on rects or very smooth curves
- There is also an issue that would happen when the car is transitioning lanes
- Any factor that may alter the colors on the picture can play a major role in the identification (weather, very dirty lanes, etc)
- Polyfit algorithm used for the linear regression is very sensitive to outliers, this is causing major issues. Even if I applied an outliers filter based of an statistical model it is still not 100% accurate and some circunstances trigger the lines to severly deviate from the standard.
- Use ML for better identification of the relevant aspects of the picture and also for outliers detection
- Make it work on curves and transitioning lanes
- I believe this model is not highly scalable and that a whole new approach needs to be introduce to make it work on more real applications.