vehicle_result.h
7.03 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
257
258
259
260
261
262
263
264
265
266
267
#include <stddef.h>
//---------------- 车辆分析结果结构体定义 ------------------//
//中间结果信息
#ifndef VPT_INFO_MIDD_TEMP_
#define VPT_INFO_MIDD_TEMP_
typedef struct vpt_info_midd_temp
{
int obj_id;
sy_rect obj_rect;
int obj_index;
float obj_score;
int dis; //20220308到最佳目标点的加权距离
}vpt_info_midd_temp;
#endif
//1.车检测结果
#define MAXCARCOUNT 100 //支持最多100个车检测
#ifndef VD_RESULT_
#define VD_RESULT_
typedef struct vd_result
{
sy_rect rect;
float score;
}vd_result;
#endif
//2.车颜色结果
#ifndef VC_RESULT_
#define VC_RESULT_
typedef struct vc_result
{
float score;
int index;//车颜色索引0-12,对应"棕", "橙", "灰", "白", "粉", "紫", "红", "绿", "蓝", "银", "青", "黄", "黑"
}vc_result;
#endif
//3.车型识别结果
#ifndef VR_RESULT_
#define VR_RESULT_
typedef struct vr_result //结果
{
char vehicle_brand[260]; //车辆品牌
char vehicle_subbrand[260]; //车辆子品牌
char vehicle_issue_year[260]; //车辆年款
char vehicle_type[260]; //车辆类型
char freight_ton[260]; //货车吨级
float name_score; //识别置信度
int index;
}vr_result;
#endif
//4.车牌检测识别结果
#define PLATENUM 8 //车牌号码位数
#define MAXPLATECOUNT 20 //支持最多20个车牌检测
//车牌类型
#define SINGLETYPE_BLUE 0 //单排蓝色
#define SINGLETYPE_YELLOW 1 //单排黄色
#define SINGLETYPE_WHITE 2 //单排白色
#define SINGLETYPE_BLACK 3 //单排黑色
#define DOUBLETYPE_YELLOW 4 //双排黄色
#define DOUBLETYPE_WHITE 5 //双排白色
#define NEWENERGYTYPE_YELLOWGREEN 6 //新能源黄绿色
#define NEWENERGYTYPE_WHITEGRA 7 //新能源白绿色
//车牌号码
#ifndef VPLATENUM_RESULT_
#define VPLATENUM_RESULT_
typedef struct vplate_num
{
char character[4];
float maxprob;
int index;
}vplate_num;
#endif
//车牌遮挡识别
//#define COVER 0 //全部遮挡
//#define NO_COVER 1 //无车牌
//#define NORMAL 2 //正常车牌
//#define PARTIAL 3 //部分遮挡
#ifndef SVP_RESULT_
#define SVP_RESULT_
typedef struct stain_vplate_result
{
float score; //识别置信度
int type; //COVER 或者 NO_COVER 或者 NORMAL 或者 PARTIAL
}stain_vplate_result;
#endif
#ifndef VPLATE_RESULTS_
#define VPLATE_RESULTS_
typedef struct vplate_results
{
sy_rect rect;//车牌检测坐标
float detect_score;//车牌检测置信度
vplate_num recg[PLATENUM];//识别号码结果
float num_score;//识别置信度
int type; //车牌类型:0-单排蓝色 1-单排黄色 2-单排白色 3-单排黑色 4-双排黄色 5-双排白色 6-新能源黄绿色 7-新能源白绿色
//stain_vplate_result stain_vp_result; //车牌遮挡识别结果
int special_type; //常规车牌、临时车牌、低速车牌。0-common,1-temporary_license_plate,2-low_speed_license_plate.
}vplate_results;
#endif
//5.车属性结果
#define VPD_FACE_FEATURESIZE 512
//这里的结构体与vpd.h中的不一样了。
#ifndef VPENDANTD_RESULT_
#define VPENDANTD_RESULT_
typedef struct v_pendant_d_info
{
sy_rect rect;
int index; //类型 0-driver 1-face 2-belt 3-sunshield 4-tag 5-decoration 6-napkinbox 7-zhuanjt 8-callPhone 9-sunRoof 10-holder 11-smoke
float confidence; //置信度
int driver_copilot_info; //车属性的主驾副驾信息,0-不分主驾副驾,1-主驾,2-副驾,(只有司机 、人脸、安全带、遮阳板、打电话、抽烟 区分主驾副驾,其他属性默认是输出0)
//float feature[VPD_FACE_FEATURESIZE]; //车属性中的人脸特征。
}v_pendant_d_info;
typedef struct v_pendant_d_result
{
v_pendant_d_info* vpd_res;
int count;
}v_pendant_d_result;
#endif
//6.车违规结果
#define ILLEGAL 1000 //违规
#define lEGAL 1001 //合法
#define UNCERTAINTY 1002 //不确定
#define NOBODY 1003 //无人
#define SOMEBODY 1004 //有人
#ifndef VID_RESULT_
#define VID_RESULT_
typedef struct vid_details
{
int status; //是否违规 ILLEGAL:违规(抽烟 未系安全带 打电话) lEGAL:未违规(未抽烟 系安全带 未打电话) UNCERTAINTY:不确定
float confidence; //置信度
}vid_details;
typedef struct vid_info
{
vid_details belt; //是否系安全带 ILLEGAL:未系安全带 LEGAL:系安全带
vid_details smoke; //是否抽烟 ILLEGAL:抽烟 LEGAL:未抽烟
vid_details phone; //是否使用电话 ILLEGAL:使用电话 LEGAL:未使用电话
vid_details call; //是否打电话 ILLEGAL:打电话 LEGAL:未打电话
vid_details person; //是否有人 NOBODY:无人 SOMEBODY:有人
}vid_info;
typedef struct vid_result
{
vid_info driver; //主驾驶
vid_info copilot; //副驾驶
}vid_result;
#endif
//7.以车搜车结果
//#define FEATURESIZE 256 //特征长度
//#define VA_FEATURESIZE 268 //特征长度
#define VA_FEATURESIZE 520 //特征长度
#ifndef VF_RESULT_
#define VF_RESULT_
typedef struct vf_result
{
float feature[VA_FEATURESIZE];
}vf_result;
#endif
//8.特殊品类车型
#ifndef VS_INFORMATION_
#define VS_INFORMATION_
typedef struct vs_information
{
float score;//车类型置信度
int index; //车类型索引0-10:"吊车", "罐装车", "货车", "渣土车", "轿运车","救援车", "垃圾车", "消防车", "清扫车", "随车吊","危化品车"
}vs_information;
#endif
#ifndef VS_RESULT_
#define VS_RESULT_
typedef struct vs_result
{
vs_information vs_info[2];//车类型信息
int count;//车类型的数量,是1,内部没设阈值
}vs_result;
#endif
//9.渣土车盖盖
#define COVER 1012 //盖盖
#define NOCOVER_NODIRT 1013 //无盖无土
#define NOCOVER_DIRT 1014 //无盖有土
#ifndef MUCKTRUCKCOVER_RESULT_
#define MUCKTRUCKCOVER_RESULT_
typedef struct mucktruckcover_result
{
int status; //是否盖盖 COVER-盖盖 NOCOVER_NODIRT-无盖无土 NOCOVER_DIRT-无盖有土
float confidence; //置信度
}mucktruckcover_result;
#endif
//11.摩托车是否载人/摩托车驾驶人是否戴头盔/三轮车是否载人
#define MOTOR_MANNED 1005 //摩托车载人
#define MOTOR_NOT_MANNED 1006 //摩托车未载人
#define MOTOR_DRIVER_HELMETED 1007 //摩托车驾驶人戴头盔
#define MOTOR_DRIVER_NOT_HELMETED 1008 //摩托车驾驶人未戴头盔
#define TRICYCLE_MANNED 1009 //三轮车载人
#define TRICYCLE_NOT_MANNED 1010 //三轮车未载人
#ifndef MTA_RESULT_
#define MTA_RESULT_
typedef struct mta_details
{
int status; //摩托车是否载人/摩托车驾驶人是否戴头盔/三轮车是否载人 UNCERTAINTY:不确定
float confidence; //置信度
}mta_details;
typedef struct mta_result
{
mta_details motor_driver_helmeted; //摩托车驾驶人是否戴头盔
mta_details motor_manned; //摩托车是否载人
mta_details tricycle_manned; //三轮车是否载人
vd_result motor_driver_hs_rect; //摩托车驾驶人(未带头盔时输出)头肩坐标
}mta_result;
#endif
//12.是否载人
#ifndef MANNED_RESULT_
#define MANNED_RESULT_
typedef struct manned_result
{
//int status; //是否载人 0-不是货车或不是三轮车或三轮车未载人或货车未载人,1-货车载人,2-三轮车载入
//float confidence; //置信度
vd_result hs_rect[10]; //头肩坐标
int hs_count; //头肩个数
}manned_result;
#endif