-
Notifications
You must be signed in to change notification settings - Fork 177
Program Description
Welcome to the rpi-speed-camera wiki!
This is a raspberry pi computer and picamera openCV object motion speed tracker program. It is written in python and bash script and uses openCV to detect and track object motion and speed. This can used for vehicles or any other moving objects. It tracks the speed of the largest moving object in the camera view. This program has been tested and runs using python2 or python3 and associated opencv version.
Note opencv3 requires install from source. I have a whiptail menu driven script to automate download, dependencies install, cmake and compile of opencv3, if you are interested enter a github issue for this rpi-speed-camera repo and I can send you a copy.
There is a menu driven admin tool called menubox.sh that can perform most speed camera operations
The program will detect motion in the field of view and use opencv to calculate the largest contour and return its x,y coordinate. Motion is tracked for a specified pixel length and speed reported. Motion detection is restricted between y_upper, y_lower, x_left, x_right variables (rectangle area of road or area of interest). Only motion within this rectangle is tracked. If a track is longer than track_len_trig variable then average speed will be calculated (based on cal_obj_px and cal_obj_mm variables) and a speed photo will be taken and saved in an images folder. If config.py variable log_data_to_file=True then a speed-cam.csv file will be created/updated with event data stored in CSV (Comma Separated Values) format. This can be imported into a spreadsheet.
The results are recorded on speed photos and optionally in a CSV data file that can be imported to a spreadsheet or other program for additional processing. The CSV data can also be used to creating web pages that can be viewed on a web browser from another computer on the same network.
How to Install rpi-speed-camera
- YouTube Speed Camera Demo Video https://youtu.be/eRi50BbJUro
- YouTube Speed Lapse A Day on the Street Video https://youtu.be/-xdB_x_CbC8
- Speed Camera RPI Forum post https://www.raspberrypi.org/forums/viewtopic.php?p=1004150#p1004150
- YouTube motion-track video https://youtu.be/09JS7twPBsQ
- YouTube Channel https://www.youtube.com/user/pageaucp
- Speed Camera GitHub Repo https://github.com/pageauc/rpi-speed-camera
Wiki Home
Description, Issues, Features
How to Install or Upgrade
How to Run
How to Calibrate
Change Settings and Plugins
How to Tune Motion Tracking
Setup RTSP Camera
rclone Remote Storage File Transfer
How to View Speed Data
How to Generate Graphs
How to Run speed-search.py
How to Start on Boot
How to use run.sh
watch-app.sh Remote config
How to Manage Sqlite3 Database
How to move speed-camera to ext drive
How to use OPENALPR with speed camera
Github Repo