-
Notifications
You must be signed in to change notification settings - Fork 175
alpr speed.py Process speed images with OPENALPR Automatic License Plate Reader
This sample alpr-speed.py script will read speed-cam.py image paths from sqlite3 database entries. It will then use openalpr to search for license plate numbers in the speed-cam.py images. This method takes advantage of speed-cam.py motion tracking to only process potential candidates for real moving vehicles or objects.
You will need to configure openalpr to suit your needs eg country and regions Etc. As each image is processed the speed_cam.db speed table status field will be updated to 'none' or plate infor. image is only processed once.
When using speed camera for openalpr purposes the speed settings will most likely not be needed and motion tracking will only be used for triggering image for license plate capture purposes. It is suggested you set speed-cam.py config.py image resolution WIDTH and HEIGHT to 640x480 with image_bigger = 1.0
This script will print out the license plates info. It will also add a license plate data the status column of the data/speed_cam_db sqlite3 database. This code is still under development. It is also possible to add code to save results to another sqlite database table, csv or other file.
I installed openalpr on RPI's per
sudo apt-get install python-openalpr
sudo apt-get install openalpr install openalpr-daemon
sudo apt-get openalpr-utils libopenalpr-dev
sudo apt-get install sqlite3
I Also needed to create symbolic link per below but this may be due to version that was loaded
sudo ln -s /usr/share/openalpr/runtime_data/ocr/tessdata/lus.traineddata /usr/share/openalpr/runtime_data/ocr/lus.traineddata
Configure speed-cam.py using config.py and set camera width height to 640x480 resolution and image_bigger = 1.0 Since the camera will be positioned to read license plates the speed calibration can be ignored.
Make sure openalpr is installed and can be run. Collect speed camera images with license plate(s) showing on the images. The image entries will be added to the data/speed_cam.db database file. The status column of the speed table will store the processing status of alpr-speed.py
Open SSH or terminal session and
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