Description

This document will introduce how to integrate between Milesight LPR camera and NVR or VMS (Including Milesight brand and the third parties brand). There are three post types: TCP, HTTP and RTSP.


Note:

1.For the Evidence function, please make sure your camera’s model is TSxxxx-xxC or MS-Cxxxx-xLC and your camera’s version is 45.8.0.3-LPR_XX-r1 or above. If your camera’s model is MS-Cxxxx-xLxE or TSxxxx-xxxE, please make sure your camera’s version is T_61.8.0.3_XX-r7 or above. 

2.For the Parking Detection, please make sure your camera’s model is TSxxxx-FPC/P and your camera’s version is 45.8.0.3-LPR_XX-r3 or above. If your camera’s model is TSxxxx-FPE/P, please make sure your camera’s version is T_61.8.0.3_XX-r7 or above.

3.For the Vehicle Counting, please make sure your camera’s model is TSxxxx-xxC (Except for TSxxxx-FPC/P) and your camera’s version is 45.8.0.3-LPR_XX-r3 or above. If your camera’s model is TSxxxx-xxE (Except for TSxxxx-FPE/P), please make sure your camera’s version is T_61.8.0.3_XX-r7 or above.

4.For the List Event with HTTP post method, please make sure your camera’s model is MS-Cxxxx-xLxC or TSxxxx-xxxC and your camera’s version is 45.8.0.3-LPR_XX-r8 or above. If your camera’s model is MS-Cxxxx-xLxE or TSxxxx-xxxE, please make sure your camera’s version is T_61.8.0.3_XX-r7 or above.

5.For the Attributes Event, please make sure your camera’s model name is TSxxxx-xxxC (Except for TSxxxx-FPC/P) and your camera’s version is T_61.8.0.3_XX-r1 or above.

6.For the Violation Management, please make sure your camera’s model is MS-Cxxxx-xLxC or TSxxxx-xxxC and your camera’s version is 45.8.0.3-LPR_XX-r6 or above. If your camera’s model is MS-Cxxxx-xLxE or TSxxxx-xxxE, please make sure your camera’s version is T_61.8.0.3_XX-r7 or above.

7.Due to some code conflicts between different platforms, if your camera model is MS-Cxxxx-xxxE or TSxxxx-xxxE, it is recommended to upgrade your camera to T_61.8.0.3_XX-r13 or above before integration with your system. If your camera model is MS-Cxxxx-xxxC or TSxxxx-xxxC, it is recommended to upgrade your camera to T_45.8.0.3_XX-r9 or above before integration with your system.


{
 “registerAll”: 1,
}
②When you want to register only one feature, you can set that feature to 1 and set the “registerAll” to 0, refer to the following case:
{
 “registerAll”: 0,
     “vehiclecount”: 1
}
Or
{
 “registerAll”: 0,
      lprparking”: 1
}




Parameter

Note

typedef enum traBrandType{

    TRA_BRAND_UNKNOW = 0,

    TRA_BRAND_AUDI,

    TRA_BRAND_ASTONMARTIN,

    TRA_BRAND_ALFAROMEO,

    TRA_BRAND_BUICK,

    TRA_BRAND_MERCEDESBENZ,

    TRA_BRAND_BMW,

    TRA_BRAND_HONDA,

    TRA_BRAND_PEUGEOT,

    TRA_BRAND_PORSCHE,

    TRA_BRAND_BENTLEY,

    TRA_BRAND_BUGATTI,

    TRA_BRAND_VOLKSWAGEN,

    TRA_BRAND_DODGE,

    TRA_BRAND_DAEWOO,

    TRA_BRAND_DAIHATSU,

    TRA_BRAND_TOYOTA,

    TRA_BRAND_FORD,

    TRA_BRAND_FERRARI,

    TRA_BRAND_FIAT,

    TRA_BRAND_GMC,

    TRA_BRAND_MITSUOKA,

    TRA_BRAND_HAVAL,

    TRA_BRAND_GEELY,

    TRA_BRAND_JEEP,

    TRA_BRAND_JAGUAR,

    TRA_BRAND_CADILLAC,

    TRA_BRAND_CHRYSLER,

    TRA_BRAND_LEXUS,

    TRA_BRAND_LANDROVER,

    TRA_BRAND_LINCOLN,

    TRA_BRAND_SUZUKI,

    TRA_BRAND_ROLLSROYCE,

    TRA_BRAND_LAMBORGHINI,

    TRA_BRAND_RENAULT,

    TRA_BRAND_MAZDA,

    TRA_BRAND_MINI,

    TRA_BRAND_MASERATI,

    TRA_BRAND_MAYBACH,

    TRA_BRAND_ACURA,

    TRA_BRAND_OPEL,

    TRA_BRAND_CHERY,

    TRA_BRAND_KIA,

    TRA_BRAND_NISSAN,

    TRA_BRAND_SKODA,

    TRA_BRAND_MITSUBISHI,

    TRA_BRAND_SUBARU,

    TRA_BRAND_SMART,

    TRA_BRAND_SSANGYONG,

    TRA_BRAND_TESLA,

    TRA_BRAND_ISUZU,

    TRA_BRAND_CHEVROLET,

    TRA_BRAND_CITROEN,

    TRA_BRAND_HYUNDAI,

    TRA_BRAND_INFINITY,

    TRA_BRAND_MERCURY,

    TRA_BRAND_SATURN,

    TRA_BRAND_SAAB,

    TRA_BRAND_LYNKCO,

    TRA_BRAND_MORRISGARAGES,

    TRA_BRAND_PAGANI,

    TRA_BRAND_SPYKER,

    TRA_BRAND_BYD,

    TRA_BRAND_MCLAREN,

    TRA_BRAND_KOENIGSEGG,

    TRA_BRAND_VOLVO,

    TRA_BRAND_LANCIA,

    TRA_BRAND_SHELBY,

    TRA_BRAND_SEAT,

    TRA_BRAND_CUPRA,

    TRA_BRAND_DACIA,

    TRA_BRAND_DS,

    TRA_BRAND_MAX

} TRA_BRAND_ENUM;

 

 

"Audi"

"Aston Martin"

"Alfa Romeo"

"Buick"

"Mercedes—Benz"

"BMW"

"Honda"

"Peugeot"

"Porsche"

"Bentley"

"Bugatti"

"Volkswagen"

"Dodge"

"Daewoo"

"Daihatsu"

"Toyota"

"Ford"

"Ferrari"

"Fiat"

"GMC"

"MITSUOKA"

"Haval"

"Geely"

"Jeep"

"Jaguar"

"Cadillac"

"Chrysler"

"Lexus"

"Land Rover"

"Lincoln"

"Suzuki"

"Rolls-royce"

"Lamborghini"

"Renault"

"Mazda"

"MINI"

"Maserati"

"Maybach"

"Acura"

"Opel"

"Chery"

"Kia"

"Nissan"

"Skoda"

"Mitsubishi"

"Subaru"

"Smart"

"Ssangyong"

"Tesla"

"Isuzu"

"Chevrolet"

"Citroen"

"Hyundai"

"Infinity"

"Mercury"

"Saturn"

"SAAB"

"LYNK&CO"

"MorrisGarages"

"pagani"

"Spyker"

"BYD"

"McLaren"

"Koenigsegg"

"Volvo"

"Lancia"

"Shelby"

"Seat"

"CUPRA"

"Dacia"

"DS"

Vehicle Type Table

parameter

value

none

0

car

1

motor

2

bus

3

truck

4

van

5

suv

6

forklift

7

excavator

8

towtruck

9

Police-car

10

fireengine

11

ambulance

12

bicycle

13

E-bike

14

other

15


There are two post modes for the Parking Detection: Trigger mode and Period mode, please refer to the following cases:


Trigger Mode

{
"event":"Parking Detection",
"device":"Network Camera",
"time":"2023-01-02 23:46:24",
"report_type":"trigger",
"region":1,
"region name":"ROI1",
"state":0,
"Length of Parking":"00:00:31",
"License Plate":"BD925RA",
"Plate Color":"Blue",
"Vehicle Type":"Car",
"Vehicle Color":"Blue",
"Vehicle Brand":"Buick",
"Object tracking box_x1":732,
"Object tracking box_y1":885,
"Object tracking box_x2":1193,
"Object tracking box_y2":1558,
"plateSnap":"....(BASE64 code)",
"bkgSnap":"....(BASE64 code)"
}


Period Mode



{
"event":"Parking Detection",
"device":"Network Camera",
"time":"2023-01-02 23:54:54",
"report_type":"interval",
"total_occupied":1,
"total_available":3,
"region":[1, 2, 3, 4],
"region name":["ROI_1", "ROI_2", "ROI_3", "ROI_4"],
"state":[1, 0, 0, 0],
"data list":[{
"region":1,
"region name":"ROI_1",
"state":1,
"Length of Parking":"00:00:17",
"License Plate":"DD925RA",
"Plate Color":"Blue",
"Vehicle Type":"SUV",
"Vehicle Color":"Blue",
"Vehicle Brand":"Buick",
"Object tracking box_x1":1092,
"Object tracking box_y1":870,
"Object tracking box_x2":1509,
"Object tracking box_y2":1541,
            "plateSnap":"....(BASE64 code)"
        },
        {
"region":2,
"region name":"ROI_2",
"state":1,
"Length of Parking":"00:01:17",
"License Plate":"DD92AAA",
"Plate Color":"Blue",
"Vehicle Type":"SUV",
"Vehicle Color":"Blue",
"Vehicle Brand":"Buick",
"Object tracking box_x1":1092,
"Object tracking box_y1":870,
"Object tracking box_x2":1509,
"Object tracking box_y2":1541,
            "plateSnap":"....(BASE64 code)"
        }
    ],
"bkgSnap":"....(BASE64 code)"
}


COMM_COUNTING_POST

This is specifically for the Vehicle Counting, make sure your camera’s model and firmware version support this function, as shown below:

There are two post modes for the Vehicle Counting: Instant mode and Customize mode, please refer to the following cases:

①Instant Mode


{
"event":"Vehicle Counting",
"device":"Network Camera",
"time":"2023-01-03 00:28:07",
"region":1,
"region name":"ROI_1",
"All-Car":1,
"All-Motorcycle":0,
"All-Non-motor":0,
"Car":1,
"Motorbike":0,
"Bus":0,
"Truck":0,
"Van":0,
"SUV":0,
"Fire engine":0,
"Ambulance":0,
"Bicycle":0,
"Other":0,
"snapshot":"....(BASE64 code)"

②Customize Mode

{
"event":"Vehicle Counting",
"device":"Network Camera",
"time":"2023-01-03 01:00:00",
"regionList":[{
"region":1,
"region name":"ROI_1",
"All-Car":23,
"All-Motorcycle":0,
"All-Non-motor":0,
"Car":19,
"Motorbike":0,
"Bus":0,
"Truck":1,
"Van":0,
"SUV":3,
"Fire engine":0,
"Ambulance":0,
"Bicycle":0,
"Other":0
}, {
"region":2,
"region name":"ROI_2",
"All-Car":40,
"All-Motorcycle":1,
"All-Non-motor":0,
"Car":35,
"Motorbike":1,
"Bus":2,
"Truck":2,
"Van":0,
"SUV":1,
"Fire engine":0,
"Ambulance":0,
"Bicycle":0,
"Other":0
}, {
"region name":"Total",
"All-Car":63,
"All-Motorcycle":1,
"All-Non-motor":0,
"Car":54,
"Motorbike":1,
"Bus":2,
"Truck":3,
"Van":0,
"SUV":4,
"Fire engine":0,
"Ambulance":0,
"Bicycle":0,
"Other":0
}],
"snapshot":"....(BASE64 code)"
}

Note: The three parameters in blue font in the case above are related to the configuration of "Count Type" on the page. As shown below:

 

  • (1) When you select "Small Vehicle/Medium Vehicle/Large Vehicle", please refer to the following case:

"Small Vehicle":0,

"Medium Vehicle":0,

"Large Vehicle":0,

  • (2) When you select "Car/Motorcycle/Non-motor", please refer to the following case:

"All-Car":23,

"All-Motorcycle":0,

"All-Non-motor":0,

2. HTTP Type

lIntegrate 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 license plate is recognized.

 

lLPR Information transfer

üPost Method

Take an example, the API URL from a VMS is like:

http://192.168.69.28:8092/api/httpEvent” 

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 that will be sent is as follows:





Key

Sample of Value

Description

device

......demo..............

The Device Name which can be configured on the System Info of camera. The default is Network Camera.

time

2023-09-15 06:19:57.267

The time when license plate is recognized.

time_msec

2023-09-15 06:19:57.267

The time when license plate is recognized.(Accurate to the millisecond level.)

plate

NSC5870

The recognized license plate number.

type

Visitor

The plate list type of recognized license plate, Black or White or Visitor.

speed

-

The running speed of detected vehicle.

direction

-

The driving direction of detected vehicle, Approach or Away.

detection_region

2

The ID of detection region where the vehicle is being tested, 1 or 2 or 3 or 4.

region

NLD

The registration country/region of the recognized license plate.

resolution_width

1920

The width of LPR processing resolution.

resolution_height

1080

The height of LPR processing resolution.

coordinate_x1, coordinate_y1

539736

The top left coordinates of license plate.

coordinate_x2, coordinate_y2

699874

The bottom right coordinates of license plate.

confidence

-

The confidence value of recognized license plate.

plate_color

White

The color of recognized license plate.

vehicle_type

Car

The type of recognized vehicle.

vehicle_color

Red

The color of recognized vehicle.

Vehicle Brand

Volkswagen

The brand of recognized vehicle.

plate_image

 

The snapshot of license Plate, depends on whether it is configured to send together. 

As shown below, it will be sent together if select License Plate or All.

 

full_image

 

The full snapshot,depends on whether it is configured to send together. 

As shown below, it will be sent together if select Full Snapshot or All.

 

evidence_image0

 

The snapshot of license Plate from evidence camera 1, depends on whether a linkage evidence camera is added to your LPR camera.

 

evidence_image1

 

The snapshot of license Plate from evidence camera 2, depends on whether two linkage evidence cameras are added to your LPR camera.





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

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

http://192.168.69.28:8092/api/httpEventsource=LPR&description=MS12345

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


<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.)


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