Skip to content

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.

License

Notifications You must be signed in to change notification settings

cizodevahm/line-detection-on-road-with-OpenCV

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Line Detection on Road with OpenCV

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.

Overview

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.

Features

Video Processing:

Reads and processes video frames in real-time.

Gaussian Blur:

Reduces noise and smoothens the image.

Color Filtering:

Isolates specific color ranges in the HSV color space.

Edge Detection:

Uses the Canny edge detector to find edges in the image.

Line Detection:

Applies the Hough Line Transform to detect and draw lines.

Installation

  1. Clone the repository:
    git clone https://github.comcizodevahm/line-detection-on-road-with-OpenCV.git
  2. Navigate to the project directory:
    cd line-detection-on-road-with-OpenCV
  3. Install the required dependencies:
    pip install opencv-python numpy

Usage

  1. Place your video file in the project directory and update the script with the video file name.
  2. Run the script:
    python Line.py
  3. The script will display the processed video with detected lines.

Example

Sample gif

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages