Target Recognition
Service
Enable Target Recognition
Topic: thing/product/{gateway_sn}/services
Direction: down
Method: target_detect_open
Data:
Column | Name | Type | constraint | Description |
---|---|---|---|---|
ai_lens_type | Detection lens | int | 0: Visible light, 1: Infrared, 2: Night vision (currently unsupported) | |
scene_type | Current recognition scene | int | 0: General | Default value is 0 |
target_type_list | List of selected detection types by the user; an empty list indicates recognition of all supported detection types in the current scene | list<int> | See definition of "Target recognition types" below | NULL is acceptable |
Example**:**
Topic: thing/product/{gateway_sn}/services_reply
Direction: up
Method: target_detect_open
Column | Name | Type | constraint | Description |
---|---|---|---|---|
result | Is AI recognition enabled | int | 0: 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
Column | Name | Type | constraint | Description |
---|---|---|---|---|
result | Disable AI recognition operation result | int | 0: 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:
Column | Name | Type | constraint | Description |
---|---|---|---|---|
locked | Whether the relative position of the nose and gimbal is locked | bool | false: only the gimbal turns, the body does not turn; true: locks the nose, the gimbal and body turn together | |
start_x | Starting point x-coordinate | double | ||
start_y | Starting point y-coordinate | double | ||
width | Width of the target point | double | ||
height | Height of the target point | double | ||
tracker_id | Detection target 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
},
"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 | Return code | int | Non-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
Column | Name | Type | constraint | Description |
---|---|---|---|---|
result | Result of closing AI recognition operation | int | 0 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:
Column | Name | Type | constraint | Description |
---|---|---|---|---|
time | Timestamp | long | ||
uav_id | UAV ID | String | ||
camera_id | Camera ID | int | 0: visible light, 1: infrared | |
global_pos | UAV Latitude/Longitude | GlobalPos | ||
camera | Camera Parameters | CameraBean | ||
obj_cnt | Detected Target Count | int | ||
objs | Detected Contents | List<ObjCnts> |
ObjCnts
Column | Name | Type | constraint | Description | |
---|---|---|---|---|---|
tracker_id | Detected Target ID | String | |||
cls_id | Detected Target Type | int | |||
bbox | Target Detection Box | BBox | |||
pos | Target Latitude/Longitude | GlobalPos | |||
pic | First Frame Image Path | String | (This may change as the base station and UAV currently cannot capture screenshots) | ||
timestamp |
BBox
Column | Name | Type | constraint | Description |
---|---|---|---|---|
x | Target X Coordinate | float | Proportion of the screen | |
y | Target Y Coordinate | float | Proportion of the screen | |
w | Target Width | float | Proportion of the screen | |
h | Target Height | float | Proportion of the screen |
CameraBean
Column | Name | Type | constraint | Description |
---|---|---|---|---|
roll | Gimbal Roll Angle | float | ||
pitch | Gimbal Pitch Angle | float | ||
yaw | Gimbal Yaw Angle (Horizontal) | float | ||
longitude | UAV Longitude | float | ||
latitude | UAV Latitude | float | ||
height | UAV Relative Height | float | ||
fov | Field of View (FOV) | flaot[] | ||
resolution | Original Image Resolution | `int[] | ||
focal_type | Focal Type | String |
GlobalPos
Column | Name | Type | constraint | Description |
---|---|---|---|---|
latitude | Latitude | float | ||
longitude | Longitude | float | ||
altitude | Altitude | float |
Target Types
Target Type ID | Target Name |
---|---|
0 | Background(Not supported yet) |
1 | Animal(Not supported yet) |
2 | Boat |
3 | Car |
4 | Pedestrian |
5 | Cyclist |
6 | Large Vehicle |
34 | Drone |
35 | Smoke |
36 | Fire |
99 | No Target Detected |
Event
AI Detection Shooting Result Reporting
Topic: thing/product/{gateway_sn}/events
Direction: up
Method: AI_detect_shoot_notify
Data:
Column | Name | Type | constraint | Description |
---|---|---|---|---|
File | File | text | ||
path | Business path of the file | text | ||
ext | File extension content | struct | ||
»flight_id | Task ID | text | ||
»waypoint_id | Waypoint ID | text | ||
»drone_model_key | Drone product enumeration value | text | ||
»payload_model_key | Payload product enumeration value | textt | ||
»is_original | Is it the original image | bool | :"No", "1":"Yes" | |
metadata | Media metadata | struct | ||
»gimbal_yaw_degree | Gimbal yaw angle | float | ||
»absolute_altitude | Absolute shooting height | float | ||
»relative_altitude | Relative shooting height | float | ||
»create_time | Media shooting time | date | "format":"iso8601" | |
»shoot_position | Shooting position | struct | ||
»»lat | Shooting position latitude | float | ||
»»lng | Shooting position longitude | float | ||
obj_num | Number of detected targets in a frame | int | ||
ObjInfo | Detected target array | struct | ||
»tracker_id | Detected target ID | String | ||
»cls_id | Detected target type | int | ||
»timestamp | ||||
»object_position | Target latitude and longitude | |||
»»object_lat | Latitude | |||
»»object_lng | Longitude | |||
»»object_altitude | Altitude | float | ||
»bbox | Target detection box | |||
»»x | Target X coordinate on screen | float | ||
»»y | Target Y coordinate on screen | float | ||
»»w | Target width on screen | float | ||
»»h | Target height on screen | float |