This project demonstrates lane detection in images and videos using OpenCV. It includes several utility functions for edge detection, region of interest selection, and optimizing lane lines in a video.
-
test_image.jpg: An example image for testing lane detection. -
utilityfolder: Contains utility functions for lane detection.
Make sure you have the following Python libraries installed:
- OpenCV (
cv2) - NumPy (
numpy) - Matplotlib (
matplotlib)
You can install these dependencies using pip:
pip install opencv-python numpy matplotlib
-
Clone the repository:
Copy code git clone https://github.com/yourusername/lane-detection.git cd lane-detection
-
Run the lane detection script:
Copy code python lane_detection.py
- The script will process the video "test2.mp4" for lane detection and display the output.
-
Press 'q' to exit the video playback.
- cannyimage: Performs Canny edge detection on an input image.
- region_of_interest: Defines a region of interest in the image where lane lines are expected.
- makeCoordinates: Calculates coordinates for drawing lane lines.
- optimizedLines: Optimizes and averages detected lane lines.
- display_line_image: Draws the detected lane lines on an image.
MRUNMAYEE RANE
- GitHub: https://github.com/mrunmayee17