1. TCP Type

System Structure

Enter the LPR IP address and LPR port on the NVR/VMS to register the LPR camera. Then LPR Camera will transmits the data of recognition result to the NVR/VMS when the LPR the license plate is recognized. The data includes the time that was recognized, the license plate, the license plate snapshot, and the full-screen snapshot.

List of messages

Basic Packet Composition

1.  SIG                               CC FF  :  Packet Start

2.  SIG END                       FF DD  :  Packet End

3.  COMMAND

4.  DATA_SIZE

5.  DATA

COMM_LOGIN_REQ

1. Data Type: JSON-charset=utf-8

2. Data Content: ID and Password 

3. Example

           {

              “id”: “admin”,

              “password”: “1234”

            }

※ DATA_SIZE = DATA length + 2 bytes(SIG END)

※ Use Little-Endian

COMM_LOGIN_REPLY

1. Data Type : JSON-charset=utf-8

2. Data Content : result - Required Items

                        HTTP Status code

  • a. 200 : OK
  • b. 401 : No Privileges
  • c. Etc...

3. Example

           {

              “result”: “200”     

            }

COMM_RECOG_POST

1. Recognition Result Message

The LPR camera sends the recognition results on its own initiative without requiring a request from the NVR/VMS.

Data Type : Binary

Data Content 

 

a. metadata

① Device ID : 16 byte – GUID byte array : 04 f9 12 bb ce 94 65 40 89 af e8 3c d8 8f 70 be

② recognition time : 8 byte – Posix Time : 1525867890000

③ Color of the Car : 1 byte – refer to the color table(stand by)

④ Color of the licence plate : 1 byte – refer to the color table(stand by)

⑤ Speed : 2 byte – unsigned short integer, Km/h Unit

⑥ Number of resulting images : 1 byte

⑦ Direction : 1 byte – 0: Unknown 1: In   2: Out

⑧ Region:32 byte

⑨ ROI ID : 1 byte 1~4 0:unknown

⑩ Plate’s length

⑪ License plate

⑫ Vehicle Type: 0:unknown 1:car 2:motor bike 3:bus 4:truck

⑬ Confidence:4 byte(float)

⑭ Plate Type: 1:black 2:white 3:visitor

⑮ Distance: (int)need to enable radar

⑯ Azimuth: (float) need to enable radar

⑰ Vehicle Count:need to enable radar

   

b. Image data : variable size 

c. Data Chunk

① Chunk ID : 4 byte

       Meta : 11 ff 00 00

       mage : 22 ff 00 

② Chunk Size : 4 byte

       Data size excluding Chunk Header 8 byte.

 

2. Packet Example


Color Table

enum Color

{

Color_Green = 0x00,

Color_White,

Color_Yellow,

Color_Orange,

Color_Black,

Color_Silver,

Color_Blue,

Color_Red,

Color_Royal,

Color_Indigo,

Color_Unknown = 0xFE,

Color_End,

};

2. HTTP Type

Integrate Method

For the HTTP Type, currently our LPR camera supports HTTP Post and Get request method.

VMS or NVR needs to develop matched API to receive the LPR information from the camera. The matched API URL may be like below:

URL of Post Methodhttp://IP:Port/xxxx

URL of Get Method: http://IP:Port/xxxx

After VMS or NVR has completed the API, our LPR camera could use the API URL to send LPR information to the VMS or NVR when the car plate is recognized.

 

LPR Information transfer

ü Post Method

Take an example, the API URL from a VMS is like “http://192.168.2.24:1234/post” 

Fill in the specified URL in camera’s web UI (if the VMS requires the authentication, please also fill in) : 

Camera will post the LPR information data in json format to the VMS or NVR in real time when it is recognized.

The content will be sent is as follows:

ü Get Method

Take an example, the API URL from a VMS is like “http://192.168.7.121:8080/api/lpr?”  

Fill in the specified URL in camera’s web UI (if the VMS requires the authentication, please also fill in) : 

For sending the license plate information, the LPR camera will automatically add the license plate parameters to the URL.

For example, the car plate is “MS12345”. Once it’s detected, the LPR camera will send below URL to VMS:

http://192.168.7.121:8080/api/lpr?Caption = LPR&description = MS12345

If the license plate information is to be displayed in VMS, the VMS side needs to extract it from the URL.

3. RTSP Type

Prerequisites

This part is implemented in onvif metadata. There are three streams in rtsp: video stream, audio stream, and alarm stream. Metadata alarm is performed through the onvif alarm stream in the rtsp. So if the VMS or NVR supports and can receive the onvif alarm stream in the rtsp, it can work with rtsp.  

Integrate Method

We have defined the format of the XML. Knowing the XML format, VMS or NVR can be developed to be integrated, and LPR information can be displayed in VMS or NVR.

 

ex.) The contents of the xml include the date, time, license plate, and license plate snapshot paths as shown below.

<tt:MetaDataStream>

 <tt:Event>

 <wsnt:NotificationMessage>

 <wsnt:Topic Dialect="http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet">tns1:RuleEngine/LicensePlateDetector/LicensePlate</wsnt:Topic>

 <wsnt:Message>

 <tt:Message UtcTime="2018-05-15T06:19:34Z" PropertyOperation="Changed">

 <tt:Source>

 <tt:SimpleItem Name="VideoSourceConfigurationToken" Value="VideoSourceToken"/>

 <tt:SimpleItem Name="VideoAnalyticsConfigurationToken" Value="VideoAnalyticsToken"/>

 <tt:SimpleItem Name="Rule" Value="MyLicensePlateDetectorRule"/>

  </tt:Source>

 <tt:Key>

 <tt:SimpleItem Name="LicensePlateResult" Value="43거6510"/>

  </tt:Key>

  <tt:Data>

 <tt:SimpleItem Name="LicensePlatePicturePath" Value="/LPR/2018051506193401.jpg"/>

<tt:SimpleItem Name="LicenseCarSpeed" Value="25km/h"/>

<tt:SimpleItem Name="LicenseCarDirection" Value="1"/>

  </tt:Data>

  </tt:Message>

  </wsnt:Message>

  </wsnt:NotificationMessage>

  </tt:Event>

  </tt:MetaDataStream>

 

Description: You can receive the recognized license plate image through the snapshot path and the command named get ( ex. http://IP:PORT/LPR/2018051506193401.jpg). Only 10 latest images are available for download. (If you can't see image in the NVR or VMS, type url ( ex.http://IP:PORT/LPR/2018051506193401.jpg) in the web browser address box to see if the image is visible.) 

LPR information transfer 

When the integration is complete, the LPR camera sends an xml containing LPR information to the VMS or NVR in real time when it is recognized.



——————END——————