The goal of this project is to provide a real-time visual representation of lane boundaries in a video feed. This can be useful in applications such as driver-assistance systems and autonomous vehicles.
Features
Video Processing: The script reads a video file and processes each frame individually.
Grayscale Conversion: Each frame is converted to grayscale to simplify image processing tasks.
Edge Detection: Canny edge detection is applied to highlight lane markings.
Morphological Operations: Enhancements are made to the detected edges for better accuracy.
Hough Line Transform: This technique is used to detect line segments representing lanes in the video.
Visual Feedback: Detected lanes are highlighted in green and overlaid on the original video frame.
User Interaction: The program allows users to exit by pressing the 'q' key.
Prerequisites
Python 3.x
OpenCV library
Setup and Installation
Ensure Python is installed on your system.
Install the required libraries using:
pip install opencv-python
Place your video file (e.g., lane1.avi) in the project directory.
How It Works
The script processes the input video frame-by-frame.
It identifies lane boundaries using image processing techniques.
The detected lanes are drawn on the video for visual feedback.
Users can monitor the highlighted lanes, enhancing driving safety and awareness.
Project Files
lane_detection_video.py: Main Python script implementing the detection logic.
lane1.avi: Sample video file used for testing lane detection.
Screenshot 2024-01-20 190253.png: Screenshot of the lane detection output.
This project demonstrates the application of Python and OpenCV in a practical scenario, paving the way for innovations in computer vision and autonomous systems. It combines efficient algorithms and real-time processing to create a foundational lane detection system.