Skip to content

mrunmayee17/Lane_detection_using_OpenCv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lane Detection with OpenCV

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.

Overview

  • test_image.jpg: An example image for testing lane detection.

  • utility folder: Contains utility functions for lane detection.

Dependencies

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

Usage

  •   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.
    
Screenshot 2023-09-14 at 12 52 10 PM

Functions

  • 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.

Author

MRUNMAYEE RANE

About

This project utilizes OpenCV to perform lane detection in images and videos. It employs various utility functions for essential tasks such as edge detection, region of interest selection, and optimizing lane lines within a video stream.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages