算法参数配置接口.txt
9.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
1.获取算法配置
POST : http://192.168.1.117:8081/SDCAPI/V1.0/VionSoftware/do/webclient/getAlgConfig
请求参数:
{
"channelid": 1
}
返回结果:
{
"success":1,
"describe":"算法设置查询成功",
"channelid": 1, //
"runtype": 1, //类型1-7 目前只支持三种 1.进出客流 4.区域 6.人脸
"algconfig":
{
"resource":
{
"total_resouce_free": 20,//总资源剩余 [0,100]
"resouce_usage": 20, //资源使用率,[0,100]
},
"roi":
{
"imagepath": "../../../TEMP/1462519844378479.jpg", //画ROI的那张截图路径
"imagesize_H": 1280,
"imagesize_W": 1280,
"cameraheight": 500, //单位cm
"angle": 0, //角度
"mode": 0, //选择模式, 0:宽松 1:严格
"directioncount": 0,//方向个数
"linecount": 0, //进门线个数
"rectcount": 0, //检测框个数
"directionxysets"://方向线坐标
[
{
"beginx":123,
"beginy":456,
"endx": 223,
"endy": 556
},
...
],
"linexysets"://进门线坐标initRect
[
{ //一条进门线
"coordinates":
[ //每条进门线含有N个坐标点
{ //一个坐标点
"x":123,
"y":456
}
...
]
},
...
],
"recxysets"://检测框坐标
[
{ //一个检测框
"coordinates":
[ //每个检测框含有N个坐标点
{ //一个坐标点
"x":123,
"y":456
}
...
]
},
...
],
},
"config": //算法基本参数
{
"inout"://进出客流
{
"zoomscale": 3, //人头尺寸 [0.5,4] step=0.01 alg:x100 表示传入算法时,该值要*100
"zoomscalemin": 20, //最小人头尺寸 [0,1000] step=5
"zoomscalemax": 300, //最大人头尺寸 [0,1000] step=5
"sensitivity1": 20, //敏感度1 [0,100] step=1
"sensitivity2": 40, //敏感度2 [0,100] step=1
"sensitivity3": 20, //敏感度3 [0,100] step=1
"displaymode": 1, //模式选择 0:录像 1:经典 2:调试 3:展示
"tracethreshold": 3, //轨迹跟踪阀值 [1,5] step=0.1 alg:x100
"preframenum": 30, //轨迹预测帧数 [1,100] step=1
"trackmotionthreshold": 1, //轨迹移动阀值 [0,10] step=0.1 alg:x100
"trackshapethreshold": 0.5, //轨迹形态阀值 [0,1] step=0.1 alg:x100
"incoefficient": 0, //走入参数 [0,2] step=0.1 alg:x100
"outcoefficient": 0, //走出参数 [0,2] step=0.1 alg:x100
},
"area"://区域客流
{
"zoomscale": 3, //人头尺寸 [0.5,4] step=0.01 alg:x100 表示传入算法时,该值要*100
"zoomscalemin": 20, //最小人头尺寸 [0,1000] step=5
"zoomscalemax": 300, //最大人头尺寸 [0,1000] step=5
"sensitivity1": 20, //敏感度1 [0,100] step=1
"sensitivity2": 40, //敏感度2 [0,100] step=1
"sensitivity3": 20, //敏感度3 [0,100] step=1
"displaymode": 1, //模式选择 0:录像 1:经典 2:调试 3:展示
"tracethreshold": 3, //轨迹跟踪阀值 [1,5] step=0.1 alg:x100
"trackmotionthreshold": 1, //轨迹移动阀值 [0,10] step=0.1 alg:x100
"areacoefficient": 1, //区域参数 [0.1,10] step=0.01 alg:x100
},
"face"://人脸客流
{
"zoomscale": 3, //人头尺寸 [0.5,4] step=0.01 alg:x100 表示传入算法时,该值要*100
"zoomscalemin": 20, //最小人头尺寸 [0,1000] step=5
"zoomscalemax": 300, //最大人头尺寸 [0,1000] step=5
"sensitivity1": 20, //敏感度1 [0,100] step=1
"sensitivity2": 40, //敏感度2 [0,100] step=1
"sensitivity3": 20, //敏感度3 [0,100] step=1
"displaymode": 1, //模式选择 0:录像 1:经典 2:调试 3:展示
"tracethreshold": 3, //轨迹跟踪阀值 [1,5] step=0.1 alg:x100
"preframenum": 30, //轨迹预测帧数 [1,100] step=1
"trackmotionthreshold": 1, //轨迹移动阀值 [0,10] step=0.1 alg:x100
"trackshapethreshold": 0.5, //轨迹形态阀值 [0,1] step=0.1 alg:x100
"removesimilarity":75, //去重相似度 [10,100] step=0.01 alg:x100
"removetime":15, //去重时间 [0,1200] step=1
"facelum":0.5, //人脸亮度 [0,1] step=0.01 alg:x100
"facequalitythreshold": 3.5, //人脸质量阀值 [0,5] step=0.1 alg:x100
"maxage":70, //最大年龄 [1,100] step=1
"minage":1, //最小年龄 [1,100] step=1
"genderthreshold":0.5, //男女阀值 [0,1] step=0.01 alg:x100
"facecaptureinterval":3, //人脸抓取间隔 [1,20] step=1
"incoefficient": 1, //走入参数 [0.1,10] step=0.01 alg:x100
"outcoefficient": 1, //走出参数 [0.1,10] step=0.01 alg:x100
}
}
}
}
2.设置算法配置
POST :http://192.168.1.117:8081/SDCAPI/V1.0/VionSoftware/do/webclient/modAlgConfig
参数:
{
"channelid": 1,
"runtype": 1, //类型1-7 目前只支持三种 1.进出客流 4.区域 6.人脸
"roi":
{
"imagepath": "../../../TEMP/1462519844378479.jpg", //画ROI的那张截图路径
"imagesize_H": 1280,
"imagesize_W": 1280,
"cameraheight": 500, //单位cm
"angle": 0, //角度
"mode": 0, //选择模式, 0:宽松 1:严格
"directioncount": 0,//方向个数
"linecount": 0, //进门线个数
"rectcount": 0, //检测框个数
"directionxysets"://方向线坐标
[
{
"beginx":123,
"beginy":456,
"endx": 223,
"endy": 556
},
...
],
"linexysets"://进门线坐标
[
{ //一条进门线
"coordinates":
[ //每条进门线含有N个坐标点
{ //一个坐标点
"x":123,
"y":456
}
...
]
},
...
],
"recxysets"://检测框坐标
[
{ //一个检测框
"coordinates":
[ //每个检测框含有N个坐标点
{ //一个坐标点
"x":123,
"y":456
}
...
]
},
...
]
},
"config": //算法基本参数
{
"inout"://进出客流
{
"zoomscale": 3, //人头尺寸 [0.5,4] step=0.01 alg:x100 表示传入算法时,该值要*100
"zoomscalemin": 20, //最小人头尺寸 [0,1000] step=5
"zoomscalemax": 300, //最大人头尺寸 [0,1000] step=5
"sensitivity1": 20, //敏感度1 [0,100] step=1
"sensitivity2": 40, //敏感度2 [0,100] step=1
"sensitivity3": 20, //敏感度3 [0,100] step=1
"displaymode": 1, //模式选择 0:录像 1:经典 2:调试 3:展示
"tracethreshold": 3, //轨迹跟踪阀值 [1,5] step=0.1 alg:x100
"preframenum": 30, //轨迹预测帧数 [1,100] step=1
"trackmotionthreshold": 1, //轨迹移动阀值 [0,10] step=0.1 alg:x100
"trackshapethreshold": 0.5, //轨迹形态阀值 [0,1] step=0.1 alg:x100
"incoefficient": 0, //走入参数 [0,2] step=0.1 alg:x100
"outcoefficient": 0, //走出参数 [0,2] step=0.1 alg:x100
},
"area"://区域客流
{
"zoomscale": 3, //人头尺寸 [0.5,4] step=0.01 alg:x100 表示传入算法时,该值要*100
"zoomscalemin": 20, //最小人头尺寸 [0,1000] step=5
"zoomscalemax": 300, //最大人头尺寸 [0,1000] step=5
"sensitivity1": 20, //敏感度1 [0,100] step=1
"sensitivity2": 40, //敏感度2 [0,100] step=1
"sensitivity3": 20, //敏感度3 [0,100] step=1
"displaymode": 1, //模式选择 0:录像 1:经典 2:调试 3:展示
"tracethreshold": 3, //轨迹跟踪阀值 [1,5] step=0.1 alg:x100
"trackmotionthreshold": 1, //轨迹移动阀值 [0,10] step=0.1 alg:x100
"areacoefficient": 1, //区域参数 [0.1,10] step=0.01 alg:x100
},
"face"://人脸客流
{
"zoomscale": 3, //人头尺寸 [0.5,4] step=0.01 alg:x100 表示传入算法时,该值要*100
"zoomscalemin": 20, //最小人头尺寸 [0,1000] step=5
"zoomscalemax": 300, //最大人头尺寸 [0,1000] step=5
"sensitivity1": 20, //敏感度1 [0,100] step=1
"sensitivity2": 40, //敏感度2 [0,100] step=1
"sensitivity3": 20, //敏感度3 [0,100] step=1
"displaymode": 1, //模式选择 0:录像 1:经典 2:调试 3:展示
"tracethreshold": 3, //轨迹跟踪阀值 [1,5] step=0.1 alg:x100
"preframenum": 30, //轨迹预测帧数 [1,100] step=1
"trackmotionthreshold": 1, //轨迹移动阀值 [0,10] step=0.1 alg:x100
"trackshapethreshold": 0.5, //轨迹形态阀值 [0,1] step=0.1 alg:x100
"removesimilarity":75, //去重相似度 [10,100] step=0.01 alg:x100
"removetime":15, //去重时间 [0,1200] step=1
"facelum":0.5, //人脸亮度 [0,1] step=0.01 alg:x100
"facequalitythreshold": 3.5, //人脸质量阀值 [0,5] step=0.1 alg:x100
"maxage":70, //最大年龄 [1,100] step=1
"minage":1, //最小年龄 [1,100] step=1
"genderthreshold":0.5, //男女阀值 [0,1] step=0.01 alg:x100
"facecaptureinterval":3, //人脸抓取间隔 [1,20] step=1
"incoefficient": 1, //走入参数 [0.1,10] step=0.01 alg:x100
"outcoefficient": 1, //走出参数 [0.1,10] step=0.01 alg:x100
}
}
}
响应:
{
"success":1,
"describe":"算法参数修改成功",//可选
"errcode": 23, //可选
"command": "modChannel" //可选
}