Push Google Colab ipynb Notebook to Github on Google drive

5. You should get this screen next after entering your credentials. Allow GitHub to access your Colab Notebook in this step by clicking Authorize googlecolab. 6. Next, you need to specify the…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




4 Techniques Self Driving Cars Can Use to Find Lanes

Making computer see!

T eaching a computer to see has wide varieties of applications. In the context of a self-driving car, on seeing the below picture, the car has to know where the lanes are, to navigate safely.

Can you find lanes on the road?
Test Image From Udacity’s Self Driving Car Nano-Degree course

We will look at a few techniques to find lane lines.

A colored image is made of a stack of 3 images, each corresponding to red, green, and blue channels. The above image can be split into three separate images as shown below

Image split into 3 channels

Since lanes are white markings on the road, these can be identified, by filtering out pixels, whose values are less than a certain threshold. By choosing the right thresholds, the following output can be produced.

Output after applying color thresholds

However, this does not fully solve our problem, because you can see other white spots in the image, that are not lanes.

Assuming the camera that took pictures of the road is mounted on a fixed position in the front of the car, the lane lines will always appear around a general region of the image. Applying that region of interest to the images (blue dotted region), we are now able to eliminate non-lane lines, as shown below.

Output after applying color threshold and region masking

However, under varying lighting conditions (day, night, shade, etc) and lane colors (yellow, etc), the two techniques we looked at so far, may fail to detect lanes. Hence the need for more sophisticated algorithms.

This technique helps find edges of objects in an image.

GrayScale Image

The brightness of each pixel corresponds to the strength of the gradient at that point. We find edge pixels by tracing out the pixels that follow the strongest gradients. By identifying edges, we can more easily detect objects by their shape.

Canny Edge Detected Image

The output of applying a canny edge detection algorithm shows an image full of dots, that represent edges of lane lines as well as other objects.

Since we are interested in finding lane lines only, we can model a line, and then fit that line model to the assortment of dots, to detect lane lines. To make it easier to work with lots of dots, we use hough space.

After applying Hough transformation, on the canny edge detected image, and performing parameter tuning, we are now able to detect lanes, as shown below.

Image With Lane Lines Identified

The application of the above techniques resulted in the car accurately identifying lanes, as shown in the video below.

As it moves, Car can identify lanes

Even though my algorithm was able to detect lanes accurately in the above video, it might fail to detect lanes correctly in several other cases. Such cases could include a combination of different conditions, like lighting (day, night, shade), curves, etc.

These shortcomings were addressed in the next article (see link below)

The final video is the output of my ‘Finding Lane Lines Project’, of the Udacity self-driving car nano-degree program.

Add a comment

Related posts:

Email List Verification

You spend a lot of time building the perfect email campaign. Don’t send it to a list that hasn’t been verified. Set up your campaign for success. Improve campaign performance, deliverability…

The Best of Demaryius Thomas

Late last night I heard the tragic news that Demaryius Thomas had died, and I immediately thought about the 2011 AFC Wild Card Game. He had an amazing performance, four catches for 204 yards and an…

How Joe And Christian Massa Are Using Film To Fight Mental Illness

It is a silent film without any dialogue, only music. It starts with statistics about suicide. A man encounters a hooded figure.