This project is an amalgamation of Python, OpenCV and my growing love for CV ;)
Pipeline used for lane line detection :
- Input Image
- Converting to Grayscale
- Gaussian Blur
- Canny edge detection
- ROI selection
- Hough Lines detection
- Install Anaconda on your local setup (Choose Python 3 version - Link)
- Create an environment (More on environments here)
Open cmd and type -
> conda create --name myenv
This will create an environment with default python version, which is Python 3 for this project. - Activate the environment, using
> activate myenv
- Install Libraries :
OpenCV :
> conda install -c conda-forge opencv
moviepy (used in this project to work with videos):> pip install moviepy
- All the line segments are divided into left_lane_lines and right_lane_Lines using slopes of the lines
- A line is fitted to both sets resulting in one line for each side
When working with images and color selection HSV color space becomes quite handy (Learn more about HSV and HSL color space here).
Using Hue Saturation Value color space and cv2.inRange()
function we can select any color range from image.
This technique is used for final challenge video.