
# 非机动车检测
- 输出JSON数据流到DIS指定的通道或者Webhook URL，包括告警结构化数据和图片数据。
- 非机动车违停/非机动车入侵JSON结果示例：
  ```
  {
       "event_type":1376256, 
       "alarm_type":0,
       "task_id":"2f268b9472a544e991eae3c5c3534f5b",    
       "stream_id": "9f8933c9-448c-48e5-8bc0-631ea83b92eb",
       "timestamp": 1527603463,
       "message_id": "0DD1BEA6-634B-11E8-8B0B-407D0FAD9218",
       "image_base64": "/3j24AAQSkZJRgABAQAAAQABAAD/2wBDAAIBAQE..."，
       "data":{
           "event_set":[
               {
                    "bounding_box":{
                         "x":100,
                         "y":200,
                         "w":80,
                         "h":150
                     },
                     "detection_id":"a99e5fa2-c6c6-4709-acfb-54ef79d293a7",
                     type: "bicycle"
                 },
                {
                     "bounding_box":{
                          "x":200,
                          "y":300,
                          "w":70,
                          "h":150
                     },
                     "detection_id":"b99e5fa2-c6c6-4709-acfb-54ef79d293a7",
                     type: "electromobile"
                 }
             ]   
        }
  }
  ```
  
- 非机动车违停事件消失告警JSON结果示例：
  ```
  {
       "event_type":1376256, 
       "alarm_type":1,
       "task_id":"2f268b9472a544e991eae3c5c3534f5b",    
       "stream_id": "9f8933c9-448c-48e5-8bc0-631ea83b92eb",
       "timestamp": 1527603463,
       "message_id": "0DD1BEA6-634B-11E8-8B0B-407D0FAD9218",
       "image_base64": "/3j24AAQSkZJRgABAQAAAQABAAD/2wBDAAIBAQE...",
       "data":{
           "event_set":[
               {
                     "detection_id":"a99e5fa2-c6c6-4709-acfb-54ef79d293a7",
                }
             ]   
        }
  }
  ```
  
- JSON格式说明
  
  | 字段           | 类型     | 说明                                                                                                                                                                                                                                                                                                                                                                                                                                       |
  |:---|:---|:---|
  | event_type   | Uint64 | 快速标识非机动车检测算法的输出消息类型。 - 非机动车违停检测事件其值固定为1376256, 对应16进制为 0x 0000 0000 000150000。  - 非机动车入侵检测事件其值固定为1376257, 对应16进制为 0x 0000 0000 000150001。   |
  | alarm_type   | Uint64 | 告警类型：0为事件告警，1为事件消失告警。                                                                                                                                                                                                                                                                                                                                                                                                                    |
  | task_id      | String | 作业ID。                                                                                                                                                                                                                                                                                                                                                                                                                                    |
  | stream_id    | String | 摄像头编号。                                                                                                                                                                                                                                                                                                                                                                                                                                   |
  | timestamp    | Uint64 | 触发告警时间点的时间戳。                                                                                                                                                                                                                                                                                                                                                                                                                             |
  | message_id   | String | 告警ID，生成的唯一告警事件UUID。                                                                                                                                                                                                                                                                                                                                                                                                                      |
  | image_base64 | String | 告警时刻输入的视频图像的Base64编码结果。                                                                                                                                                                                                                                                                                                                                                                                                                  |
  | data         | Object | 详细输出内容。                                                                                                                                                                                                                                                                                                                                                                                                                                  |
     
  
- data参数格式说明
  
  | 字段        | 类型             | 说明      |
  |:---|:---|:---|
  | event_set | List\<Object\> | 输出事件列表。 |
     
  
- event_set参数格式说明
  
  | 字段           | 类型     | 说明                                                                                                                                                                                            |
  |:---|:---|:---|
  | bounding_box | Object | 告警输出的违规电动车对象矩形框。 在告警为违停事件消失告警时，没有该字段。                                                                                                            |
  | type         | String | 车辆类型，目前支持bicycle和electromobile两类，在告警为违停事件消失告警时，没有该字段。 "bicycle": 自行车 "electromobile": 两轮电瓶车（包含摩托车） |
  | detection_id | String | 告警目标对应的UUID。画面中同一个占道区域，连续检测到的告警ID不变，若跟踪丢失ID会发生变化。                                                                                                                                             |
     
  
- bounding_box参数格式说明
  
  | 字段 | 类型  | 说明         |
  |:---|:---|:---|
  | x  | Int | 矩形框左上角横坐标。 |
  | y  | Int | 矩形框左上角纵坐标。 |
  | w  | Int | 矩形框宽度。     |
  | h  | Int | 矩形框高度。     |
     
  
 
