CARRIDA streaming modes

Revision: 1.0
Date: 2020-12-15
Copyright: 1996-2020 Carrida Technologies GmbH, Ettlingen, Germany
Author: Carrida Support

Home page

Table of Contents

1   Introduction

Carrida library can operate on various sources - live streams, videos, images, etc. To produce the best possible performance for the given scenario, the Carrida engine can be easily tuned. Four predefined configurations (or streaming modes) are available to choose from:

  • single
  • offline
  • parking
  • freeflow

A streaming mode can be set via the configuration ini file:

mode = parking

It can be also set or changed any time via API interface by using the function LPR::set_parameter.

To be able to set the appropriate streaming mode, one should ask himself the following questions:

  • Am I handling with a real-time (camera, RTSP stream) or offline (video, a folder with images) source?
  • Do the results need to come as soon as possible (parking entrance) or some small delay in timing is acceptable (enabling reading performance to be even more robust)?
  • Does Carrida have to handle a video stream or discrete frames (triggered images, a folder with independent images)?

Depending on the answers to these questions, four streamings modes described in the next section are available. But first, it is important to understand some definitions.

1.1   Blocking vs non-blocking setup

A blocking setup means that every frame which is fed into the Carrida engine is guaranteed to be processed. This is suited for offline sources like video files or folders with images. Carrida engine has an intern buffer (or queue) of input frames. Once it becomes full (in the case if input frames are coming faster than the Carrida engine needs to process them), the engine blocks until the input buffer can accept the next input frame. Thus, no dropped frames can occur in the processing pipeline.

When handling real-time sources, blocking setup does not have much sense. Input frames are coming at a constant frame rate. If the engine processing frame rate is smaller than the input frame rate, there is no way to avoid some lost frames in the processing pipeline. So, the Carrida engine works in the non-blocking setup. It still accepts every input frame, but, if its intern queue is full, it immediately returns with the lpr_processing_full_queue code.

1.2   Merging of multiple reading results

When dealing with a video stream, each vehicle license plate is typically present in more than one frame during the vehicle moves across the camera view. Carrida engine collects multiple reading results per vehicle and merges them into a single result - this makes the reading performance more robust. In the case if the Carrida engine is fed with single, independent from each other frames, the merging functionality should be switched off.

The following table shows the described setups for each streaming mode.

Configuration depending on a streaming mode
Streaming mode blocking/non-blocking merging of results
single blocking false
offline blocking true
parking non-blocking true
freeflow non-blocking true

2   Streaming modes

This section describes each streaming mode in more detail, as well as gives typical use cases for each mode.

2.1   single

This is the default mode. Merging of multiple reading results is switched off. Once an input image comes into Carrida, it immediately gets processed and the reading result is returned.

Use cases:

  • processing of a folder with images
  • dealing with triggered images (one per vehicle)

2.2   offline

This is the mode with the largest timing delay - the results are coming with an offset of about 20 frames. When dealing with an offline source, such delay is not critical. At the same time, it allows the best possible reading performance. The Carrida engine uses the power of multiple readings (20 readings per vehicle at most) before producing the merged result.

Use cases:

  • processing of video files

2.3   parking

As the name implies, this mode is explicitly tuned for the parking lot entrance scenario. The engine still utilizes multiple reading strategy before producing an output result, and at the same time, the delay in results is minimized. By default, the engine waits until the license plate is detected at least 3 times (though, this can be configured). This means that the minimal delay in results is 3 frames. Until a license plate is detected less than 3 times, it will not produce the reading result.

Use cases:

  • parking lot entrance/exit

2.4   freeflow

Freeflow mode works in the same way as parking mode. The only difference is that the minimum required number of detections per license plate is reduced to 2. This mode is intended for real-time scenarios with higher velocities.

Use cases:

  • a camera installed on a highway

3   Runtime efficiency

The following table demonstrates runtimes for different modes. The numbers were obtained using Carrida version 4.5.0 (high mode), running on PC using four cores (i7-6700K CPU @ 4.00GHz). The tested video has resolution 720x576 pixels. One can see that the single mode is slower than other modes - this is due to the less effective usage of hardware resources.

Typical running times, ms
Streaming mode with listener without listener
single 6.42 7.65
offline 5.14 6.03
parking 5.20 6.05
freeflow 5.17 6.09