Parking Pi
University Group Project - Raspberry Pi automated parking lot management system
Description
Parking Pi is a Raspberry Pi-based automated parking lot management system built as a university group project. It combines computer vision, OCR, and physical hardware to handle vehicle entry and exit via automated boom gates, monitor parking spot occupancy in real time, and provide a web portal for payments and administration.
Architecture
The system is split into three services running on a single Raspberry Pi:
spot-watcher monitors parking spot occupancy using a webcam. It captures frames and compares them against an empty-lot reference image using SSIM, saturation delta, and luminance delta metrics, then pushes spot status updates to the web server every second.
gate-watcher manages the boom gate using a second webcam and license plate OCR. It detects plate position in frame to determine entry or exit zone, reads the plate with Tesseract, calls the web server, and drives servo motors to open or close the gate. RGB LEDs provide visual feedback to drivers.
web-server is a Flask REST API and web UI acting as the central hub, handling entry/exit events, parking payments via a customer-facing portal, real-time spot status, and an admin panel for viewing all vehicles. Vehicle records are persisted in SQLite.
Features
- Automated boom gate control via servo motors
- License plate recognition using Tesseract OCR
- Real-time parking spot occupancy monitoring with computer vision
- Customer web portal for parking payment
- Admin panel showing all vehicles and their status
- RGB LED entry/exit feedback for drivers
- Push button triggers for scanning mode
Technology Used
- Language: Python 3.11+
- Web framework: Flask with Jinja2 templates
- Computer vision: OpenCV, NumPy, scikit-image (SSIM)
- OCR: Tesseract via pytesseract
- Database: SQLite3
- Hardware I/O: RPi.GPIO, gpiozero, pigpio, PWM servo control
- Camera control: v4l2-ctl
Hardware
- Raspberry Pi (running all three services)
- 2x USB webcams (spot monitoring and gate)
- Servo motors for boom gate arms
- RGB LED indicators
- Push buttons for scan triggering