跳到主要内容

目标识别

Service

开启目标识别

Topic: thing/product/{gateway_sn}/services

Direction: down

Method: target_detect_open

Data:

ColumnNameTypeconstraintDescription
ai_lens_type检测镜头int0:可见光,1:红外,2:夜视(暂不支持)AI 镜头类型
scene_type当前识别场景int0:通用默认传0
target_type_list当前用户选择的检测类型列表,列表传空,表示当前识别场景下的所有支持检测类型进识别list<int>见下文“目标识别类型”定义可以传NULL

Example**:**

Topic: thing/product/{gateway_sn}/services_reply

Direction: up

Method: target_detect_open

ColumnNameTypeconstraintDescription
result是否打开AI识别int0成功 非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

ColumnNameTypeconstraintDescription
result关闭AI识别操作结果int0成功 非0失败

Status

目标识别结果上报

Topic: topic: thing/product/{gateway_sn}/state

**Direction:**up

Method: target_detect_result_report

Data:

ColumnNameTypeconstraintDescription
time时间戳long上报时间戳
uav_id无人机IDString无人机唯一标识
camera_id相机IDint0,可见光,1,红外相机唯一标识
global_pos无人机经纬度GlobalPos无人机全局位置
camera相机参数CameraBean拍摄相机参数
obj_cnt检测到得目标数量int检测到的目标数量
objs检测内容List<ObjCnts>检测目标对象列表

ObjCnts

ColumnNameTypeconstraintDescription
tracker_id检测目标IDString目标跟踪 ID
cls_id检测目标类型int目标分类 ID,见下方目标类型表
bbox目标检测框BBox目标在画面中的检测框坐标
pos目标经纬度GlobalPos目标在地图中的经纬度位置
pic第一帧得图片路径String(可能会更改,机巢以及无人机目前拿不到截图)
timestamp该目标被检测到的时间戳

BBox

ColumnNameTypeconstraintDescription
x目标在屏幕中的X坐标float占屏幕的比例
y目标在屏幕中的X坐标float占屏幕的比例
w目标在屏幕中的宽float占屏幕的比例
h目标在屏幕中的高float占屏幕的比例

CameraBean

ColumnNameTypeconstraintDescription
roll云台翻滚角float相机姿态角(横滚)
pitch云台俯仰角float相机姿态角(俯仰)
yaw云台旋转角度(水平)float相机姿态角(偏航)
longitude无人机经度float拍摄时无人机经度
latitude无人机纬度float拍摄时无人机纬度
height无人机相对高度float拍摄时无人机相对起飞点高度
fov视场角度flaot[]相机视场角(度)
resolution原图片分辨率`int[]原图分辨率 [宽, 高]
focal_type焦距类型String相机焦距类型(如广角/变焦)

GlobalPos

ColumnNameTypeconstraintDescription
latitude纬度float纬度坐标
longitude经度float经度坐标
altitude海拔高度float海拔高度(米)

目标**类型:**

目标类型ID目标名称
0背景(暂不支持)
1动物(暂不支持)
2
3小车
4行人
5骑行者
6大车
34无人机
35烟雾
36
99未检测到目标