Giter Club home page Giter Club logo

sdc-term1-finding-lane-lines-on-road's Introduction

Self-Driving-Car-ND Term-1

Udacity - Self-Driving Car NanoDegree

Project: Finding lane lines on the road


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 on your work in a written report

  • The results are as below.


  • Dependencies: OpenCV and Python3
  • Techniques used for the pipeline implementation: Grayscale, Gaussian Smoothing, Canny edges detection, mask region of interest, and Hough transform.

Reflection

1. Describe your pipeline.

In this part, we take the image below as the input, and the pipeline method is described in the following steps:

Figure 1: Original image.

We convert the original image to the grayscale image as in Figure 2 below: Figure 2: Gaussian Smoothing.

We apply the Canny edges detection algorithm to extract the edges of the Gaussian Smoothing image, we still keep the low threshold and high threshold at 50 and 150 as recommended, respectively. Note, I have tried to change these values, but the videos have been crashed when running for some reasons.

  • Update: we have improved the code and the low threshold and high threshold are changed to 28 and 90, respectively.

Figure 3: Canny edges detection.

We then mask the trapezoid shape (region of interest) to the image above to use for identifying the lane lines. I have found that the best combination for the hough transform parameters is as follows: rho = 1; theta = (2* np.pi / 180); threshold = 20; min_line_length = 5; and max_line_gap = 20;

  • Update: We have improved the code with the new updated parameters as follows: rho=2; threshold=15; min_line_length = 10; others are unchanged.

Figure 4: Masked edges region of interest.

For the draw lines function, we have added the calculation of the slope and the upper bound of the lines for both sides. Then we draw the lines based on the resulted points on left line and right line. Figure 5: Hough transform on the edges detection of the image.

Finally, we merge the output of the hough transform image with the original image, the result is as below.

The outputs of the pipeline method are good enough to keep the lines on the correct sides.

2. Identify potential shortcomings with your current pipeline

One potential shortcoming would be that the noise is too large for light-colored lane lines as in the "challenge.mp4". The current pipeline is not robust enough to detect the left lane line correctly. We ran the challenge.mp4 video, the right lane line is good but the left one is not. Then, we ran the raw detected edges without using drawing lines function, it showed that a lot of lines are poped-up when the car passes the white road. Note that the current pipeline method works fine with the dark road. I am still trying to figure out to fix this issue.

  • Update: I have fixed this issue.

3. Suggest possible improvements to your pipeline

A possible improvement for the current pipeline would be to modify the vertices. Instead of the trapezoid shape, we could split the shape into two seperated shapes for left lane line and right lane line.

  • Update: I have updated this issue.

sdc-term1-finding-lane-lines-on-road's People

Contributors

ttungl avatar

Stargazers

 avatar  avatar

Watchers

 avatar  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.