Skip to content

Lane lines detecion on road images, using Open CV library.

Notifications You must be signed in to change notification settings

SelfDreyeve/Lane-Detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Lane-Detection

Detecting lane lines on road images using Open CV library.

In this project, we've been working on defining simple functions to detect lane lines on the road in videos.

The steps we've taken to achieve the outcome in the gif above were:

  1. Choosing the best color space to highlight the lanes as best as possible. We've chosen HLS color space.

hls

  1. Since the lane colors changed to green and blue, we then set up the lower and upper threshold to select only the color pixels we're interested in.
  2. Converting HLS images into gray scale.
  3. Smoothing the edges.

Smoothed

  1. Canny Edge Detection

    • If a pixel gradient is higher than the upper threshold, the pixel is accepted as an edge.
    • If a pixel gradient value is below the lower threshold, then it is rejected.
    • If the pixel gradient is between the two thresholds, then it will be accepted only if it is connected to a pixel that is above the upper threshold.
    • Canny recommended the upper:lower ratio between 2:1 and 3:1.
    • If the high threshold is too high, we'll see no edges.
    • If the low threshold is too low, we'll see too much noise
  2. Selecting the region of interest (to focus the lane detection on the region where the lanes actually are)

  3. Hough transform for recognizing lines in the image by use of parameters like minimum gap between lane pixels and maximum gap.

  4. Extrapolating and averaging the detected lines.

detected_extrapolated

  1. Defining the final pipeline that takes video, performs lane detection and outputs the images with detected lanes.

The notebook in this repository doesn't require any installs in order to run. Everything needed (including the data) is already there. We used the images and videos from Udacity Lane Detection repository.

About

Lane lines detecion on road images, using Open CV library.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages