This computer vision project detects road lane lines from a dashcam driving video using traditional image processing techniques in OpenCV. It simulates a basic lane-following system, which is an essential component of autonomous driving.
solidWhiteRight.mp4
lane_detected_output.mov
- File:
solidWhiteRight.mp4
- Source: Udacity Self-Driving Car Dataset
- Clean white-lane driving footage recorded in daylight
- Convert video frame to grayscale
- Apply Gaussian blur to reduce noise
- Use Canny edge detection
- Define region of interest (ROI) to mask unwanted parts
- Apply Hough Line Transform to detect straight lines
- Average and extrapolate the left/right lane lines
- Overlay detected lanes onto the original frame
- Python 3
- OpenCV
- NumPy
opencv-python
numpy
Install them using:
pip install -r requirements.txt
File | Description |
---|---|
lane_detection.py |
Main script that processes the video |
solidWhiteRight.mp4 |
Input driving video |
lane_detected_output.mp4 |
Output video with detected lanes |
requirements.txt |
Python libraries used |
README.md |
Project documentation |
pip install -r requirements.txt
python lane_detection.py
- Support curved lanes using polynomial fitting
- Integrate real-time webcam lane detection
- Use color masks to detect yellow lanes better
- Deploy in embedded systems or mobile devices
Muhammad Rayan Shahid
AI & ML Enthusiast | LinkedIn | GitHub
⭐ If you found this project useful, please consider starring the repository!