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.
This project will detect lane lines in images using Python and OpenCV. OpenCV means "Open-Source Computer Vision", which is a package that has many useful tools for analyzing images.
To meet specifications in the project, take a look at the requirements in the project rubric
The goals of this project are the following:
- Make a pipeline that finds lane lines on the road
- Reflect on my work in a this written report
Reflection describes the current pipeline, identifies its potential shortcomings and suggests possible improvements.
My pipeline consists of these steps.
- Getting Image Source. This will return original image.
- Region Masking. Applies an Image Masking. Only keeps the region of the image defined by the polygon formed from vertices. The rest of the image is set to black.
- Grayscale. This will return an image with only one-color channel.
- Gaussian Blur. Applies a Gaussian Noise Kernel.
- Color Selection. Applies the Color Selection.
- Canny Edge. Applies the Canny Edges Transform.
- Hough Transform. Applies the Hough Transform.
- Draw Lines. Drawing Solid Lines based on slope from Hough Transform result.
- Weighted Image. Combine Lines and Real Image.
There are several potential shortcomings.
- Potential shortcoming would happen when lanes meet sharp-turn. Need to be fixing the slope algorithm.
- Another shortcoming would happen if the line not solid, and the color not consistent.
- Another shortcoming would happen if the line not visible, maybe there are object covering it.
- Another shortcoming would happen if the line covered with shadow on one side. For example, if left line not covered, and right line covered, then only left line that detected by this algorithm.
- And one more shortcoming would happen if the resolution of Images/Videos different (not standardized). Because the lines that created, using fixed coordinates.
There are several possible improvements.
- Possible improvement would be to creating a historical data of slope. So we can predict next slope depend on before data. And then we can using statistics for searching the slope, not simple just like this, only counting the average value.
- Another possible improvement would be to create dynamic algorithm for drawing a lines. Possibly by using shape of the image, and then proportionally using that for drawing a lines.
- Or maybe adding more Advanced Image Processing techniques.
I try the Challenge video and adding one my own video. Very Excited!
This project is licensed under the MIT License - see the LICENSE file for details