CN110622091A - Cloud deck control method, device and system, computer storage medium and unmanned aerial vehicle - Google Patents

Cloud deck control method, device and system, computer storage medium and unmanned aerial vehicle Download PDF

Info

Publication number
CN110622091A
CN110622091A CN201880031880.5A CN201880031880A CN110622091A CN 110622091 A CN110622091 A CN 110622091A CN 201880031880 A CN201880031880 A CN 201880031880A CN 110622091 A CN110622091 A CN 110622091A
Authority
CN
China
Prior art keywords
angle
coordinate system
rotation
axis
attitude
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201880031880.5A
Other languages
Chinese (zh)
Inventor
王映知
刘帅
王文军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SZ DJI Technology Co Ltd
Original Assignee
SZ DJI Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SZ DJI Technology Co Ltd filed Critical SZ DJI Technology Co Ltd
Publication of CN110622091A publication Critical patent/CN110622091A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D3/00Control of position or direction
    • G05D3/12Control of position or direction using feedback

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Studio Devices (AREA)

Abstract

A control method, a device and a system of a cloud deck, a computer storage medium and an unmanned aerial vehicle are provided, and the method comprises the following steps: determining a stability augmentation angle corresponding to the rotation of the stability augmentation shaft of the holder relative to the world coordinate system in a preset body coordinate system (S1); acquiring a first attitude compensation angle and a second attitude compensation angle generated by the rotation of the pan-tilt relative to the world coordinate system in a preset body coordinate system (S2); and controlling the pan-tilt according to the first attitude compensation angle, the second attitude compensation angle and the stability augmentation angle so that the image tracked and shot by the pan-tilt is positioned in the picture (S3). The first attitude compensation angle and the second attitude compensation angle generated by the rotation of the cradle head in the body coordinate system relative to the world coordinate system are obtained by determining the stability augmentation angle, and the cradle head is controlled by the first attitude compensation angle, the second attitude compensation angle and the stability augmentation angle, so that the image tracked and shot by the cradle head can be effectively ensured to be positioned in the picture, the output effect of the picture is improved, and the observation by a user is facilitated.

Description

Cloud deck control method, device and system, computer storage medium and unmanned aerial vehicle Technical Field
The invention relates to the technical field of unmanned aerial vehicles, in particular to a control method, a control device and a control system for a holder, a computer storage medium and an unmanned aerial vehicle.
Background
At present, unmanned aerial vehicles are applied to the fields of aerial photography, agriculture, plant protection, miniature self-timer, express transportation, disaster relief, wild animal observation, infectious disease monitoring, surveying and mapping, news reporting, power inspection, disaster relief, film and television shooting, romantic manufacturing and the like, and mainly utilize the shooting and tracking functions of the unmanned aerial vehicles. The existing unmanned aerial vehicle tracking implementation modes can be divided into two types: one is speed tracking, that is, a real-time calculation tracking mode according to the coordinates of the target on the screen, which can generally track the target because of the closed loop, so that the target is in the center of the screen; the other is angle tracking, that is, the angle of the pan-tilt that needs to be moved is calculated according to the coordinates of the target on the picture when the tracking is started, and the pan-tilt moves in place once.
For a variable-focus tripod head, the purpose of pointing and zooming is to zoom and amplify a target object in a picture at the same time, if a speed tracking mode is adopted, the image variation of the target in the zooming and amplifying process is large, great difficulty is brought to image identification, and the requirement of using scenes is not met, so that an angle tracking mode is adopted for pointing and zooming, and the tripod head moves in place once, so that the experience is good.
When the unmanned aerial vehicle is used for operations such as aerial photography, agriculture, plant protection, express transportation and the like, the cloud deck can be installed below the fuselage, at the moment, a shooting device on the cloud deck is also located below the fuselage, in order to prevent the fuselage and blades from being seen and limited by mechanical limit during shooting, the upward lifting angle of a pitch axis (pitch axis) of the cloud deck is limited, so that the basic visual field is that a target is in front of the whole airplane, and at the moment, for the cloud deck, the direction of a world coordinate system is not greatly different from a body coordinate system; however, when the world coordinate system is far from the body coordinate system, for example: when the unmanned aerial vehicle is used for surveying and mapping operations (for example, bridge opening crack detection and the like), the pan-tilt can be installed above the machine body, at the moment, a shooting device on the pan-tilt is also located above the machine body, at the moment, as shown in fig. 1, the difference between a world coordinate system XYZ and a body coordinate system X ' Y ' Z ' is large, a pitch axis of the pan-tilt can at least reach 90 degrees (pitch angle) upwards, at the moment, if the pan-tilt angle calculated in the body coordinate system is continuously used for controlling the pan-tilt located in the world coordinate system, the pan-tilt can move to an incorrect position, so that the accuracy degree of pan-tilt control is reduced, even a tracked target is not in a picture, and the output effect of the picture is influenced.
Disclosure of Invention
The invention provides a control method, a device and a system of a cloud deck, a computer storage medium and an unmanned aerial vehicle, aiming at the problems that in the prior art, when the difference between a world coordinate system and a body coordinate system is large, the accuracy degree of cloud deck control is low, even a tracked target is not in a picture, and the output effect of the picture is influenced.
The first aspect of the present invention is to provide a control method for a pan/tilt head, including:
determining a stability augmentation angle corresponding to the rotation of a stability augmentation shaft of the holder relative to a world coordinate system in a preset body coordinate system;
acquiring a first attitude compensation angle and a second attitude compensation angle generated by the rotation of the holder in the body coordinate system relative to the world coordinate system;
and controlling the cradle head according to the first attitude compensation angle, the second attitude compensation angle and the stability augmentation angle so as to enable the image tracked and shot by the cradle head to be positioned in the picture.
A second aspect of the present invention is to provide a control apparatus for a pan/tilt head, including:
a memory for storing a computer program;
a processor for executing the computer program stored in the memory to implement: determining a stability augmentation angle corresponding to the rotation of a stability augmentation shaft of the holder relative to a world coordinate system in a preset body coordinate system; acquiring a first attitude compensation angle and a second attitude compensation angle generated by the rotation of the holder in the body coordinate system relative to the world coordinate system; and controlling the cradle head according to the first attitude compensation angle, the second attitude compensation angle and the stability augmentation angle so as to enable the image tracked and shot by the cradle head to be positioned in the picture.
A third aspect of the present invention is to provide a control system for a pan/tilt head, comprising: one or more processors, operating alone or in cooperation, to:
determining a stability augmentation angle corresponding to the rotation of a stability augmentation shaft of the holder relative to a world coordinate system in a preset body coordinate system;
acquiring a first attitude compensation angle and a second attitude compensation angle generated by the rotation of the holder in the body coordinate system relative to the world coordinate system;
and controlling the cradle head according to the first attitude compensation angle, the second attitude compensation angle and the stability augmentation angle so as to enable the image tracked and shot by the cradle head to be positioned at the central position of the picture.
A fourth aspect of the present invention is to provide a computer storage medium having stored therein program instructions for implementing:
determining a stability augmentation angle corresponding to the rotation of a stability augmentation shaft of the holder relative to a world coordinate system in a preset body coordinate system;
acquiring a first attitude compensation angle and a second attitude compensation angle generated by the rotation of the holder in the body coordinate system relative to the world coordinate system;
and carrying out zooming control on the holder according to the first attitude compensation angle, the second attitude compensation angle and the stability augmentation angle so as to enable the image tracked and shot by the holder to be positioned in the picture.
A fifth aspect of the present invention is to provide an unmanned aerial vehicle, including:
a frame;
the holder is arranged on the rack;
a controller in communication with the pan/tilt head for: determining a stability augmentation angle corresponding to the rotation of a stability augmentation shaft of the holder relative to a world coordinate system in a preset body coordinate system; acquiring a first attitude compensation angle and a second attitude compensation angle generated by the rotation of the holder in the body coordinate system relative to the world coordinate system; and carrying out zooming control on the cradle head according to the first attitude compensation angle, the second attitude compensation angle and the stability augmentation angle so as to enable the image tracked and shot by the cradle head to be positioned in a picture.
According to the control method, the device, the system, the computer storage medium and the unmanned aerial vehicle of the cloud deck provided by the invention, the stability augmentation angle corresponding to the rotation of the stability augmentation shaft of the cloud deck relative to the world coordinate system in the preset body coordinate system is determined, the first attitude compensation angle and the second attitude compensation angle generated by the rotation of the cloud deck relative to the world coordinate system in the body coordinate system are obtained, and the cloud deck is controlled through the first attitude compensation angle, the second attitude compensation angle and the stability augmentation angle, so that the image tracked and shot by the cloud deck can be effectively ensured to be positioned in the picture, the output effect of the picture is improved, the observation and the processing of a user are facilitated, the practicability of the method is ensured, and the popularization and the application of the market are facilitated.
Drawings
FIG. 1 is a schematic coordinate diagram of a world coordinate system and a body coordinate system according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a control method of a pan/tilt head according to an embodiment of the present invention;
fig. 3 is a schematic flowchart of a process for acquiring a first attitude compensation angle and a second attitude compensation angle generated by the rotation of the pan/tilt head in the body coordinate system with respect to the world coordinate system according to the embodiment of the present invention;
fig. 4 is a schematic flow chart illustrating a process of obtaining a final quaternion corresponding to a pan-tilt attitude angle after the pan-tilt rotates in the body coordinate system according to an embodiment of the present invention;
FIG. 5 is a diagram of a frame coordinate system according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of an x-axis projection based on a frame coordinate system according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of a y-axis projection based on a frame coordinate system according to an embodiment of the present invention;
FIG. 8 is a schematic diagram illustrating vector information of an X-axis in the world coordinate system according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of a control device of a pan/tilt head according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the present invention, the terms "mounted," "connected," "fixed," and the like are used in a broad sense, and for example, "connected" may be a fixed connection, a detachable connection, or an integral connection. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
It should be noted that, in the description of the present invention, the terms "first" and "second" are only used for convenience in describing different components, and are not to be construed as indicating or implying a sequential relationship, relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
Some embodiments of the invention are described in detail below with reference to the accompanying drawings. The features of the embodiments and examples described below may be combined with each other without conflict between the embodiments.
Fig. 2 is a schematic flow chart of a control method of a pan/tilt head according to an embodiment of the present invention, and referring to fig. 2, the embodiment provides a control method of a pan/tilt head, which is used for controlling a pan/tilt head (including normal control and zoom control) so that an image tracked and shot by the pan/tilt head is located in a display, and preferably, the image tracked and shot by the pan/tilt head is located at a central position of the display. The execution main body of the method can be a control device of the holder, and specifically, the control method comprises the following steps:
s1: determining a stability augmentation angle corresponding to the rotation of a stability augmentation shaft of the holder relative to a world coordinate system in a preset body coordinate system;
for the pan-tilt, the stability augmentation shaft may be any one of a roll stability augmentation shaft (X-axis), a pitch stability augmentation shaft (Y-axis) or a yaw stability augmentation shaft (Z-axis) of the pan-tilt, and correspondingly, the stability augmentation angle corresponding to the stability augmentation shaft may be any one of a roll angle, a pitch angle and a yaw angle; specifically, in this embodiment, the body coordinate system is defined as: the lens of a shooting device (comprising a camera, an intelligent terminal with a shooting function and the like) on the tripod head faces forwards to form an X axis, the lens faces rightwards to form a Y axis, and the lens faces downwards to form a Z axis.
Further, in order to ensure the stability of the stability increasing shaft on which the stability increasing angle is generated by the holder, the stability increasing angle is preferably 0 degree; for example, when the stability augmentation angle is a pitch angle, at this time, when the pan-tilt rotates in the world coordinate system and the body coordinate system, the rotation angle around the Y axis is 0 °, and the stability augmentation effect of the pan-tilt on the pitch axis can be effectively ensured; similarly, when the stability augmentation angle is a yaw angle, at this time, when the cradle head rotates in the world coordinate system and the body coordinate system, the rotation angle around the Z axis is 0, and the stability augmentation effect of the cradle head on the yaw axis can be effectively ensured; when the stability augmentation angle is a roll angle, at the moment, when the tripod head rotates in a world coordinate system and a body coordinate system, the rotation angle around the X axis is 0, and the stability augmentation effect of the tripod head on the roll axis can be effectively ensured.
For example: assuming that the world coordinate system and the X axis in the body coordinate system are not coincident, at this time, when the pan-tilt rotates under the body coordinate system, because the X axes in the world coordinate system and the body coordinate system are not coincident and have a difference, the rotation angle around the body coordinate system can enable a roll angle in Euler angles of the pan-tilt to have a value; at this time, if the pan/tilt head is continuously controlled to move to the designated position according to the angle obtained in the body coordinate system, the image shot by the pan/tilt head is still in the center of the picture, however, the roll axis of the pan/tilt head is inclined, so that the stability of the pan/tilt head is reduced, and therefore, in order to ensure the stability of the pan/tilt head, the stability increasing angle corresponding to the roll axis can be set to 0 ° in other words, in order to ensure the condition that the roll axis is not askew.
S2: acquiring a first attitude compensation angle and a second attitude compensation angle generated by the rotation of the holder in a body coordinate system relative to a world coordinate system;
for the pan-tilt, when the pan-tilt rotates in the body coordinate system and the world coordinate system, because the body coordinate system and the world coordinate system do not coincide, the image tracked and shot by the pan-tilt is easily not at the central position of the picture, at this time, in order to ensure the display effect of the image tracked and shot by the pan-tilt, a specific difference between the body coordinate system and the world coordinate system needs to be obtained, and a corresponding compensation angle is determined based on the difference, that is, a first attitude compensation angle and a second attitude compensation angle are obtained.
The first attitude compensation angle and the second attitude compensation angle are any combination of the other two angles except for the stability augmentation angle in the pitch angle, the yaw angle and the roll angle; namely: when the stability augmentation angle is a pitch angle, the first attitude compensation angle may be a yaw angle or a roll angle, and specifically, when the first attitude compensation angle is a yaw angle, the second attitude compensation angle is a roll angle; alternatively, where the first attitude compensation angle is roll angle, the second attitude compensation angle is yaw angle, and so on.
S3: and controlling the cradle head according to the first attitude compensation angle, the second attitude compensation angle and the stability augmentation angle so as to enable the image tracked and shot by the cradle head to be positioned in the picture.
The stability augmentation angle corresponding to the stability augmentation shaft in the holder is 0 degrees, so when the holder rotates in the body coordinate system, because the difference exists between the body coordinate system and the world coordinate system, if the holder is continuously controlled to move according to the world Euler angle obtained by analyzing in the body coordinate system, an image tracked and shot by the holder is easily not in the central position of a picture, and even the image tracked and shot by the holder is not in the picture, so that the observation of a user is inconvenient; in this case, the rotation of the pan/tilt head in the body coordinate system may deviate from the world coordinate system, and the first attitude compensation angle and the second attitude compensation angle may be determined from the deviation, so that the pan/tilt head may be controlled to compensate for the deviation of the image from the center position due to the deviation.
Wherein, when utilizing first attitude compensation angle, second attitude compensation angle and increasing steady angle to control the cloud platform, including two kinds of situations: in the first situation, the common control of the pan-tilt is that in the process of pan-tilt tracking shooting, in which an image tracked and shot by the pan-tilt deviates from a picture, the pan-tilt can be adjusted and controlled by using the first attitude compensation angle, the second attitude compensation angle and the stability augmentation angle, so that the image tracked and shot by the pan-tilt is located in the picture, and preferably, the image tracked and shot by the pan-tilt is located at the central position of a display picture; and in the zooming process, the first attitude compensation angle, the second attitude compensation angle and the stability enhancement angle can be utilized to carry out zooming control on the cradle head so that the image which is tracked and shot by the cradle head and is subjected to zooming processing is positioned in the picture, and preferably, the image which is tracked and shot by the cradle head is positioned in the central position of the display picture.
According to the control method of the cradle head provided by the embodiment, the stability increasing angle corresponding to the rotation of the stability increasing shaft of the cradle head in the preset body coordinate system relative to the world coordinate system is determined, the first attitude compensation angle and the second attitude compensation angle generated by the rotation of the cradle head in the body coordinate system relative to the world coordinate system are obtained, and the cradle head is controlled through the first attitude compensation angle, the second attitude compensation angle and the stability increasing angle, so that the image tracked and shot by the cradle head can be effectively ensured to be positioned in the picture, the output effect of the picture is improved, the observation and the processing of a user are facilitated, the practicability of the method is ensured, and the popularization and the application of the market are facilitated.
Fig. 3 is a schematic flow chart illustrating a process of acquiring a first attitude compensation angle and a second attitude compensation angle generated by a pan/tilt head rotating relative to a world coordinate system in a preset body coordinate system according to an embodiment of the present invention; fig. 4 is a schematic flowchart of a process of obtaining a final quaternion corresponding to a pan-tilt attitude angle after a pan-tilt rotates in a body coordinate system according to an embodiment of the present invention; on the basis of the foregoing embodiments, as can be seen by referring to fig. 2 to 4, the specific types of the stability augmentation angle, the first attitude compensation angle and the second attitude compensation angle are not limited in this embodiment, and those skilled in the art may set the stability augmentation angle, the first attitude compensation angle and the second attitude compensation angle according to different pan/tilt head structures, for example, the stability augmentation angle may be a pitch angle, the first attitude compensation angle is a yaw angle, and the second attitude compensation angle is a roll angle; or the stability augmentation angle can be a yaw angle, the first attitude compensation angle is a roll angle, and the second attitude compensation angle is a pitch angle; still alternatively, the stability augmentation angle may be a roll angle, the first attitude compensation angle may be a yaw angle, the second attitude compensation angle may be a pitch angle, and so on.
As to the specific obtaining manner of the first attitude compensation angle and the second attitude compensation angle, no matter what the specific type combination of the two compensation angles is, the specific obtaining manner is similar, in this embodiment, the first attitude compensation angle is taken as a yaw angle, the second attitude compensation angle is taken as a pitch angle as an example, at this time, the stability enhancement angle is a roll angle, and the applicable holder type is a cradle head with a ZXY structure; specifically, acquiring a first attitude compensation angle and a second attitude compensation angle generated by the rotation of the pan-tilt relative to the world coordinate system in a preset body coordinate system includes:
s21: acquiring a final quaternion corresponding to a holder attitude angle after the holder rotates in a body coordinate system;
specifically, obtaining a final quaternion corresponding to the pan-tilt attitude angle after the pan-tilt rotates in the body coordinate system may include:
s211: acquiring an initial attitude angle of a holder and a rotation angle of the holder after the holder rotates in a body coordinate system;
the present embodiment is not limited to a specific type of the rotation angle, and those skilled in the art can set the rotation angle according to specific design requirements, wherein one achievable way is: the rotation angle comprises a Y-axis rotation angle after the cradle head rotates around a Y axis in the body coordinate system; at this time, acquiring the rotation angle after the pan/tilt head rotates in the body coordinate system may include:
acquiring Y-direction position information of an image tracked and shot by a holder in the Y-axis direction and a vertical field angle of a shooting device on the holder; and determining the rotation angle of the Y axis according to the Y-direction position information and the vertical field angle.
Specifically, the determining the Y-axis rotation angle from the Y-direction position information and the vertical field angle may include:
determining a Y-axis rotation angle according to the Y-direction position information and the vertical field angle by using the following formula;
Body_Y_angle=arctan(2*(y-0.5)*tan(fov_v/2));
where Body _ Y _ angle is the Y-axis rotation angle, Y is the Y-direction position information, and fov _ v is the vertical angle of view.
Another way that can be achieved for the rotation angle is: the rotation angle comprises a Z-axis rotation angle after the cradle head rotates around a Z axis in the body coordinate system; at this time, acquiring the rotation angle after the pan/tilt head rotates in the body coordinate system may include:
acquiring X-direction position information of an image tracked and shot by a holder in the X-axis direction and a horizontal field angle of a shooting device on the holder; and determining the Z-axis rotation angle according to the X-direction position information and the horizontal field angle.
Specifically, the determining of the Z-axis rotation angle from the X-direction position information and the horizontal field angle may include:
determining a Z-axis rotation angle according to the X-direction position information and the horizontal field angle by using the following formula;
Body_Z_angle=arctan(2*(x-0.5)*tan(fov_h/2));
where Body _ Z _ angle is a Z-axis rotation angle, X is X-direction position information, and fov _ h is a horizontal angle of view.
S212: converting the rotation angle into a corresponding rotation quaternion;
after the rotation angle is acquired, the rotation angle can be converted into a corresponding rotation quaternion using the conversion relationship of the shaft angle and the quaternion in "3D math foundation". Wherein, the quaternion is a concept in 3D mathematics foundation, which is a representation method of orientation, further, any angular displacement in 3D mathematics foundation can be represented as a single rotation around a single axis, the form of the shaft angle is also a representation method of orientation, and the quaternion can also be interpreted as the shaft-angle pair mode of the angular displacement, so that the angular rotation around any axis can be represented as quaternion.
Specifically, the quaternion is defined as a number that passes through the origin [0,0 ]]The axis of rotation of (2) at points per unit length on the axis of rotation of [ w1, w2, w3]. The transformation of the rotation angle θ around this axis can be represented by a vector:also noted as q ═ q0, q1, q2, q3]Or q0+ q1 i + q2 j + q3 k, where the modulus length of the quaternion is 1. By the concept, the shaftThe angular representation can be converted to a representation of a quaternion by the above formula.
S213: and obtaining a final quaternion according to the initial attitude angle and the rotation quaternion.
Specifically, after the initial attitude angle and the rotation quaternion are obtained, the product of the initial attitude angle and the rotation quaternion may be determined as the final quaternion.
S22: acquiring vector information of an X axis in a body coordinate system after rotation in a world coordinate system according to the final quaternion;
specifically, after the final quaternion is obtained, vector information of the X axis in the body coordinate system after rotation in the world coordinate system may be obtained according to the final quaternion, specifically:
converting the final quaternion into a corresponding rotation matrix; and acquiring vector information of an X axis in a world coordinate system in the body coordinate system after rotation according to the rotation matrix.
The process of converting the final quaternion into the corresponding rotation matrix can be realized by referring to the conversion relation between the quaternion and the rotation matrix in 3D mathematical basis; after the rotation matrix is obtained, the rotation matrix may be analyzed, and specifically, vector information of an X axis in a world coordinate system in a body coordinate system after rotation may be obtained according to the rotation matrix, where the vector information includes:
and acquiring vector information of an X axis in the body coordinate system after rotation in a world coordinate system according to the rotation matrix and by using the following formula:
O′X′=dcm(cameraafter)×[1;0;0];
wherein O 'X' is vector information of X axis in the body coordinate system after rotation in the world coordinate system, dcm (camera)after) Is a rotation matrix.
S23: and determining a first attitude compensation angle and a second attitude compensation angle according to the vector information.
Wherein, as shown in fig. 8, determining the first attitude compensation angle according to the vector information may include:
determining a first attitude compensation angle from the vector information and using the following equation:
yaw=arctan(y_x′/x_x′);
where yaw is the first attitude compensation angle, y _ x 'is the second component of the vector information, and x _ x' is the first component of the vector information.
And determining the second attitude compensation angle from the vector information may include:
determining a second attitude compensation angle according to the vector information and by using the following formula:
pitch=arcsin(z_x′);
where pitch is the second attitude compensation angle and z _ x' is the third component in the vector information.
The first attitude compensation angle and the second attitude compensation angle are obtained through the process, and the accuracy and the reliability of the determination of the first attitude compensation angle and the second attitude compensation angle are effectively guaranteed, so that the control accuracy of the cradle head is improved, and the stability of the image which is tracked and shot by the cradle head and is located at the central position of the picture is further guaranteed.
In a specific application, a ZXY-type pan/tilt head structure is taken as an example for explanation, and a camera is assumed as a shooting device on the pan/tilt head, at this time, before the pan/tilt head is controlled, a field angle, a focal length and coordinates of an object on a screen of the camera are firstly acquired, and according to the field angle, the focal length and the coordinates of the object on the screen of the camera, how many degrees the pan/tilt head needs to rotate around a body coordinate system (body coordinate system) when the camera needs to be aligned with the object is calculated.
As shown in fig. 5, the upper left corner of the setting screen is the origin of coordinates (0,0), and it is known that: the pixel position of a target object which is tracked and shot by a camera and normalized in a picture on an application program (app) is (x, y), the effective value of a display picture is 0.00-1.00, and the purpose of pan-tilt tracking shooting is to place the target object in the center of the picture, so that the position of the target point is (0.5 ), and the focal length of the camera is focal _ length, the vertical field angle is fov _ v, and the horizontal field angle is fov _ h can be obtained in advance; and calculating the angle of the cradle head required to rotate around the body coordinate system according to the parameters.
First, considering the angle in the horizontal direction of the screen, as shown in fig. 6, a and B correspond to the projection point of the screen in the horizontal direction, where the coordinate x of the point a in the screen coordinate system is 0, the coordinate x of the point B in the screen coordinate system is 1, the coordinate x of the point D in the center position is 0.5, the point E in the projection position of the target object, and the coordinate x of the point ∠ ACB is fov — h (horizontal field angle), in this case, the projection position of the target object needs to be adjusted to the point D, and the projection position is also the angle that the target object needs to rotate, that is, the value of ∠ DCE;
the geometrical relationship is that in Rt △ DCB, tan ∠ DCB (fov _ h/2) is tan (DB/DC) is 0.5/DC, and DC is 1/2(tan (fov _ h/2));
in the Rt △ DCE, the content of the DCE,
tan ∠ DCE (DE/DC) (x-0.5)/(1/2(tan (fov _ h/2))) (2 (x-0.5) × tan (fov _ h/2)), and ∠ DCE (arctan (2 (x-0.5) × tan (fov _ h/2)).
Next, considering the angle in the vertical direction of the screen, as shown in fig. 7, P, Q correspond to the projection point of the screen in the vertical direction, y of the point P in the screen coordinate system is 0, y of the point Q in the screen coordinate system is 1, y of the point O in the center position coordinate is 0.5, and the point S is the projection position of the target object, and ∠ PRQ is fov — v (vertical field angle) assuming that y of the point S in the axis is y, at this time, the projection position of the target object needs to be adjusted to the point O, which is also the angle that the target object needs to rotate, i.e., the value of ∠ ORS, and similarly, the angle of rotation can be solved from the geometric relationship, i.e., ∠ ORS is arc (2 (y-0.5) tan (fov _ v/2)).
For the body coordinate system, the forward direction of the camera lens is the X axis, the right direction of the camera lens is the Y axis, the downward direction of the camera lens is the Z axis, the X axis in the display screen corresponds to the left and right of the lens, namely the Y axis of the body coordinate system, and the Y axis in the display screen corresponds to the up and down of the lens, namely the Z axis of the body coordinate system.
In conclusion: the angles of rotation around the body coordinate system are as follows: the rotation angle around the Z-axis in the body coordinate system is: body _ Z _ angle ═ arctan (2 × detax tmp 1); wherein, the pixel distance of the target image from the center of the picture on the x axis is as follows: detax ═ x-0.5; and tmp1 ═ tan (fov _ h/2).
The rotation angle around the Y axis in the body coordinate system is: body _ Y _ angle ═ arctan (2 × detail tmp1), where the pixel distance on the Y-axis of the target image from the center of the screen: detay-y-0.5; and tmp2 ═ tan (fov _ v/2).
The rotation around the body coordinate system can ensure the central position of the target image on the picture, but when the world coordinate system and the body coordinate system have a difference, the problem of roll axis skew is brought, and in fact, considering the sight line, the forward direction of the camera is defined as the X axis of the tripod head, and the problem of the target reaching the center of the picture can be converted into the problem of aligning the X axis of the tripod head body coordinate system with the target. Further, the vector representation of the X axis in the body coordinate system after rotation in the world coordinate system can be obtained by calculating the angle obtained by the rotation of the pan/tilt around the body coordinate system in the previous step and the measurement attitude at the beginning of the pan/tilt, specifically:
the initial attitude angle of the pan/tilt head (before tracking) can be denoted as q _ camera _ init by the euler angle, wherein the acquisition of the initial attitude angle can be obtained by a fused measurement of the inertial measurement unit IMU and the accelerometer.
Then, a rotation quaternion corresponding to the rotation angle is obtained, specifically, the obtained Body _ Z _ angle and Body _ Y _ angle are converted to obtain a corresponding rotation quaternion: q (Body _ Z _ angle), q (Body _ Y _ angle).
The final quaternion corresponding to the attitude angle of the rotating holder is as follows: q _ camera _ after ═ q _ camera _ init ═ q (Body _ Z _ angle) × (Body _ Y _ ang). After the rotation, the attitude angle of the pan/tilt head satisfies that the central axis of the camera faces the target image, but because the rotation around the central axis of the body coordinate system decomposes that there is a rotation component around the X axis of the body coordinate system on the world coordinate system, at this time, the target image still has a deviation condition in the picture, and the center of the target image on the picture can be understood as that the central point of the camera is projected forward to form a line on which the target image is located, that is, only the requirement of the orientation of the X axis of the body coordinate system (i.e., the camera coordinate system) of the pan/tilt head is satisfied, so that the target image can be ensured to be at the center of the picture. Therefore, it is necessary to further process the final quaternion, specifically, q _ camera _ after can be obtained according to the previous formula, and the final quaternion representation can be converted into a rotation matrix dcm (camera _ after) according to the formula (here, the rotation matrix is abbreviated by dcm).
The body coordinate system after rotation is denoted as O 'X' Y 'Z', and the vector representation of the O 'X' axis in the world coordinate system can be found: o' X ═ dcm (camera)after)×[1;0;0];
And defines: the coordinates of O ' X ' in the world coordinate system are [ X _ X ', y _ X ', z _ X ' ], and the vector representation is normalized, i.e., | O ' X ' | 1.
Wherein the euler angle defines: from the world coordinate system, it is rotated first by an angle yaw around the Z-axis, then by an angle roll around the X-axis, and then by an angle pitch around the Y-axis, so as to coincide with the object coordinate system (here, the rotation sequence of ZXY is used).
Definition of world coordinate system, expressed as xyz according to the north kinematic definition, it can be obtained that as shown in fig. 8, the projection of X ' in the OXY plane is point X ″, then the world coordinate system oyx is rotated ∠ XOX around the Z axis, then rotated 0 degree around the X axis, and finally rotated ∠ X ' OX ' angle around the Y axis, then OX of the rotated world coordinate system and OX ' of the object coordinate system coincide, ∠ XOX "is the angle of yaw of the euler angle that we need to solve, ∠ X" OX ' is the pitch angle of the euler angle that we need to solve, which can be solved by geometric knowledge:
∠XOX”=arctan(y_x′/x_x′);
∠X″OX’=arcsin(z_x′);
thus, we can determine that the first attitude compensation angle is arctan (y _ x '/x _ x '), the second attitude compensation angle is arcsin (z _ x '), where we define the first attitude compensation angle, the second attitude compensation angle and the stability augmentation angle as target euler angles, and in summary we can solve that the target euler angles of the head attitude satisfying the requirement are (arc (y _ x '/x _ x '.
The first attitude compensation angle and the second attitude compensation angle are obtained through the process, the cradle head is controlled through the obtained first attitude compensation angle, the second attitude compensation angle and the stability augmentation angle, the method is suitable for tracking shooting of any cradle head under the initial attitude, the target of the tracking shooting of the cradle head can be located at the central position of a picture, the stability augmentation effect of a roll shaft can also be guaranteed, the quality and the efficiency of the work of the cradle head are guaranteed, the practicability of the method is further improved, and the method is favorable for popularization and application of the market.
Fig. 9 is a schematic structural diagram of a control device of a pan/tilt head according to an embodiment of the present invention; referring to fig. 9, the present embodiment provides a control apparatus for a pan/tilt head, which can execute the above-mentioned control method for a pan/tilt head, and specifically, the apparatus includes:
a memory 1 for storing a computer program;
a processor 2 for executing the computer program stored in the memory to implement:
determining a stability augmentation angle corresponding to the rotation of a stability augmentation shaft of the holder relative to a world coordinate system in a preset body coordinate system; the stability augmentation angle can be any one of a pitch angle, a yaw angle and a roll angle, and preferably is 0 degree;
acquiring a first attitude compensation angle and a second attitude compensation angle generated by the rotation of a holder in a preset body coordinate system relative to a world coordinate system; the first attitude compensation angle and the second attitude compensation angle are any combination of the other two angles except for the stability augmentation angle in the pitch angle, the yaw angle and the roll angle;
and controlling the cradle head according to the first attitude compensation angle, the second attitude compensation angle and the stability augmentation angle so that the image tracked and shot by the cradle head is positioned in the picture, and preferably, the image tracked and shot by the cradle head is positioned in the central position of the display picture.
The specific implementation process and implementation effect of the operation steps implemented by the processor 2 in this embodiment are the same as those of the steps S1-S3 in the above embodiment, and reference may be made to the above statements specifically, which are not described herein again.
The control device of the pan-tilt provided by the embodiment determines the corresponding stability augmentation angle of the stability augmentation shaft of the pan-tilt to rotate relative to the world coordinate system in the preset body coordinate system through the processor 2, obtains the first attitude compensation angle and the second attitude compensation angle generated by the rotation of the pan-tilt relative to the world coordinate system in the body coordinate system, and controls the pan-tilt through the first attitude compensation angle, the second attitude compensation angle and the stability augmentation angle, so that the image tracked and shot by the pan-tilt is located in the picture, the output effect of the picture is improved, the observation and the processing of a user are facilitated, the practicability of the device is ensured, and the popularization and the application of the market are facilitated.
In this embodiment, the first attitude compensation angle is taken as a yaw angle, and the second attitude compensation angle is taken as a pitch angle as an example, at this time, when the processor 2 acquires the first attitude compensation angle and the second attitude compensation angle generated by the rotation of the pan-tilt in the preset body coordinate system with respect to the world coordinate system, the processor 2 is configured to execute the following steps:
acquiring a final quaternion corresponding to a holder attitude angle after the holder rotates in a body coordinate system; acquiring vector information of an X axis in a body coordinate system after rotation in a world coordinate system according to the final quaternion; and determining a first attitude compensation angle and a second attitude compensation angle according to the vector information.
When the processor 2 obtains the final quaternion corresponding to the pan-tilt attitude angle after the pan-tilt rotates in the body coordinate system, the processor 2 is specifically configured to execute the following steps:
acquiring an initial attitude angle of a holder and a rotation angle of the holder after the holder rotates in a body coordinate system; converting the rotation angle into a corresponding rotation quaternion; and obtaining a final quaternion according to the initial attitude angle and the rotation quaternion.
When the rotation angle comprises a Y-axis rotation angle after the cradle head rotates around the Y axis in the body coordinate system; the processor 2 is configured to: acquiring Y-direction position information of an image tracked and shot by a holder in the Y-axis direction and a vertical field angle of a shooting device on the holder; and determining the rotation angle of the Y axis according to the Y-direction position information and the vertical field angle.
Specifically, the processor 2 is configured to: determining a Y-axis rotation angle according to the Y-direction position information and the vertical field angle by using the following formula;
Body_Y_angle=arctan(2*(y-0.5)*tan(fov_v/2));
where Body _ Y _ angle is the Y-axis rotation angle, Y is the Y-direction position information, and fov _ v is the vertical angle of view.
When the rotation angle comprises a Z-axis rotation angle after the holder rotates around the Z axis in the body coordinate system; the processor 2 is configured to: acquiring X-direction position information of an image tracked and shot by a holder in the X-axis direction and a horizontal field angle of a shooting device on the holder; and determining the Z-axis rotation angle according to the X-direction position information and the horizontal field angle.
Specifically, the processor 2 is configured to: determining a Z-axis rotation angle according to the X-direction position information and the horizontal field angle by using the following formula;
Body_Z_angle=arctan(2*(x-0.5)*tan(fov_h/2));
where Body _ Z _ angle is a Z-axis rotation angle, X is X-direction position information, and fov _ h is a horizontal angle of view.
Further, after the initial attitude angle and the rotation quaternion are obtained, the initial attitude angle and the rotation quaternion need to be analyzed, so as to determine a final quaternion, specifically, when the processor 2 determines the final quaternion according to the initial attitude angle and the rotation quaternion, the processor 2 is configured to: and determining the product of the initial attitude angle and the rotation quaternion as a final quaternion.
Furthermore, when the processor 2 obtains vector information of the X-axis in the body coordinate system after rotation in the world coordinate system according to the final quaternion, the processor 2 is specifically configured to:
converting the final quaternion into a corresponding rotation matrix; and acquiring vector information of an X axis in a world coordinate system in the body coordinate system after rotation according to the rotation matrix.
Specifically, the processor 2 is configured to: and acquiring vector information of an X axis in the body coordinate system after rotation in a world coordinate system according to the rotation matrix and by using the following formula:
O′X′=dcm(cameraafter)×[1;0;0];
wherein O 'X' is vector information of X axis in the body coordinate system after rotation in the world coordinate system, dcm (camera)after) Is a rotation matrix.
After obtaining the vector information, the processor 2 is further configured to: determining a first attitude compensation angle from the vector information and using the following equation:
yaw=arctan(y_x′/x_x′);
where yaw is the first attitude compensation angle, y _ x 'is the second component of the vector information, and x _ x' is the first component of the vector information.
Further, the processor 2 is further configured to: determining a second attitude compensation angle according to the vector information and by using the following formula:
pitch=arcsin(z_x′);
where pitch is the second attitude compensation angle and z _ x' is the third component in the vector information.
The specific implementation process and implementation effect of the operation steps implemented by the processor 2 in this embodiment are the same as those in the embodiments corresponding to fig. 2 to fig. 8, and reference may be specifically made to the above statements, and details are not repeated here.
Another aspect of the present embodiment provides a control system for a pan/tilt head, including: one or more processors, operating alone or in conjunction, the processors to:
determining a stability augmentation angle corresponding to the rotation of a stability augmentation shaft of the holder relative to a world coordinate system in a preset body coordinate system; the stability augmentation angle is any one of a pitch angle, a yaw angle and a roll angle, and preferably is 0 degree;
acquiring a first attitude compensation angle and a second attitude compensation angle generated by the rotation of the holder in a body coordinate system relative to a world coordinate system; the first attitude compensation angle and the second attitude compensation angle are any combination of the other two angles except for the stability augmentation angle in the pitch angle, the yaw angle and the roll angle;
and controlling the cradle head according to the first attitude compensation angle, the second attitude compensation angle and the stability augmentation angle so that the image tracked and shot by the cradle head is positioned in the picture, and preferably, the image tracked and shot by the cradle head is positioned in the central position of the display picture.
The control system of the pan-tilt provided by this embodiment rotates the corresponding angle of stability augmentation through the axis of stability augmentation that confirms the pan-tilt in the preset body coordinate system relatively to the world coordinate system, and acquire the first attitude compensation angle and the second attitude compensation angle that the pan-tilt rotated and produced relatively to the world coordinate system in the body coordinate system, control the pan-tilt through foretell first attitude compensation angle, second attitude compensation angle and angle of stability augmentation, the image that can guarantee effectively that the pan-tilt tracks the shooting is located the picture, the output effect of picture has been improved, be convenient for the user to observe and handle, thereby the practicality of this system has been guaranteed, be favorable to popularization and application in market.
In this embodiment, taking the first attitude compensation angle as a yaw angle and the second attitude compensation angle as a pitch angle as an example for explanation, specifically, the obtaining of the first attitude compensation angle and the second attitude compensation angle generated by the pan/tilt head rotating relative to the world coordinate system in the preset body coordinate system may include:
acquiring a final quaternion corresponding to a holder attitude angle after the holder rotates in a body coordinate system;
acquiring vector information of an X axis in a body coordinate system after rotation in a world coordinate system according to the final quaternion;
and determining a first attitude compensation angle and a second attitude compensation angle according to the vector information.
Wherein, it can include to obtain the final quaternion that the cloud platform attitude angle after the cloud platform rotates in the body coordinate system corresponds:
acquiring an initial attitude angle of a holder and a rotation angle of the holder after the holder rotates in a body coordinate system;
converting the rotation angle into a corresponding rotation quaternion;
and obtaining a final quaternion according to the initial attitude angle and the rotation quaternion.
Optionally, when the rotation angle includes a Y-axis rotation angle after the pan/tilt head rotates around a Y-axis in the body coordinate system, acquiring the rotation angle after the pan/tilt head rotates in the body coordinate system may include:
acquiring Y-direction position information of an image tracked and shot by a holder in the Y-axis direction and a vertical field angle of a shooting device on the holder;
and determining the rotation angle of the Y axis according to the Y-direction position information and the vertical field angle.
Specifically, the determining the Y-axis rotation angle from the Y-direction position information and the vertical field angle may include:
determining a Y-axis rotation angle according to the Y-direction position information and the vertical field angle by using the following formula;
Body_Y_angle=arctan(2*(y-0.5)*tan(fov_v/2));
where Body _ Y _ angle is the Y-axis rotation angle, Y is the Y-direction position information, and fov _ v is the vertical angle of view.
Optionally, when the rotation angle includes a Z-axis rotation angle after the pan/tilt head rotates around the Z-axis in the body coordinate system, acquiring the rotation angle after the pan/tilt head rotates in the body coordinate system may include:
acquiring X-direction position information of an image tracked and shot by a holder in the X-axis direction and a horizontal field angle of a shooting device on the holder;
and determining the Z-axis rotation angle according to the X-direction position information and the horizontal field angle.
Specifically, the determining of the Z-axis rotation angle from the X-direction position information and the horizontal field angle may include:
determining a Z-axis rotation angle according to the X-direction position information and the horizontal field angle by using the following formula;
Body_Z_angle=arctan(2*(x-0.5)*tan(fov_h/2));
where Body _ Z _ angle is a Z-axis rotation angle, X is X-direction position information, and fov _ h is a horizontal angle of view.
Further, obtaining the final quaternion from the initial attitude angle and the rotation quaternion may include: and determining the product of the initial attitude angle and the rotation quaternion as a final quaternion.
Further, acquiring vector information of the X-axis in the body coordinate system after the rotation in the world coordinate system from the final quaternion may include:
converting the final quaternion into a corresponding rotation matrix;
and acquiring vector information of an X axis in a world coordinate system in the body coordinate system after rotation according to the rotation matrix.
Specifically, obtaining vector information of the X axis in the world coordinate system in the body coordinate system after the rotation according to the rotation matrix may include:
and acquiring vector information of an X axis in the body coordinate system after rotation in a world coordinate system according to the rotation matrix and by using the following formula:
O′X′=dcm(cameraafter)×[1;0;0];
wherein O 'X' is vector information of X axis in the body coordinate system after rotation in the world coordinate system, dcm (camera)after) Is a rotation matrix.
Further, determining the first attitude compensation angle from the vector information may include:
determining a first attitude compensation angle from the vector information and using the following equation:
yaw=arctan(y_x′/x_x′);
where yaw is the first attitude compensation angle, y _ x 'is the second component of the vector information, and x _ x' is the first component of the vector information.
Further, determining the second attitude compensation angle from the vector information may include:
determining a second attitude compensation angle according to the vector information and by using the following formula:
pitch=arcsin(z_x′);
where pitch is the second attitude compensation angle and z _ x' is the third component in the vector information.
The specific implementation process and implementation effect of the operation steps implemented in this embodiment are the same as those in the embodiments corresponding to fig. 2 to fig. 8, and reference may be specifically made to the above statements, and details are not repeated here.
Yet another aspect of the present embodiments provides a computer storage medium having program instructions stored therein for implementing:
determining a stability augmentation angle corresponding to the rotation of a stability augmentation shaft of the holder relative to a world coordinate system in a preset body coordinate system; the stability augmentation angle can be any one of a pitch angle, a yaw angle and a roll angle, and preferably is 0 degree;
acquiring a first attitude compensation angle and a second attitude compensation angle generated by the rotation of the holder in a body coordinate system relative to a world coordinate system; the first attitude compensation angle and the second attitude compensation angle are any combination of the other two angles except for the stability augmentation angle in the pitch angle, the yaw angle and the roll angle;
and carrying out zoom control on the tripod head according to the first attitude compensation angle, the second attitude compensation angle and the stability augmentation angle so as to enable the image tracked and shot by the tripod head to be positioned in the picture, and preferably, the image tracked and shot by the tripod head is positioned in the central position of the display picture.
The computer storage medium provided by this embodiment, the stability augmentation angle corresponding to the rotation of the stability augmentation shaft of the cradle head relative to the world coordinate system is determined in the preset body coordinate system, the first attitude compensation angle and the second attitude compensation angle generated by the rotation of the cradle head relative to the world coordinate system in the body coordinate system are obtained, the cradle head is controlled through the first attitude compensation angle, the second attitude compensation angle and the stability augmentation angle, it can be effectively ensured that an image captured by the cradle head in tracking is located in a picture, the output effect of the picture is improved, the observation and the processing of a user are facilitated, the practicability of the computer storage medium is ensured, and the popularization and the application of the market are facilitated.
Further, the first attitude compensation angle is a yaw angle, and the second attitude compensation angle is a pitch angle; acquiring a first attitude compensation angle and a second attitude compensation angle generated by the rotation of the pan-tilt in the preset body coordinate system relative to the world coordinate system may include:
acquiring a final quaternion corresponding to a holder attitude angle after the holder rotates in a body coordinate system;
acquiring vector information of an X axis in a body coordinate system after rotation in a world coordinate system according to the final quaternion;
and determining a first attitude compensation angle and a second attitude compensation angle according to the vector information.
Specifically, obtaining a final quaternion corresponding to the pan-tilt attitude angle after the pan-tilt rotates in the body coordinate system may include:
acquiring an initial attitude angle of a holder and a rotation angle of the holder after the holder rotates in a body coordinate system;
converting the rotation angle into a corresponding rotation quaternion;
and obtaining a final quaternion according to the initial attitude angle and the rotation quaternion.
Optionally, when the rotation angle includes a Y-axis rotation angle after the pan/tilt head rotates around a Y-axis in the body coordinate system, acquiring the rotation angle after the pan/tilt head rotates in the body coordinate system may include:
acquiring Y-direction position information of an image tracked and shot by a holder in the Y-axis direction and a vertical field angle of a shooting device on the holder;
and determining the rotation angle of the Y axis according to the Y-direction position information and the vertical field angle.
Specifically, the determining the Y-axis rotation angle from the Y-direction position information and the vertical field angle may include:
determining a Y-axis rotation angle according to the Y-direction position information and the vertical field angle by using the following formula;
Body_Y_angle=arctan(2*(y-0.5)*tan(fov_v/2));
where Body _ Y _ angle is the Y-axis rotation angle, Y is the Y-direction position information, and fov _ v is the vertical angle of view.
Optionally, when the rotation angle includes a Z-axis rotation angle after the pan/tilt head rotates around the Z-axis in the body coordinate system, acquiring the rotation angle after the pan/tilt head rotates in the body coordinate system may include:
acquiring X-direction position information of an image tracked and shot by a holder in the X-axis direction and a horizontal field angle of a shooting device on the holder;
and determining the Z-axis rotation angle according to the X-direction position information and the horizontal field angle.
Specifically, the determining of the Z-axis rotation angle from the X-direction position information and the horizontal field angle may include:
determining a Z-axis rotation angle according to the X-direction position information and the horizontal field angle by using the following formula;
Body_Z_angle=arctan(2*(x-0.5)*tan(fov_h/2));
where Body _ Z _ angle is a Z-axis rotation angle, X is X-direction position information, and fov _ h is a horizontal angle of view.
Further, obtaining a final quaternion according to the initial attitude angle and the rotation quaternion, includes: and determining the product of the initial attitude angle and the rotation quaternion as a final quaternion.
Further, acquiring vector information of the X-axis in the body coordinate system after the rotation in the world coordinate system from the final quaternion may include:
converting the final quaternion into a corresponding rotation matrix;
and acquiring vector information of an X axis in a world coordinate system in the body coordinate system after rotation according to the rotation matrix.
Specifically, obtaining vector information of the X axis in the world coordinate system in the body coordinate system after the rotation according to the rotation matrix may include:
and acquiring vector information of an X axis in the body coordinate system after rotation in a world coordinate system according to the rotation matrix and by using the following formula:
O′X′=dcm(cameraafter)×[1;0;0];
wherein O 'X' is vector information of X axis in the body coordinate system after rotation in the world coordinate system, dcm (camera)after) Is a rotation matrix.
Further, determining the first attitude compensation angle from the vector information may include:
determining a first attitude compensation angle from the vector information and using the following equation:
yaw=arctan(y_x′/x_x′);
where yaw is the first attitude compensation angle, y _ x 'is the second component of the vector information, and x _ x' is the first component of the vector information.
Further, determining the second attitude compensation angle from the vector information may include:
determining a second attitude compensation angle according to the vector information and by using the following formula:
pitch=arcsin(z_x′);
where pitch is the second attitude compensation angle and z _ x' is the third component in the vector information.
The specific implementation process and implementation effect of the operation steps implemented in this embodiment are the same as those in the embodiments corresponding to fig. 2 to fig. 8, and reference may be specifically made to the above statements, and details are not repeated here.
Yet another aspect of the present embodiments provides a drone, comprising:
a frame;
the holder is arranged on the frame;
the controller is in communication connection with the holder and is used for: determining a stability augmentation angle corresponding to the rotation of a stability augmentation shaft of the holder relative to a world coordinate system in a preset body coordinate system; acquiring a first attitude compensation angle and a second attitude compensation angle generated by the rotation of the holder in a body coordinate system relative to a world coordinate system; zooming the cradle head according to the first attitude compensation angle, the second attitude compensation angle and the stability augmentation angle so that the image tracked and shot by the cradle head is positioned in the picture, and preferably, the image tracked and shot by the cradle head is positioned in the central position of the display picture; the stability augmentation angle can be any one of a pitch angle, a yaw angle and a roll angle, and preferably is 0 degree; the first attitude compensation angle and the second attitude compensation angle are any combination of the other two angles except for the stability augmentation angle in the pitch angle, the yaw angle and the roll angle.
The unmanned aerial vehicle that this embodiment provided, it rotates the angle that increases steady that corresponds in the predetermined body coordinate system to increase steady axle through the controller definite cloud platform, and acquire the first gesture compensation angle and the second gesture compensation angle that the cloud platform rotated and produced in the body coordinate system for the world coordinate system, through foretell first gesture compensation angle, second gesture compensation angle and increase steady angle and control the cloud platform, the image that can guarantee cloud platform tracking shooting effectively is located the picture, the output effect of picture has been improved, be convenient for the user to observe and handle, thereby this unmanned aerial vehicle's practicality has been guaranteed, be favorable to the popularization and the application in market.
Further, the first attitude compensation angle is a yaw angle, and the second attitude compensation angle is a pitch angle; the controller may be configured to: acquiring a final quaternion corresponding to a holder attitude angle after the holder rotates in a body coordinate system; acquiring vector information of an X axis in a body coordinate system after rotation in a world coordinate system according to the final quaternion; and determining a first attitude compensation angle and a second attitude compensation angle according to the vector information.
Specifically, when the controller obtains the final quaternion corresponding to the attitude angle of the pan/tilt head after the pan/tilt head rotates in the body coordinate system, the controller is further configured to: acquiring an initial attitude angle of a holder and a rotation angle of the holder after the holder rotates in a body coordinate system; converting the rotation angle into a corresponding rotation quaternion; and obtaining a final quaternion according to the initial attitude angle and the rotation quaternion.
Optionally, the rotation angle includes a Y-axis rotation angle after the pan-tilt rotates around a Y-axis in the body coordinate system; at this time, the controller is configured to: acquiring Y-direction position information of an image tracked and shot by a holder in the Y-axis direction and a vertical field angle of a shooting device on the holder; and determining the rotation angle of the Y axis according to the Y-direction position information and the vertical field angle.
Specifically, the controller is configured to: determining a Y-axis rotation angle according to the Y-direction position information and the vertical field angle by using the following formula; body _ Y _ angle ═ arctan (2 × (Y-0.5) × tan (fov _ v/2));
where Body _ Y _ angle is the Y-axis rotation angle, Y is the Y-direction position information, and fov _ v is the vertical angle of view.
Optionally, the rotation angle includes a Z-axis rotation angle after the pan-tilt rotates around the Z-axis in the body coordinate system; at this time, the controller is configured to: acquiring X-direction position information of an image tracked and shot by a holder in the X-axis direction and a horizontal field angle of a shooting device on the holder; and determining the Z-axis rotation angle according to the X-direction position information and the horizontal field angle.
Specifically, the controller is configured to: determining a Z-axis rotation angle according to the X-direction position information and the horizontal field angle by using the following formula; body _ Z _ angle ═ arctan (2 × (x-0.5) × tan (fov _ h/2));
where Body _ Z _ angle is a Z-axis rotation angle, X is X-direction position information, and fov _ h is a horizontal angle of view.
Further, the controller is further configured to: and determining the product of the initial attitude angle and the rotation quaternion as a final quaternion.
In addition, the controller is further configured to: converting the final quaternion into a corresponding rotation matrix; and acquiring vector information of an X axis in a world coordinate system in the body coordinate system after rotation according to the rotation matrix.
When the controller obtains vector information of the X axis in the world coordinate system in the body coordinate system after rotation according to the rotation matrix, the controller may be configured to: and acquiring vector information of an X axis in the body coordinate system after rotation in a world coordinate system according to the rotation matrix and by using the following formula:
O′X′=dcm(cameraafter)×[1;0;0];
wherein O 'X' is vector information of X axis in the body coordinate system after rotation in the world coordinate system, dcm (camera)after) Is a rotation matrix.
Further, the controller is further configured to:
determining a first attitude compensation angle from the vector information and using the following equation:
yaw=arctan(y_x′/x_x′);
where yaw is the first attitude compensation angle, y _ x 'is the second component of the vector information, and x _ x' is the first component of the vector information.
In addition, the controller is further configured to:
determining a second attitude compensation angle according to the vector information and by using the following formula:
pitch=arcsin(z_x′);
where pitch is the second attitude compensation angle and z _ x' is the third component in the vector information.
The specific implementation process and implementation effect of the operation steps implemented in this embodiment are the same as those in the embodiments corresponding to fig. 2 to fig. 8, and reference may be specifically made to the above statements, and details are not repeated here.
The technical solutions and the technical features in the above embodiments may be used alone or in combination in case of conflict with the present disclosure, and all embodiments that fall within the scope of protection of the present disclosure are intended to be equivalent embodiments as long as they do not exceed the scope of recognition of those skilled in the art.
In the embodiments provided in the present invention, it should be understood that the disclosed related devices and methods can be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. With this understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer processor 101(processor) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes performed by the present specification and drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (65)

  1. A control method of a pan-tilt head is characterized by comprising the following steps:
    determining a stability augmentation angle corresponding to the rotation of a stability augmentation shaft of the holder relative to a world coordinate system in a preset body coordinate system;
    acquiring a first attitude compensation angle and a second attitude compensation angle generated by the rotation of the holder in the body coordinate system relative to the world coordinate system;
    and controlling the cradle head according to the first attitude compensation angle, the second attitude compensation angle and the stability augmentation angle so as to enable the image tracked and shot by the cradle head to be positioned in the picture.
  2. The method of claim 1,
    the stability augmentation angle is any one of a pitch angle, a yaw angle and a roll angle;
    the first attitude compensation angle and the second attitude compensation angle are any combination of the other two angles except the stability augmentation angle in the pitch angle, the yaw angle and the roll angle.
  3. The method of claim 2, wherein the first attitude compensation angle is a yaw angle and the second attitude compensation angle is a pitch angle; the acquiring a first attitude compensation angle and a second attitude compensation angle generated by the rotation of the holder in a preset body coordinate system relative to the world coordinate system includes:
    acquiring a final quaternion corresponding to a holder attitude angle after the holder rotates in the body coordinate system;
    acquiring vector information of an X axis in the body coordinate system after rotation in the world coordinate system according to the final quaternion;
    and determining the first attitude compensation angle and the second attitude compensation angle according to the vector information.
  4. The method according to claim 3, wherein the obtaining a final quaternion corresponding to a pan-tilt attitude angle after the pan-tilt rotates in the body coordinate system comprises:
    acquiring an initial attitude angle of the holder and a rotation angle of the holder after the holder rotates in the body coordinate system;
    converting the rotation angle into a corresponding rotation quaternion;
    and obtaining the final quaternion according to the initial attitude angle and the rotation quaternion.
  5. The method of claim 4, wherein the rotation angle comprises a Y-axis rotation angle after the pan/tilt head is rotated about a Y-axis in the body coordinate system; acquiring a rotation angle of the pan/tilt head after rotating in the body coordinate system, including:
    acquiring Y-direction position information of an image tracked and shot by the holder in the Y-axis direction and a vertical field angle of a shooting device on the holder;
    and determining the Y-axis rotation angle according to the Y-direction position information and the vertical field angle.
  6. The method of claim 5, wherein said determining the Y-axis rotation angle from the Y-direction position information and the vertical field angle comprises:
    determining the Y-axis rotation angle according to the Y-direction position information and the vertical field angle by using the following formula;
    Body_Y_angle=arctan(2*(y-0.5)*tan(fov_v/2));
    where Body _ Y _ angle is the Y-axis rotation angle, Y is the Y-direction position information, and fov _ v is the vertical angle of view.
  7. The method according to any one of claims 4-6, wherein the rotation angle comprises a Z-axis rotation angle after the pan-tilt rotates around a Z-axis in the body coordinate system; acquiring a rotation angle of the holder after rotating in the body coordinate system, including:
    acquiring X-direction position information of an image tracked and shot by the cradle head in the X-axis direction and a horizontal field angle of a shooting device on the cradle head;
    and determining the Z-axis rotation angle according to the X-direction position information and the horizontal field angle.
  8. The method of claim 7, wherein determining the Z-axis rotation angle from the X-direction position information and the horizontal field angle comprises:
    determining the Z-axis rotation angle according to the X-direction position information and the horizontal field angle by using the following formula;
    Body_Z_angle=arctan(2*(x-0.5)*tan(fov_h/2));
    where Body _ Z _ angle is a Z-axis rotation angle, X is X-direction position information, and fov _ h is a horizontal angle of view.
  9. The method of claim 4, wherein obtaining the final quaternion from the initial attitude angle and rotational quaternion comprises:
    determining the product of the initial attitude angle and a rotation quaternion as the final quaternion.
  10. The method according to claim 3, wherein the obtaining vector information of the X-axis in the body coordinate system after rotation in the world coordinate system according to the final quaternion comprises:
    converting the final quaternion into a corresponding rotation matrix;
    and acquiring vector information of an X axis in the body coordinate system under the world coordinate system after rotation according to the rotation matrix.
  11. The method of claim 10, wherein obtaining vector information of the X-axis under the world coordinate system in the body coordinate system after rotation according to the rotation matrix comprises:
    acquiring vector information of an X axis in the body coordinate system under the world coordinate system after rotation according to the rotation matrix and by using the following formula:
    O′X′=dcm(cameraafter)×[1;0;0];
    wherein O 'X' is vector information of X axis in the body coordinate system after rotation in a world coordinate system, dcm (camera)after) Is a rotation matrix.
  12. The method of any of claims 3-6, wherein determining the first attitude compensation angle from the vector information comprises:
    determining the first attitude compensation angle from the vector information using the following equation:
    yaw=arctan(y_x′/x_x′);
    where yaw is the first attitude compensation angle, y _ x 'is the second component of the vector information, and x _ x' is the first component of the vector information.
  13. The method of any of claims 3-6, wherein determining the second attitude compensation angle from the vector information comprises:
    determining the second attitude compensation angle according to the vector information and by using the following formula:
    pitch=arcsin(z_x′);
    where pitch is the second attitude compensation angle and z _ x' is the third component in the vector information.
  14. A control device of a pan/tilt head, comprising:
    a memory for storing a computer program;
    a processor for executing the computer program stored in the memory to implement: determining a stability augmentation angle corresponding to the rotation of a stability augmentation shaft of the holder relative to a world coordinate system in a preset body coordinate system; acquiring a first attitude compensation angle and a second attitude compensation angle generated by the rotation of the holder in the body coordinate system relative to the world coordinate system; and controlling the cradle head according to the first attitude compensation angle, the second attitude compensation angle and the stability augmentation angle so as to enable the image tracked and shot by the cradle head to be positioned in the picture.
  15. The apparatus of claim 14,
    the stability augmentation angle is any one of a pitch angle, a yaw angle and a roll angle;
    the first attitude compensation angle and the second attitude compensation angle are any combination of the other two angles except the stability augmentation angle in the pitch angle, the yaw angle and the roll angle.
  16. The apparatus of claim 15, wherein the first attitude compensation angle is a yaw angle and the second attitude compensation angle is a pitch angle; the processor is configured to:
    acquiring a final quaternion corresponding to a holder attitude angle after the holder rotates in the body coordinate system;
    acquiring vector information of an X axis in the body coordinate system after rotation in the world coordinate system according to the final quaternion;
    and determining the first attitude compensation angle and the second attitude compensation angle according to the vector information.
  17. The apparatus of claim 16, wherein the processor is configured to:
    acquiring an initial attitude angle of the holder and a rotation angle of the holder after the holder rotates in the body coordinate system;
    converting the rotation angle into a corresponding rotation quaternion;
    and obtaining the final quaternion according to the initial attitude angle and the rotation quaternion.
  18. The apparatus of claim 17, wherein the rotation angle comprises a Y-axis rotation angle after the pan/tilt head is rotated about a Y-axis in the body coordinate system; the processor is configured to:
    acquiring Y-direction position information of an image tracked and shot by the holder in the Y-axis direction and a vertical field angle of a shooting device on the holder;
    and determining the Y-axis rotation angle according to the Y-direction position information and the vertical field angle.
  19. The apparatus of claim 18, wherein the processor is configured to:
    determining the Y-axis rotation angle according to the Y-direction position information and the vertical field angle by using the following formula;
    Body_Y_angle=arctan(2*(y-0.5)*tan(fov_v/2));
    where Body _ Y _ angle is the Y-axis rotation angle, Y is the Y-direction position information, and fov _ v is the vertical angle of view.
  20. The apparatus according to any one of claims 17-19, wherein the rotation angle comprises a Z-axis rotation angle after the rotation of the head around the Z-axis in the body coordinate system; the processor is configured to:
    acquiring X-direction position information of an image tracked and shot by the cradle head in the X-axis direction and a horizontal field angle of a shooting device on the cradle head;
    and determining the Z-axis rotation angle according to the X-direction position information and the horizontal field angle.
  21. The apparatus of claim 20, wherein the processor is configured to:
    determining the Z-axis rotation angle according to the X-direction position information and the horizontal field angle by using the following formula;
    Body_Z_angle=arctan(2*(x-0.5)*tan(fov_h/2));
    where Body _ Z _ angle is a Z-axis rotation angle, X is X-direction position information, and fov _ h is a horizontal angle of view.
  22. The apparatus of claim 17, wherein the processor is configured to:
    determining the product of the initial attitude angle and a rotation quaternion as the final quaternion.
  23. The apparatus of claim 16, wherein the processor is configured to:
    converting the final quaternion into a corresponding rotation matrix;
    and acquiring vector information of an X axis in the body coordinate system under the world coordinate system after rotation according to the rotation matrix.
  24. The apparatus of claim 23, wherein the processor is configured to:
    acquiring vector information of an X axis in the body coordinate system under the world coordinate system after rotation according to the rotation matrix and by using the following formula:
    O′X′=dcm(cameraafter)×[1;0;0];
    wherein O 'X' is vector information of X axis in the body coordinate system after rotation in a world coordinate system, dcm (camera)after) Is a rotation matrix.
  25. The apparatus according to any of claims 17-19, wherein the processor is configured to: determining the first attitude compensation angle from the vector information using the following equation:
    yaw=arctan(y_x′/x_x′);
    where yaw is the first attitude compensation angle, y _ x 'is the second component of the vector information, and x _ x' is the first component of the vector information.
  26. The apparatus according to any of claims 17-19, wherein the processor is configured to: determining the second attitude compensation angle according to the vector information and by using the following formula:
    pitch=arcsin(z_x′);
    where pitch is the second attitude compensation angle and z _ x' is the third component in the vector information.
  27. A control system of a pan-tilt head, comprising: one or more processors, operating alone or in cooperation, to:
    determining a stability augmentation angle corresponding to the rotation of a stability augmentation shaft of the holder relative to a world coordinate system in a preset body coordinate system;
    acquiring a first attitude compensation angle and a second attitude compensation angle generated by the rotation of the holder in the body coordinate system relative to the world coordinate system;
    and controlling the cradle head according to the first attitude compensation angle, the second attitude compensation angle and the stability augmentation angle so as to enable the image tracked and shot by the cradle head to be positioned in the picture.
  28. The system of claim 27,
    the stability augmentation angle is any one of a pitch angle, a yaw angle and a roll angle;
    the first attitude compensation angle and the second attitude compensation angle are any combination of the other two angles except the stability augmentation angle in the pitch angle, the yaw angle and the roll angle.
  29. The system of claim 28, wherein the first attitude compensation angle is a yaw angle and the second attitude compensation angle is a pitch angle; the acquiring a first attitude compensation angle and a second attitude compensation angle generated by the rotation of the holder in a preset body coordinate system relative to the world coordinate system includes:
    acquiring a final quaternion corresponding to a holder attitude angle after the holder rotates in the body coordinate system;
    acquiring vector information of an X axis in the body coordinate system after rotation in the world coordinate system according to the final quaternion;
    and determining the first attitude compensation angle and the second attitude compensation angle according to the vector information.
  30. The system of claim 29, wherein the obtaining a final quaternion corresponding to a pan-tilt attitude angle after the pan-tilt rotates in the body coordinate system comprises:
    acquiring an initial attitude angle of the holder and a rotation angle of the holder after the holder rotates in the body coordinate system;
    converting the rotation angle into a corresponding rotation quaternion;
    and obtaining the final quaternion according to the initial attitude angle and the rotation quaternion.
  31. The system of claim 30, wherein the rotation angle comprises a Y-axis rotation angle after the cloud stage rotates about a Y-axis in the body coordinate system; acquiring a rotation angle of the holder after rotating in the body coordinate system, including:
    acquiring Y-direction position information of an image tracked and shot by the holder in the Y-axis direction and a vertical field angle of a shooting device on the holder;
    and determining the Y-axis rotation angle according to the Y-direction position information and the vertical field angle.
  32. The system according to claim 31, wherein said determining the Y-axis rotation angle from the Y-direction position information and the vertical field angle comprises:
    determining the Y-axis rotation angle according to the Y-direction position information and the vertical field angle by using the following formula;
    Body_Y_angle=arctan(2*(y-0.5)*tan(fov_v/2));
    where Body _ Y _ angle is the Y-axis rotation angle, Y is the Y-direction position information, and fov _ v is the vertical angle of view.
  33. The system of any one of claims 30-32, wherein the rotation angle comprises a Z-axis rotation angle after rotation of the head about a Z-axis in the body coordinate system; acquiring a rotation angle of the holder after rotating in the body coordinate system, including:
    acquiring X-direction position information of an image tracked and shot by the cradle head in the X-axis direction and a horizontal field angle of a shooting device on the cradle head;
    and determining the Z-axis rotation angle according to the X-direction position information and the horizontal field angle.
  34. The system of claim 33, wherein determining the Z-axis rotation angle from the X-direction position information and the horizontal field angle comprises:
    determining the Z-axis rotation angle according to the X-direction position information and the horizontal field angle by using the following formula;
    Body_Z_angle=arctan(2*(x-0.5)*tan(fov_h/2));
    where Body _ Z _ angle is a Z-axis rotation angle, X is X-direction position information, and fov _ h is a horizontal angle of view.
  35. The system of claim 30, wherein said deriving the final quaternion from the initial attitude angle and the rotational quaternion comprises:
    determining the product of the initial attitude angle and a rotation quaternion as the final quaternion.
  36. The system of claim 29, wherein obtaining vector information of the X-axis in the body coordinate system after rotation in the world coordinate system according to the final quaternion comprises:
    converting the final quaternion into a corresponding rotation matrix;
    and acquiring vector information of an X axis in the body coordinate system under the world coordinate system after rotation according to the rotation matrix.
  37. The system according to claim 36, wherein obtaining vector information of the X-axis in the body coordinate system under the world coordinate system after rotation according to the rotation matrix comprises:
    acquiring vector information of an X axis in the body coordinate system under the world coordinate system after rotation according to the rotation matrix and by using the following formula:
    O′X′=dcm(cameraafter)×[1;0;0];
    wherein O 'X' is vector information of X axis in the body coordinate system after rotation in a world coordinate system, dcm (camera)after) Is a rotation matrix.
  38. The system of any one of claims 29-32, wherein determining the first attitude compensation angle from the vector information comprises:
    determining the first attitude compensation angle from the vector information using the following equation:
    yaw=arctan(y_x′/x_x′);
    where yaw is the first attitude compensation angle, y _ x 'is the second component of the vector information, and x _ x' is the first component of the vector information.
  39. The system of any one of claims 29-32, wherein determining the second attitude compensation angle based on the vector information comprises:
    determining the second attitude compensation angle according to the vector information and by using the following formula:
    pitch=arcsin(z_x′);
    where pitch is the second attitude compensation angle and z _ x' is the third component in the vector information.
  40. A computer storage medium having stored therein program instructions for implementing:
    determining a stability augmentation angle corresponding to the rotation of a stability augmentation shaft of the holder relative to a world coordinate system in a preset body coordinate system;
    acquiring a first attitude compensation angle and a second attitude compensation angle generated by the rotation of the holder in the body coordinate system relative to the world coordinate system;
    and carrying out zooming control on the holder according to the first attitude compensation angle, the second attitude compensation angle and the stability augmentation angle so as to enable the image tracked and shot by the holder to be positioned in the picture.
  41. The computer storage medium of claim 40,
    the stability augmentation angle is any one of a pitch angle, a yaw angle and a roll angle;
    the first attitude compensation angle and the second attitude compensation angle are any combination of the other two angles except the stability augmentation angle in the pitch angle, the yaw angle and the roll angle.
  42. The computer storage medium of claim 41, wherein the first attitude compensation angle is a yaw angle and the second attitude compensation angle is a pitch angle; the acquiring a first attitude compensation angle and a second attitude compensation angle generated by the rotation of the holder in a preset body coordinate system relative to the world coordinate system includes:
    acquiring a final quaternion corresponding to a holder attitude angle after the holder rotates in the body coordinate system;
    acquiring vector information of an X axis in the body coordinate system after rotation in the world coordinate system according to the final quaternion;
    and determining the first attitude compensation angle and the second attitude compensation angle according to the vector information.
  43. The computer storage medium of claim 42, wherein the obtaining a final quaternion corresponding to a pan-tilt attitude angle after the pan-tilt rotates in the body coordinate system comprises:
    acquiring an initial attitude angle of the holder and a rotation angle of the holder after the holder rotates in the body coordinate system;
    converting the rotation angle into a corresponding rotation quaternion;
    and obtaining the final quaternion according to the initial attitude angle and the rotation quaternion.
  44. The computer storage medium of claim 43, wherein the rotation angle comprises a Y-axis rotation angle after the pan-tilt rotates about a Y-axis in the body coordinate system; acquiring a rotation angle of the holder after rotating in the body coordinate system, including:
    acquiring Y-direction position information of an image tracked and shot by the holder in the Y-axis direction and a vertical field angle of a shooting device on the holder;
    and determining the Y-axis rotation angle according to the Y-direction position information and the vertical field angle.
  45. The computer storage medium of claim 44, wherein said determining the Y-axis rotation angle from the Y-direction position information and the vertical field angle comprises:
    determining the Y-axis rotation angle according to the Y-direction position information and the vertical field angle by using the following formula;
    Body_Y_angle=arctan(2*(y-0.5)*tan(fov_v/2));
    where Body _ Y _ angle is the Y-axis rotation angle, Y is the Y-direction position information, and fov _ v is the vertical angle of view.
  46. A computer storage medium as recited in any of claims 43-45, wherein the rotation angle comprises a Z-axis rotation angle after the pan/tilt head is rotated about a Z-axis in the body coordinate system; acquiring a rotation angle of the holder after rotating in the body coordinate system, including:
    acquiring X-direction position information of an image tracked and shot by the cradle head in the X-axis direction and a horizontal field angle of a shooting device on the cradle head;
    and determining the Z-axis rotation angle according to the X-direction position information and the horizontal field angle.
  47. The computer storage medium of claim 46, wherein determining the Z-axis rotation angle from the X-direction position information and the horizontal field angle comprises:
    determining the Z-axis rotation angle according to the X-direction position information and the horizontal field angle by using the following formula;
    Body_Z_angle=arctan(2*(x-0.5)*tan(fov_h/2));
    where Body _ Z _ angle is a Z-axis rotation angle, X is X-direction position information, and fov _ h is a horizontal angle of view.
  48. The computer storage medium of claim 43, wherein the obtaining the final quaternion from the initial attitude angle and the rotational quaternion comprises:
    determining the product of the initial attitude angle and a rotation quaternion as the final quaternion.
  49. The computer storage medium of claim 42, wherein obtaining vector information of the X-axis in the body coordinate system after rotation in the world coordinate system according to the final quaternion comprises:
    converting the final quaternion into a corresponding rotation matrix;
    and acquiring vector information of an X axis in the body coordinate system under the world coordinate system after rotation according to the rotation matrix.
  50. The computer storage medium of claim 49, wherein obtaining vector information of the X-axis in the body coordinate system under the world coordinate system after rotation according to the rotation matrix comprises:
    acquiring vector information of an X axis in the body coordinate system under the world coordinate system after rotation according to the rotation matrix and by using the following formula:
    O′X′=dcm(cameraafter)×[1;0;0];
    wherein O 'X' is vector information of X axis in the body coordinate system after rotation in a world coordinate system, dcm (camera)after) Is a rotation matrix.
  51. The computer storage medium of any one of claims 42-45, wherein determining the first attitude compensation angle from the vector information comprises:
    determining the first attitude compensation angle from the vector information using the following equation:
    yaw=arctan(y_x′/x_x′);
    where yaw is the first attitude compensation angle, y _ x 'is the second component of the vector information, and x _ x' is the first component of the vector information.
  52. The computer storage medium of any one of claims 42-45, wherein determining the second attitude compensation angle from the vector information comprises:
    determining the second attitude compensation angle according to the vector information and by using the following formula:
    pitch=arcsin(z_x′);
    where pitch is the second attitude compensation angle and z _ x' is the third component in the vector information.
  53. An unmanned aerial vehicle, comprising:
    a frame;
    the holder is arranged on the rack;
    a controller in communication with the pan/tilt head for: determining a stability augmentation angle corresponding to the rotation of a stability augmentation shaft of the holder relative to a world coordinate system in a preset body coordinate system; acquiring a first attitude compensation angle and a second attitude compensation angle generated by the rotation of the holder in the body coordinate system relative to the world coordinate system; and carrying out zooming control on the cradle head according to the first attitude compensation angle, the second attitude compensation angle and the stability augmentation angle so as to enable the image tracked and shot by the cradle head to be positioned in a picture.
  54. A drone according to claim 53,
    the stability augmentation angle is any one of a pitch angle, a yaw angle and a roll angle;
    the first attitude compensation angle and the second attitude compensation angle are any combination of the other two angles except the stability augmentation angle in the pitch angle, the yaw angle and the roll angle.
  55. A drone as claimed in claim 54, wherein the first attitude compensation angle is a yaw angle and the second attitude compensation angle is a pitch angle; the controller is configured to:
    acquiring a final quaternion corresponding to a holder attitude angle after the holder rotates in the body coordinate system;
    acquiring vector information of an X axis in the body coordinate system after rotation in the world coordinate system according to the final quaternion;
    and determining the first attitude compensation angle and the second attitude compensation angle according to the vector information.
  56. A drone as claimed in claim 55, wherein the controller is to:
    acquiring an initial attitude angle of the holder and a rotation angle of the holder after the holder rotates in the body coordinate system;
    converting the rotation angle into a corresponding rotation quaternion;
    and obtaining the final quaternion according to the initial attitude angle and the rotation quaternion.
  57. A drone as claimed in claim 56, wherein the rotation angle includes a Y-axis rotation angle after rotation of the head about a Y-axis in the body coordinate system; the controller is configured to:
    acquiring Y-direction position information of an image tracked and shot by the holder in the Y-axis direction and a vertical field angle of a shooting device on the holder;
    and determining the Y-axis rotation angle according to the Y-direction position information and the vertical field angle.
  58. A drone as claimed in claim 57, wherein the controller is to:
    determining the Y-axis rotation angle according to the Y-direction position information and the vertical field angle by using the following formula;
    Body_Y_angle=arctan(2*(y-0.5)*tan(fov_v/2));
    where Body _ Y _ angle is the Y-axis rotation angle, Y is the Y-direction position information, and fov _ v is the vertical angle of view.
  59. A drone as claimed in any one of claims 56 to 58, wherein the rotation angle includes a Z axis rotation angle after rotation of the head about a Z axis in the body coordinate system; the controller is configured to:
    acquiring X-direction position information of an image tracked and shot by the cradle head in the X-axis direction and a horizontal field angle of a shooting device on the cradle head;
    and determining the Z-axis rotation angle according to the X-direction position information and the horizontal field angle.
  60. A drone of claim 59, wherein the controller is to:
    determining the Z-axis rotation angle according to the X-direction position information and the horizontal field angle by using the following formula;
    Body_Z_angle=arctan(2*(x-0.5)*tan(fov_h/2));
    where Body _ Z _ angle is a Z-axis rotation angle, X is X-direction position information, and fov _ h is a horizontal angle of view.
  61. A drone as claimed in claim 56, wherein the controller is to:
    determining the product of the initial attitude angle and a rotation quaternion as the final quaternion.
  62. A drone as claimed in claim 55, wherein the controller is to:
    converting the final quaternion into a corresponding rotation matrix;
    and acquiring vector information of an X axis in the body coordinate system under the world coordinate system after rotation according to the rotation matrix.
  63. A drone as claimed in claim 62, wherein the controller is to:
    acquiring vector information of an X axis in the body coordinate system under the world coordinate system after rotation according to the rotation matrix and by using the following formula:
    O′X′=dcm(cameraafter)×[1;0;0];
    wherein O 'X' is vector information of X axis in the body coordinate system after rotation in a world coordinate system, dcm (camera)after) Is a rotation matrix.
  64. A drone as claimed in any one of claims 56-58, wherein the controller is configured to:
    determining the first attitude compensation angle from the vector information using the following equation:
    yaw=arctan(y_x′/x_x′);
    where yaw is the first attitude compensation angle, y _ x 'is the second component of the vector information, and x _ x' is the first component of the vector information.
  65. A drone as claimed in any one of claims 56-58, wherein the controller is configured to:
    determining the second attitude compensation angle according to the vector information and by using the following formula:
    pitch=arcsin(z_x′);
    where pitch is the second attitude compensation angle and z _ x' is the third component in the vector information.
CN201880031880.5A 2018-03-28 2018-03-28 Cloud deck control method, device and system, computer storage medium and unmanned aerial vehicle Pending CN110622091A (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/080933 WO2019183845A1 (en) 2018-03-28 2018-03-28 Pan-tilt device control method, apparatus and system, computer storage medium and unmanned aerial vehicle

Publications (1)

Publication Number Publication Date
CN110622091A true CN110622091A (en) 2019-12-27

Family

ID=68059116

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201880031880.5A Pending CN110622091A (en) 2018-03-28 2018-03-28 Cloud deck control method, device and system, computer storage medium and unmanned aerial vehicle

Country Status (2)

Country Link
CN (1) CN110622091A (en)
WO (1) WO2019183845A1 (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111273701A (en) * 2020-02-28 2020-06-12 佛山科学技术学院 Visual control system and control method for holder
CN111452046A (en) * 2020-03-31 2020-07-28 佛山科学技术学院 Virtual reality-based explosive-handling robot system, control method and storage medium
CN111770270A (en) * 2020-06-24 2020-10-13 杭州海康威视数字技术股份有限公司 Camera posture correction method and camera
CN112822632A (en) * 2021-02-06 2021-05-18 湖南科天健光电技术有限公司 Dynamic attitude position compensation method, system, electronic device, and medium
CN113296546A (en) * 2021-04-22 2021-08-24 杭州晟冠科技有限公司 Compensation method for positioning error of ship linkage tracking
CN113805607A (en) * 2021-09-17 2021-12-17 深圳市道通智能航空技术股份有限公司 Unmanned aerial vehicle shooting method and device, unmanned aerial vehicle and storage medium
CN114827447A (en) * 2021-01-29 2022-07-29 北京小米移动软件有限公司 Image shake correction method and apparatus
CN115209029A (en) * 2021-04-08 2022-10-18 成都睿铂科技有限责任公司 Stability augmentation control method, device, system, equipment and storage medium

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022109860A1 (en) * 2020-11-25 2022-06-02 深圳市大疆创新科技有限公司 Target object tracking method and gimbal
WO2023201655A1 (en) * 2022-04-21 2023-10-26 深圳市大疆创新科技有限公司 Stability augmentation system, stability augmentation method for photographing device on gimbal, and movable platform
CN114785955B (en) * 2022-05-05 2023-08-15 广州新华学院 Dynamic camera motion compensation method, system and storage medium under complex scene

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102915043A (en) * 2012-10-17 2013-02-06 天津市亚安科技股份有限公司 Method for increasing location accuracy of cloud platform
US20150205301A1 (en) * 2013-03-15 2015-07-23 Ashley A. Gilmore Digital tethering for tracking with autonomous aerial robot
CN105045293A (en) * 2015-05-27 2015-11-11 深圳一电科技有限公司 Cradle head control method, external carrier control method and cradle head
CN105116926A (en) * 2015-08-20 2015-12-02 深圳一电科技有限公司 Holder control method and device
CN105676880A (en) * 2016-01-13 2016-06-15 零度智控(北京)智能科技有限公司 Control method and system of holder camera device
CN106200693A (en) * 2016-08-12 2016-12-07 东南大学 The The Cloud Terrace real-time control system of land investigation SUAV and control method
CN106873632A (en) * 2017-03-14 2017-06-20 中国科学院自动化研究所 Bionic machine fish and its image stability augmentation system and active visual tracking system
CN206417213U (en) * 2016-12-30 2017-08-18 深圳市大疆灵眸科技有限公司 Head and unmanned vehicle
WO2017177542A1 (en) * 2016-04-12 2017-10-19 高鹏 Object tracking method, device and system
CN107339569A (en) * 2017-08-23 2017-11-10 魏承赟 The angle regulation method of stabilizer and stabilizer

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102915043A (en) * 2012-10-17 2013-02-06 天津市亚安科技股份有限公司 Method for increasing location accuracy of cloud platform
US20150205301A1 (en) * 2013-03-15 2015-07-23 Ashley A. Gilmore Digital tethering for tracking with autonomous aerial robot
CN105045293A (en) * 2015-05-27 2015-11-11 深圳一电科技有限公司 Cradle head control method, external carrier control method and cradle head
CN105116926A (en) * 2015-08-20 2015-12-02 深圳一电科技有限公司 Holder control method and device
CN105676880A (en) * 2016-01-13 2016-06-15 零度智控(北京)智能科技有限公司 Control method and system of holder camera device
WO2017177542A1 (en) * 2016-04-12 2017-10-19 高鹏 Object tracking method, device and system
CN106200693A (en) * 2016-08-12 2016-12-07 东南大学 The The Cloud Terrace real-time control system of land investigation SUAV and control method
CN206417213U (en) * 2016-12-30 2017-08-18 深圳市大疆灵眸科技有限公司 Head and unmanned vehicle
CN106873632A (en) * 2017-03-14 2017-06-20 中国科学院自动化研究所 Bionic machine fish and its image stability augmentation system and active visual tracking system
CN107339569A (en) * 2017-08-23 2017-11-10 魏承赟 The angle regulation method of stabilizer and stabilizer

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111273701A (en) * 2020-02-28 2020-06-12 佛山科学技术学院 Visual control system and control method for holder
CN111273701B (en) * 2020-02-28 2023-10-31 佛山科学技术学院 Cloud deck vision control system and control method
CN111452046A (en) * 2020-03-31 2020-07-28 佛山科学技术学院 Virtual reality-based explosive-handling robot system, control method and storage medium
CN111770270A (en) * 2020-06-24 2020-10-13 杭州海康威视数字技术股份有限公司 Camera posture correction method and camera
CN111770270B (en) * 2020-06-24 2021-06-25 杭州海康威视数字技术股份有限公司 Camera posture correction method and camera
CN114827447A (en) * 2021-01-29 2022-07-29 北京小米移动软件有限公司 Image shake correction method and apparatus
CN114827447B (en) * 2021-01-29 2024-02-09 北京小米移动软件有限公司 Image jitter correction method and device
CN112822632A (en) * 2021-02-06 2021-05-18 湖南科天健光电技术有限公司 Dynamic attitude position compensation method, system, electronic device, and medium
CN115209029A (en) * 2021-04-08 2022-10-18 成都睿铂科技有限责任公司 Stability augmentation control method, device, system, equipment and storage medium
CN113296546A (en) * 2021-04-22 2021-08-24 杭州晟冠科技有限公司 Compensation method for positioning error of ship linkage tracking
CN113805607A (en) * 2021-09-17 2021-12-17 深圳市道通智能航空技术股份有限公司 Unmanned aerial vehicle shooting method and device, unmanned aerial vehicle and storage medium

Also Published As

Publication number Publication date
WO2019183845A1 (en) 2019-10-03

Similar Documents

Publication Publication Date Title
CN110622091A (en) Cloud deck control method, device and system, computer storage medium and unmanned aerial vehicle
US12069372B2 (en) Gimbal control method and apparatus, control terminal and aircraft system
WO2019113966A1 (en) Obstacle avoidance method and device, and unmanned aerial vehicle
WO2020014909A1 (en) Photographing method and device and unmanned aerial vehicle
WO2017020150A1 (en) Image processing method, device and camera
CN108574825B (en) Method and device for adjusting pan-tilt camera
EP3972235A1 (en) Focusing method and apparatus, aerial photography camera, and unmanned aerial vehicle
CN108235815B (en) Imaging control device, imaging system, moving object, imaging control method, and medium
CN108780324B (en) Unmanned aerial vehicle, and unmanned aerial vehicle control method and device
WO2019227441A1 (en) Video control method and device of movable platform
CN111656403A (en) Method and device for tracking target and computer storage medium
US20210203839A1 (en) Method for marking target position of gimbal, gimbal, and photographing device
CN112955711A (en) Position information determining method, apparatus and storage medium
US20210018138A1 (en) Gimbal mode switching method, device, mobile platform and storage medium
WO2021217371A1 (en) Control method and apparatus for movable platform
WO2021081707A1 (en) Data processing method and apparatus, movable platform and computer-readable storage medium
CN113805607B (en) Unmanned aerial vehicle shooting method and device, unmanned aerial vehicle and storage medium
WO2019205087A1 (en) Image stabilization method and device
WO2021258251A1 (en) Surveying and mapping method for movable platform, and movable platform and storage medium
WO2019183789A1 (en) Method and apparatus for controlling unmanned aerial vehicle, and unmanned aerial vehicle
CN114125268A (en) Focusing method and device
WO2019205103A1 (en) Pan-tilt orientation correction method, pan-tilt orientation correction apparatus, pan-tilt, pan-tilt system, and unmanned aerial vehicle
WO2021013143A1 (en) Apparatus, photgraphic apparatus, movable body, method, and program
WO2021138856A1 (en) Camera control method, device, and computer readable storage medium
WO2021056411A1 (en) Air route adjustment method, ground end device, unmanned aerial vehicle, system, and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20191227

WD01 Invention patent application deemed withdrawn after publication