园区智能体 CampusGo-创建云上人流量统计作业:请求
请求
- 请求样例1(VIS输入+DIS输出)
POST /v2/6204a5bd270343b5885144cf9c8c158d/services/c-flowcount-cloud/tasks{ "name":"flowcount_cloud_0", "description":"flowcount task test", "input":{ "type":"vis", "data":[ { "stream_name":"flowcount", "index":0 } ] }, "output":{ "dis":{ "stream_name":"dis-flowcount" } }, "service_version":"3.0", "resource_order_id":"840a5cf90d4a4bbaa71f251dfe8fe64e", "service_config":{ "common":{ "line_count_interval":2, "region_count_interval":2, "line_detection_sw":1, "region_detection_sw":1, "heatmap_detection_sw":0, "heatmap_detection_interval":60, "target_roi":"{\"lines\":[{\"data\":[[560,680],[1185,506]],\"properties\":{\"side1_name\":\"Side1\",\"side2_name\":\"Side2\"}}],\"polygons\":[{\"data\":[[0,0],[0,1080],[1920,1080],[1920,0]]}]}", "heatmap_point_interval":4 } }}
- 参数说明
参数
是否必选
类型
说明
name
是
String
作业名称,只能由中文、字母(a~zA~Z)、数字(0~9)、中划线(-)、下划线(_)组成,长度范围为[1,100]。
description
否
String
作业描述信息,最大长度为500字符长度。
input
是
Object
视频数据输入列表,目前云上人流量统计支持以下输入类型:- vis:从 视频接入服务 中读取视频数据。
详细参数定义参见task.input(任务输入参数)。
service_version
是
String
功能版本号,版本号为3.0。
resource_order_id
是
String
购买的算法能力包ID,在服务界面购买算法能力包获取。
output
是
Object
结果数据的输出列表,目前支持将结果输出到您指定的通道中,输出类型为“dis”。
详细参数定义参见task.output(任务输出参数)。
service_config
否
Object
服务的算法配置,配置参数见ServiceConfig参数说明。
- service_config中common参数结构说明
字段
是否必选
类型
说明
line_count_interval
否
Int
过线人流量统计周期,单位为秒,统计的是一段时间的人流量结果。取值范围为(0, 86400],默认值为2。
region_count_interval
否
Int
区域人流量统计周期,单位为秒,统计的是当前时刻的区域人流量结果。取值范围为(0, 86400],默认值为2。
line_detection_sw
否
Int
过线人流量统计开关。
- 0:表示不开启。
- 1:表示开启。
默认值为1。
region_detection_sw
否
Int
区域人流量统计开关。
- 0:表示不开启。
- 1:表示开启。
默认值为1。
target_roi
否
string
对应控制台的界面参数“检测区域设置”。
表示检测区域,该字段为JSON格式的字符串,API调用时需要加转义符。详细JSON格式参见target_roi(目标区域)。
例如:
{"lines":[{"data":[[560,680],[1185,506]],"properties":{"side1_name":"Side1","side2_name":"Side2"}}],"polygons":[{"data":[[0,0],[0,1080],[1920,1080],[1920,0]]}]}
参数没有携带时,默认区域为整个视频帧。
直线与区域默认位置如图1所示。
heatmap_detection_sw
否
Int
热力图检测开关
- 0:表示不开启。
- 1:表示开启。
默认值为0。
heatmap_detection_interval
否
Int
热力图检测周期,单位为秒。取值范围为[10, 86400],默认值为10。依据热力图检测周期内的热点值进行更新。
heatmap_point_interval
否
Int
热点更新周期,单位为帧。取值范围为[1, 10000],默认值为4。在热力图检测周期内,热点值逐渐累加。
- 当target_roi参数未设置时,或者线与区域的坐标值全为0时,直线与区域默认位置如图1所示,其中Wframe为帧宽度,Hframe为帧高度。
- 直线两端点point_1与point_2默认值为:
- point_1=(¼Wframe, ½Hframe)
- point_2=(¾Wframe, ½Hframe)
- 默认区域为矩形,假设矩形的四个端点分别为point_1、point_2、point_3、point_4,其位置默认为:
- point_1=(¼Wframe, ¼Hframe)
- point_2=(¾Wframe, ¼Hframe)
- point_3=(¼Wframe, ¾Hframe)
- point_4=(¾Wframe, ¾Hframe)
- 直线两端点point_1与point_2默认值为: