Giter Club home page Giter Club logo

lane_detector_for_self-driving_cars's Introduction

CPPND: Capstone Self Driving Car Lane Detector

Please check the last section of this README for commentary on the changes made to the starter repository and the points of the rubric addressed.

This is Capstone project for C++ Udacity NanoDegree by using C++ and OpenCV to implement lane detector for self-driving cars.

Dependencies for Running Locally

Basic Build Instructions

  1. Clone this repo.
  2. Make a build directory in the top level directory: mkdir build && cd build
  3. Compile: cmake .. && make
  4. Copy: project_video.mp4 file to the same location of executable file (build/)
  5. Run it: ./laneDetector.

File Structure

.
├── CMakeLists.txt
├── CMakeSettings.json
├── GIF.gif
├── LICENSE
├── README.md
├── include
│   ├── LaneCalculator.h
│   ├── LaneDetector.h
│   ├── LanePlotter.h
│   └── LanePredictor.h
├── project_video.mp4
└── src
    ├── LaneCalculator.cpp
    ├── LaneDetector.cpp
    ├── LanePlotter.cpp
    ├── LanePredictor.cpp
    └── main.cpp

Rubric Points Addressed

Loops, Functions, I/O

Criteria Description
The project demonstrates an understanding of C++ functions and control structures. All code is seperated into functions and methods
The project reads data from a file and process the data, or the program writes data to a file. Using OpenCv's VideoCapture class I capture frames from project_video.mp4 file to process it into the program then show the result frames as video to user.

Object Oriented Programming

Criteria Description
The project uses Object Oriented Programming techniques. Most of code is located at LaneDetector, LanePredictor, LaneCalculator and LanePlotter classes
Classes use appropriate access specifiers for class members. LaneDetector which is the main class owns unique_ptr to LanePredictor, LaneCalculator and LanePlotter objects which are all private objects
Class constructors utilize member initialization lists. Done by default for most class which hold private/public data members.
Classes encapsulate behavior. LaneDetector class own private unique_ptrs to utils classes
Classes follow an appropriate inheritance hierarchy. LaneDetector is composed of LaneCalculator, LanePlotter and LanePredictor classes

Memory Management

Criteria Description
The project uses scope / Resource Acquisition Is Initialization (RAII) where appropriate. All containers used in the project are RAII-based as its from STL, and using unique_ptr in LaneDetector class data members
The project uses smart pointers instead of raw pointers. I used smart pointers specially unique_ptrs in LaneDetector class
The project makes use of references in function declarations. All objects that are non-trivally copyable are based by reference such as vectors of lines std::vector<Line>.
The project follows the Rule of 5. Implemented for all needfull classes such as LanePredictor.

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.