A computer vision system that detects available parking spaces in real-time and provides an interactive map interface for visualization.
This system combines computer vision techniques with mapping capabilities to:
- Detect and monitor parking spaces in video feeds
- Track parking space occupancy in real-time
- Display results on an interactive web-based map
- Calculate distances to available parking spaces
├── ParkingSpace.py # Core parking space detection logic ( in the uploaded files section, you will find 3 such files because i implemented it for 3 videos)
├── interactive_map.py # Map interface implementation
├── main_with_interactive.py # Main application entry point
├── requirements.txt # Project dependencies
├── carPark.mp4 # Sample video feed ( you will find 3 such video files in the uplaoded section, because i used 3 sample videos)
└── interactive_parking_map.html # Generated map interface
-
Set up Python virtual environment:
python -m venv .venv .venv\Scripts\activate # On Windows source .venv/bin/activate # On Unix/MacOS
-
Install dependencies:
pip install -r requirements.txt
-
Prepare video source:
- Place your parking lot video file (e.g.,
carPark.mp4) in the project directory - Or configure webcam input in the main script
- Place your parking lot video file (e.g.,
-
Run the application:
python main_with_interactive.py
- Real-time video processing
- Automatic space occupancy detection
- Support for multiple parking areas
- Configurable detection parameters
- Web-based visualization
- Real-time updates of space availability
- Color-coded parking space markers
- Distance calculation to available spaces
- JSON-based storage of space counts
- Configurable parking location coordinates
- Support for multiple parking areas
- OpenCV (cv2)
- NumPy
- Folium (for map visualization)
- Python 3.x
-
Configuring Parking Spaces:
- Use the provided scripts to define parking space coordinates
- Adjust detection parameters in ParkingSpace.py
-
Map Interface:
- Access the interactive map through generated HTML file
- Markers update automatically with space availability
- Click markers for detailed information
-
Performance Optimization:
- Adjust video resolution as needed
- Configure detection frequency
- Optimize space coordinates for accuracy
Output Screenshots :
The three parking area locations are plotted in the gmap interface, the user's location is represented as " i "
Video 1 :
Video 2 :
Video 3 : 
Acknowledgement : Murtaza's Workshop. Learnt the Parking Space Detection logic with his youtube video.