eac85cd5
Hu Chunming
调通va
|
1
2
|
/************************************************************
* Version: vehicle_analysis_v0.0.0.190311.gpuonly
|
d4ec4cba
Hu Chunming
补交头文件
|
3
|
* CopyRight: �п�����������Ƽ�����˾
|
eac85cd5
Hu Chunming
调通va
|
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
* UpdateDate: 20190311
* Content: drafting the first edition by
************************************************************/
#ifndef VEHICLEANALYSIS_H_
#define VEHICLEANALYSIS_H_
#ifdef _MSC_VER
#ifdef VEHICLEANALYSIS_EXPORTS
#define VEHICLEANALYSIS_API __declspec(dllexport)
#else
#define VEHICLEANALYSIS_API __declspec(dllimport)
#endif
#else
#define VEHICLEANALYSIS_API __attribute__ ((visibility ("default")))
#endif
#ifdef __cplusplus
extern "C"
{
#endif
|
d4ec4cba
Hu Chunming
补交头文件
|
26
27
|
#include "sy_common.h" //ͨ�����ݽṹ�嶨��
#include "vehicle_result.h" //������������ṹ�嶨��
|
eac85cd5
Hu Chunming
调通va
|
28
29
30
31
|
#ifndef __VEHICLE_INFO__
#define __VEHICLE_INFO__
|
d4ec4cba
Hu Chunming
补交头文件
|
32
33
34
35
36
37
38
39
40
41
42
43
|
typedef struct vehicle_info { //�������������
vd_result vehicle_detect_res; //��(��ͷ+��β)�����
vd_result vehicle_win_detect_res; //���������
vd_result vehicle_body_detect_res; //���������
vc_result vehicle_color_res; //����ɫ
vr_result vehicle_recg_res; //����ʶ��
vplate_results vehicle_plate_det_recg_res; //���Ƽ��ʶ����
v_pendant_d_result vehicle_pendant_det_res; //������
vid_result vehicle_illegal_det_res; //����
vf_result vehicle_fea_res; //�Գ��ѳ�
//vs_result vehicle_special_res; //����Ʒ��ͣ�ֻ�л�������������
//mucktruckcover_result vehicle_mucktruckcover_res; //�������Ǹ�״̬(��ͷ��ֻ������Ʒ����е��������ͽ���������������������β��ֻ�л�����������)
|
eac85cd5
Hu Chunming
调通va
|
44
|
|
d4ec4cba
Hu Chunming
补交头文件
|
45
|
mta_result mta_res; //Ħ�г��Ƿ�����/Ħ�г���ʻ���Ƿ��ͷ��/ũ�ó��Ƿ�����
|
eac85cd5
Hu Chunming
调通va
|
46
|
|
d4ec4cba
Hu Chunming
补交头文件
|
47
|
manned_result manned_res; //�Ƿ��ǻ������ֳ����� 0-���ǻ���/�������ֳ�/���ֳ�δ����/����δ���ˣ�1-�������ˣ�2-���ֳ�����
|
eac85cd5
Hu Chunming
调通va
|
48
|
|
d4ec4cba
Hu Chunming
补交头文件
|
49
50
51
|
int type; //�������0-��ͷ��1-��β��2-Ħ�г���3-���ֳ� ��4-����
int vpt_type;
int rainshed; //是否安装雨棚, 0 有雨棚 1 无雨棚
|
eac85cd5
Hu Chunming
调通va
|
52
|
|
d4ec4cba
Hu Chunming
补交头文件
|
53
|
//int obj_quality_idx;//�۵��������ͣ�0-��Ч���ݣ�1-�������ݣ�2-��������
|
eac85cd5
Hu Chunming
调通va
|
54
55
56
57
58
59
|
} vehicle_info;
#endif
#ifndef __VEHICLE_ANALYSIS_RESULT__
#define __VEHICLE_ANALYSIS_RESULT__
|
d4ec4cba
Hu Chunming
补交头文件
|
60
61
62
|
typedef struct va_result { //����������� �ڴ����ⲿ����
vehicle_info *info; //������ȫ���������
int count; //��������
|
eac85cd5
Hu Chunming
调通va
|
63
64
65
66
67
68
|
} va_result;
#endif
#ifndef __DET_PARAM__
#define __DET_PARAM__
|
d4ec4cba
Hu Chunming
补交头文件
|
69
|
typedef struct det_param //����㷨����
|
eac85cd5
Hu Chunming
调通va
|
70
71
72
73
74
75
76
77
78
79
80
81
|
{
int process_min_l;
int process_max_l;
float thresld;
}det_param;
#endif
#ifndef __VA_PARAM__
#define __VA_PARAM__
typedef struct va_param
{
|
d4ec4cba
Hu Chunming
补交头文件
|
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
//�㷨���ò���
sy_command vehicle_detect_config; //�Ƿ����������
sy_command vehicle_recg_config; //�Ƿ���������ʶ��
sy_command vehicle_recg_supplement_config; //�Ƿ���������ʶ��ʶ��(��ͷ��βlogo���ʶ��+����15����)��ǰ���������ʶ��vehicle_recg_config��
sy_command vehicle_plate_det_recg_config; //�Ƿ��������Ƽ��ʶ��
sy_command vehicle_color_config; //�Ƿ�����������ɫʶ��
sy_command vehicle_pendant_det_config; //�Ƿ�������������ʶ��
sy_command vehicle_illegal_config; //�Ƿ�������Υ����Ϊ���
sy_command vehicle_feature_config; //�Ƿ���������������ȡ
//sy_command vehicle_special_config; //�Ƿ���������Ʒ���ʶ�𡣣�ǰ���������ʶ��vehicle_recg_config��
//sy_command vehicle_image_quality_config; //�Ƿ���������ͼ��������ʶ��
sy_command vehicle_motor_tricycle_analysis_config; //�Ƿ�����Ħ�г����ֳ�������Ħ�г��Ƿ�����/Ħ�г���ʻ���Ƿ��ͷ��/ũ�ó��Ƿ����ˣ�
//sy_command vehicle_motor_hs_output_config; //�Ƿ�����Ħ�г�δ��ͷ�����ͷ�����ꡣ��ǰ�����Ħ�г����ֳ�����vehicle_motor_tricycle_analysis_config��
//sy_command vehicle_stain_vp_config; //�Ƿ������ڵ�����ʶ��
//sy_command vehicle_muck_truck_cover_config; //�Ƿ������������Ǹ�ʶ��(ǰ���������Ʒ���ʶ��vehicle_special_config)
//sy_command vehicle_lorry_manned_config; //�Ƿ�������������ʶ�𡣣�ǰ���������ʶ��vehicle_recg_config��
sy_command vehicle_manned_config; //�Ƿ��������������ֳ�����ʶ�𡣣�ǰ���������ʶ��vehicle_recg_config��
|
eac85cd5
Hu Chunming
调通va
|
99
100
|
|
d4ec4cba
Hu Chunming
补交头文件
|
101
102
103
104
105
106
107
|
//�㷨��ʼ������
int gpuid; //ָ���Կ�id
float vehicle_det_thresld=0.5; //��������
int min_obj_size=200; //��ͷβ���Ŀ����С���ߣ�����ȡֵ��Χ100~200������С�ڸóߴ�Ĺ��˵���
float vehicle_plate_det_thresld=0.5; //���Ƽ�����
float vehicle_attribute_det_thresld=0.5; //�����Լ�����
float vehicle_logo_det_thresld=0.1; //��logo������
|
eac85cd5
Hu Chunming
调通va
|
108
|
|
d4ec4cba
Hu Chunming
补交头文件
|
109
110
111
|
float vc_thresld=0.5; //����ɫ��ֵ
char* dbPath; //����ʶ��������··�� <��ǰ��֧��Ӣ��·��>
char* models_Path; //����ģ�͵�·�� <��ǰ��֧��Ӣ��·��>//20210615
|
eac85cd5
Hu Chunming
调通va
|
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
|
}va_param;
#endif
/*************************************************************************
* function: va_init
* purpose: init resources
* param:
[in] handle - handle
[in] param - init param
* return: success(0) or error code(<0)
* notes: null
*************************************************************************/
VEHICLEANALYSIS_API int va_init(void ** handle, va_param param);
|
d4ec4cba
Hu Chunming
补交头文件
|
127
|
VEHICLEANALYSIS_API int va_acl_init();//������һ�Σ��ȵ���va_acl_init���ٵ���va_init
|
eac85cd5
Hu Chunming
调通va
|
128
129
130
131
132
133
134
135
136
137
|
/*************************************************************************
* function: va_release
* purpose: release sources
* param:
[in] handle - handle
* return: null
* notes: null
*************************************************************************/
VEHICLEANALYSIS_API void va_release(void ** handle);
|
d4ec4cba
Hu Chunming
补交头文件
|
138
|
VEHICLEANALYSIS_API void va_acl_release();//������һ�Σ������е�va_release���ͷ��ˣ�������va_acl_release
|
eac85cd5
Hu Chunming
调通va
|
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
|
/*************************************************************************
* function: va_get_version
* purpose: get sdk version
* param: null
* return: null
* notes: null
*************************************************************************/
VEHICLEANALYSIS_API const char * va_get_version();
/*************************************************************************
* function: va_batch
* purpose: vehicle analysis batch
* param:
[in] handle - handle
[in] img_data_array - data array
[in] format - data format
[in] batch_size - batch size
[in] result - vehicle analysis result
* return: success(0) or error code(<0)
* notes: null
*************************************************************************/
VEHICLEANALYSIS_API int va_batch(void * handle, sy_img * img_data_array, int batch_size, va_result *result);
|
d4ec4cba
Hu Chunming
补交头文件
|
162
|
//img_data_array��device���ݣ�batch_size==16ʱ���ù̶�16ģ�ͣ�С��16ʱ���ù̶�1ģ�͡�
|
eac85cd5
Hu Chunming
调通va
|
163
164
165
166
167
168
|
VEHICLEANALYSIS_API int va_batch16_device(void * handle, sy_img * img_data_array, int batch_size, va_result *result);
/*************************************************************************
* FUNCTION: VA_ComputeSimilarity
|
d4ec4cba
Hu Chunming
补交头文件
|
169
|
* PURPOSE: �ȶ����ƶȣ�ͨ�ã�
|
eac85cd5
Hu Chunming
调通va
|
170
|
* PARAM:
|
d4ec4cba
Hu Chunming
补交头文件
|
171
172
173
174
|
[in] Afea - ��һ��ͼƬ����
[in] Bfea - �ڶ���ͼƬ����
[in] featuresize - ��������
* RETURN: ���ƶ�
|
eac85cd5
Hu Chunming
调通va
|
175
176
177
178
179
180
|
* NOTES:
*************************************************************************/
VEHICLEANALYSIS_API float va_compute_similarity(float *Afea, float *Bfea, int featuresize);
/*************************************************************************
* FUNCTION: va_compute_similarity_byvafeature
|
d4ec4cba
Hu Chunming
补交头文件
|
181
|
* PURPOSE: �ȶ����ƶȣ����va������
|
eac85cd5
Hu Chunming
调通va
|
182
|
* PARAM:
|
d4ec4cba
Hu Chunming
补交头文件
|
183
184
185
186
|
[in] Afea - ��һ��ͼƬva����
[in] Bfea - �ڶ���ͼƬva����
[in] featuresize - ��������VA_FEATURESIZE
* RETURN: ���ƶ�
|
eac85cd5
Hu Chunming
调通va
|
187
188
189
190
191
192
193
194
195
196
197
198
|
* NOTES:
*************************************************************************/
VEHICLEANALYSIS_API float va_compute_similarity_byvafeature(void * handle , float *Afea, float *Bfea, int featuresize);
#ifdef __cplusplus
};
#endif
#endif
|