Skip to the content.

Road Lane Detection

A Computer Vision Project in Python

Overview

Lane Line detection is a critical component for self driving cars and also for computer vision in general. This concept is used to describe the path for self-driving cars and to avoid the risk of getting in another lane.

In this project, we will build a machine learning project to detect lane lines in real-time. We will do this using the concepts of computer vision using OpenCV library. To detect the lane we have to detect the white markings on both sides on the lane.

Block Diagram

image

Methodology

1. Image Processing:

To enhance the quality of image, we need to preprocess it. The processes like gray scaling, noise reduction, edge detection, and contrast and color management are applied.

image

2. Region of Interest:

ROI plays a significant role in detecting the computational complexity of lane identification and LDI systems. Only the selected regions are detected and forwarded to the next processing level. These ROI images are then employed in a suggested method for lane detection. The use of ROI shortens the time it takes for the frames to be processed.

image

3. Canny edge detection:

Canny edge detection is a technique for extracting relevant structural information from various visual objects while reducing the amount of data to be processed considerably. It’s been used in a variety of computer vision systems.

image

4. Hough Transform:

A technique known as Hough Transform can be used to separate the features of various shapes within a picture. This method is commonly used to identify arbitrary forms such as straight lines, circles, ellipses, and so on. After the canny edges detection, the Hough Transform is applied to images in order to retrieve the image pixels that are wanted. The Hough Transform is utilized in this system to detect the coordinates of lane line from the image data.

Results

Input Video

image (Click on image for video)

Output Video

image (Click on image for video)

The results of the system in different conditions are shown in the figure below:

a. Day

image

b. Night

image

c. Rainy Weather

image

Conclusion

In this lane line detection project, before detecting lane lines, we masked unnecessary objects and then identified the line with Hough transformation. The ROI-setting algorithm significantly reduced processing time. When the ROI is prioritised for optimization, not only the system’s real-time performance increased, but it also maintained a high level of robustness.