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
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能力列表
+name Y string 能力名CrowdGathered
+value Y object 参考abilities参数说明

abilities参数说明

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

响应字段

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

示例

请求

{
  "cameraId": "10000000000",
  "url": "rtsp://12312312",
  "imageOut": "base64|path",
  "inputType": "RTSP|File",
  "decodeType": "device",
  "notifyUrl": "http://10.10.1.124:6200/api/v1/receive",
  "skipFrame": 25,
  "roi": [],
  "areaBoxes": [],
  "fileStore": {
    "url": "http://xxx.xxx.xxx.xxx:0000",
    "type": 1,
    "nsKey": "scene",
    "nsValue": "certificate"
  },
  "abilities":[
     {
    "name": "VehicleNumberByJamParam",
    "value": {
            "interval": 0.5,
            "minTarry": 3,
            "alarmInterval": 5,
            "threshold": 0.4,
            "areaIsReverse": false,
            "jamMinNumber": 5,
            "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"
}

报警格式

参数说明

Key Require Type Description
cameraId Y string 相机ID
alarmType Y string 告警类型
scene Y string 场景图
ts Y string 时间戳13位
uid Y string uid描述
vehicleBoxes Y object[] 检测框数组
+height Y int 框height
+width Y int 框width
+x Y int 框左上点x坐标
+y Y int 框左上点y坐标
areas Y array 警戒框
extra Y object 扩展信息
+itemsInBox Y object[] 针对检测框的扩展
++confidence Y float 置信度
++color Y string color描述(暂无意义)
++plate Y string plate描述(暂无意义)
++plateColor Y string plateColor描述(暂无意义)
++plateScores Y array plateScores描述(暂无意义)
++type Y string 目标标签类型
++uid Y string uid描述(暂无意义)
values Y array vehicle全量信息
+vehicle Y object vehicle信息
++vehicle Y string vehicle描述
++vehicleBoxNo Y int vehicle编号

示例

{
    "alarmType": "VehicleNumberByJamParam",
    "cameraId": "cd-fermarmarket",
    "eventID": "b76c80c2-8cbd-11ed-afa4-0242ac110002",
    "extra": {
        "itemsInBox": [
            {
                "color": "",
                "confidence": 0.5332351922988892,
                "plate": "",
                "plateColor": "",
                "plateScores": [],
                "type": "car",
                "uid": ""
            }
        ]
    },
    "scene": "base64dataexist",
    "ts": 1672898197229,
    "uid": "",
    "url": "b76c81a8-8cbd-11ed-b15f-0242ac110002",
    "values": [
        {
            "vehicle": {
                "vehicle": "",
                "vehicleBoxNo": 0
            }
        }
    ],
    "vehicleBoxes": [
        {
            "height": 30,
            "width": 42,
            "x": 94,
            "y": 711
        }
    ]
}