跳到主要内容

目标识别

Service

开启目标识别

Topic: thing/product/{gateway_sn}/services

Direction: down

Method: target_detect_open

Data:

ColumnNameTypeconstraintDescription
ai_lens_type检测镜头int0:可见光,1:红外,2:夜视(暂不支持)
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失败

进入智能追踪

Topic: thing/product/{gateway_sn}/services

Direction: down

Method: intelligent_lock_enter

Data:

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

Example**:**

Topic: thing/product/{gateway_sn}/services_reply

Direction: up

Method: intelligent_lock_enter

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

ColumnNameTypeconstraintDescription
result是否打开AI识别int0成功 非0失败

选择锁定目标的信息

锁定目标功能指飞行器将原地调整机身正对着该目标,该目标点将成为镜头视野的中心。

Topic: thing/product/{gateway_sn}/services

Direction: down

Method: select_tracking_target

Data:

ColumnNameTypeconstraintDescription
locked机头和云台的相对关系是否锁定boolfalse:仅云台转,机身不转, true:锁定机头,云台和机身一起转
start_x起始点x坐标double
start_y起始点y坐标double
width目标点宽度double
height目标点高度double
tracker_id检测目标IDint
camera_id检测镜头int0:可见光,1:红外,2:夜视(暂不支持),3:广角
seq_id操作序号idint

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:

ColumnNameTypeconstraintDescription
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"
}

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
cls_id检测目标类型int
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未检测到目标