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


 

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

2. recognition time : 8 byte – Posix Time : 1525867890000

3. Car Number : 16 byte – utf-8 string : “부산02가1234”<< NULL Exclude Fixed Size

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

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

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

7. Number of resulting images : 1 byte

8. Direction : 1 byte – 0: Unknown 1: In   2: Out

9. Region:32 byte

10. ROI ID : 1 byte 1~4 0:unknown

11.plate’s length

12. license plate

13. Vehicle Type: 0:unknown 1:car 2:motor bike 3:bus 4:truck 5:minibus

14. Confidence:4 byte(float)

15. Plate Type: 1:black 2:white 3:visitor

16. Distance: (int)need to enable radar

17. Azimuth: (float) need to enable radar

18. Vehicle Count:need to enable radar

19. Width: resolution width

20. Height: resolution height

21. coordinate_x1: The left coordinates of license plate.

22. coordinate_y1: The top coordinates of license plate.

23. coordinate_x2: The right coordinates of license plate.

24. coordinate_y2: The bottom coordinates of license plate.

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

{

LPR_COLOR_UNKNOWN = 0,

LPR_COLOR_BLACK,

LPR_COLOR_BLUE,

LPR_COLOR_CYAN,

LPR_COLOR_GRAY,

LPR_COLOR_GREEN,

LPR_COLOR_RED,

LPR_COLOR_WHITE,

LPR_COLOR_YELLOW,

LPR_COLOR_VIOLET,

LPR_COLOR_ORANGE

};

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——————