This repository contains a Python script that demonstrates line detection in a video using OpenCV. The script processes a video file to detect and highlight lines, which can be useful for applications such as lane detection in autonomous driving.
The script reads a video file, applies Gaussian blur and color filtering to isolate specific features, and then uses the Canny edge detector and Hough Line Transform to detect and draw lines on the video frames.
Reads and processes video frames in real-time.
Reduces noise and smoothens the image.
Isolates specific color ranges in the HSV color space.
Uses the Canny edge detector to find edges in the image.
Applies the Hough Line Transform to detect and draw lines.
- Clone the repository:
git clone https://github.comcizodevahm/line-detection-on-road-with-OpenCV.git
- Navigate to the project directory:
cd line-detection-on-road-with-OpenCV
- Install the required dependencies:
pip install opencv-python numpy
- Place your video file in the project directory and update the script with the video file name.
- Run the script:
python Line.py
- The script will display the processed video with detected lines.