Skip to content

穿背心检测

请求格式

URL /dynamic/api/v1/setup
Method POST

请求头说明

Key Value
Content-Type application/json

参数说明

Key Require Type Description
cameraId Y string 相机ID
url Y string 相机或视频地址
imageOut Y string base64-返回Base64 path-返回URL
notifyUrl Y string AI分析结果上报地址
inputType Y string RTSP-像机/File-文件
decodeType N string 解码类型, 支持cpu、device两种
skipFrame Y float 抽帧率,60秒一帧,1以下代表1秒多少,比如0.15,表示1秒15帧,0.25表示1秒25帧, 暂时不考虑
roi Y arr ROI, 暂时不考虑
areaBoxes Y arr 区域框列表, 暂时不考虑, 传默认值 []即可
fileStore N object 告警凭证视频存储服务
+url Y string 文件上传地址
+type Y int 文件服务器类型 1-GoFastDFS
+nsKey N string 存储空间KEY
+nsValue N string 存储空间VALUE
abilities Y arr AI能力列表, 参考下面能力参数

abilites参数说明

参数 类型 是否必传 默认值 描述
interval float Y 0.5 跳帧间隔,单位秒
alarmInterval float Y 5 告警上报间隔,单位秒
minBox object N - 最小目标尺寸
+width int N 50 宽, 单位像素
+height int N 50 高, 单位像素
areaBoxes array Y - 警戒框列表
+x float Y - X坐标
+y float Y - Y坐标
threshold float N 0.4 阈值
areaIsReverse boolean N false 警戒框取反

响应字段

参数 类型 是否必传 描述
status int Y 响应状态码
message string Y 提示消息

示例

请求

{
  "cameraId": "10000000000",
  "url": "rtsp://192.168.0.100/camera",
  "imageOut": "base64",
  "inputType": "RTSP",
  "decodeType": "nvidia",
  "notifyUrl": "http://10.10.1.124:6200/api/v1/receive",
  "skipFrame": 25,
  "roi": [],
  "fileStore": {
    "url": "http://xxx.xxx.xxx.xxx:0000",
    "type": 1,
    "nsKey": "scene",
    "nsValue": "certificate"
  },
  "abilities":[
     {
        "name": "ChecVestClothes",
        "value": {
          "interval": 0.5,
          "alarmInterval": 5,
          "threshold": 0.4,
          "areaIsReverse": false,
          "minBox": {
              "width": 50,
              "height": 50
          },
          "areaBoxes": [
            [
              {"x": 100, "y": 100},
              {"x": 900, "y": 100},
              {"x": 900, "y": 800},
              {"x": 100, "y": 800}
            ]
          ]
        }
     }
   ]
}

响应

{
  "status":200,
  "message"":"success"
}
```ChecVestClothes

## 报警格式

## 参数说明

| Key          | Require | Type     | Description      |
| ------------ | ------- | -------- | ---------------- |
| cameraId     | Y       | string   | 相机ID           |
| alarmType    | Y       | string   | 告警类型         |
| scene        | Y       | string   | 场景图           |
| ts           | Y       | string   | 时间戳13位       |
| boxes        | Y       | object[] | 检测框数组       |
| areas        | Y       | array    | 警戒框           |
| extra        | Y       | object   | 扩展信息         |
| +itemsInBox  | Y       | object[] | 针对检测框的扩展 |
| ++confidence | Y       | float    | 置信度           |

## 示例

```json
{
  "cameraId": "10000000000",
  "alarmType": "ChecVestClothes",
  "scene": "场景图, URL(或BASE64)",
  "ts": "时间戳, 13位",
  "boxes": [
    {
      "x": 340,
      "y": 200,
      "width": 200,
      "height": 240
    }
  ],
  "areas": [
    [
      {"x": 100, "y": 100},
      {"x": 900, "y": 100},
      {"x": 900, "y": 800},
      {"x": 100, "y": 800}
    ]
  ],
  "extra": {
    "itemsInBox": [
      {
        "confidence" : 0.85 //置信度
      }
    ]
  }
}

能力列表

中文名 英文名
反光背心检测 WearDetection