[LPR + VitSQLquery] Matching recognized license numbers with data in external DB

Summary

This article describes how to setup automatic search of recognized license numbers in external databases. Video management system (VMS) used — Axxon's Intellect Enterprise.

Solution components:

  • AutoCode LPR. Performs license plate recognition; is represented by AutoCode recognition module object in Intellect Enterprise.
  • AutoCode VitSQLquery. Integrates Intellect Enterprise's message core with optional database management system; is represented by SQL-gateway module object in Intellect Enterprise.
  • AutoCode Viewer. Displays license plate recognition results; is represented by Recognition protocol object in Intellect Enterprise; if needed, this functionality (designed for operators) can be extended with Recognition display object which displays results' meta data and alarms based on those results.

Solution's main point:

For each LPR event (result), VitSQLquery will generate an SQL query to the specified external database in order to determine whether that license number is present there or not. The result of a query (whether the number exists + additional external meta data) is then returned to Intellect Enterprise. If positive, it triggers a reaction within the VMS. The reaction depends on the particular script (see Prerequisite steps, step 2) and Recognition protocol\display's features.

Process:

  1. AutoCode LPR plug-in processes the video stream from Intellect Enterprise's sources, recognizes license plates and generates NUMBER_DETECTED recognition events.
  2. AutoCode LPR sends NUMBER_DETECTED events to Intellect Enterprise's message core.
  3. VitSQLquery retrieves a NUMBER_DETECTED event from message core, generates an SQL query for external database and receives a query result.
  4. When positive result is obtained from the external database, VitSQLquery creates an alarm entry with additional context in MS SQL database which stores recognition events.
  5. Also, based on positive results, VitSQLquery generates an SQLRESULT event.
  6. (performed when script #1 is used) Recognition protocol detects a new alarm entry in recognition database and marks the corresponding event red in its UI.
  7. (performed when script #1 is used): Recognition display receives the SQLRESULT event, retrieves context about the license number and displays it in its UI. Also, it generates an alarming sound

Expected result:


Instruction contents

Note on optional steps

If your goal is to test VitSQLquery and AutoCode LPR functionality working together, we have provided additional instructions on test environment setup:

  • In case you do not have any traffic surveillance camera integrated to your Intellect Enterprise instance, you still need a video stream to recognize license numbers on. See 1. Prerequisite steps : Step 3. Configuring video file import to Intellect Enterprise.
  • In case you do not have a database with sample data to compare recognized license numbers with, see 1. Prerequisite steps : Step 4. Creating demo SQL Server database.

If you are maintaining a real-world installation, it is implied that you have traffic surveillance cameras already configured and integrated with your Intellect Enterprise instance, as well as an external database containing license numbers to trigger alarms. If so, skip the steps marked as [optional].

Prerequisite steps (3-6 are optional)

Step 1. Installing software

On the target server, the following software must be installed:

  1. Intellect Enterprise VMS

    You can download the installation package of the newest version from Axxon's website.


  2. AutoCode LPR module. 

    See the AutoCode administrator's guide for instructions on installation. 

  3. AutoCode Viewer module. 
  4. AutoCode VitSQLquery module. 

Step 2. Downloading scripts

Download the scripts needed for your solution and locate them on your target server:

ExtDB2.js

Obligatory script, version #1. When this script is used, the Recognition display object retrieves SQLRESULT events and displays triggered alarms in its UI for convenient processing by operators. Also, the Recognition display object generates an alarming sound when a recognized number is found in external database.

ExtDB3.jsObligatory script, version #2. Checks the recognized number in external databases, but Recognition display object does not participate in reaction on positive results.

plates.sql


Optional script. Users might find it useful, as it creates a table (within a specified database) to be filled with sample license numbers. This script is used when performing the optional Step 4.

Step 3. Configuring video file import to Intellect Enterprise [optional]

Step 4. Creating demo SQL Server database [optional]

Step 5. Configuring license plate recognition [optional]

This step may be skipped if you already have a configured AutoCode recognition module object in your Intellect Enterprise instance.

You will find detailed description of recognition settings in AutoCode LPR administrator's guide.

Step 6. Configuring license plate recognition results viewing [optional]

This step may be skipped if you have already configured Recognition protocol object.

This step may be skipped if you already have a configured Recognition protocol object in your Intellect Enterprise instance.

Main steps

In order to use the VitSQLquery module for communication with external databases:

  1. Create an SQL-gateway module object on the Hardware tab.

  2. Check the Use connection string option on settings pane of the newly created object. Click Create

  3. In the window that appeared, select an appropriate OLE DB provider to access your database. For example, SQL Server Native Client 10.0.

  4. Select or enter a server name.
  5. Select the Use Windows NT Integrated security option. 
  6. Select a database which contains license numbers to compare with.
  7. Make sure connection is successful. 
  8. Click OK to save the connection settings. Make sure that SQL-gateway module object now has a connection string. Click Apply.
  9. Go to Programming tab. Create a new Script object.
  10. On the Script's settings pane, configure the events filter. You have to specify the following events which will be processed by the Script object: SQLRESULT (object type: SQL-gateway module) and NUMBER_DETECTED (object_type: AutoCode recognition module).

    Refer to Axxon's documentation for more information on Script object configuration.

    Import contents of ITV_extdb file into the Editor-Debugger window (to the Script filed). Save the changes.

  11. Close the Editor-Debugger window and apply the changes.

    By default, all recognition events (NUMBER_DETECTED) from all AutoCode recognition module objects in the system are processed by the created SQL-gateway module object. In script body, you have to specify the ID of that SQL-gateway module object. Assign the ID to VITSQLQUERY_ID constant.

    Also, if you use the script #1, create a Recognition display object and assign its ID to VITLPRMON_ID constant.

    If you use the script #1 and you want another alarming sound to be generated instead of the default one, you can substitute the latest with your custom sound. By default, the original sound file is located in C:\Program Files (x86)\Intellect\Modules\ directory and its name is alarm.wav. You can substitute it with another media file with the same name and extension.



Note on licensing

This article does not cover operations with licenses.

For instruction on Intellect Enterprise's license activation, please refer to Axxon's documentation.

For instruction on AutoCode LPR's license activation, please refer to our quick guide on managing license keys on Windows platform.