Automatic number plate recognition (ANPR) works in four steps. It needs to detect vehicles and license plates, read the plates, and trigger events.
1. Detect vehicle
Detect vehicles as cars, trucks, and buses and follow them in the video stream.
2. Detect license plate
For each detected vehicle, detect license plates and map them to the vehicles.
3. Read license plate
For each detected license plate, apply an optical character recognition (OCR) to read the plate.
4. Send event
If the vehicle crosses a counting line, send an event with the text from the detected license plate.
The main challenge for ANPR setups consists of clearly readable license plates. This means a sharp and well-illuminated image without occlusions or blurry objects is required to obtain correct results. The following guide shows how to set up our ANPR system and helps to avoid the most common issues.
The system is designed for two typical setups which are described here.
For this setup, the camera is mounted at around 2m height, as closely as possible to the side of the lane to avoid a high horizontal angle. If possible, enforce vehicles to stay in lane for the ANPR section, as switching lanes can lead to inaccurate results.
When positioning the camera above the cars (e.g. entry/exit of a garage) a maximum of two lanes can be covered.
To work properly, vehicles should drive straight through the scene to have the license plate visible in the entire scene. The camera should be at a height of 3m and facing vehicles directly from the front or back to avoid a high horizontal angle to the license plate.
Camera setup can sometimes be tricky and often requires some experimentation with the camera position and parameters to get optimal results.
The following sections describes common camera issues and how to avoid them.
License plates need to be visible with 250 pixel-per-meter (PPM). For a standard European plate, this gives us a minimum height of 30px and a minimum width of 100px to get good recognition results.
For camera setups with object distances within the specification, a FullHD (1080p) resolution is sufficient. In some cases, it might help to choose a higher resolution (4MP or 2K) for a sharper image.
It is recommended to check the size of license plate crops manually during the setup phase.
License plates need to be visible from a direct viewing angle. While small angles (<20° horizontal, <30° vertical) and tilting <5° can be handled, larger angles cannot work at all. If view angles get bigger, the system is more likely to mix up characters or is not able to recognize characters close to the edges.
For camera positions from the side only a single lane is recommended, while with camera views from above, a maximum of two lanes works.
Scene illumination has two major effects.
With good illumination, a lower shutter speed can be chosen and images get less blurred, especially for fast-moving vehicles.
Good lighting reduces the ISO value of the camera and images appear less grainy and sharper.
Some cameras offer additional illumination which can be useful. If the camera light is not sufficient, an external illumination of the scene is required.
Digital noise reduction (DNR) should be kept in a low range to further reduce graininess.
A low shutter speed is important for moving objects to get a sharp image and avoid blurriness caused by motion.
While in general, faster is better, the selected shutter speed depends on the available light in the scene.
Depending on vehicle speed a shutter speed of 1/250 is a bare minimum for moving objects below 15 km/h. For faster vehicles, up to 40 km/h, a shutter speed of 1/500 is a good choice. For faster objects, an even lower shutter speed is required which only works with good illumination.
With P101 we only support ANPR on vehicles passing with maximum 15km/h
To stream the camera image, data is encoded. Different encodings can save data and reduce image quality. For the ANPR use case, high image quality is required. Select H.264 codec and a high bitrate of >6000kbps for FullHD (1080p) content and >8000 kbps for 4MP video material with 25 FPS.
Additional features such as BLC and WDR are not recommended, as postprocessing can reduce details. If they are necessary, the impact on the video quality should be checked.
A constant bitrate (CBR) usually leads to a better quality than variable bitrate (VBR).
When setting up the camera, it is recommended to take a few short test videos in different lighting conditions (morning, midday, evening, night) to check if license plates are clearly visible in all conditions.
If license plates are not clearly recognizable for a human, ANPR cannot work. Make sure to get good and clear camera images for best results.
A suitable position of the event trigger (counting line) is essential for good ANPR results. If the line is positioned far in the back, the ANPR system has no time to detect and recognize the plate before an event is sent. If the line is in a position, where the license plate is only visible at a suboptimal angle, results will not be accurate.
For an optimal counting line position, a short debug video of the scene with 3-5 vehicles is required. In the analysis of the video, one should follow the vehicle through the optimal section with the best view on the plate (see Example 6). Just as the view on the plate gets worse (see Example 7), position the line right behind the center of the vehicle.
By this method, it’s guaranteed that the system can utilize the best video parts to detect and recognize the license plate and send the event just before suboptimal views worsen the result.
Our ANPR system is tested properly under various conditions. In our test setup, we have around five different scenes, and accuracies are calculated on the basis of > 800 European vehicles. Overall accuracy means the percentage of correctly identified vehicles plus license plates compared to all passing vehicles with readable license plates.
Under the specified conditions, the system reaches >95% overall accuracy in slow parking environments and >90% in environments with fast vehicles.
For a detailed analysis of potential errors, see limitations described below.
A base limitation that cannot be solved is the general readability of license plates. Plates with occlusions, covered with dust or snow or incorrectly mounted plates cannot be read. Environmental limitations such as strong rain or snow which blocks the clear view on plates can also lead to inaccurate results.
There are a few hard limitations where the system cannot provide good results.
1. Illumination (day-only)
Currently, the system supports good illumination only. This limitation is usually for day-only, however it will also work for well-lighted night scenes if the license plates are clearly recognizable.
2. Single-line plates only
License plates with two lines (such as motorcycle plates) are not supported and recognition will not work.
3. EU license plates only
The recognition system is limited to standard EU license plates. It can work with license plates from other countries (and some older non-standard EU plates), but there are no accuracy guarantees.
There are four potential errors that can occur within the ANPR system.
No vehicle is detected (< 1% error rate)
No plate is detected (< 0.1% error rate)
Event is sent without a vehicle passing (< 0.1% error rate)
Wrong plate text is recognized (< 5-10% error rate, depending on the scenario)
The OCR system identifies character by character. In most error cases it’s a single character that is misclassified or a character that was missed. As in some countries, license plate characters look very similar (sometimes even exactly the same), most errors are caused by mixing up characters with lookalikes.
B
and 8
can be mixed-up
D
and 0
can be mixed-up
0
and O
can be mixed-up
I
and 1
can be mixed-up
5
and S
can be mixed-up
The best option to avoid these mixups is to get a clear front view on the plate. However, for systems that need to match in- and outgoing license plates, it might make sense to match them with a fuzzy search that takes mixups and duplicated characters into account. For example, the system could still match plate texts like S123A0
and SI23AO
, when the second event exists on the same or following day.
If all setup recommendations are implemented and the camera configuration cannot be improved any further, there are some external improvements that can be made. Best results are achieved when combined.
Slow down vehicles in the ANPR section to have more time to detect and recognize the license plate.
Reduce distance from vehicle to camera, for example by limiting the entry to a single or narrow lane, reducing variation and angle to the camera.
If possible, use camera zoom to focus on the section with the best view on license plates. This can also help with a low resolution of plate crops.
If the Swarm system performance is an issue (low FPS), it can help to blackout any unnecessary image parts with vehicles (e.g. with a privacy zone). By this, the focus of the system is set on the ANPR section only.
How to succeed in setting up an Entry/Exit parking system with ANPR
You have a parking space where you want to know your utilization and parking times of your customers, then you can use the SWARM solution as following.
For this use case, SWARM software is providing you with any relevant data for your Entry/Exit parking space. The solution is gathering the number of vehicles in your parking space as well as the number of vehicles entering and exiting your parking space for customizable time frames.
The vehicles are classified in any classes the SWARM software can detect. Nevertheless, consider that the following configuration set-up is optimized to detect vehicles and not people and bicycles.
Thanks to the License plate recognition, the parking duration of your customers will be analyzed. On top of the License plate information, license plate origin country as well as license plate area codes are available as meta information. The country codes are according to ISO 3166 Alpha 2 standard. The country classification is working with excellent accuracy of 99%.
Find below some general settings for the installation of this use case. As the automatic number plate reading needs some more detailed information you will find additional and more detailed information on how to set it up in the following page:
Especially for Automatic Number Plate Recognition (ANPR) the camera choice and positioning are essential.
The requirements for accurate number plate recognition can be aligned with respective norms for the accurate operation of (human-based) surveillance systems.
The standards give a recommended pixel-per-meter measure (“pixels on target”), to reliably perform that task (by a human). The relevant category for clear reading of license plates/identification of a person “without a reasonable doubt” is “identify”. A Bullet camera is recommended.
The configuration of the solution can be managed centrally in SWARM Control Center. Below, you can see how the Entry/Exit parking with license plate detection needs to be configured for optimal results.
In order to start your configuration, take care that you have configured your camera and data configuration.
For receiving the utilization of your parking space including the park durations of your customers, a CL for each Entry/Exit needs to be configured. The CL should be placed approx at the beginning from last third of the frame in order that the object can be over several frames, so that the License plate detection and classification are most accurate.
Consider that the IN/OUT direction of the crossing line is important as it is relevant for calculation of the park duration. (IN = Entry to parking, OUT = Exit of parking).
You can visualize data via Data Analytics in different widgets.
In our Parking Scenario section, you can find more details about the possible Widgets to be created in the Parking Scenario Dashboards.
You are able to visualize the data for any Entry/Exit you have configured with the Counting lines. So you are able to see the number of vehicles with their classes/subclasses and license plates of any Entry or Exit.
Furthermore, you will be able to gather a list of customers with the corresponding license plate that has parked longer than your preconfigured parking duration is. For the purpose of provability, you can also see a picture of the incoming and outgoing vehicle. Please mind that you need to configure the parking time due to your data privacy restriction.
If you need your data for further local analysis, you have the option to export the data of any created widget as csv file for further processing.
If you would like to integrate the data in your IT environment, you can use the API. In Data Analytics, you will find a description of the Request to use for retrieving the data of each widget.
In case you are using your custom MQTT broker, you can also retreive the raw data there. We provide a special option to have the license plate capture added to the event schema. This enables you to retrieve the capture within the pushed MQTT message. The picture is encoded in BASE64. In order to enable this option, please contact our support.
The License plate recognition is not supported on the P100 SWARM Perception boxes. So for this use-case, the P401, P101 SWARM Perception box, or a VPX deployment option with NVIDIA-based hardware is needed.
Recommended | |
---|---|
Manufacturer | Model | Link | Note |
---|---|---|---|
Hikvision
Bullet Camera
DS-2CD2645FWD-IZS
Motorized varifocal lens
Configuration
Model
Configuration option
CL (Counting Line)
ANPR
Enabled
Raw tracks
Disabled
Pixels Per Meter is a measurement used to define the amount of potential image detail that a camera offers at a given distance.
> 250 PPM
To clearly read a license plate, at least 250 PPM are required. Using the camera parameters defined below ensures to achieve the minimum required PPM value
Tip: Use the Axis lens calculator or generic lens calculator.
Resolution
min. 1920×1080 (H264)
Focal Length
min 3.6-8 mm motorized adjustable focal length recommended
Mounting
Distance and height of installation
Note: setting correct distance to license plate and camera mounting height should result in the correct vertical angle to license plate Horizontal angle to license plate
Exposure / Shutter speed
max. 1/250 for objects not moving faster than 40 km/h
European countries
Licence plate types
‘standard’ car license plates (520 by 120/110 mm)
Note: square two line license plates (e.g. motorbike) are not supported
Object velocity
< 40km/h with low-light conditions
Area of focus
Single lane when camera mounted on the side; Two lanes when mounted above the center of both lanes
Day/Night/Lighting
Daytime or well illuminated only (min 500 lux)
Indoor/Outdoor
Indoor & Outdoor
Expected Accuracy (Counting + License Plate)
(when all environmental, hardware and camera requirements met)
>90% Only vehicles are considered. For parking spaces people, bicycles and motorbikes are not part of our test scenarios as they don't occupy parking spaces.
Examples: