Giter Site home page Giter Site logo

detecting_road_lanes's Introduction

SDC Project1 Finding lanes

Self driving car project 1 finding lanes lines

  • These file contain IPython notebook which contains my work for project 1. Finding lane lines
  • Also contains 2 videos. The output generated from the notebook

Finding Lane Lines on the Road

Write up Project1

Finding Lane Lines on the Road

The goals / steps of this project are the following:

  • Make a pipeline that finds lane lines on the road
  • Reflect of my work

1. Pipe Line

The project aim was to use computer vision to identify lane lines on the road. For this task I have only used the helper function provided with the project. The helper functions include grayscaling, gaussian bluring, canny edge detection and hough transform. In the end I had to modify the draw_lines function to average and extrapolate the detected lines

Test images and videos are used to make the pipe line. Various parameters for canny edge detection, gaussian bluring and hough transform have been tried and optimized to these test examples

The pipe line is as follows;

  • I used read a test image and use the grayscape helper function to create grayscape version of the image.

  • I apply gaussian blurring with the kernal_size of 15 (Only odd kernal sizes are allowed)

  • I used the canny helper function to for detecting canny edges; I used a low thershold of 50 and high thershold of 150.

  • Then made masked the unwanted regions of the image using the region of interest helper function. The parameters for this were extracted from the quizes of lecture videos.

  • Then I used perfrom hough transformation using the helper function. I had to play with several to the parameters to arrive at resonable set of parameters

  • The hough helper function calls the draw lines function. I modified this function to average/extrapolate the lines generated by hough transformation. I was a fun exercise!! Here is what I did

    • I define the functions to get the slope and intercept given two points

    • I calculate all the slopes and intercepts of the points generated by hough transformation and only consider the abs(slopes) > 0.4. I arrived at this cutoff by looking at all the slopes of all the test images

    • It is obvious that all the positive slopes corresponds to left line and vice versa.

    • I then take the average of the slopes and intercepts corresponding to left and right line

    • I consider the y1 (lower part of the image) for both the lines to be equal 540 which is the maximum of y components of the image. The y component corresponding to the end of the line is the min of the y components extracted from hough space. Using y's, slopes and intercepts I calculate the corresponding x's and then use the cv2.line function to project lines onto the image.

This pipeline performed very nice on the static images. The same pipeline is applied on the video clips

2. Shortcomings

The shortcomings I can think of are,

This pipeline will not work:

  • when there is car right in front of the car.

  • when either left of right line is missing

  • when the road is curvy, we might have to use a quadratic fit to the points

3. Improvements

  • The current pipeline works really good for the static images but not that smooth on video.
  • Use a linear fitting algos for averaging and extrapolating
  • use quadratic fit instead of linear for smoothness

detecting_road_lanes's People

Contributors

sai19872000 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.