Coder Social home page Coder Social logo

opencv-lane-detection's Introduction

Curved Lane Detection for Self Driving Cars | OpenCV Python

By Sudharsan Ananth

Table of Contents
  1. Introduction
  2. Dependencies
  3. Prerequisites
  4. Run the code
  5. License

Introduction

This Repository consists of code to estimate Lane curvature from front view images captured from a car. The code uses openCV library to process the image and overlay the output. This can be implemented in real time using a live camera feed by changing cameraFeed=True

Working video

Output

Dependencies

This project is built with the below given major frameworks and libraries. The code is primarily based on python. And the environment is created using Anaconda.

Prerequisites

  1. Python 3.7 (skip if downloading conda)
  2. Conda (Either miniconda or Ananconda)

Run the code

Simply clone the repo cd into the right directory and run code using the below commands. Step-by-Step instructions given below. Simply change the directory and run agent.py from the directory RL_car_game. You will be able to see the agent training and getting better in minutes.

  1. Clone the repository using

    git clone https://github.com/sudharsan-007/opencv-lane-detection.git
  2. cd into the directory opencv-lane-detection

    cd opencv-lane-detection
  3. Recommended: create a conda environment

    # We require python>=3.7
    conda create -n cv2_lane_detection python=3.7 numpy 
    conda activate cv2_lane_detection
  4. Install pickle (Skip if import pickle works)

    pip install pickle4
  5. Install openCV-python. Please refer openCV website.

    # https://docs.opencv.org/4.x/d6/d00/tutorial_py_root.html
    pip install opencv-python
  6. If the above code does not work for you try this(skip this step 5 worked).

    conda install -c conda-forge opencv
  7. Add video that you want lane detection to run on in the same directory.

  8. Change the directory name inside the python file LaneDetection.py and Run LaneDetection.py from this directory and from inside this environment.

    python LaneDetection.py

License

Distributed under the GNU General Public License v3.0 License. See LICENSE.txt for more information.

(back to top)

opencv-lane-detection's People

Contributors

sudharsan-007 avatar

Stargazers

Alfonso Blanco. avatar Gabriel Lara avatar GeoKou avatar  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.