Updated on 2024-02-29 GMT+08:00

Standing Water Detection

  • Data streams in JSON format are output to the specified DIS channels or webhook URLs, including structured data and images.
  • Result example when alert_mode is set to single:
    {
         "event_type":1900544, 
         "task_id":"51d71bb66e6948969fd6156aa48ed36d",    
         "stream_id": "25292206-995f-4c31-bfd5-b0dd7bc389e7",
         "timestamp": 1611648991,
         "message_id": "CBC9C702-5FAE-11EB-9DA9-0242AC110002",
         "image_base64": "/3j24AAQSkZJRgABAQAAAQABAAD/2wBDAAIBAQE...",
         "data":{
             "event_set":[{
                      "bounding_box":{
                           "x": 0,
                           "y": 752,
                           "w": 1920,
                           "h": 328
                       }
            }]   
          }
    }
  • When alert_mode is set to periodic, the results in JSON format when a waterlogging condition is detected are as follows:
    {
         "event_type":1900544, 
         "task_id":"51d71bb66e6948969fd6156aa48ed36d",    
         "stream_id": "25292206-995f-4c31-bfd5-b0dd7bc389e7",
         "timestamp": 1611648991,
         "message_id": "CBC9C702-5FAE-11EB-9DA9-0242AC110002",
         "image_base64": "/3j24AAQSkZJRgABAQAAAQABAAD/2wBDAAIBAQE...",
         "data":{
             "water_logging_ratio":0.15,
             "water_logging_flag":true,
             "event_set":[{
                      "bounding_box":{
                           "x": 0,
                           "y": 752,
                           "w": 1920,
                           "h": 328
                       }
            }]   
          }
    }
  • When alert_mode is set to periodic, the results in JSON format when a waterlogging condition is not detected are as follows:
    {
         "event_type":1900544, 
         "task_id":"51d71bb66e6948969fd6156aa48ed36d",    
         "stream_id": "25292206-995f-4c31-bfd5-b0dd7bc389e7",
         "timestamp": 1611648991,
         "message_id": "CBC9C702-5FAE-11EB-9DA9-0242AC110002",
         "image_base64": "/3j24AAQSkZJRgABAQAAAQABAAD/2wBDAAIBAQE...",
         "data":{
             "water_logging_ratio":0.0,
             "water_logging_flag":false,
             "event_set":[]   
          }
    }
  • JSON format

    Field

    Type

    Description

    event_type

    Uint64

    Event type for the output message.

    The value is fixed to 1900544, which is 0x 0000 0000 0001D0000 in hexadecimal format.

    task_id

    String

    Task ID

    stream_id

    String

    Camera ID

    timestamp

    Uint64

    Time when the alarm is triggered

    message_id

    String

    Alarm ID in the form of a UUID

    image_base64

    String

    Base64 encoding results of the video image when the alarm is triggered

    data

    Object

    Output in detail

  • data parameters

    Field

    Type

    Description

    water_logging_ratio

    Float

    Ratio of the waterlogged area to the detection area. This parameter is available only when the detection interval is set. The value range is [0,1].

    water_logging_flag

    Bool

    Whether waterlogging has occurred. This parameter is available only when the detection interval is set.

    event_set

    List<Object>

    List of events generated

  • event_set parameters

    Field

    Type

    Description

    bounding_box

    Object

    Minimum bounding rectangle of the waterlogged area in the alarm output

  • bounding_box parameters

    Field

    Type

    Description

    x

    Int

    Horizontal coordinate of the upper-left corner of a bounding box

    y

    Int

    Vertical coordinate of the upper-left corner of a bounding box

    w

    Int

    Width of a bounding box

    h

    Int

    Height of a bounding box