Code Monkey home page Code Monkey logo

udacity-self-driving-car---project-1-finding-lane-lines's Introduction

Finding Lane Lines on the Road

Udacity - Self-Driving Car NanoDegree

Combined Image

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. Naturally, one of the first things we would like to do in developing a self-driving car is to automatically detect lane lines using an algorithm.

In this project you will detect lane lines in images using Python and OpenCV. OpenCV means "Open-Source Computer Vision", which is a package that has many useful tools for analyzing images.

To complete the project, two files will be submitted: a file containing project code and a file containing a brief write up explaining your solution. We have included template files to be used both for the code and the writeup.The code file is called P1.ipynb and the writeup template is writeup_template.md

To meet specifications in the project, take a look at the requirements in the project rubric

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

Reflection

1. Pipeline description

My pipeline consisted of next steps:

  • Load image

alt text

  • Define region_of_interest image

alt text

  • Convert source image to grayscale

alt text

  • Apply gaussian blur to a grayscale image

alt text

  • Apply canny edge detection to gaussian blur image

alt text

  • Mask canny edge detection and region_of_interest image

alt text

  • Use hough_lines to find all the lines and draw a single left and right lanes

alt text

  • Weighted lane_detection and source images

alt text

Procedure for extracting the lane ines

  • Get the midpoint of all lines detected
  • Determines whether the midpoint is loaded on the right or left side of the image and classifies it
  • Use a simple linear regression to get m and b parameters the midpoint of left and right lines detected
  • Define the x1, y1 and x2, y2 points to draw the left and right line to cover the region of interest x = (y - b) / m
  • Draw the left and right lane lines

2. Potential shortcomings

One potential shortcoming would be what would happen when are shades in the road or too much light

3. Possible improvements to pipeline

A possible improvement would be to detect lane lines by color in order to have some redundancy

The Project

If you have already installed the CarND Term1 Starter Kit you should be good to go! If not, you should install the starter kit to get started on this project.

Step 1: Set up the CarND Term1 Starter Kit if you haven't already.

Step 2: Open the code in a Jupyter Notebook

You will complete the project code in a Jupyter notebook. If you are unfamiliar with Jupyter Notebooks, check out Udacity's free course on Anaconda and Jupyter Notebooks to get started.

Jupyter is an Ipython notebook where you can run blocks of code and see results interactively. All the code for this project is contained in a Jupyter notebook. To start Jupyter in your browser, use terminal to navigate to your project directory and then run the following command at the terminal prompt (be sure you've activated your Python 3 carnd-term1 environment as described in the CarND Term1 Starter Kit installation instructions!):

> jupyter notebook

A browser window will appear showing the contents of the current directory. Click on the file called "P1.ipynb". Another browser window will appear displaying the notebook. Follow the instructions in the notebook to complete the project.

Step 3: Complete the project and submit both the Ipython notebook and the project writeup

udacity-self-driving-car---project-1-finding-lane-lines's People

Contributors

cesar-vargas88 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.