Finding Lane Lines on the Road
When we drive, we use our eyes to decide where to go. The lines on the road that show us where the lanes are act as our constant reference for where to steer the vehicle. Naturally, one of the first things we would like to do in developing a self-driving car is to automatically detect lane lines using an algorithm.
In this project you will detect lane lines in images using Python and OpenCV.
The goals / steps of this project are the following:
- Make a pipeline that finds lane lines on the road
This project requires Python3
Type 'python find_lane.py --[VIDEO_NAME]
In the [VIDEO_NAME] option, choose one of 'solidWhiteRight', 'solidYelloLeft' or 'challenge'
My pipeline consisted of 5 steps.
In order to draw a single line on the left and right lanes, the function 'draw_lines()' includes :
- Calculate slopes for each single line.
- Filter Hough lines by slope and end points.
- Seperate filterd lines into left/right candidates.
- Do linear fittings to identify the full extent of left/right lanes.
The image below shows how the pipeline works:
One shortcoming of this algorithm comes from 'image preprocessing', whihch is filter out all colors except yellow and white pixels. This technique can reduce the wrong detection of tree's shadows and small discrepencies on the road. However, at night or during bad weahters, simply filtering the color will harm the accuracy.
A possible improvement would be to use a more robust algorithm to filter out unwanted color pixels.
Another suggestion is to use deep learning methods to do lane detection.
Please click the following links to view the results on Youtube: