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

Intrusion Detection

  • Data streams in JSON format are output to the specified DIS channels or webhook URLs, including structured data and images.
  • Result example:
    {
        "event_type":196609,
        "timestamp":1581753322,
        "stream_id":"08eeab92-d822-483a-bc60-eb3db54360f7",
        "message_id":"849D1326-4FC8-11EA-8F73-0242AC110004",
        "image_base64":"/9j/4AAQSkZJRgA...",
        "task_id":"cb088e91e03b4e4a87d55bbaae1debe0",
        "data":{
            "event_set":[
                {
                    "start_position":"in",
                    "end_position":"in",
                    "bounding_box":{
                        "y":327,
                        "h":216,
                        "x":876,
                        "w":105
                    },
                    "category":0,
                    "detection_id":"83BFC020-4FC8-11EA-9F93-0242AC110004"
                }
            ]
        }
    }
  • JSON format

    Field

    Type

    Description

    stream_id

    String

    Camera ID

    event_type

    Uint64

    Event type of the output message. For an intrusion detection event, the value is fixed to 196609, which is 0x 0000 0000 0003 0001 in hexadecimal format. For a loitering detection event, the value is fixed to 196610, which is 0x 0000 0000 0003 0002 in hexadecimal format.

    task_id

    String

    Task ID

    message_id

    String

    Alarm ID in the form of a UUID

    timestamp

    Uint64

    Time when the alarm is triggered

    image_base64

    String

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

    data

    Object

    Service output content

  • data parameter description

    Field

    Type

    Description

    event_set

    List<Object>

    List of events generated

  • event_set parameters

    Field

    Type

    Description

    bounding_box

    Object

    Rectangle for the alarm object

    detection_id

    String

    UUID of the alarm object

    category

    Int

    Alarm target type. The value can be:
    • 0: person
    • 1: vehicle
    • 2: other

    start_position

    String

    Start position of the intrusion. This parameter is not generated for loitering detection.

    • For an intrusion against a line, the value is the name of the side from where the object enters.
    • For an intrusion into a region, the value is in or out.
      • in: The intrusion starts inside the region.
      • out: The intrusion starts outside the region.

    end_position

    String

    End position of the intrusion. This parameter is not generated for loitering detection.

    • For an intrusion across a line, the value is the name of the side where the object arrives.
    • For an intrusion into a region, the value is in or out.
      • in: The intrusion ends inside the region.
      • out: The intrusion ends outside the region.
  • 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