Configure ANPR Alarm

If the vehicle appears in the monitoring image during a certain time period, and the recognition parameters are configured, the ANPR camera will capture the vehicle picture automatically. Then the camera analyzes the license plate and the ANPR alarm will be triggered.

  • Make sure you have called NET_DVR_Init to initialize the integration environment.

  • Make sure you have called NET_DVR_Login_V40 to log in to the device.

Figure 1 Programming Flow of Configuring ANPR Alarm

  1. Optional: Call NET_DVR_GetDeviceAbility, set the capability type (dwAbilityType) to "DEVICE_ABILITY_INFO" (0x011), and set the input parameter pointer (pInbuf) to XML_Desc_ITDeviceAbility message for getting intelligent traffic capability to check if the following functions are supported.

    You can also call NET_DVR_STDXMLConfig to transmit the request URI: GET /ISAPI/ITC/capability to get the intelligent traffic capability and check whether the ANPR function is supported.

    The capability is returned in the message XML_ITCCap by lpOutBuffer of lpOutputParam.

    The intelligent traffic capability is returned in the message of XML_ITDeviceAbility, and the related node is <ITCAbility>.

  2. Optional: Call NET_DVR_GetDeviceConfig with "NET_DVR_GET_TRIGGEREX_CFG" (command No.: 5074) and set the input buffer (lpInBuffer) to the structure NET_DVR_TRIGGER_COND for getting the configured or existing triggering mode of ANPR alarm for reference.

    The triggering mode parameters are returned by the output buffer (lpOutBuffer) in the structure of NET_ITC_TRIGGERCFG.

  3. Call NET_DVR_SetDeviceConfig with "NET_DVR_SET_TRIGGEREX_CFG" (command No.: 5075), set the input buffer (lpInBuffer) to the structure NET_DVR_TRIGGER_COND, and set the input parameter (lpInParamBuffer) to the structure NET_ITC_TRIGGERCFG for setting the triggering mode.
  4. Optional: Call NET_DVR_GetDeviceConfig with "NET_DVR_GET_GUARDCFG" (command No.: 3134) and set the input buffer (lpInBuffer) to the structure NET_DVR_GUARD_COND for getting the configured or existing arming schedule of ANPR alarm for reference.

    The arming schedule parameters are returned by the output buffer (lpOutBuffer) in the structure of NET_DVR_GUARD_CFG.

  5. Call NET_DVR_SetDeviceConfig with "NET_DVR_SET_GUARDCFG" (command No.: 3135), set the input buffer (lpInBuffer) to the structure NET_DVR_GUARD_COND, and set the input parameter (lpInParamBuffer) to the structure NET_DVR_GUARD_CFG for setting arming schedule.
    Note:

    You can also configure the triggering mode and arming schedule for ANPR alarm by logging in to device via web browser.

  6. Optional: Configure parameters to display license plate information on alarm picture.
    1. Optional: Call NET_DVR_GetDeviceConfig with "NET_ITS_GET_OVERLAP_CFG_V50" (command No.: 5055) and set the input buffer (lpInBuffer) to the structure NET_ITS_OVERLAPCFG_COND for getting the configured or existing overlay parameters for reference.

      The overlay parameters are returned by the output buffer (lpOutBuffer) in the structure of NET_ITS_OVERLAP_CFG_V50.

    2. Call NET_DVR_SetDeviceConfig with "NET_ITS_SET_OVERLAP_CFG_V50" (command No.: 5056), set the input buffer (lpInBuffer) to the structure NET_ITS_OVERLAPCFG_COND, and set the input parameter (lpInParamBuffer) to the structure NET_ITS_OVERLAP_CFG_V50 for setting the parameters to display license plate information on alarm picture.
  7. Optional: Call NET_DVR_STDXMLConfig to transmit /ISAPI/Traffic/channels/<ID>/licensePlate/filtration?format=json by PUT method and set lpInputParam to JSON_Filtration to filter the duplicated license plates and receive the same alarm just for once.
    Note:

    To check whether the device supports filtering duplicated license plates, you can call NET_DVR_STDXMLConfig to transmit /ISAPI/Traffic/channels/<ID>/capabilities by GET method. The capability will be returned in the message JSON_Filtration by lpOutputParam. If it supports, the node <isSupportFiltration> will be in the capability message and its value is "true".

  8. Optional: Receive ANPR alarm in arming mode (see Receive Alarm/Event in Arming Mode) or listening mode (see Receive Alarm/Event in Listening Mode) when alarm is triggered.
    Note:

    The command (lCommand) to receive ANPR alarms should be set to "COMM_ITS_PLATE_RESULT" (command No.: 0x3050) or "COMM_UPLOAD_PLATE_RESULT" (command No.: 0x2800) in the alarm callback function MSGCallBack.

    For alarm details, refer to XML_EventNotificationAlert_ANPR returned in the field pXmlBuf of NET_DVR_PLATE_INFO in the structure NET_ITS_PLATE_RESULT or NET_DVR_PLATE_RESULT.

Call NET_DVR_Logout and NET_DVR_Cleanup to log out from device and release resources.