Skip to content

PraveenKumar-Rajendran/CarND-LaneLines-P1

Repository files navigation

Finding Lane Lines on the Road

Introduction

This project is part of the Self-Driving Car Nanodegree program at Udacity, serving as an introduction to the field of computer vision and providing a foundation for becoming a self-driving car engineer in the future.


Reflection

Lane Detection Pipeline

The lane detection pipeline consists of 5 steps, which are explained below:

  1. Conversion to Grayscale: The color image is converted to grayscale to simplify the subsequent processing steps.

  2. Gaussian Smoothing: A Gaussian filter with a kernel size of 3 is applied to the image to reduce noise and spurious gradients before running the Canny edge detection algorithm.

  3. Canny Edge Detection: The edges of the image are detected using the Canny edge detection algorithm with low and high thresholds of 80 and 250, respectively.

  4. Region of Interest Masking: A trapezoid-shaped region of interest is defined to mask out irrelevant areas, focusing only on the lane region.

  5. Hough Transform: The Hough transform is applied to detect lines from the edges obtained in the previous step.

The hardcoded values have been experimented with and optimized based on the obtained results.

The pipeline is applied to the test images, and the resulting lane detection outputs are shown below:

solidWhiteCurve solidWhiteRight solidYellowCurve
solidYellowCurve2 solidYellowLeft whiteCarLaneSwitch

During the implementation, significant effort was dedicated to identifying the full extent of the lane. This involved averaging and extrapolating the line segments to produce a stable result. The Robust Linear Model Estimation using RANSAC from scikit-learn was utilized to achieve this stability.

Potential Shortcomings

One potential shortcoming of the current pipeline is its inability to handle significant shifts in the region of the lane. Such shifts could cause the pipeline to fail in accurately detecting and tracking the lane lines.

Another shortcoming is the hardcoded nature of many parameters, which limits the pipeline's adaptability to different lighting and road conditions in videos taken under diverse circumstances.

Possible Improvements

To enhance the pipeline, the following improvements are suggested:

  1. Robustness to Curvy Roads: Consideration should be given to curvy roads to ensure the pipeline performs well in both straight and curvy road conditions.

  2. Adaptive Region of Interest: Adjust the

region of interest dynamically based on the current position of the vehicle, leveraging HD maps and sensor fusion algorithms.

About

Self-Driving Car Engineer Nanodegree Program: Project1

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published