Skip to content

varunasthana92/Lane_Detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lane Detection

Objective of the project is to detect the drive lane on the given data set (a video). Project was part of the academic coursework ENPM673-Perception for Autonomous Robots at the Univeristy of Maryland-College Park.

Dependencies

  • opencv 3.3.1
  • numpy 1.16.6
  • matplotlib 2.2.5

How to Run

Use the below command to run the lane-detector on the provided input video.
--saveImgs : Set 1 to save pipeline processing images. Default 0
--saveVideo : Set 1 to save final output as a video. Default 0

python detect.py --saveImgs=1 --saveVideo=1

Pipeline

  1. Convert the scene into bird-eye view with a Homography.
  2. Trim the field of view according to camera position to get area of interest (i.e. road).

  1. Create a binary image from the trimmed image. White and yellow pixels are retianed (for white and yellow lanes).

  1. With histogram along the width of the image, detect the left and right lane start points at the bottom of the image (mean of pixel x values). Left lane point will be in left half width and right lane point will be in the right half width (assuming camera center to be at the mid of the image).

  1. Divide the height of the binary image into defined number of boxes. Detetct x-mean of white pixels in each successive box to track the lane. Once all center points of left and right lanes are detected, fit a line from these pixel points to get the missing points between lane patches (for continuous lane detection).

  1. With inverse homography, plot these detected points.

Contact information

Name: Varun Asthana
Email id: varunasthana92@gmail.com

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages