02e5e637
Zhao Shuaihua
增加行人/非机动车占机动车道(50...
|
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
|
/*************************************************************************
* Version: road_seg_v0.0.0.20230313
* CopyRight : 中国科学院自动化所模式识别实验室图像视频组
* UpdateDate:
* Content : 道路分割
*************************************************************************/
#ifndef ROADSEG3CLS_H_
#define ROADSEG3CLS_H_
#if _MSC_VER
#ifdef ROADSEG3CLS_EXPORTS
#define ROADSEG3CLS_API __declspec(dllexport)
#else
#define ROADSEG3CLS_API __declspec(dllimport)
#endif
#else
#define ROADSEG3CLS_API __attribute__ ((visibility ("default")))
#endif
#include "sy_common.h"
#ifdef __cplusplus
extern "C"
{
#endif
#ifndef __RS3CLS_LANE__
#define __RS3CLS_LANE__
typedef struct rs3cls_lane {
sy_point points[180]; // 车道线上的点坐标数组
int num_points; // 车道线上点的数量
float start_x; // 起始点x坐标
float start_y; // 起始点y坐标
float cls; // 车道线类别 1-实线 2-虚线
float conf; // 车道线置信度
}rs3cls_lane;
#endif
#ifndef __RS3CLS_RESULT__
#define __RS3CLS_RESULT__
typedef struct rs3cls_result
{
rs3cls_lane reg_array[20];
int lane_count;
unsigned char *seg_array;
}rs3cls_result;
#endif
#ifndef __RS3CLS_PARAM__
#define __RS3CLS_PARAM__
typedef struct rs3cls_param
{
int devId; //运行卡号
char* modelNames;
float thresld; //检测阈值 默认为0.3
}rs3cls_param;
#endif
/*************************************************************************
* FUNCTION: rs3cls_init
* PURPOSE: 载入模型
* PARAM:
[in] handle - 句柄
[in] params - 参数
* RETURN: 成功(0)或者错误代码
* NOTES:
*************************************************************************/
ROADSEG3CLS_API int rs3cls_init(void ** handle, rs3cls_param param);
/*************************************************************************
* FUNCTION: rs3cls_process
* PURPOSE: 车颜色识别
* PARAM:
[in] handle - 检测句柄
[in] img_data - 图像数据
[in] result - 结果 内存在外部申请
* RETURN: 成功(0) 或 错误代码(< 0)
* NOTES:
*************************************************************************/
ROADSEG3CLS_API int rs3cls_process(void *handle, sy_img img_data, rs3cls_result result);
/*************************************************************************
* FUNCTION: rs3cls_batch
* PURPOSE: 车颜色识别 batch
* PARAM:
[in] handle - 检测句柄
[in] img_data_array - 图像数据
[in] batch_size - 图像数目
[in] result - 结果 内存在外部申请
* RETURN: 成功(0) 或 错误代码(< 0)
* NOTES:
*************************************************************************/
ROADSEG3CLS_API int rs3cls_batch(void *handle, sy_img* img_data_array, int batch_size, rs3cls_result* result);
/*************************************************************************
* FUNCTION: rs3cls_release
* PURPOSE: 释放
* PARAM:
[in] handle - handle
* RETURN: NULL
* NOTES:
*************************************************************************/
ROADSEG3CLS_API void rs3cls_release(void ** handle);
/*************************************************************************
* FUNCTION: rs3cls_get_version
* PURPOSE:
* PARAM: NULL
* RETURN: 版本号
* NOTES:
*************************************************************************/
ROADSEG3CLS_API const char * rs3cls_get_version();
#ifdef __cplusplus
};
#endif
#endif
|