Senstar License Plate Recognition Guide

License plate Recognition (LPR) is the capacity to capture photographic video or images from license plates and transform the optical data into digital information in real-time.

Also known as Automatic Number Plate Recognition (ANPR), LPR is a widely used technology for vehicle management operations such as Ticketless Parking (off-street and on-street), Tolling, ITS, stolen vehicles detection, smart billing and many other applications in Europe and becoming a trend in the Americas.

By bringing the license plate digital information (among other data such as vehicle’s direction and speed) to the mix, License Plate Recognition allows operators to immediately gather and associate more data about every vehicle passing a control point:

  • The action itself: time, place, direction and speed of the vehicle
  • The vehicle: origin, Restrictions or security alerts
  • The driver: License number, personal public or contact information about the driver

Thanks to License plate Recognition, operators have developed pretty “futuristic” solutions:

Imagine to be automatically billed at a tolling without slowing down, or parking in a mall without stopping at barriers to get in / out or at cashiers to pay; amazing? how about this: imagine a city that “knows” where every stolen or reported vehicle is, at any time.

License Plate Recognition: How to configure Symphony to allow a 3rd party system to update the license plate list

Rules based on VE410 (Automatic License Plate Recognition) check a list of license plates to deny or allow access. This list can be updated using the Symphony Rule Wizard. But in cases of frequent updates, using the Symphony Rule Wizard is inconvenient.

The following instructions demonstrate how to configure Symphony to allow a 3rd party system to update the license plate list.

Task 1: Create a Rule and note the Rule ID

The Rule ID is used only to find the Location ID. The Location ID is integral this process.

1.Create a rule for the VE410 using the Symphony Rule Wizard. The license plates to alarm on will be added later using the 3rd party system.

 

rule wizard

 

2.Save the rule and note the Rule ID. For example, in the following figure, the Rule ID is 10.

 

rule wizard

Task 2: Determine the Location ID using DBUpdater and the Rule ID from Task 1

1.In the command line, enter the following, where id= the Rule ID you identified in Task 1:

dbupdater “select * from policy where id=10”

2.Output will appear similar to the following:

loc ID tag

 

3.Find the ID between the <loc> and </loc> tags. In this example, the ID is 8.
4.Use this ID (of 8, for example), for Task 3 and Task 4.

Senstar License Plate Recognition Guide

Read Also : Backup Guide for Dahua Devices 2024

Task 3: Define how often the Rule should update its cache

Any time the Symphony Rule Wizard is run, the cache will be updated automatically. If you are using a 3rd party system to update the rule frequently, you must configure the rule cache to refresh more often.

1.In Symphony from the Server menu, select Manual Configuration Editor.
2.Expand Type: Rule.
3.Using the Location ID you identified in Task 2, find the Rule ID with the matching value.

Manual Configuration editor

 

4.In the Value field, insert the XML content between <State> and <Mode>

<RefreshXMLTime>5000</RefreshXMLTime>

where, for example, 0 indicates the cache is never refreshed or 5000 indicates the cache is refreshed every 5 seconds

 

5.Save the changes and close the Manual Configuration Editor.

Task 4: Externally update the alarm list (alarm table)

Use the SDK or DBUpdater to update the alarm table. If you use the DBUpdater, enter the following in the command line:

Dbupdater “update settings set V='<State><Mode>Black</Mode><RefreshXMLTime>5000</RefreshXMLTime><Plates><Plate Number=\”ABC123\” Type=\”0\” /><Plate Number=\”ABC456\” Type=\”0\” /></Plates></State>’ where Type=’Rule’ AND Id=8 AND Section=’1_Intel_VE410′ AND K=1″

where the Id= the Location ID you identified in Task 2

Type=\”=0\” 0 indicates that no region is associated with this plate. To associate a region, you must know the Type code. See How to find the Type code for a license plate region.

Section and Key values may not always be consistently Section=’1_Intel_VE410′ and K=1. You must verify these values in your own system, as they could differ. You can find these values in Manual Server Configuration dialog box once the appropriate Rule ID is known from Task 2.

How to enable and connect to the data stream from the License Plate Recognition Engine (VE410)

This article is intended for software developers integrating their systems with Symphony.

Solution

1.Open Symphony SDK.
2.Find the XMLStream project and compile it. The XMLStream project connects to the TCP socket and authorizes the Symphony user to receive the XML data stream. You must extend this application to parse XML data and/or work with multiple connections.
3.Run XMLStream.exe without arguments from the console. Observe the instructions displayed on how to enable XMLStreaming. For example:

Usage: \SDK\bin\XMLStream.exe <server address> <port> <username> <password>
<port> is usually 50013, 50023, 50033, … for cameras 1, 2, 3, …

releases before Jan 9, 2008 use ports 50103, 50203, 50303, …

4.Important: Set MultiXMLIntelStream to YES to enable the XML Streaming port.
 Run the following command on the server ONLY once.
5.dbupdater.exe “insert into settings (type,section,id,k,v) values (‘Global’,’Camera’,”,’MultiXMLIntelStream’,’YES’)”
6.Restart Symphony services and cameras.
7.Run XMLStream.exe with the following arguments:

XMLStream.exe localhost 50013 username password

This will connect to camera with ID 1. It is needed to establish an individual connection to each camera. If a connection drops for any reason, it should reconnect automatically.

8.Observe the stream of xml data being captured. Write your own code to parse <LPR><plate>WA01047</plate> from the stream:

<stream>
<frame utc=’1337112104144′>

<object id=’15194741′ confidence=’100′>

<class confidence=’100′>Car</class>

<rect x=’460′ y=’126′ width=’280′ height=’58’ />

<speed>1.00</speed>

<size>4060.00</size>

<dwellSeconds>10</dwellSeconds>

<state></state>

<algorithm>Intel_VE410</algorithm>

<LPR><plate>W01047</plate><confidence>98</confidence><type>0</type><fcolor>0</fcolor><bcolor>16777215</bcolor><stime>1337112098531</stime><etime>1337112103704<

etime><add>true</add></LPR>

</object>

<object id=’8184276′ confidence=’100′>

<class confidence=’100′>Car</class>

<rect x=’458′ y=’126′ width=’284′ height=’58’ />

<speed>1.00</speed>

<size>4118.00</size>

<dwellSeconds>10</dwellSeconds>

<state></state>

<algorithm>Intel_VE410</algorithm>

<LPR><plate>WA01047</plate><confidence>98</confidence><type>0</type><fcolor>0</fcolor><bcolor>16777215</bcolor><stime>1337112096937</stime><etime>1337112104144

/etime><add>true</add></LPR>

</object>

</frame>

</stream>

License check failed message

Issue

License check failed message is displayed in Symphony

Log Message

17:02:49.122  4952 <BasicInf> CLPRAlgorithm: CLPRAlgorithm instance created
17:02:49.122  4952 <BasicInf> Init IPP as SSE42

17:02:49.122  4952 <MoreInfo> creating object for camera 1

17:02:49.126  4952 <BasicInf> LPR Path: C:\Program Files (x86)\Aimetis\Symphony\_bin\LPR

17:02:49.158  4952 <MoreInfo> License count = 0
17:02:49.158  4952 <BasicInf> SetStorageState for (c

See also: 
Increase LogLevel to MoreInfo

Possible Cause

One of the following is the cause:

1.There is no dongle on the server where camera tracker is running.
Action: Verify in the Windows Device Manager that there is a FXMC USB Neural Network Controller
2.Dongle is dead.
Action: Verify in the Windows Device Manager that there is a FXMC USB Neural Network Controller.
3.Dongle drivers are not installed properly.
Action: Verify by opening the Windows Device Manager and search for exclamation mark icons or other suspicious icons beside FXMC USB Neural Network Controller.
OR

Double-click on FXMC USB Neural Network Controller. 
Device status should indicate that “This device is working properly.”

FXMC USB Neural Network Controller

How to find the Type code for a license plate region

To find the Type code:

Task 1: Create a temporary white/blacklist rule using the Symphony Rule Wizard.

1.From the Server menu, select Configuration. The Server Configuration dialog box opens.
2.In the left pane, click Rules. The Rules Summary opens in the right pane.
3.Click New, and then Event.
4.Select the camera using the VE410- License Plate Recognition engine.
5.Add an arbitrary plate to the rule and select the region you want. The region will be saved in the system as a Type code.
6.Click Next several times to finally Save the new rule.

server configuration


The Rule will now be displayed in the 
Rule Summary. In this example, note that the Rule ID is displayed as 18 in the Server Configuration Rule Summary list.

License Rule

Task 2: Ensure that the region Type has been saved in the XML code for the rule

1.From the Server menu, select Manual Configuration Editor. The Manual Configuration Editor dialog box opens.
2.Expand the Type:Rule section.
Note that the Rule 
ID is now 17 and not 18 as in the Server Configuration Rule Summary example. The Rule ID in the Manual Configuration editor does not correspond to the Rule ID in Server Configuration. Normally they are different by one and the Rule ID in Manual Configuration editor is lower.

manual config editor

 

3.Expand the ID and then Value column field.

Value field expanded

The Type code number for the region you want is displayed as follows: <Plate Number=”WA01047″ Type=”XXXXXXXXX” /> … ).

 

See Also

License Plate Recognition: How to configure Symphony to allow a 3rd party system to update the license plate list

How to set the Queue Time feature in ALPR

The Queue Time feature is useful when you have many cameras that are not detecting motion all the time. Using this feature you can, for example, purchase one LPR hardware key but have 10 cameras that each detect motion 5% of the time.

When setting the Queue Time value, you should consider the amount of RAM the current server has.

An example calculation:

 Image size: 720 * 480 * 3(3 color bytes) = 1036800 (which is roughly 1 megabyte = 1048576 bytes )
 RAM queue speed: 1Megabyte * 10 fps = 10 Megabytes / per second
 Queue time of 120 seconds will result in maximum accumulation of 120*10 = 1200 Megabytes
 If a server has only 4 GB of RAM, customer can only have 2-3 cameras that are set to maximum queue time of 120 seconds
 1200M * 3 cameras = 3600M = 3.6GB
 Some memory must be left for other processes, so this is a bit high for queue time for this system.
 If queue time is too high and server does not have enough RAM, camera tracking processes will restart with a Not Enough Memory error and the entire queue for that camera will be lost.
 If a mask is used for VE410 analytic, the amount of RAM will not be equivalent to full screen resolution. As such you can set Queue Time to a higher value.
 You can set different Queue times per camera, but total RAM should not exceed 50-70% of RAM on the server.
 If Queue Time is set to the maxium value all the time, License plates will be shown in live video delayed by amount of queue time. As such, it is best to keep this value fairly low (10-20 seconds is recommended)

License Plate Log displays wrong JPEG in the camera panel

Scenario

License detections in License Plate Log using no region engine. Many plates selected from the License Plate Log display the wrong JPEG in the camera panel. The same is observed from JPEGs generated in the Search License Plate Log.

 

Solution

Reduce lag time.

1.Reduce Queue Time to 1 second.
2.Enable the Use with Motion Detection check box. (When using VE250.)
3.Increase Plate Dwell Time.

LPR analtyic

How to troubleshoot license plates not being detected

Symptom

You have LPR running on a camera and license plates are not being detected and recognized.

Verification

1.Open the latest LPR log file found in %APPDATA%\Senstar\AILogs\lpr_YYMMDD_##.txt
2.One or more license plates show a Confidence value of 0
3.One or more license plates show a low Confidence value (relative to the Reporting Confidence value set for the system where Low = 0, Medium = 50%, High = 100%, and the values increment by 10 in between)

Example of an LPR log where a Syrian License plate is found but with a Confidence of 0.

10:35:29.940  4336 <BasicInf> Found: 434882, Confidence: 0, Region: 0

10:35:30.440  4336 <BasicInf> Found: 434882, Confidence: 0, Region: 0

10:35:32.112  4336 <BasicInf> Found: 434882, Confidence: 0, Region: 0

10:35:59.425  4296 <BasicInf> Found: 434882, Confidence: 0, Region: 0

Potential Causes

 Server CPU speed
 High CPU load on the server

Solution

To improve license plate detection, you can configure the LPR system to process each image for a longer period of time.

The Analysis Timeout setting available on the Analytics Configuration tab under Advanced Settings configures the maximum amount of time the algorithm spends attempting to detect a license plate in a frame.

Analytics Configuration tab > Advanced Settings > Analysis Timeout value

When you increase the Analysis Timeout value, the LPR system has a better chance of detecting and verifying plates with confidence, though the algorithm can take longer to process each frame and decrease the number of frames that can be processed overall.

After adjusting the Analysis Timeout value, when verifying the LPR logs, you will see higher confidence values and potentially a region value.

08:35:56.858 25976 <BasicInf> Found: 434882, Confidence: 35, Region: 206001

08:35:57.219 25976 <BasicInf> Found: 434882, Confidence: 44, Region: 206001

08:35:57.941 25976 <BasicInf> Found: 434882, Confidence: 24, Region: 206001

Notes

By default, the Analysis Timeout value is set to 250 ms. Typically the system takes less than the specified maximum time to process a frame.

 Decreasing the Analysis Timeout value from the default can result in a higher number of false positives. because the system returns a “best guess” value
 Increasing the Analysis Timeout value from the default can result in an increased number of missed license plates.

For example, if you configure the LPR engine to do analysis at 5 frames per second (FPS), setting the Analysis Timeout value to 1000 ms (i.e., 1 second) configures the algorithm to takes one second to process a single frame. In that second, the algorithm will not process the other four frames, which means potentially missing a plate that showed up in one of the four frames that were skipped.

How to enable Rule logging for License Plate Recognition (LPR)

Task 1: Find the Rule ID from the Server Configuration, Rules Summary screen.

1.From the Server menu, select Configuration. Click RulesRules Summary screen opens.
2.Note the Rule ID number of the rule related to License Plate Recognition.

license rule

Task 2: Find the Rule ID in the Manual Configuration Editor

1.From the Server menu, select Manual Configuration Editor. The Manual Configuration Editor dialog box opens.
2.Expand the Type:Rule section.
Note that the Rule 
ID is now 17 and not 18 as in the Server Configuration Rule Summary example. The Rule ID in the Manual Configuration editor does not correspond to the Rule ID in Server Configuration. Normally they are different by one and the Rule ID in Manual Configuration editor is lower.

manual config editor

 

3.Expand the ID and then Value column field.

Value field expanded

Task 3: Add the LogLevel setting

1.Below <State> add the following:

<LogLevel>7</LogLevel>

adding logging level

2.Click OK to save and close the Manual Configuration Editor.

License Plate Recognition – USA/Canada Region Detection

Issue:

When upgrading from Symphony 6.14.1 to 6.14.2 license plate recognition region detection for the USA and Canada is increased. In 6.14.2 the system produces an increased number of Unknown Region detections of partial plates.

plate recognition

Solution

Increase the Reporting Confidence in the VE410 settings.

reporting confidence

How to convert LPR plate type to region name

Scenario

The LicensePlate table in the database has a PlateType column which stores the region information encoded as an integer.

Solution

To get the translated name of this region, call the static PlateTypeToString method on the LicensePlateTypeHelper class in the Lpr.Core.Model namespace: 

namespace Lpr.Core.Model 


public static class LicensePlateTypeHelper 


public static string PlateTypeToString(int type); 




Sample code: 


using Lpr.Core.Model; 


static void Main(string []args) 


Console.WriteLine(LicensePlateTypeHelper.PlateTypeToString(60)); 

Console.WriteLine(LicensePlateTypeHelper.PlateTypeToString(108)); 



Output will be: 

Ontario 

Germany 


If your machine’s language is German, the output will be: 

Ontario 

Deutschland

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.