Commit d4ec4cba8176dc573988907a74fd958423cc59ea

Authored by Hu Chunming
1 parent a86c63ca

补交头文件

algorithm/vehicle_analysis/vehicle_analysis.h
1 /************************************************************ 1 /************************************************************
2 * Version: vehicle_analysis_v0.0.0.190311.gpuonly 2 * Version: vehicle_analysis_v0.0.0.190311.gpuonly
3 -* CopyRight: 中科视语(北京)科技有限公 3 +* CopyRight: 锟叫匡拷锟斤拷锟斤(锟斤拷锟斤拷锟斤拷锟狡硷拷锟斤拷锟睫癸拷
4 * UpdateDate: 20190311 4 * UpdateDate: 20190311
5 * Content: drafting the first edition by 5 * Content: drafting the first edition by
6 ************************************************************/ 6 ************************************************************/
@@ -23,48 +23,50 @@ extern "C" @@ -23,48 +23,50 @@ extern "C"
23 { 23 {
24 #endif 24 #endif
25 25
26 -#include "sy_common.h" //通用数据结构体定义  
27 -#include "vehicle_result.h" //车辆分析结果结构体定义 26 +#include "sy_common.h" //通锟斤拷锟斤拷锟捷结构锟藉定锟斤拷
  27 +#include "vehicle_result.h" //锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷峁癸拷宥拷锟
28 28
29 29
30 #ifndef __VEHICLE_INFO__ 30 #ifndef __VEHICLE_INFO__
31 #define __VEHICLE_INFO__ 31 #define __VEHICLE_INFO__
32 - typedef struct vehicle_info { //单车辆分析结果  
33 - vd_result vehicle_detect_res; //车(车头+车尾)检测结果  
34 - vd_result vehicle_win_detect_res; //车窗检测结果  
35 - vd_result vehicle_body_detect_res; //车身检测结果  
36 - vc_result vehicle_color_res; //车颜色  
37 - vr_result vehicle_recg_res; //车型识别  
38 - vplate_results vehicle_plate_det_recg_res; //车牌检测识别结果  
39 - v_pendant_d_result vehicle_pendant_det_res; //车属性  
40 - vid_result vehicle_illegal_det_res; //车违规  
41 - vf_result vehicle_fea_res; //以车搜车  
42 - //vs_result vehicle_special_res; //特殊品类车型(只有货车有输出结果)  
43 - //mucktruckcover_result vehicle_mucktruckcover_res; //渣土车盖盖状态(车头:只有特殊品类车型中的渣土车和建筑垃圾车有输出结果,车尾:只有货车有输出结果) 32 + typedef struct vehicle_info { //锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟
  33 + vd_result vehicle_detect_res; //锟斤拷(锟斤拷头+锟斤拷尾)锟斤拷锟斤拷锟
  34 + vd_result vehicle_win_detect_res; //锟斤拷锟斤拷锟斤拷锟斤拷锟
  35 + vd_result vehicle_body_detect_res; //锟斤拷锟斤拷锟斤拷锟斤拷锟
  36 + vc_result vehicle_color_res; //锟斤拷锟斤拷色
  37 + vr_result vehicle_recg_res; //锟斤拷锟斤拷识锟斤拷
  38 + vplate_results vehicle_plate_det_recg_res; //锟斤拷锟狡硷拷锟绞讹拷锟斤拷锟
  39 + v_pendant_d_result vehicle_pendant_det_res; //锟斤拷锟斤拷锟斤拷
  40 + vid_result vehicle_illegal_det_res; //锟斤拷违锟斤拷
  41 + vf_result vehicle_fea_res; //锟皆筹拷锟窖筹拷
  42 + //vs_result vehicle_special_res; //锟斤拷锟斤拷品锟洁车锟酵o拷只锟叫伙拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷
  43 + //mucktruckcover_result vehicle_mucktruckcover_res; //锟斤拷锟斤拷锟斤拷锟角革拷状态(锟斤拷头锟斤拷只锟斤拷锟斤拷锟斤拷品锟洁车锟斤拷锟叫碉拷锟斤拷锟斤拷锟斤拷锟酵斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷尾锟斤拷只锟叫伙拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷)
44 44
45 - mta_result mta_res; //摩托车是否载人/摩托车驾驶人是否戴头盔/农用车是否载人 45 + mta_result mta_res; //摩锟叫筹拷锟角凤拷锟斤拷锟斤拷/摩锟叫筹拷锟斤拷驶锟斤拷锟角凤拷锟酵凤拷锟/农锟矫筹拷锟角凤拷锟斤拷锟斤拷
46 46
47 - manned_result manned_res; //是否是货车三轮车载人 0-不是货车/不是三轮车/三轮车未载人/货车未载人,1-货车载人,2-三轮车载人 47 + manned_result manned_res; //锟角凤拷锟角伙拷锟斤拷锟斤拷锟街筹拷锟斤拷锟斤拷 0-锟斤拷锟角伙拷锟斤拷/锟斤拷锟斤拷锟斤拷锟街筹拷/锟斤拷锟街筹拷未锟斤拷锟斤拷/锟斤拷锟斤拷未锟斤拷锟剿o拷1-锟斤拷锟斤拷锟斤拷锟剿o拷2-锟斤拷锟街筹拷锟斤拷锟斤拷
48 48
49 - int type; //车的类别:0-车头,1-车尾,2-摩托车,3-三轮车 ,4-车身 49 + int type; //锟斤拷锟斤拷锟斤拷锟-锟斤拷头锟斤拷1-锟斤拷尾锟斤拷2-摩锟叫筹拷锟斤拷3-锟斤拷锟街筹拷 锟斤拷4-锟斤拷锟斤拷
  50 + int vpt_type;
  51 + int rainshed; //鏄惁瀹夎闆ㄦ锛 0 鏈夐洦妫 1 鏃犻洦妫
50 52
51 - //int obj_quality_idx;//聚档数据类型:0-无效数据,1-低质数据,2-优质数据 53 + //int obj_quality_idx;//锟桔碉拷锟斤拷锟斤拷锟斤拷锟酵o拷0-锟斤拷效锟斤拷锟捷o拷1-锟斤拷锟斤拷锟斤拷锟捷o拷2-锟斤拷锟斤拷锟斤拷锟斤拷
52 } vehicle_info; 54 } vehicle_info;
53 #endif 55 #endif
54 56
55 57
56 #ifndef __VEHICLE_ANALYSIS_RESULT__ 58 #ifndef __VEHICLE_ANALYSIS_RESULT__
57 #define __VEHICLE_ANALYSIS_RESULT__ 59 #define __VEHICLE_ANALYSIS_RESULT__
58 - typedef struct va_result { //车辆分析结果 内存在外部申请  
59 - vehicle_info *info; //单车辆全部分析结果  
60 - int count; //车辆数量 60 + typedef struct va_result { //锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟 锟节达拷锟斤拷锟解部锟斤拷锟斤拷
  61 + vehicle_info *info; //锟斤拷锟斤拷锟斤拷全锟斤拷锟斤拷锟斤拷锟斤拷锟
  62 + int count; //锟斤拷锟斤拷锟斤拷锟斤拷
61 } va_result; 63 } va_result;
62 #endif 64 #endif
63 65
64 66
65 #ifndef __DET_PARAM__ 67 #ifndef __DET_PARAM__
66 #define __DET_PARAM__ 68 #define __DET_PARAM__
67 - typedef struct det_param //检测算法参数 69 + typedef struct det_param //锟斤拷锟斤拷惴拷锟斤拷锟
68 { 70 {
69 int process_min_l; 71 int process_min_l;
70 int process_max_l; 72 int process_max_l;
@@ -77,36 +79,36 @@ extern "C" @@ -77,36 +79,36 @@ extern "C"
77 #define __VA_PARAM__ 79 #define __VA_PARAM__
78 typedef struct va_param 80 typedef struct va_param
79 { 81 {
80 - //算法配置参数  
81 - sy_command vehicle_detect_config; //是否启动车检测  
82 - sy_command vehicle_recg_config; //是否启动车型识别  
83 - sy_command vehicle_recg_supplement_config; //是否启动车型识别补充识别(车头车尾logo检测识别+车型15分类)(前提:启动车型识别vehicle_recg_config)  
84 - sy_command vehicle_plate_det_recg_config; //是否启动车牌检测识别  
85 - sy_command vehicle_color_config; //是否启动车辆颜色识别  
86 - sy_command vehicle_pendant_det_config; //是否启动车辆属性识别  
87 - sy_command vehicle_illegal_config; //是否启动车违规行为检测  
88 - sy_command vehicle_feature_config; //是否启动车辆特征提取  
89 - //sy_command vehicle_special_config; //是否启动特殊品类车型识别。(前提:启动车型识别vehicle_recg_config)  
90 - //sy_command vehicle_image_quality_config; //是否启动车辆图像清晰度识别  
91 - sy_command vehicle_motor_tricycle_analysis_config; //是否启动摩托车三轮车分析(摩托车是否载人/摩托车驾驶人是否戴头盔/农用车是否载人)  
92 - //sy_command vehicle_motor_hs_output_config; //是否启动摩托车未戴头盔输出头肩坐标。(前提:启动摩托车三轮车分析vehicle_motor_tricycle_analysis_config)  
93 - //sy_command vehicle_stain_vp_config; //是否启动遮挡车牌识别  
94 - //sy_command vehicle_muck_truck_cover_config; //是否启动渣土车盖盖识别。(前提:开启特殊品类车型识别vehicle_special_config)  
95 - //sy_command vehicle_lorry_manned_config; //是否启动货车载人识别。(前提:开启车型识别vehicle_recg_config)  
96 - sy_command vehicle_manned_config; //是否启动货车、三轮车载人识别。(前提:开启车型识别vehicle_recg_config) 82 + //锟姐法锟斤拷锟矫诧拷锟斤拷
  83 + sy_command vehicle_detect_config; //锟角凤拷锟斤拷锟斤拷锟斤拷锟斤拷锟
  84 + sy_command vehicle_recg_config; //锟角凤拷锟斤拷锟斤拷锟斤拷锟斤拷识锟斤拷
  85 + sy_command vehicle_recg_supplement_config; //锟角凤拷锟斤拷锟斤拷锟斤拷锟斤拷识锟金补筹拷识锟斤拷(锟斤拷头锟斤拷尾logo锟斤拷锟绞讹拷锟+锟斤拷锟斤拷15锟斤拷锟斤拷)锟斤拷前锟结:锟斤拷锟斤拷锟斤拷锟斤拷识锟斤拷vehicle_recg_config锟斤拷
  86 + sy_command vehicle_plate_det_recg_config; //锟角凤拷锟斤拷锟斤拷锟斤拷锟狡硷拷锟绞讹拷锟
  87 + sy_command vehicle_color_config; //锟角凤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷色识锟斤拷
  88 + sy_command vehicle_pendant_det_config; //锟角凤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷识锟斤拷
  89 + sy_command vehicle_illegal_config; //锟角凤拷锟斤拷锟斤拷锟斤拷违锟斤拷锟斤拷为锟斤拷锟
  90 + sy_command vehicle_feature_config; //锟角凤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷取
  91 + //sy_command vehicle_special_config; //锟角凤拷锟斤拷锟斤拷锟斤拷锟斤拷品锟洁车锟斤拷识锟金。o拷前锟结:锟斤拷锟斤拷锟斤拷锟斤拷识锟斤拷vehicle_recg_config锟斤拷
  92 + //sy_command vehicle_image_quality_config; //锟角凤拷锟斤拷锟斤拷锟斤拷锟斤拷图锟斤拷锟斤拷锟斤拷锟斤拷识锟斤拷
  93 + sy_command vehicle_motor_tricycle_analysis_config; //锟角凤拷锟斤拷锟斤拷摩锟叫筹拷锟斤拷锟街筹拷锟斤拷锟斤拷锟斤拷摩锟叫筹拷锟角凤拷锟斤拷锟斤拷/摩锟叫筹拷锟斤拷驶锟斤拷锟角凤拷锟酵凤拷锟/农锟矫筹拷锟角凤拷锟斤拷锟剿o拷
  94 + //sy_command vehicle_motor_hs_output_config; //锟角凤拷锟斤拷锟斤拷摩锟叫筹拷未锟斤拷头锟斤拷锟斤拷锟酵凤拷锟斤拷锟斤拷辍o拷锟角帮拷幔猴拷锟斤拷锟侥︼拷谐锟斤拷锟斤拷殖锟斤拷锟斤拷锟絭ehicle_motor_tricycle_analysis_config锟斤拷
  95 + //sy_command vehicle_stain_vp_config; //锟角凤拷锟斤拷锟斤拷锟节碉拷锟斤拷锟斤拷识锟斤拷
  96 + //sy_command vehicle_muck_truck_cover_config; //锟角凤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟角革拷识锟斤拷(前锟结:锟斤拷锟斤拷锟斤拷锟斤拷品锟洁车锟斤拷识锟斤拷vehicle_special_config)
  97 + //sy_command vehicle_lorry_manned_config; //锟角凤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷识锟金。o拷前锟结:锟斤拷锟斤拷锟斤拷锟斤拷识锟斤拷vehicle_recg_config锟斤拷
  98 + sy_command vehicle_manned_config; //锟角凤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟街筹拷锟斤拷锟斤拷识锟金。o拷前锟结:锟斤拷锟斤拷锟斤拷锟斤拷识锟斤拷vehicle_recg_config锟斤拷
97 99
98 100
99 - //算法初始化参数  
100 - int gpuid; //指定显卡id  
101 - float vehicle_det_thresld=0.5; //车检测参数  
102 - int min_obj_size=200; //车头尾检测目标最小长边(建议取值范围100~200,长边小于该尺寸的过滤掉)  
103 - float vehicle_plate_det_thresld=0.5; //车牌检测参数  
104 - float vehicle_attribute_det_thresld=0.5; //车属性检测参数  
105 - float vehicle_logo_det_thresld=0.1; //车logo检测参数 101 + //锟姐法锟斤拷始锟斤拷锟斤拷锟斤拷
  102 + int gpuid; //指锟斤拷锟皆匡拷id
  103 + float vehicle_det_thresld=0.5; //锟斤拷锟斤拷锟斤拷锟斤拷
  104 + int min_obj_size=200; //锟斤拷头尾锟斤拷锟侥匡拷锟斤拷锟叫★拷锟斤拷撸锟斤拷锟斤拷锟饺≈碉拷锟轿00~200锟斤拷锟斤拷锟斤拷小锟节该尺达拷墓锟斤拷说锟斤拷锟
  105 + float vehicle_plate_det_thresld=0.5; //锟斤拷锟狡硷拷锟斤拷锟斤拷
  106 + float vehicle_attribute_det_thresld=0.5; //锟斤拷锟斤拷锟皆硷拷锟斤拷锟斤拷
  107 + float vehicle_logo_det_thresld=0.1; //锟斤拷logo锟斤拷锟斤拷锟斤拷
106 108
107 - float vc_thresld=0.5; //车颜色阈值  
108 - char* dbPath; //车型识别车型数据路路径 <当前仅支持英文路径>  
109 - char* models_Path; //所有模型的路径 <当前仅支持英文路径>//20210615 109 + float vc_thresld=0.5; //锟斤拷锟斤拷色锟斤拷值
  110 + char* dbPath; //锟斤拷锟斤拷识锟斤拷锟斤拷锟斤拷锟斤拷路路锟斤拷 <锟斤拷前锟斤拷支锟斤拷英锟斤拷路锟斤拷>
  111 + char* models_Path; //锟斤拷锟斤拷模锟酵碉拷路锟斤拷 <锟斤拷前锟斤拷支锟斤拷英锟斤拷路锟斤拷>//20210615
110 112
111 }va_param; 113 }va_param;
112 #endif 114 #endif
@@ -122,7 +124,7 @@ extern &quot;C&quot; @@ -122,7 +124,7 @@ extern &quot;C&quot;
122 * notes: null 124 * notes: null
123 *************************************************************************/ 125 *************************************************************************/
124 VEHICLEANALYSIS_API int va_init(void ** handle, va_param param); 126 VEHICLEANALYSIS_API int va_init(void ** handle, va_param param);
125 - VEHICLEANALYSIS_API int va_acl_init();//仅调用一次,先调用va_acl_init,再调用va_init 127 + VEHICLEANALYSIS_API int va_acl_init();//锟斤拷锟斤拷锟斤拷一锟轿o拷锟饺碉拷锟斤拷va_acl_init锟斤拷锟劫碉拷锟斤拷va_init
126 128
127 /************************************************************************* 129 /*************************************************************************
128 * function: va_release 130 * function: va_release
@@ -133,7 +135,7 @@ extern &quot;C&quot; @@ -133,7 +135,7 @@ extern &quot;C&quot;
133 * notes: null 135 * notes: null
134 *************************************************************************/ 136 *************************************************************************/
135 VEHICLEANALYSIS_API void va_release(void ** handle); 137 VEHICLEANALYSIS_API void va_release(void ** handle);
136 - VEHICLEANALYSIS_API void va_acl_release();//仅调用一次,当所有的va_release都释放了,最后调用va_acl_release 138 + VEHICLEANALYSIS_API void va_acl_release();//锟斤拷锟斤拷锟斤拷一锟轿o拷锟斤拷锟斤拷锟叫碉拷va_release锟斤拷锟酵凤拷锟剿o拷锟斤拷锟斤拷锟斤拷va_acl_release
137 139
138 /************************************************************************* 140 /*************************************************************************
139 * function: va_get_version 141 * function: va_get_version
@@ -157,31 +159,31 @@ extern &quot;C&quot; @@ -157,31 +159,31 @@ extern &quot;C&quot;
157 * notes: null 159 * notes: null
158 *************************************************************************/ 160 *************************************************************************/
159 VEHICLEANALYSIS_API int va_batch(void * handle, sy_img * img_data_array, int batch_size, va_result *result); 161 VEHICLEANALYSIS_API int va_batch(void * handle, sy_img * img_data_array, int batch_size, va_result *result);
160 - //img_data_array是device数据,batch_size==16时调用固定16模型,小于16时调用固定1模型。 162 + //img_data_array锟斤拷device锟斤拷锟捷o拷batch_size==16时锟斤拷锟矫固讹拷16模锟酵o拷小锟斤拷16时锟斤拷锟矫固讹拷1模锟酵★拷
161 VEHICLEANALYSIS_API int va_batch16_device(void * handle, sy_img * img_data_array, int batch_size, va_result *result); 163 VEHICLEANALYSIS_API int va_batch16_device(void * handle, sy_img * img_data_array, int batch_size, va_result *result);
162 164
163 165
164 166
165 /************************************************************************* 167 /*************************************************************************
166 * FUNCTION: VA_ComputeSimilarity 168 * FUNCTION: VA_ComputeSimilarity
167 - * PURPOSE: 比对相似度(通用) 169 + * PURPOSE: 锟饺讹拷锟斤拷锟狡度o拷通锟矫o拷
168 * PARAM: 170 * PARAM:
169 - [in] Afea - 第一张图片特征  
170 - [in] Bfea - 第二张图片特征  
171 - [in] featuresize - 特征长度  
172 - * RETURN: 相似度 171 + [in] Afea - 锟斤拷一锟斤拷图片锟斤拷锟斤拷
  172 + [in] Bfea - 锟节讹拷锟斤拷图片锟斤拷锟斤拷
  173 + [in] featuresize - 锟斤拷锟斤拷锟斤拷锟斤拷
  174 + * RETURN: 锟斤拷锟狡讹拷
173 * NOTES: 175 * NOTES:
174 *************************************************************************/ 176 *************************************************************************/
175 VEHICLEANALYSIS_API float va_compute_similarity(float *Afea, float *Bfea, int featuresize); 177 VEHICLEANALYSIS_API float va_compute_similarity(float *Afea, float *Bfea, int featuresize);
176 178
177 /************************************************************************* 179 /*************************************************************************
178 * FUNCTION: va_compute_similarity_byvafeature 180 * FUNCTION: va_compute_similarity_byvafeature
179 - * PURPOSE: 比对相似度(针对va特征) 181 + * PURPOSE: 锟饺讹拷锟斤拷锟狡度o拷锟斤拷锟絭a锟斤拷锟斤拷锟斤拷
180 * PARAM: 182 * PARAM:
181 - [in] Afea - 第一张图片va特征  
182 - [in] Bfea - 第二张图片va特征  
183 - [in] featuresize - 特征长度VA_FEATURESIZE  
184 - * RETURN: 相似度 183 + [in] Afea - 锟斤拷一锟斤拷图片va锟斤拷锟斤拷
  184 + [in] Bfea - 锟节讹拷锟斤拷图片va锟斤拷锟斤拷
  185 + [in] featuresize - 锟斤拷锟斤拷锟斤拷锟斤拷VA_FEATURESIZE
  186 + * RETURN: 锟斤拷锟狡讹拷
185 * NOTES: 187 * NOTES:
186 *************************************************************************/ 188 *************************************************************************/
187 VEHICLEANALYSIS_API float va_compute_similarity_byvafeature(void * handle , float *Afea, float *Bfea, int featuresize); 189 VEHICLEANALYSIS_API float va_compute_similarity_byvafeature(void * handle , float *Afea, float *Bfea, int featuresize);
algorithm/vehicle_analysis/vehicle_result.h
1 #include <stddef.h> 1 #include <stddef.h>
2 -//---------------- 车辆分析结果结构体定义 ------------------// 2 +//---------------- 锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷峁癸拷宥拷锟 ------------------//
3 3
4 -//中间结果信 4 +//锟叫硷拷锟斤拷锟斤拷
5 #ifndef VPT_INFO_MIDD_TEMP_ 5 #ifndef VPT_INFO_MIDD_TEMP_
6 #define VPT_INFO_MIDD_TEMP_ 6 #define VPT_INFO_MIDD_TEMP_
7 typedef struct vpt_info_midd_temp 7 typedef struct vpt_info_midd_temp
@@ -10,7 +10,7 @@ typedef struct vpt_info_midd_temp @@ -10,7 +10,7 @@ typedef struct vpt_info_midd_temp
10 sy_rect obj_rect; 10 sy_rect obj_rect;
11 int obj_index; 11 int obj_index;
12 float obj_score; 12 float obj_score;
13 - int dis; //20220308到最佳目标点的加权距离 13 + int dis; //20220308锟斤拷锟斤拷锟侥匡拷锟斤拷募锟饺拷锟斤拷锟
14 }vpt_info_midd_temp; 14 }vpt_info_midd_temp;
15 #endif 15 #endif
16 16
@@ -20,8 +20,8 @@ typedef struct vpt_info_midd_temp @@ -20,8 +20,8 @@ typedef struct vpt_info_midd_temp
20 20
21 21
22 22
23 -//1.车检测结果  
24 -#define MAXCARCOUNT 100 //支持最多100个车检测 23 +//1.锟斤拷锟斤拷锟斤拷锟
  24 +#define MAXCARCOUNT 100 //支锟斤拷锟斤拷锟00锟斤拷锟斤拷锟斤拷锟
25 25
26 #ifndef VD_RESULT_ 26 #ifndef VD_RESULT_
27 #define VD_RESULT_ 27 #define VD_RESULT_
@@ -33,28 +33,28 @@ typedef struct vd_result @@ -33,28 +33,28 @@ typedef struct vd_result
33 #endif 33 #endif
34 34
35 35
36 -//2.车颜色结果 36 +//2.锟斤拷锟斤拷色锟斤拷锟
37 #ifndef VC_RESULT_ 37 #ifndef VC_RESULT_
38 #define VC_RESULT_ 38 #define VC_RESULT_
39 typedef struct vc_result 39 typedef struct vc_result
40 { 40 {
41 float score; 41 float score;
42 - int index;//车颜色索引0-12,对应"棕", "橙", "灰", "白", "粉", "紫", "红", "绿", "蓝", "银", "青", "黄", "黑" 42 + int index;//锟斤拷锟斤拷色锟斤拷锟斤拷0-12锟斤拷锟斤拷应"锟斤拷", "锟斤拷", "锟斤拷", "锟斤拷", "锟斤拷", "锟斤拷", "锟斤拷", "锟斤拷", "锟斤拷", "锟斤拷", "锟斤拷", "锟斤拷", "锟斤拷"
43 }vc_result; 43 }vc_result;
44 #endif 44 #endif
45 45
46 46
47 -//3.车型识别结果 47 +//3.锟斤拷锟斤拷识锟斤拷锟斤拷
48 #ifndef VR_RESULT_ 48 #ifndef VR_RESULT_
49 #define VR_RESULT_ 49 #define VR_RESULT_
50 -typedef struct vr_result //结果 50 +typedef struct vr_result //锟斤拷锟
51 { 51 {
52 - char vehicle_brand[260]; //车辆品牌  
53 - char vehicle_subbrand[260]; //车辆子品牌  
54 - char vehicle_issue_year[260]; //车辆年款  
55 - char vehicle_type[260]; //车辆类型  
56 - char freight_ton[260]; //货车吨级  
57 - float name_score; //识别置信度 52 + char vehicle_brand[260]; //锟斤拷锟斤拷品锟斤拷
  53 + char vehicle_subbrand[260]; //锟斤拷锟斤拷锟斤拷品锟斤拷
  54 + char vehicle_issue_year[260]; //锟斤拷锟斤拷锟斤拷锟
  55 + char vehicle_type[260]; //锟斤拷锟斤拷锟斤拷锟斤拷
  56 + char freight_ton[260]; //锟斤拷锟斤拷锟街硷拷
  57 + float name_score; //识锟斤拷锟斤拷锟脚讹拷
58 int index; 58 int index;
59 }vr_result; 59 }vr_result;
60 #endif 60 #endif
@@ -62,20 +62,20 @@ typedef struct vr_result //结果 @@ -62,20 +62,20 @@ typedef struct vr_result //结果
62 62
63 63
64 64
65 -//4.车牌检测识别结果  
66 -#define PLATENUM 8 //车牌号码位数  
67 -#define MAXPLATECOUNT 20 //支持最多20个车牌检测  
68 -//车牌类型  
69 -#define SINGLETYPE_BLUE 0 //单排蓝色  
70 -#define SINGLETYPE_YELLOW 1 //单排黄色  
71 -#define SINGLETYPE_WHITE 2 //单排白色  
72 -#define SINGLETYPE_BLACK 3 //单排黑色  
73 -#define DOUBLETYPE_YELLOW 4 //双排黄色  
74 -#define DOUBLETYPE_WHITE 5 //双排白色  
75 -#define NEWENERGYTYPE_YELLOWGREEN 6 //新能源黄绿色  
76 -#define NEWENERGYTYPE_WHITEGRA 7 //新能源白绿色 65 +//4.锟斤拷锟狡硷拷锟绞讹拷锟斤拷锟
  66 +#define PLATENUM 8 //锟斤拷锟狡猴拷锟斤拷位锟斤拷
  67 +#define MAXPLATECOUNT 20 //支锟斤拷锟斤拷锟0锟斤拷锟斤拷锟狡硷拷锟
  68 +//锟斤拷锟斤拷锟斤拷锟斤拷
  69 +#define SINGLETYPE_BLUE 0 //锟斤拷锟斤拷锟斤拷色
  70 +#define SINGLETYPE_YELLOW 1 //锟斤拷锟脚伙拷色
  71 +#define SINGLETYPE_WHITE 2 //锟斤拷锟脚帮拷色
  72 +#define SINGLETYPE_BLACK 3 //锟斤拷锟脚猴拷色
  73 +#define DOUBLETYPE_YELLOW 4 //双锟脚伙拷色
  74 +#define DOUBLETYPE_WHITE 5 //双锟脚帮拷色
  75 +#define NEWENERGYTYPE_YELLOWGREEN 6 //锟斤拷锟斤拷源锟斤拷锟斤拷色
  76 +#define NEWENERGYTYPE_WHITEGRA 7 //锟斤拷锟斤拷源锟斤拷锟斤拷色
77 77
78 -//车牌号码 78 +//锟斤拷锟狡猴拷锟斤拷
79 #ifndef VPLATENUM_RESULT_ 79 #ifndef VPLATENUM_RESULT_
80 #define VPLATENUM_RESULT_ 80 #define VPLATENUM_RESULT_
81 typedef struct vplate_num 81 typedef struct vplate_num
@@ -86,18 +86,18 @@ typedef struct vplate_num @@ -86,18 +86,18 @@ typedef struct vplate_num
86 }vplate_num; 86 }vplate_num;
87 #endif 87 #endif
88 88
89 -//车牌遮挡识别  
90 -//#define COVER 0 //全部遮挡  
91 -//#define NO_COVER 1 //无车牌  
92 -//#define NORMAL 2 //正常车牌  
93 -//#define PARTIAL 3 //部分遮挡 89 +//锟斤拷锟斤拷锟节碉拷识锟斤拷
  90 +//#define COVER 0 //全锟斤拷锟节碉拷
  91 +//#define NO_COVER 1 //锟睫筹拷锟斤拷
  92 +//#define NORMAL 2 //锟斤拷锟斤拷锟斤拷锟斤拷
  93 +//#define PARTIAL 3 //锟斤拷锟斤拷锟节碉拷
94 94
95 #ifndef SVP_RESULT_ 95 #ifndef SVP_RESULT_
96 #define SVP_RESULT_ 96 #define SVP_RESULT_
97 typedef struct stain_vplate_result 97 typedef struct stain_vplate_result
98 { 98 {
99 - float score; //识别置信度  
100 - int type; //COVER 或者 NO_COVER 或者 NORMAL 或者 PARTIAL 99 + float score; //识锟斤拷锟斤拷锟脚讹拷
  100 + int type; //COVER 锟斤拷锟斤拷 NO_COVER 锟斤拷锟斤拷 NORMAL 锟斤拷锟斤拷 PARTIAL
101 }stain_vplate_result; 101 }stain_vplate_result;
102 #endif 102 #endif
103 103
@@ -105,31 +105,31 @@ typedef struct vplate_num @@ -105,31 +105,31 @@ typedef struct vplate_num
105 #define VPLATE_RESULTS_ 105 #define VPLATE_RESULTS_
106 typedef struct vplate_results 106 typedef struct vplate_results
107 { 107 {
108 - sy_rect rect;//车牌检测坐标  
109 - float detect_score;//车牌检测置信度  
110 - vplate_num recg[PLATENUM];//识别号码结果  
111 - float num_score;//识别置信度  
112 - int type; //车牌类型:0-单排蓝色 1-单排黄色 2-单排白色 3-单排黑色 4-双排黄色 5-双排白色 6-新能源黄绿色 7-新能源白绿色 108 + sy_rect rect;//锟斤拷锟狡硷拷锟斤拷锟斤拷锟
  109 + float detect_score;//锟斤拷锟狡硷拷锟斤拷锟斤拷哦锟
  110 + vplate_num recg[PLATENUM];//识锟斤拷锟斤拷锟斤拷锟
  111 + float num_score;//识锟斤拷锟斤拷锟脚讹拷
  112 + int type; //锟斤拷锟斤拷锟斤拷锟酵o拷0-锟斤拷锟斤拷锟斤拷色 1-锟斤拷锟脚伙拷色 2-锟斤拷锟脚帮拷色 3-锟斤拷锟脚猴拷色 4-双锟脚伙拷色 5-双锟脚帮拷色 6-锟斤拷锟斤拷源锟斤拷锟斤拷色 7-锟斤拷锟斤拷源锟斤拷锟斤拷色
113 113
114 - //stain_vplate_result stain_vp_result; //车牌遮挡识别结果  
115 - int special_type; //常规车牌、临时车牌、低速车牌。0-common,1-temporary_license_plate,2-low_speed_license_plate. 114 + //stain_vplate_result stain_vp_result; //锟斤拷锟斤拷锟节碉拷识锟斤拷锟斤拷
  115 + int special_type; //锟斤拷锟芥车锟狡★拷锟斤拷时锟斤拷锟狡★拷锟斤拷锟劫筹拷锟狡★拷0-common,1-temporary_license_plate,2-low_speed_license_plate.
116 }vplate_results; 116 }vplate_results;
117 #endif 117 #endif
118 118
119 119
120 -//5.车属性结果 120 +//5.锟斤拷锟斤拷锟皆斤拷锟
121 #define VPD_FACE_FEATURESIZE 512 121 #define VPD_FACE_FEATURESIZE 512
122 -//这里的结构体与vpd.h中的不一样了。 122 +//锟斤拷锟斤拷慕峁癸拷锟斤拷锟絭pd.h锟叫的诧拷一锟斤拷锟剿★拷
123 #ifndef VPENDANTD_RESULT_ 123 #ifndef VPENDANTD_RESULT_
124 #define VPENDANTD_RESULT_ 124 #define VPENDANTD_RESULT_
125 typedef struct v_pendant_d_info 125 typedef struct v_pendant_d_info
126 { 126 {
127 sy_rect rect; 127 sy_rect rect;
128 - 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  
129 - float confidence; //置信度 128 + 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
  129 + float confidence; //锟斤拷锟脚讹拷
130 130
131 - int driver_copilot_info; //车属性的主驾副驾信息,0-不分主驾副驾,1-主驾,2-副驾,(只有司机 、人脸、安全带、遮阳板、打电话、抽烟 区分主驾副驾,其他属性默认是输出0)  
132 - //float feature[VPD_FACE_FEATURESIZE]; //车属性中的人脸特征。 131 + int driver_copilot_info; //锟斤拷锟斤拷锟皆碉拷锟斤拷锟捷革拷锟斤拷锟斤拷息锟斤拷0-锟斤拷锟斤拷锟斤拷锟捷革拷锟捷o拷1-锟斤拷锟捷o拷2-锟斤拷锟捷o拷锟斤拷只锟斤拷司锟斤拷 锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷全锟斤拷锟斤拷锟斤拷锟斤拷锟藉、锟斤拷缁帮拷锟斤拷锟斤拷锟 锟斤拷锟斤拷锟斤拷锟捷革拷锟捷o拷锟斤拷锟斤拷锟斤拷锟斤拷默锟斤拷锟斤拷锟斤拷锟拷锟
  132 + //float feature[VPD_FACE_FEATURESIZE]; //锟斤拷锟斤拷锟斤拷锟叫碉拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷
133 }v_pendant_d_info; 133 }v_pendant_d_info;
134 134
135 typedef struct v_pendant_d_result 135 typedef struct v_pendant_d_result
@@ -140,43 +140,43 @@ typedef struct v_pendant_d_result @@ -140,43 +140,43 @@ typedef struct v_pendant_d_result
140 #endif 140 #endif
141 141
142 142
143 -//6.车违规结果  
144 -#define ILLEGAL 1000 //违规  
145 -#define lEGAL 1001 //合法  
146 -#define UNCERTAINTY 1002 //不确定  
147 -#define NOBODY 1003 //无人  
148 -#define SOMEBODY 1004 //有人 143 +//6.锟斤拷违锟斤拷锟斤拷
  144 +#define ILLEGAL 1000 //违锟斤拷
  145 +#define lEGAL 1001 //锟较凤拷
  146 +#define UNCERTAINTY 1002 //锟斤拷确锟斤拷
  147 +#define NOBODY 1003 //锟斤拷锟斤拷
  148 +#define SOMEBODY 1004 //锟斤拷锟斤拷
149 149
150 #ifndef VID_RESULT_ 150 #ifndef VID_RESULT_
151 #define VID_RESULT_ 151 #define VID_RESULT_
152 152
153 typedef struct vid_details 153 typedef struct vid_details
154 { 154 {
155 - int status; //是否违规 ILLEGAL:违规(抽烟 未系安全带 打电话) lEGAL:未违规(未抽烟 系安全带 未打电话) UNCERTAINTY:不确定  
156 - float confidence; //置信度 155 + int status; //锟角凤拷违锟斤拷 ILLEGAL锟斤拷违锟斤拷(锟斤拷锟斤拷 未系锟斤拷全锟斤拷 锟斤拷缁) lEGAL锟斤拷未违锟斤拷(未锟斤拷锟斤拷 系锟斤拷全锟斤拷 未锟斤拷缁) UNCERTAINTY锟斤拷锟斤拷确锟斤拷
  156 + float confidence; //锟斤拷锟脚讹拷
157 }vid_details; 157 }vid_details;
158 158
159 typedef struct vid_info 159 typedef struct vid_info
160 { 160 {
161 - vid_details belt; //是否系安全带 ILLEGAL:未系安全带 LEGAL:系安全带  
162 - vid_details smoke; //是否抽烟 ILLEGAL:抽烟 LEGAL:未抽烟  
163 - vid_details phone; //是否使用电话 ILLEGAL:使用电话 LEGAL:未使用电话  
164 - vid_details call; //是否打电话 ILLEGAL:打电话 LEGAL:未打电话  
165 - vid_details person; //是否有人 NOBODY:无人 SOMEBODY:有人 161 + vid_details belt; //锟角凤拷系锟斤拷全锟斤拷 ILLEGAL锟斤拷未系锟斤拷全锟斤拷 LEGAL锟斤拷系锟斤拷全锟斤拷
  162 + vid_details smoke; //锟角凤拷锟斤拷锟 ILLEGAL锟斤拷锟斤拷锟斤拷 LEGAL锟斤拷未锟斤拷锟斤拷
  163 + vid_details phone; //锟角凤拷使锟矫电话 ILLEGAL锟斤拷使锟矫电话 LEGAL锟斤拷未使锟矫电话
  164 + vid_details call; //锟角凤拷锟界话 ILLEGAL锟斤拷锟斤拷缁 LEGAL锟斤拷未锟斤拷缁
  165 + vid_details person; //锟角凤拷锟斤拷锟斤拷 NOBODY锟斤拷锟斤拷锟斤拷 SOMEBODY:锟斤拷锟斤拷
166 }vid_info; 166 }vid_info;
167 167
168 typedef struct vid_result 168 typedef struct vid_result
169 { 169 {
170 - vid_info driver; //主驾驶  
171 - vid_info copilot; //副驾驶 170 + vid_info driver; //锟斤拷锟斤拷驶
  171 + vid_info copilot; //锟斤拷锟斤拷驶
172 }vid_result; 172 }vid_result;
173 #endif 173 #endif
174 174
175 175
176 -//7.以车搜车结果  
177 -//#define FEATURESIZE 256 //特征长度  
178 -//#define VA_FEATURESIZE 268 //特征长度  
179 -#define VA_FEATURESIZE 520 //特征长度 176 +//7.锟皆筹拷锟窖筹拷锟斤拷锟
  177 +//#define FEATURESIZE 256 //锟斤拷锟斤拷锟斤拷锟斤拷
  178 +//#define VA_FEATURESIZE 268 //锟斤拷锟斤拷锟斤拷锟斤拷
  179 +#define VA_FEATURESIZE 520 //锟斤拷锟斤拷锟斤拷锟斤拷
180 #ifndef VF_RESULT_ 180 #ifndef VF_RESULT_
181 #define VF_RESULT_ 181 #define VF_RESULT_
182 typedef struct vf_result 182 typedef struct vf_result
@@ -185,13 +185,13 @@ typedef struct vf_result @@ -185,13 +185,13 @@ typedef struct vf_result
185 }vf_result; 185 }vf_result;
186 #endif 186 #endif
187 187
188 -//8.特殊品类车型 188 +//8.锟斤拷锟斤拷品锟洁车锟斤拷
189 #ifndef VS_INFORMATION_ 189 #ifndef VS_INFORMATION_
190 #define VS_INFORMATION_ 190 #define VS_INFORMATION_
191 typedef struct vs_information 191 typedef struct vs_information
192 { 192 {
193 - float score;//车类型置信度  
194 - int index; //车类型索引0-10:"吊车", "罐装车", "货车", "渣土车", "轿运车","救援车", "垃圾车", "消防车", "清扫车", "随车吊","危化品车" 193 + float score;//锟斤拷锟斤拷锟斤拷锟斤拷锟脚讹拷
  194 + int index; //锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷0-10:"锟斤拷锟斤拷", "锟斤拷装锟斤拷", "锟斤拷锟斤拷", "锟斤拷锟斤拷锟斤拷", "锟斤拷锟剿筹拷","锟斤拷援锟斤拷", "锟斤拷锟斤拷锟斤拷", "锟斤拷锟斤拷锟斤拷", "锟斤拷扫锟斤拷", "锟芥车锟斤拷","危锟斤拷品锟斤拷"
195 }vs_information; 195 }vs_information;
196 #endif 196 #endif
197 197
@@ -200,66 +200,66 @@ typedef struct vs_information @@ -200,66 +200,66 @@ typedef struct vs_information
200 #define VS_RESULT_ 200 #define VS_RESULT_
201 typedef struct vs_result 201 typedef struct vs_result
202 { 202 {
203 - vs_information vs_info[2];//车类型信息  
204 - int count;//车类型的数量,是1,内部没设阈值 203 + vs_information vs_info[2];//锟斤拷锟斤拷锟斤拷锟斤拷息
  204 + int count;//锟斤拷锟斤拷锟酵碉拷锟斤拷锟斤拷锟斤拷锟斤拷1锟斤拷锟节诧拷没锟斤拷锟斤拷值
205 }vs_result; 205 }vs_result;
206 #endif 206 #endif
207 207
208 -//9.渣土车盖盖  
209 -#define COVER 1012 //盖盖  
210 -#define NOCOVER_NODIRT 1013 //无盖无土  
211 -#define NOCOVER_DIRT 1014 //无盖有土 208 +//9.锟斤拷锟斤拷锟斤拷锟角革拷
  209 +#define COVER 1012 //锟角革拷
  210 +#define NOCOVER_NODIRT 1013 //锟睫革拷锟斤拷锟斤拷
  211 +#define NOCOVER_DIRT 1014 //锟睫革拷锟斤拷锟斤拷
212 212
213 #ifndef MUCKTRUCKCOVER_RESULT_ 213 #ifndef MUCKTRUCKCOVER_RESULT_
214 #define MUCKTRUCKCOVER_RESULT_ 214 #define MUCKTRUCKCOVER_RESULT_
215 typedef struct mucktruckcover_result 215 typedef struct mucktruckcover_result
216 { 216 {
217 - int status; //是否盖盖 COVER-盖盖 NOCOVER_NODIRT-无盖无土 NOCOVER_DIRT-无盖有土  
218 - float confidence; //置信度 217 + int status; //锟角凤拷歉锟 COVER-锟角革拷 NOCOVER_NODIRT-锟睫革拷锟斤拷锟斤拷 NOCOVER_DIRT-锟睫革拷锟斤拷锟斤拷
  218 + float confidence; //锟斤拷锟脚讹拷
219 }mucktruckcover_result; 219 }mucktruckcover_result;
220 220
221 #endif 221 #endif
222 222
223 223
224 -//11.摩托车是否载人/摩托车驾驶人是否戴头盔/三轮车是否载人  
225 -#define MOTOR_MANNED 1005 //摩托车载人  
226 -#define MOTOR_NOT_MANNED 1006 //摩托车未载人  
227 -#define MOTOR_DRIVER_HELMETED 1007 //摩托车驾驶人戴头盔  
228 -#define MOTOR_DRIVER_NOT_HELMETED 1008 //摩托车驾驶人未戴头盔  
229 -#define TRICYCLE_MANNED 1009 //三轮车载人  
230 -#define TRICYCLE_NOT_MANNED 1010 //三轮车未载人 224 +//11.摩锟叫筹拷锟角凤拷锟斤拷锟斤拷/摩锟叫筹拷锟斤拷驶锟斤拷锟角凤拷锟酵凤拷锟/锟斤拷锟街筹拷锟角凤拷锟斤拷锟斤拷
  225 +#define MOTOR_MANNED 1005 //摩锟叫筹拷锟斤拷锟斤拷
  226 +#define MOTOR_NOT_MANNED 1006 //摩锟叫筹拷未锟斤拷锟斤拷
  227 +#define MOTOR_DRIVER_HELMETED 1007 //摩锟叫筹拷锟斤拷驶锟剿达拷头锟斤拷
  228 +#define MOTOR_DRIVER_NOT_HELMETED 1008 //摩锟叫筹拷锟斤拷驶锟斤拷未锟斤拷头锟斤拷
  229 +#define TRICYCLE_MANNED 1009 //锟斤拷锟街筹拷锟斤拷锟斤拷
  230 +#define TRICYCLE_NOT_MANNED 1010 //锟斤拷锟街筹拷未锟斤拷锟斤拷
231 231
232 #ifndef MTA_RESULT_ 232 #ifndef MTA_RESULT_
233 #define MTA_RESULT_ 233 #define MTA_RESULT_
234 234
235 typedef struct mta_details 235 typedef struct mta_details
236 { 236 {
237 - int status; //摩托车是否载人/摩托车驾驶人是否戴头盔/三轮车是否载人 UNCERTAINTY:不确定  
238 - float confidence; //置信度 237 + int status; //摩锟叫筹拷锟角凤拷锟斤拷锟斤拷/摩锟叫筹拷锟斤拷驶锟斤拷锟角凤拷锟酵凤拷锟/锟斤拷锟街筹拷锟角凤拷锟斤拷锟斤拷 UNCERTAINTY锟斤拷锟斤拷确锟斤拷
  238 + float confidence; //锟斤拷锟脚讹拷
239 }mta_details; 239 }mta_details;
240 240
241 typedef struct mta_result 241 typedef struct mta_result
242 { 242 {
243 - mta_details motor_driver_helmeted; //摩托车驾驶人是否戴头盔  
244 - mta_details motor_manned; //摩托车是否载人  
245 - mta_details tricycle_manned; //三轮车是否载人  
246 - vd_result motor_driver_hs_rect; //摩托车驾驶人(未带头盔时输出)头肩坐标 243 + mta_details motor_driver_helmeted; //摩锟叫筹拷锟斤拷驶锟斤拷锟角凤拷锟酵凤拷锟
  244 + mta_details motor_manned; //摩锟叫筹拷锟角凤拷锟斤拷锟斤拷
  245 + mta_details tricycle_manned; //锟斤拷锟街筹拷锟角凤拷锟斤拷锟斤拷
  246 + vd_result motor_driver_hs_rect; //摩锟叫筹拷锟斤拷驶锟剿o拷未锟斤拷头锟斤拷时锟斤拷锟斤拷锟酵凤拷锟斤拷锟斤拷锟
247 }mta_result; 247 }mta_result;
248 248
249 #endif 249 #endif
250 250
251 251
252 252
253 -//12.是否载人 253 +//12.锟角凤拷锟斤拷锟斤拷
254 #ifndef MANNED_RESULT_ 254 #ifndef MANNED_RESULT_
255 #define MANNED_RESULT_ 255 #define MANNED_RESULT_
256 typedef struct manned_result 256 typedef struct manned_result
257 { 257 {
258 - //int status; //是否载人 0-不是货车或不是三轮车或三轮车未载人或货车未载人,1-货车载人,2-三轮车载入  
259 - //float confidence; //置信度 258 + //int status; //锟角凤拷锟斤拷锟斤拷 0-锟斤拷锟角伙拷锟斤拷锟斤拷锟斤拷锟斤拷锟街筹拷锟斤拷锟斤拷锟街筹拷未锟斤拷锟剿伙拷锟斤拷锟轿达拷锟斤拷耍锟-锟斤拷锟斤拷锟斤拷锟剿o拷2-锟斤拷锟街筹拷锟斤拷锟斤拷
  259 + //float confidence; //锟斤拷锟脚讹拷
260 260
261 - vd_result hs_rect[10]; //头肩坐标  
262 - int hs_count; //头肩个数 261 + vd_result hs_rect[10]; //头锟斤拷锟斤拷锟斤拷
  262 + int hs_count; //头锟斤拷锟斤拷锟
263 }manned_result; 263 }manned_result;
264 #endif 264 #endif
265 265