Best Practice for Vaxtor LPR configuration

1. Introduction

This document provides the steps to fine tune the Vaxtor LPR (MMC) plugin to achieve the best possible results.
For ease of reference, each section of the plugin menu will be analyzed separately. However, only the complex options will be discussed in depth, with a focus on the steps addressed by the algorithm below, skipping over those that are sufficiently self-explanatory.
Should any further information be required, please refer to the manual.

:exclamation:Note: The values shown in the images accompanying the text are for illustrative purposes only, being part of the screenshots. They must be adapted for each individual installation as explained in the sections below.

2. Configuration menu

Section 1. - Vaxtor LPR

Countries: allows the possible origins of license plates to be added to expand the range of detectable plates and reduce false positives.

How it works:

  1. it first detects the country of origin of the LP,
  2. loads the grammar of the detected country,
  3. reads the LP.

:warning: Caution! :warning:
Adding a large number of countries increases the computational load.

Grammar Strict: this option searches for any LP in the ROI, searches for country, checks another possible candidate. If there are no further candidates, reads LP and returns its value.

Multi-country Balance: If the flag is OFF the OCR will select the first country matching the plate grammar, otherwise it will compare candidates with all the countries in the list selecting the best option according to its internal algorithms.

We have 3 possible working modes:

  • Signaled: license plates are detected only upon a Signal activation. A MxMessage is used to trigger that signal
  • Freeflow: license plates are continuously detected and captured
  • Enter & Exit: typical for parking lots, the algorithm detects the plate once the vehicle is stopped in front of the camera for “Enter timeout” seconds and considers that the same vehicle has left after the plate is no longer readable for at least “Exit timeout” seconds because it left the parking lot.

Section 2. - Recognition Areas


The advice here is to reduce the detection area as much as possible to avoid spending resources searching for possible license plates or candidates in unnecessary portions.

Recognition Area Type: this option allows to detect either the plates inside the recognition area (“inclusion”) or outside (“exclusion”).

Section 3. - List Management


This section allows to add plates to white/blacklist.

Section 4. - Video


LPR Sensor: Sensor where the analysis is applied, where the ROI appears.

Overview Sensor: Sensor used to capture the images once the plate is detected.
Sometimes could be useful to set LPR Sensor to strictly analyze the plate number and the Overview sensor to watch the whole vehicle


Minimum Character Height: measured in pixels, it represents the minimum height admitted to read numbers/characters on the plates.
Maximum Character Height: measured in pixels, it represents the maximum height admitted to read numbers/characters on the plates.

In order to setup the optimal interval for these two values, try detecting plates first, adding the variable $charheight$ to show the detected height.
Once the medium height is fixed, say X, setup min and max character height as X-5 as min and X+5 as max. In general, it needs to be adapted to the local license plates “grammar”.
Here is how we calculated the value of X, putting the variable $charheight$ in the field “Text Overlay” in section “Reporting” described below and then checking the value appearing in the live view from time to time.
In the following picture we can see the result; a height of 23 is detected for the plate characters.

We will therefore set the respective values as follows:
Minimum Character Height → 18
Maximum Character Height → 28
This results in a lower amount of resources and greater accuracy.

Section 5. - License Plates


As with other sections seen previously, we attempt to make effective use of the resources available to the algorithm. The first two options in this case [Minimum Plate Characters, Maximum Plate Characters] define the number [min and max] of characters of which the license plate is composed. When capturing plates from only one country, it is best to put the precise value for that country as ‘Maximum Plate Characters’ so as not to waste computational resources unnecessarily.

Section 6. - Environment


Same plate delay: time waiting to return the same plate. So if, for example, a car remains stationary in front of the camera for our number of seconds, it will not return it again.
Should another one pass by, it will of course be returned.

This function is particularly used at petrol stations, where a car remains stationary in one place until the refueling has been completed.

Same Plate Character Distance: This function refers to the concept of “Edit Distance” between words. That is, the difference between two words so you can tell mathematically how similar they are.

For example, let’s take “AB 095 TR” and “HB 098 TB”. How are these two plates similar compared to any other word?

AB 095 TR → AB 098 TR (substitution of “5” for “8”)
AB 098 TR → AB 098 TB (substitution of “R” for “B”)
AB 098 TB → HB 098 TB (substitution of “A” for “H”).

This “edit distance” comes to three, since there are three edits to change one word to the other and there is no way to do it with less than three edits.

Now, this example can be carried over to the case of other number plates with the following examples:

License Plate Classification Levenshtein Distance
16 IJ 522 16WW522 2
55 L 3929 55L3928 1

So, with this value we can reduce the misclassifications, restricting the possible false positives.

Maximum Slope Angle: This parameter is one of the most decisive for increasing possible readings.
In fact, it defines the inclination of the license plates that will appear in front of the camera. The optimum case would require the image to appear horizontal, but this is obviously not possible in most installations. It is therefore recommended to start with a value of 15-20 minimum.

Keeping this value very low and close to zero drastically reduces the number of possible readings and almost no number plates will be detected. In fact, it is very difficult for the installation to allow perfectly horizontal number plates to be seen. It is therefore always better to increase this value. In our example (see image below) we set it at 20 because the number plates of passing cars have various inclinations, due to the type of intersection we are scanning. A value of 15 is normally very low so, as stated before, we can consider this as a “starting value”.

{Maximum Recognition Period; Minimum Plates Occurrences; Maximum Plates Occurrences}
Let’s consider these 3 options as a group: when OCR recognizes a number plate, it tries to recognize it several times to obtain a more reliable result.

Therefore, this value defines how long we want to allow the algorithm to find such number plates and how many times [min and max] we want it to recognize them.

In our case we therefore have:

Minimum Plates Occurrences and Maximum Plates Occurrences which define the minimum and maximum number of times the reading attempt should be made. In our case therefore 1 and 5. Therefore the value 5 is important to avoid too many readings because it means that if there are 5 equal readings before the 500ms we set, there is no need to wait any longer to return the result and the plate can be considered to have been read correctly.

Reported Image: when the license plate is recognized, its images are saved so we can choose which one we want to appear on the top left corner of the live view.
The “Middle” is normally the best one because the “First” and “Last” option could be less visible due to the quality of the snapshot (taken too early or too late, respectively). The ‘Middle’ choice gives an image in which the vehicle is more centered and with better exposure control, as the cam has had more time to balance the image.

Section 7. - OCR


Confidence: In general, when OCR reads a plate it assigns a confidence to each character and then calculates the overall confidence for the entire reading.

Two fairly robust values for these could be the following:

Minimum Global Confidence: 80
Minimum Character Confidence: 70

Very low Confidence would tend to increase the number of false positives. Too high a confidence would cause the rejection of results that are correct but have been evaluated by the algorithm with medium to low confidence.

There are 2 different options about complexity.

Preamble: As already seen in Section 1 > “Working mode”, there are various modes of operation. In particular, with the “Freeflow” mode the OCR is continuously analysing the video stream (all frames) and searching for number plates in all frames while in “Signal” mode it waits for a signal and at that instant takes the video frame and returns all visible number plates in the ROI defined in that view.

In the “Freeflow” mode, which is the most common form of working, of the two algorithms, the “Find Plate Complexity” is constantly running, thus analysing all frames. When it detects something that looks like a plate, OCR is started.

This behaviour is referred to by the complexities indicated below:

Analytics Complexity: → Medium
Find Plate Complexity: → Low

Therefore, these values should be raised in the case of a more difficult scenario (more distant number plates, smaller characters).

Ultimately, the lower the complexity of these two options, the higher the detection speed will be.
Conversely, the higher the complexity values, the more frames are analysed and the later a result will be produced.

Section 8. - Reporting

“Text Overlay” subsection controls the values and images that appear on the top of the live image.
In particular,

  • Overlay Template” contains possible variables that we want to appear at the top of the live view

  • MxMessage Template” includes possible variables to customize the MxMessage that the camera sends whenever a plate is recognised.

The list of available variables is at page 36 of this link.

Section 9. - Advanced


Show Calibration Grid activates a grid of 20x20 pixel squares on the live view of the OCR sensor. It allows to check the height of the characters on the plates and the slope of the plate on the area of interest.