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 we will detect lane lines in images using Python Modules (MatPlotLib, Numpy, MoviePy and IPython) and OpenCV.
- OpenCV means "Open-Source Computer Vision", which is a package that has many useful tools for analyzing images.
- MoviePy is a Python module for video editing, which can be used for basic Operations (like custs, concatenations, title insertions), Video Composing (a.k.a. non-linear editing), Video Processing or create advanced effects.
- MatPlotLib is a Python 2D plotting library which produces pulication quality figures in a variety of hardcopy formats and interactive environments across platforms.
- Numpy is the fundamental package for scientific computing with Python.
- IPython means "Interactive Python" is a command shell for interactive computing in multiple prgoramming launguages, Originally developed for the Python Programming.
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 8 steps.
- Extracted blue channel from a color image.
- Added noise to the image by using gaussian with kernel of size 5.
- Detected edges using canny edge detection algorithm.
- Applied a mask to the image with edges to eliminate not important regions.
- Extracted lines using hough line detection algorithm.
- Determined slopes of lane lines by averaging and separting left/right line segments.
- Extrapolated lane lines.
- Drawn lane lines on the original image.
- Several times the detected lane lines are unstable - fluctuating value of line slope.
- Hardcoded values for region of interest and all parameters.
- Variable performance on different light/weather conditions.
- Adaptive parameter values.
- Smooth out lane lines (kalman filter)