Giter Club home page Giter Club logo

findlanelines's Introduction

Finding Lane Lines on the Road

The result https://youtu.be/gtjwOifrxhQ

Overview

When we drive, we use our eyes to decide where to go. The lines on the road that show us where the lanes are act as our constant reference for where to steer the vehicle. This project was the very first step in developing a self-driving car is to automatically detect lane lines using in images using Python and OpenCV.

How to Run the Program

Step 1: Set up the CarND Term1 Starter Kit

Step 2: Open the code in a Jupyter Notebook

> jupyter notebook

Click on the file called "P1.ipynb". Another browser window will appear displaying the notebook.

How the Program Works

The program mainly consists of 7 parts.

original image

alt text

  1. Convert images to grayscale.

alt text

  1. Extract the pixels of the image with higher value since the yellow and white lane is relatively white in grayscale.

alt text

  1. Apply gaussian blur to remove noise in the image.

alt text

  1. Apply canny edge detection to find the edge of lanes in the image.

alt text

  1. Mask by polygon to extract roughly where the lanes are.

alt text

  1. Apply probabilistic Hough transform to find straight line segments to draw.

alt text

  1. Combine drawn lines and the original image.

alt text

2. Potential Shortcomings with the current program

As my method crops out the bottom half of the image by the trapezoid, I imagine the outputed lines will be much off from the actual lane in the more real-life image since the given test video and images were under the almost best condition such as the straight lane, sunny day, and no shade on lanes.

My algorithm always represents lanes as two straight lines no matter what. Apparently this cannot be sufficient when a car encounter a quick curve.

In bad whether or road with shade, the grayscale value of each pixel could be much lower, which results that the lanes are corpped out through the current color masking.

3. Possible Solution

To adupt the different light condition, I would suggest use HSB space instead of RGB space for color masking. Since it's easier to select similar color with different brightness. That is, specifing small range of hue and somewhat wider range of saturation and brightness would easily extract the pixel of a cirtain color.

findlanelines's People

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.