What can I use the Vehicle Recognition Stream API for?

Vehicle Recognition Stream API is used for license plate recognition on videos or time-ordered image sequences

The Vehicle Recognition Stream API is used for license plate recognition on videos or time-ordered image sequences.

The Vehicle Recognition Stream API organizes video streams so that they can be efficiently processed by OpenALPR. The library utilizes motion detection to improve performance, and groups sequential plate results for each vehicle into a single result with the highest possible confidence. The API also buffers incoming video and handles cases where video input is faster than the available processing by evenly dropping frames from the video buffer.

You may configure the API to connect directly to a video feed (either an IP camera stream URL or a file). Vehicle Recognition Stream API will create a background thread that constantly pulls from the source to keep the video buffer full. You may also feed video frames directly. If sending video manually, you should do this on a separate thread.

The Vehicle Recognition Stream API maintains a buffer of frames for processing. You may share an AlprStream object across threads. Each thread should maintain its own Alpr object. Passing the Alpr object to the API using a process_frame() call performs a recognition and returns individual results. The AlprStream object keeps track of these results and forms plate groups.

Plate Groups can be accessed at any time by popping or peeking from the active list. Once a plate group is fully formed, and we are confident that the vehicle is no longer in the scene, it is available to be popped. Otherwise, it will remain on the list that you can peek, until enough time has passed.

Vehicle recognition is optionally run on each AlprGroup after it has been popped. The vehicle recognition is CPU/GPU intensive. The Vehicle Recognition Stream API looks for a vehicle detection that encompasses the plate and uses that bounding box to classify the vehicle attributes (make, color, body type, etc).

The AlprStream object should be initialized once for each video stream. The initialization time is minimal. The API instance is thread-safe.