Category Archives: Home Security

Displaying Plate Numbers on ALPR Cameras

I’ve been running OpenALPR on Unraid for about 6 months. Since January I’ve been working on a tool that replaces the limited closed-source OpenALPR web ui with my own OpenALPR Webhook Processor. I pointed the OpenALPR agent at my tool instead of the OpenALPR web ui. The agent sends a JSON payload defined here.

After the JSON payload is processed it is displayed through an Angular web app running on Asp.net Core backend. It uses a SQLite database to store plate information, and retrieves images from the agent on the fly. It records a small amount of statistics, allows searching based on make/model and plate numbers including regular expressions, and can both ignore and alert on plates.

The home plate screen

The tool can also manage individual cameras day/night toggling and zoom/focus based on the camera GPS location:

Modifying ALPR and regular cameras

When the tool receives a webhook from the agent, it parses the plate information and overlays the text on the camera:

The agent tries to determine the make/model of the vehicle, it’s not always correct (especially at night), but it does get a fair amount of accurate results.

So far it has been working pretty well! I am currently working on a method for “scraping” the agent’s debug web ui for information instead of using webhooks. This will be useful for people with the “Homeowner” membership that requires the webhook to come from the OpenALPR cloud website.

OpenALPR Running On Docker with Unraid

My DIY Security Mailbox has caught some interesting footage since its installation.

Deer running down the road:

Santa’s list checking staff has been modified due to the coronavirus.

Neighbors reporting suspicious vehicles stealing mail from mailboxes:

Men walking down the street while dawning ski masks:

Newspaper delivery driving through yards to turn around:

Coyotes running through our backyard into the road:

This project has been well worth since it has been installed. I’ve been successfully capturing license plates as they drive by, but I wanted to try some Automatic License Plate Recognition (ALPR) next. I found OpenALPR which seemed to have pretty good accuracy from the demos I watched.

My main media server currently runs on Unraid serving up plex, mail servers, etc via docker containers. The OpenALPR “agent”, which streams video from the camera and parses it for license plates, has a docker image available. I am currently running on a trial account, which gives access to the commercial features allowing local storage of plates instead of uploading them to their cloud application. I wasn’t able to get the OpenALPR web server running on Docker due to the multitude of dependencies that need to run with it. I installed an Ubuntu VM on the box then installed the web server inside the VM. The modern UI exposes the “agent” which allows for camera configuration for streaming:

The OpenALPR home screen (plate numbers redacted)

Included with the commercial license is vehicle color and make/model descriptions. The agent can parse the details about a car just by analyzing the video stream!

A PDF generated by the web server with details about the vehicle, including make, model, and body. All done by analyzing the vehicle in the stream, no API call needed.

It does get confused when vehicles are not a common type, have trailers, or attachments on them:

I can see how a computer would think this is a chopper..

The camera configuration has inclusion and exclusion zones, which limit the area the agent will scan for plates, lowering CPU usage. While the commercial license has motion sensing optimizations, the “homeowner” license constantly checks for plates whether there is motion in the video feed or not, creating higher CPU usage. I found that at night when the entire screen is black the commercial license had near 0% CPU usage, while the homeowner license was a steady 15-20% throughout the entire day.

Giving the agent the streaming URL for the camera is all it needs to start processing
Exclusions/Inclusions help limit the area scanned for plates

From there it was pretty much hands off. The OpenALPR algorithm, coupled with my camera placement right next to the road the angle, allows for good plate reads even at night.

The web server comes with useful features like reporting and alerting based on license plates. While the reports aren’t too useful for me, I do have several alerts for some of my coworkers who like to drive by my house and see if the cameras are working correctly.

The main downside to OpenALPR is the price. While the homeowner license is only $5/month per camera, In order to get the CPU optimizations, plate reading optimizations, the agent’s ability to send it’s information to a private web server, and other various features, the business license is required, $45/month per camera.

I’m looking into getting the license plate information overlaid on the video while it’s being recorded to Blue Iris.