跳到主要内容

Target Recognition

Service

Enable Target Recognition

Topic: thing/product/{gateway_sn}/services

Direction: down

Method: target_detect_open

Data:

ColumnNameTypeconstraintDescription
ai_lens_typeDetection lensint0: Visible light, 1: Infrared, 2: Night vision (currently unsupported)
scene_typeCurrent recognition sceneint0: GeneralDefault value is 0
target_type_listList of selected detection types by the user; an empty list indicates recognition of all supported detection types in the current scenelist<int>See definition of "Target recognition types" belowNULL is acceptable

Example**:**

Topic: thing/product/{gateway_sn}/services_reply

Direction: up

Method: target_detect_open

ColumnNameTypeconstraintDescription
resultIs AI recognition enabledint0: Success, Non-zero: Failure

Turn Off Target Recognition

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
resultDisable AI recognition operation resultint0: Success, Non-zero: Failure

Select Tracking Target Information

The tracking target function allows the aircraft to adjust its body to face the target, making that target point the center of the camera's view.

Topic: thing/product/{gateway_sn}/services

Direction: down

Method: select_tracking_target

Data:

ColumnNameTypeconstraintDescription
lockedWhether the relative position of the nose and gimbal is lockedboolfalse: only the gimbal turns, the body does not turn; true: locks the nose, the gimbal and body turn together
start_xStarting point x-coordinatedouble
start_yStarting point y-coordinatedouble
widthWidth of the target pointdouble
heightHeight of the target pointdouble
tracker_idDetection target 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
},
"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
resultReturn codeintNon-zero indicates an error

Example:

{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"data": {
"result": 0
},
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp": 1654070968655,
"method": "select_tracking_target"
}

Exit Target Lock

Exiting the target lock will continue target detection; the target will not stop being detected unless target recognition is turned off.

Topic: thing/product/{gateway_sn}/services

Direction: down

Method: target_tracking_close

Data:

Example:

Topic: thing/product/{gateway_sn}/services_reply

Direction: up

Method: target_tracking_close

ColumnNameTypeconstraintDescription
resultResult of closing AI recognition operationint0 for success; non-zero for failure

Status

Target Recognition Result Reporting

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

Direction: up

Method: target_detect_result_report

Data:

ColumnNameTypeconstraintDescription
timeTimestamplong
uav_idUAV IDString
camera_idCamera IDint0: visible light, 1: infrared
global_posUAV Latitude/LongitudeGlobalPos
cameraCamera ParametersCameraBean
obj_cntDetected Target Countint
objsDetected ContentsList<ObjCnts>

ObjCnts

ColumnNameTypeconstraintDescription
tracker_idDetected Target IDString
cls_idDetected Target Typeint
bboxTarget Detection BoxBBox
posTarget Latitude/LongitudeGlobalPos
picFirst Frame Image PathString(This may change as the base station and UAV currently cannot capture screenshots)
timestamp

BBox

ColumnNameTypeconstraintDescription
xTarget X CoordinatefloatProportion of the screen
yTarget Y CoordinatefloatProportion of the screen
wTarget WidthfloatProportion of the screen
hTarget HeightfloatProportion of the screen

CameraBean

ColumnNameTypeconstraintDescription
rollGimbal Roll Anglefloat
pitchGimbal Pitch Anglefloat
yawGimbal Yaw Angle (Horizontal)float
longitudeUAV Longitudefloat
latitudeUAV Latitudefloat
heightUAV Relative Heightfloat
fovField of View (FOV)flaot[]
resolutionOriginal Image Resolution`int[]
focal_typeFocal TypeString

GlobalPos

ColumnNameTypeconstraintDescription
latitudeLatitudefloat
longitudeLongitudefloat
altitudeAltitudefloat

Target Types

Target Type IDTarget Name
0Background(Not supported yet)
1Animal(Not supported yet)
2Boat
3Car
4Pedestrian
5Cyclist
6Large Vehicle
34Drone
35Smoke
36Fire
99No Target Detected

Event

AI Detection Shooting Result Reporting

Topic: thing/product/{gateway_sn}/events

Direction: up

Method: AI_detect_shoot_notify

Data:

ColumnNameTypeconstraintDescription
FileFiletext
pathBusiness path of the filetext
extFile extension contentstruct
»flight_idTask IDtext
»waypoint_idWaypoint IDtext
»drone_model_keyDrone product enumeration valuetext
»payload_model_keyPayload product enumeration valuetextt
»is_originalIs it the original imagebool:"No", "1":"Yes"
metadataMedia metadatastruct
»gimbal_yaw_degreeGimbal yaw anglefloat
»absolute_altitudeAbsolute shooting heightfloat
»relative_altitudeRelative shooting heightfloat
»create_timeMedia shooting timedate"format":"iso8601"
»shoot_positionShooting positionstruct
»»latShooting position latitudefloat
»»lngShooting position longitudefloat
obj_numNumber of detected targets in a frameint
ObjInfoDetected target arraystruct
»tracker_idDetected target IDString
»cls_idDetected target typeint
»timestamp
»object_positionTarget latitude and longitude
»»object_latLatitude
»»object_lngLongitude
»»object_altitudeAltitudefloat
»bboxTarget detection box
»»xTarget X coordinate on screenfloat
»»yTarget Y coordinate on screenfloat
»»wTarget width on screenfloat
»»hTarget height on screenfloat