目标识别
Service
开启目标识别
Topic: thing/product/{gateway_sn}/services
Direction: down
Method: target_detect_open
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| ai_lens_type | 检测镜头 | int | 0:可见光,1:红外,2:夜视(暂不支持) | AI 镜头类型 |
| scene_type | 当前识别场景 | int | 0:通用 | 默认传0 |
| target_type_list | 当前用户选择的检测类型列表,列表传空,表示当前识别场景下的所有支持检测类型进识别 | list<int> | 见下文“目标识别类型”定义 | 可以传NULL |
Example**:**
Topic: thing/product/{gateway_sn}/services_reply
Direction: up
Method: target_detect_open
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| result | 是否打开AI识别 | int | 0成功 非0失败 |
关闭目标识别
Topic: thing/product/{gateway_sn}/services
Direction: down
Method: target_detect_close
Data:
Example**:**
Topic: thing/product/{gateway_sn}/services_reply
Direction: up
Method: target_detect_close
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| result | 关闭AI识别操作结果 | int | 0成功 非0失败 |
Status
目标识别结果上报
Topic: topic: thing/product/{gateway_sn}/state
**Direction:**up
Method: target_detect_result_report
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| time | 时间戳 | long | 上报时间戳 | |
| uav_id | 无人机ID | String | 无人机唯一标识 | |
| camera_id | 相机ID | int | 0,可见光,1,红外 | 相机唯一标识 |
| global_pos | 无人机经纬度 | GlobalPos | 无人机全局位置 | |
| camera | 相机参数 | CameraBean | 拍摄相机参数 | |
| obj_cnt | 检测到得目标数量 | int | 检测到的目标数量 | |
| objs | 检测内容 | List<ObjCnts> | 检测目标对象列表 |
ObjCnts
| Column | Name | Type | constraint | Description | |
|---|---|---|---|---|---|
| tracker_id | 检测目标ID | String | 目标跟踪 ID | ||
| cls_id | 检测目标类型 | int | 目标分类 ID,见下方目标类型表 | ||
| bbox | 目标检测框 | BBox | 目标在画面中的检测框坐标 | ||
| pos | 目标经纬度 | GlobalPos | 目标在地图中的经纬度位置 | ||
| pic | 第一帧得图片路径 | String | (可能会更改,机巢以及无人机目前拿不到截图) | ||
| timestamp | 该目标被检测到的时间戳 |
BBox
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| x | 目标在屏幕中的X坐标 | float | 占屏幕的比例 | |
| y | 目标在屏幕中的X坐标 | float | 占屏幕的比例 | |
| w | 目标在屏幕中的宽 | float | 占屏幕的比例 | |
| h | 目标在屏幕中的高 | float | 占屏幕的比例 |
CameraBean
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| roll | 云台翻滚角 | float | 相机姿态角(横滚) | |
| pitch | 云台俯仰角 | float | 相机姿态角(俯仰) | |
| yaw | 云台旋转角度(水平) | float | 相机姿态角(偏航) | |
| longitude | 无人机经度 | float | 拍摄时无人机经度 | |
| latitude | 无人机纬度 | float | 拍摄时无人机纬度 | |
| height | 无人机相对高度 | float | 拍摄时无人机相对起飞点高度 | |
| fov | 视场角度 | flaot[] | 相机视场角(度) | |
| resolution | 原图片分辨率 | `int[] | 原图分辨率 [宽, 高] | |
| focal_type | 焦距类型 | String | 相机焦距类型(如广角/变焦) |
GlobalPos
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| latitude | 纬度 | float | 纬度坐标 | |
| longitude | 经度 | float | 经度坐标 | |
| altitude | 海拔高度 | float | 海拔高度(米) |
目标**类型:**
| 目标类型ID | 目标名称 |
|---|---|
| 0 | 背景(暂不支持) |
| 1 | 动物(暂不支持) |
| 2 | 船 |
| 3 | 小车 |
| 4 | 行人 |
| 5 | 骑行者 |
| 6 | 大车 |
| 34 | 无人机 |
| 35 | 烟雾 |
| 36 | 火 |
| 99 | 未检测到目标 |