UAV control method, device and UAV
A control method includes obtaining an image captured by a photographing device, determining a location of a target part of a target object in the image, controlling, based on at least the location of the target part, an unmanned aerial vehicle (UAV) to fly to an expected altitude with a non-zero horizontal distance with the target part of the target object, and in response to a detected landing command, controlling the UAV to initiate a landing process. The expected altitude is an altitude at which the target part is located.
1 . A control method comprising:
obtaining an image captured by a photographing device;
determining a location of a target part of a target object in the image;
controlling, based on at least the location of the target part, an unmanned aerial vehicle (UAV) to fly to an expected altitude with a non-zero horizontal distance with the target part of the target object, the expected altitude being an altitude at which the target part is located; and
in response to a detected landing command, controlling the UAV to initiate a landing process.
2 . The control method according to claim 1 , further comprising:
determining location information of a hand of the target object based on a location of the hand in the image;
wherein controlling the UAV to initiate the landing process includes controlling the UAV to land based on the location information of the hand of the target object.
3 . The control method according to claim 2 , wherein determining the location information of the hand of the target object includes:
determining an orientation of the hand relative to the UAV based on the location of the hand in the image and an attitude of a gimbal that carries the photographing device; and
determining the location information of the hand of the target object based on the orientation, a horizontal distance between the target object and the UAV, and location information of the UAV.
4 . The control method according to claim 1 , wherein controlling, based on at least the location of the target part, the UAV to fly to the expected altitude includes:
determining an angle of the target part with respect to the UAV in a pitch direction based on the location of the target part of the target object and location information of the UAV; and
controlling the UAV to fly to the expected altitude based on the angle.
5 . The control method according to claim 4 , wherein determining the angle of the target part with respect to the UAV in the pitch direction based on the location of the target part of the target object and the location information of the UAV includes:
in response to a state parameter of the target object satisfying a first preset requirement, determining the angle of the target part with respect to the UAV in the pitch direction based on the location of the target part of the target object and the location information of the UAV.
6 . The control method according to claim 5 , wherein the state parameter of the target object satisfying the first preset requirement includes:
a size ratio of the target object in the image being greater than or equal to a preset first ratio threshold; and
a distance between the target object and the UAV being less than or equal to a preset first distance.
7 . The control method according to claim 1 , wherein controlling, based on at least the location of the target part, the UAV to fly to the expected altitude includes:
determining an angle of the target part with respect to a preset part of the target object in a pitch direction based on location information of the preset part of the target object and the location of the target part; and
controlling the UAV to fly to the expected altitude based on the angle.
8 . The control method according to claim 7 , wherein determining the angle of the target part with respect to the preset part in the pitch direction based on the location information of the preset part of the target object and the location of the target part includes:
in response to a state parameter of the target object satisfying a second preset requirement, determining the angle of the target part with respect to a feature part in the pitch direction based on the location information of the preset part of the target object and the location of the target part.
9 . The control method according to claim 7 , wherein the location information of the preset part is determined based on location information of the target object.
10 . The control method according to claim 1 , further comprising:
controlling the UAV to fly away from or toward the target object based on a location of a hand of the target object.
11 . The control method according to claim 1 , further comprising:
determining location information of the target object based on a location of the target object in the image, an attitude of a gimbal that carries the photographing device, a horizontal distance between the target object and the UAV, and location information of the UAV.
12 . The control method according to claim 1 , further comprising:
determining an angle of a hand of the target object with respect to the target object in a yaw direction based on a location of the hand and a location of the target object;
determining an expected angle of the UAV relative to the target object in the yaw direction based on the angle; and
controlling the UAV to fly around the target object at a fixed distance to the target object according to the expected angle.
13 . The control method according to claim 1 , wherein controlling the UAV to initiate the landing process includes:
controlling the UAV to fly in an altitude direction based on the location of the target part of the target object.
14 . The control method according to claim 1 , wherein in response to the detected landing command, controlling the UAV to initiate the landing process includes:
detecting a gesture of a hand of the target object; and
in response to detecting that a gesture of the hand is a palm-extending gesture, controlling the UAV to initiate the landing process, including:
in response to detecting that the gesture of the hand is the palm-extending gesture and a flatness of a landing surface below the UAV being greater than or equal to a preset flatness threshold, controlling the UAV to land based on the location of the target part of the target object;
in response to detecting that the gesture of the hand is the palm-extending gesture and a flying speed of the UAV being less than or equal to a preset speed threshold, controlling the UAV to land based on the location of the target part of the target object; or
in response to detecting that the gesture of the hand is the palm-extending gesture and an altitude of the hand of the target object being lower than an altitude of a head of the target object, controlling the UAV to land based on the location of the target part of the target object.
15 . The control method according to claim 14 , further comprising:
in response to detecting that the gesture of the hand is the palm-extending gesture and the flatness of the landing surface below the UAV being less than the preset flatness threshold, controlling the UAV to cease descending;
in response to detecting that the gesture of the hand is the palm-extending gesture and the flying speed of the UAV being greater than the preset speed threshold, controlling the UAV to cease descending; or
in response to detecting that the gesture of the hand is the palm-extending gesture and the altitude of the hand of the target object being not lower than the altitude of the head of the target object, controlling the UAV to cease descending.
16 . The control method according to claim 1 , further comprising:
in response to the target object being identified and the hand of the target object not being identified, controlling the UAV to track the target object to cause the target object to be maintained in images captured by the photographing device.
17 . The control method according to claim 1 , wherein the target part is a hand of the target object.
18 . The control method according to claim 1 , further comprising:
in response to a distance between the UAV and the target object being greater than or equal to a maximum distance, controlling the UAV to stop flying away the target object; or
in response to the distance between the UAV and the target object being less than a minimum distance, controlling the UAV to stop flying toward the target object.
19 . A control device for an unmanned aerial vehicle (UAV), comprising:
a memory storing program code, and
a processor configured to execute the program code, when executed, the program code instructing the processor to:
obtain an image captured by a photographing device;
determine a location of a target part of a target object in the image;
control, based on at least the location of the target part, the UAV to fly to an expected altitude with a non-zero horizontal distance with the target part, the expected altitude being an altitude at which the target part is located; and
in response to a detected landing command, control the UAV to initiate a landing process.
20 . An unmanned aerial vehicle (UAV) comprising:
a memory storing program code, and
a processor configured to execute the program code, when executed, the program code instructing the processor to:
obtain an image captured by a photographing device;
determine a location of a target part of a target object in the image;
control, based on at least the location of the target part, the UAV to fly to an expected altitude with a non-zero horizontal distance with the target part, the expected altitude being an altitude at which the target part is located; and
in response to a detected landing command, control the UAV to initiate a landing process.