Karansutradhar / Lane-Detection-Unmanned-Vehicle

In this project we aim to do simple Lane Detection to mimic Lane Departure Warning systems used in Self Driving Cars.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Instructions to run the program for Project 2

file name : GammaCorrection.py file name : LaneDetection.py

Running instructions for GammaCorrection:

  1. To execute the code for problem 1, run the command python3 GammaCorrection.py. You will get the output which is being compared with the original video.
  2. Make sure the .py file and the video are in the same directory.
  3. The code will also write the output into the current directory.
  4. The program will destroy all the windows once the video has finished playing.

Running instructions for LaneDetection:

  1. To run the code for problem two, provide the relative path to the input video as an argument. For example, if the video is a file named challenge_video.mp4 in a directory called Videos that is in the same directory as the code, then you have to type the following command:

    python3 LaneDetection Videos/challenge_video.mp4

in the terminal. 2) Make sure the py file and the directory containting the videos are in the same directory. 3) Additionally you can also type "-h" for help:

`python3 LaneDetection -h`
  1. We have converted the frames that were provided to us into a video and renamed it as DayDrive.mp4
  2. After processing, OpenCV will display the original video alongside the final result. OpenCV will loop the video indefinitely until you decide to stop the program. Use Control-C in the terminal to exit the video.
  3. The code will write the output into the current directory before processing the video.

We imported the following libraries:

  1. numpy
  2. cv2
  3. sys
  4. math
  5. argparse

Results for GammaCorrection: You will be able to see a pop up with the brighter video along with the original video

Results for LaneDetection: Based on your choice of video you will see a pop up with detected lanes and turn prediction being compared with the original video.

The video output of our program can be found in the links below:

About

In this project we aim to do simple Lane Detection to mimic Lane Departure Warning systems used in Self Driving Cars.

License:MIT License


Languages

Language:Python 52.3%Language:TeX 47.7%