目标识别
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:夜视(暂不支持) | |
| 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 | |||
| cls_id | 检测目标类型 | int | |||
| 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 | 未检测到目标 |