Street Lanes Finder - Detecting Street Lanes for Self-Driving Cars 🚗
In today’s article, we are going to use basic Computer Vision techniques to approach the street lanes detection problem which is crucial for self-driving cars. By the end of this article, you will be able to perform real-time lane detection with Python and OpenCV.
You can find the full codebase for this project on GitHub and I encourage you to check it and follow along.
You can't perform that action at this time. You signed in with another tab or window. You signed out in another tab or…
Let’s start with defining our problem.
Given an image of the road, we would like to detect street lanes on it.
In order to do it, let’s provide an image path and load it with OpenCV, then let’s invoke find_street_lanes pipeline with it.
test_image = cv2.imread(INPUT_FOLDER + TEST_IMAGE)
street_lanes = find_street_lanes(test_image)
And this is how our find_street_lanes pipeline looks like
The first step of our pipeline is an image conversion from color to grayscale. We do it because in our case color values don’t hold any valuable information so to make further processing simpler and faster, we convert from three channels to one.
grayscale = (r + g + b) / 3