speed-camera  by pageauc

Object speed camera for Raspberry Pi, Unix, and Windows using OpenCV

created 8 years ago
1,048 stars

Top 36.5% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a comprehensive solution for building an object speed camera system using Python and OpenCV. It targets users on Raspberry Pi, Windows, and Unix-like systems, enabling motion tracking, speed calculation, video streaming, and data logging for security and traffic monitoring applications.

How It Works

The system detects and tracks the largest moving object within a defined region of interest (ROI) using OpenCV. Speed is calculated based on user-defined calibration parameters relating pixels to real-world measurements (millimeters). Motion tracking is configurable via track_event_count, and captured images/data can be optionally synced remotely via rclone or stored in a SQLite database.

Quick Start & Requirements

  • Installation: curl -L https://raw.github.com/pageauc/speed-camera/master/source/speed-install.sh | bash (on RPi/Unix) or Docker.
  • Prerequisites: Python 3, OpenCV (3.x.x recommended), RPi camera module, USB webcam, or RTSP stream. For RPi legacy camera support: sudo raspi-config -> Interface Options -> Enable Legacy Camera.
  • Setup: Initial calibration (CALIBRATE_ON=True) is required.
  • Documentation: Wiki Instructions, YouTube Tutorials.

Highlighted Details

  • Supports RPi camera module, USB cameras, and RTSP streams.
  • Includes a standalone web server (speed-web.py) for viewing images and data.
  • Features an admin menu interface (menubox.sh) for easier configuration and operation.
  • Offers image search via OpenCV template matching (speed-search.py).
  • Integrates with OpenALPR for license plate recognition (demo).
  • Includes scripts for generating speed and count reports/graphs using Matplotlib.

Maintenance & Community

  • Developed by Claude Pageau.
  • Active YouTube channel and GitHub repository.
  • Community support via YouTube comments and GitHub issues.

Licensing & Compatibility

  • The README does not explicitly state a license. Compatibility for commercial use or closed-source linking is not specified.

Limitations & Caveats

  • Performance is dependent on hardware, with quad-core RPi recommended.
  • Initial setup requires careful camera calibration for accurate speed measurements.
  • Bash scripts (.sh) require a Bash environment on Windows (e.g., Cygwin, WSL).
Health Check
Last commit

1 week ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
27 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.