目标识别
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:夜视(暂不支持),3:广角 | |
| 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失败 |
进入智能追踪
Topic: thing/product/{gateway_sn}/services
Direction: down
Method: intelligent_lock_enter
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: intelligent_lock_enter
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| result | 是否打开AI识别 | int | 0成功 非0失败 |
退出智能追踪
Topic: thing/product/{gateway_sn}/services
Direction: down
Method: intelligent_lock_exit
Data:
Example**:**
Topic: thing/product/{gateway_sn}/services_reply
Direction: up
Method: intelligent_lock_exit
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| result | 是否打开AI识别 | int | 0成功 非0失败 |
选择锁定目标的信息
锁定目标功能指飞行器将原地调整机身正对着该目标,该目标点将成为镜头视野的中心。
Topic: thing/product/{gateway_sn}/services
Direction: down
Method: select_tracking_target
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| locked | 机头和云台的相对关系是否锁定 | bool | false:仅云台转,机身不转, true:锁定机头,云台和机身一起转 | |
| start_x | 起始点x坐标 | double | ||
| start_y | 起始点y坐标 | double | ||
| width | 目标点宽度 | double | ||
| height | 目标点高度 | double | ||
| tracker_id | 检测目标ID | int | ||
| camera_id | 检测镜头 | int | 0:可见光,1:红外,2:夜视(暂不支持),3:广角 | |
| seq_id | 操作序号id | int |
Example:
{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"data": {
"start_x": 0.5,
"start_y": 0.5,
"locked": true,
"width": 0.8,
"height": 0.3,
"tracker_id": 123456,
"camera_id":0,
"seq_id":0,
"ai_mode":0
},
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp": 1654070968655,
"method": "select_tracking_target"
}
Topic: thing/product/{gateway_sn}/services_reply
Direction: up
Method: select_tracking_target
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| result | 返回码 | int | 非 0 代表错误 |
Example:
{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"data": {
"result": 0
},
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp": 1654070968655,
"method": "select_tracking_target"
}
AI布防设置
Topic: thing/product/{gateway_sn}/services
Direction: down
Method: AI_security_set
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| enable | 打开AI布防 | int | 0:关闭,1:开启 | 必传 |
| ai_lens_type | 检测镜头 | int | 0:可见光,1:红外,2:夜视(暂不支持),3:广角 | 必传 |
| target_type_list | 当前用户选择的检测类型列表,列表传空,表示当前识别场景下的所有支持检测类型进识别 | list<int> | (人、车、船、火、烟雾、无人机)见下文“目标识别类型”定义 | 必传 |
| action | 识别后进行的动作 | int | 0:录像+拍照 , 3:拍照 | 必传 |
| max_record_time | 视频录制最大时长 | int | 5-1800秒,单位s | action为0时,必传 |
Example**:**
Topic: thing/product/{gateway_sn}/services_reply
Direction: up
Method: AI_security_set
| 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 | |||
| cls_status | 跟踪目标类型 | 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 | 无人机经度 | double | ||
| latitude | 无人机纬度 | double | ||
| height | 无人机相对高度 | float | ||
| fov | 视场角度 | flaot[] | ||
| resolution | 原图片分辨率 | int[] | ||
| focal_type | 焦距类型 | String |
GlobalPos
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| latitude | 纬度 | double | max 90,min -90 | 角度值。南纬是负,北纬是正,精度到小数点后6位。 |
| longitude | 经度 | double | max 180,min:-180} | 角度值。东经是正,西经是负,精度到小数点后6位。 |
| altitude | 海拔高度 | float | 目标点高度(椭球高) |
目标**类型:**
| 目标类型ID | 目标名称 |
|---|---|
| 0 | 背景 |
| 1 | 动物 |
| 2 | 船 |
| 3 | 小车 |
| 4 | 行人 |
| 5 | 骑行者 |
| 6 | 大车 |
| 30 | 平民 |
| 34 | 无人机 |
| 35 | 烟雾 |
| 36 | 火 |
| 99 | 未检测到目标 |
AI识别拍摄结果上报
Topic: thing/product/{gateway_sn}/events
Direction: up
Method: AI_detect_shoot_notify
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| File | 文件 | text | ||
| even_id | 事件id | String | ||
| path | 文件的业务路径 | text | ||
| ext | 文件扩展内容 | struct | ||
| »flight_id | 任务 ID | text | ||
| »waypoint_id | 航点 ID | text | ||
| »drone_model_key | 飞行器产品枚举值 | text | ||
| »payload_model_key | 负载产品枚举值 | textt | ||
| »is_original | 是否为原图 | bool | 0:"否","1":"是" | |
| metadata | 媒体元数据 | struct | ||
| »gimbal_yaw_degree | 云台偏航角 | float | ||
| »absolute_altitude | 拍摄绝对高度 | float | ||
| »relative_altitude | 拍摄相对高度 | float | ||
| »create_time | 媒体拍摄时间 | date | "format":"iso8601" | |
| »shoot_position | 拍摄位置 | struct | ||
| »»lat | 拍摄位置纬度 | float | ||
| »»lng | 拍摄位置经度 | float | ||
| obj_num | 一帧中检测目标个数 | int | ||
| ObjInfo | 检测目标数组 | struct | ||
| »tracker_id | 检测目标ID | String | ||
| »cls_id | 检测目标类型 | int | ||
| »timestamp | ||||
| »object_position | 目标经纬度 | |||
| »»object_lat | 纬度 | |||
| »»object_lng | 经度 | |||
| »»object_altitude | 海拔高度 | float | ||
| »bbox | 目标检测框 | |||
| »»x | 目标在屏幕中的X坐标 | float | ||
| »»y | 目标在屏幕中的Y坐标 | float | ||
| »»w | 目标在屏幕中的宽 | float | ||
| »»h | 目标在屏幕中的高 | float |