Table of Contents
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
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.
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.
-
Clone the repository using
git clone https://github.com/sudharsan-007/opencv-lane-detection.git
-
cd into the directory opencv-lane-detection
cd opencv-lane-detection
-
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
-
Install pickle (Skip if
import pickle
works)pip install pickle4
-
Install openCV-python. Please refer openCV website.
# https://docs.opencv.org/4.x/d6/d00/tutorial_py_root.html pip install opencv-python
-
If the above code does not work for you try this(skip this step 5 worked).
conda install -c conda-forge opencv
-
Add video that you want lane detection to run on in the same directory.
-
Change the directory name inside the python file
LaneDetection.py
and RunLaneDetection.py
from this directory and from inside this environment.python LaneDetection.py
Distributed under the GNU General Public License v3.0 License. See LICENSE.txt
for more information.