Camera holder control method and device, electronic equipment and storage medium

The control parameters are obtained through the virtual rocker, and the camera gimbal is controlled to move horizontally and vertically in a software-defined manner, solving the problem of high stepless rotation cost of the camera gimbal in the prior art, and achieving low-cost stepless rotation.

CN120264144APending Publication Date: 2025-07-04INSPUR TIANYUAN COMM INFORMATION SYST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510313775.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-17
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

The existing camera gimbal stepless rotation control method relies on hardware equipment, resulting in high costs.

Method used

Control parameters are obtained through virtual rocker, including distance, angle and movement time from the center point, and the camera gimbal is controlled to move horizontally and vertically to achieve stepless rotation.

Benefits of technology

It reduces the implementation cost of stepless rotation of the camera gimbal and avoids dependence on hardware devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120264144A_ABST
    Figure CN120264144A_ABST
Patent Text Reader

Abstract

The invention provides a camera holder control method and device, electronic equipment and a storage medium, and belongs to the technical field of cameras, and the method comprises the steps: obtaining control parameters of a virtual rocker in a process that the virtual rocker controls a camera holder to rotate; the control parameters comprise the distance of the virtual rocker deviating from the central point, the included angle between the virtual rocker and the horizontal plane and the moving duration of the virtual rocker; and controlling the camera holder to perform horizontal movement and vertical movement in each rotation stage in sequence according to the control parameters. According to the control parameters of the virtual joystick, the camera holder is controlled to perform horizontal movement and vertical movement in each rotation stage in sequence, stepless rotation of the camera holder is realized in a software definition mode, the method does not depend on hardware equipment, and the realization cost of stepless rotation of the camera holder is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of cameras, and particularly to a method and device for controlling a camera pan-tilt, an electronic device, and a storage medium. Background Art

[0002] For the rotational control of a camera pan-tilt, currently, stepless rotation is mainly achieved through mechanical methods, mainly including two ways: servo control and damping transmission. Servo control takes a high-precision servo motor as the core and is equipped with high-precision sensors, such as magnetic encoders, gyroscopes, acceleration sensors, etc., to continuously sense information such as the position, speed, and acceleration of the pan-tilt, and feedback this data to the control system. Damping transmission introduces damping components, such as damping shafts and damping wheels, into the transmission mechanism of the pan-tilt, making the resistance received by the pan-tilt during rotation more uniform and stable, thereby achieving smooth stepless rotation.

[0003] The above control methods rely on the camera hardware module, and the hardware cost for achieving stepless rotation is high. Summary of the Invention

[0004] The present invention provides a method and device for controlling a camera pan-tilt, an electronic device, and a storage medium, so as to solve the technical problem of high cost of stepless control of a camera pan-tilt in the prior art.

[0005] The present invention provides a method for controlling a camera pan-tilt, including: During the process of controlling the rotation of the camera pan-tilt with a virtual joystick, obtaining the control parameters of the virtual joystick; the control parameters include the distance of the virtual joystick from the center point, the angle between the virtual joystick and the horizontal plane, and the movement duration of the virtual joystick; Controlling the horizontal and vertical movements of each rotation stage of the camera pan-tilt according to the control parameters.

[0006] According to the method for controlling a camera pan-tilt provided by the present invention, the controlling the horizontal and vertical movements of each rotation stage of the camera pan-tilt according to the control parameters includes: Mapping the control parameters to control signals of the camera pan-tilt in each rotation stage; Based on the control signals, controlling the horizontal and vertical movements of each rotation stage of the camera pan-tilt in sequence.

[0007] According to the method for controlling a camera pan-tilt provided by the present invention, the control signals include horizontal movement time and vertical movement time; The mapping the control parameters to control signals of the camera pan-tilt in each rotation stage includes: Determine the movement path of the camera pan-tilt according to the control parameters; Discretize the movement path to obtain a plurality of discrete coordinate points; Determine the horizontal movement distance and the vertical movement distance of the camera pan-tilt at each rotation stage according to the plurality of discrete coordinate points; Obtain the movement speed of the camera pan-tilt, and determine the horizontal movement time and the vertical movement time according to the movement speed, the horizontal movement distance, and the vertical movement distance.

[0008] According to a camera pan-tilt control method provided by the present invention, the control signal further includes a movement speed; Before obtaining the movement speed of the camera pan-tilt, mapping the control parameters to the control signal of the camera pan-tilt at each rotation stage further includes: Based on the principle that the movement speed is positively correlated with the distance, determine the movement speed according to the distance.

[0009] According to a camera pan-tilt control method provided by the present invention, determining the movement speed according to the distance includes: Obtain the maximum speed of the camera pan-tilt and the maximum displacement of the virtual joystick; Determine the movement speed according to the distance, the maximum speed, and the maximum displacement.

[0010] According to a camera pan-tilt control method provided by the present invention, controlling the camera pan-tilt to perform horizontal movement and vertical movement at each rotation stage based on the control signal includes: Control the camera pan-tilt to move horizontally at the movement speed at each rotation stage, and the movement duration is the horizontal movement time corresponding to the rotation stage; Control the camera pan-tilt to move vertically at the movement speed at each rotation stage, and the movement duration is the vertical movement time corresponding to the rotation stage.

[0011] The present invention further provides a camera pan-tilt control device, including: An acquisition module, configured to acquire the control parameters of the virtual joystick during the process of controlling the camera pan-tilt to rotate by the virtual joystick; the control parameters include the distance of the virtual joystick deviating from the center point, the angle between the virtual joystick and the horizontal plane, and the movement duration of the virtual joystick; A control module, configured to control the camera pan-tilt to perform horizontal movement and vertical movement at each rotation stage according to the control parameters.

[0012] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the camera pan-tilt control method as described in any one of the above is implemented.

[0013] The present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the camera pan-tilt control method as described in any one of the above is implemented.

[0014] The present invention also provides a computer program product, including a computer program. When the computer program is executed by a processor, the camera pan-tilt control method as described in any one of the above is implemented.

[0015] The camera pan-tilt control method, device, electronic device, and storage medium provided by the present invention control the horizontal and vertical movements of the camera pan-tilt in each rotation stage in sequence according to the control parameters of the virtual joystick, and realize the stepless rotation of the camera pan-tilt in a software-defined manner, without relying on hardware devices, and reducing the implementation cost of the stepless rotation of the camera pan-tilt. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0017] Figure 1 is a schematic structural diagram of the camera pan-tilt control system provided by the present invention.

[0018] Figure 2 is a schematic flow chart of the camera pan-tilt control method provided by the present invention.

[0019] Figure 3 is a schematic diagram of the virtual joystick provided by the present invention.

[0020] Figure 4 is a schematic flow chart of step S2 provided by the present invention.

[0021] Figure 5 is a schematic diagram of the principle of the stepless rotation of the camera pan-tilt provided by the present invention.

[0022] Figure 6 is a schematic structural diagram of the camera pan-tilt control device provided by the present invention.

[0023] Figure 7 is a schematic structural diagram of the electronic device provided by the present invention. Detailed implementation manners

[0024] To make the objectives, technical solutions and advantages of the present invention clearer, the technical solutions in the present invention will be clearly and completely described below with reference to the accompanying drawings in the present invention. Obviously, the described embodiments are some but not all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present invention without making creative efforts shall fall within the protection scope of the present invention.

[0025] It should be noted that in the description of the present invention, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements but also includes other elements not explicitly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, the element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, method, article or device including the said element. The orientation or positional relationship indicated by the terms "upper", "lower", etc. is based on the orientation or positional relationship shown in the accompanying drawings, and is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus cannot be construed as a limitation of the present invention. Unless otherwise clearly specified and defined, the terms "mount", "connect", "couple" should be understood in a broad sense. For example, it may be a fixed connection, a detachable connection or an integral connection; it may be a mechanical connection or an electrical connection; it may be directly connected or indirectly connected through an intermediate medium, and may be the internal communication of two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0026] The terms "first", "second", etc. in the present invention are used to distinguish similar objects, rather than to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances so that the embodiments of the present invention can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of the same category, and do not limit the number of objects. For example, the first object may be one or more. In addition, "and / or" represents at least one of the connected objects, and the character " / " generally represents an "or" relationship between the associated objects before and after.

[0027] The following will be combined with Figures 1-7 to describe the camera pan-tilt control method, device, electronic device and storage medium provided by the present invention.

[0028] It should be noted that this discovery first provides the function of controlling the rotation of the camera pan-tilt through a virtual joystick. The function of the virtual joystick is similar to that of a remote control handle but exists on the operation interface. Users can operate the virtual joystick on the operation interface to control the rotation of the camera pan-tilt. The camera pan-tilt is rigidly connected to the camera, and the rotation of the camera pan-tilt can drive the rotation of the camera. The camera pan-tilt can be a pan-tilt device that supports the national standard GB28181 protocol and is controlled through PTZ commands. The PTZ commands are used to remotely control the horizontal rotation (Pan), vertical tilt (Tilt), and zoom (Zoom) operations of the camera. As Figure 1 shown, the camera pan-tilt control system includes an operation interface at the application layer, a controller at the support layer, and a pan-tilt device at the device layer.

[0029] As Figure 2 shown, the camera pan-tilt control method provided by the present invention is applied to Figure 1 the controller, and includes: Step S1, during the process of controlling the rotation of the camera pan-tilt by the virtual joystick, obtain the control parameters of the virtual joystick; the control parameters include the distance of the virtual joystick from the center point, the angle between the virtual joystick and the horizontal plane, and the moving duration of the virtual joystick.

[0030] As Figure 3 shown, the center point of the virtual joystick is O, the distance of the virtual joystick from the center point is L, the angle between the virtual joystick and the horizontal plane is , and the moving duration of the virtual joystick is T.

[0031] It can be understood that in practice, the movement of the virtual joystick is a continuous process, and the rotation of the camera pan-tilt is also a continuous process.

[0032] Step S2, control the camera pan-tilt to perform horizontal and vertical movements in each rotation stage in sequence according to the control parameters.

[0033] Since the rotation of the camera pan-tilt is a continuous process, but the camera pan-tilt can only move left and right in the horizontal direction and up and down in the vertical direction, the rotation of the camera pan-tilt is divided into multiple continuous rotation stages. The rotation of each rotation stage includes horizontal and vertical movements. After the camera pan-tilt completes the horizontal and vertical movements of a rotation stage, it completes the rotation of a rotation stage. After the camera pan-tilt sequentially and continuously completes the horizontal and vertical movements of all rotation stages, it completes stepless rotation.

[0034] As can be seen from the above, the present invention controls the camera pan-tilt to perform horizontal and vertical movements in each rotation stage in sequence through the control parameters of the virtual joystick, and realizes the stepless rotation of the camera pan-tilt in a software-defined manner, without relying on hardware devices, and reduces the implementation cost of the stepless rotation of the camera pan-tilt.

[0035] Considering that the control parameters are the parameters of the virtual joystick and cannot be directly used to control the rotation of the camera pan-tilt, it is necessary to convert the control parameters into control signals that can control the rotation of the camera pan-tilt. For this purpose, in some embodiments, as Figure 4 shown, step S2 may include: Step S21, mapping the control parameters to the control signals of the camera pan-tilt at each rotation stage; Step S22, controlling the camera pan-tilt to perform horizontal and vertical movements at each rotation stage in sequence based on the control signals.

[0036] In this way, the control parameters can be first converted into control signals that can control the rotation of the camera pan-tilt, and the purpose of controlling the rotation of the camera pan-tilt according to the control parameters can be achieved.

[0037] In some embodiments, the control signals of the present invention may include horizontal movement time and vertical movement time; Step S21 may include: Determining the movement path of the camera pan-tilt according to the control parameters; Discretizing the movement path to obtain a plurality of discrete coordinate points; Determining the horizontal movement distance and vertical movement distance of the camera pan-tilt at each rotation stage according to the plurality of discrete coordinate points; Obtaining the movement speed of the camera pan-tilt, and determining the horizontal movement time and vertical movement time according to the movement speed, horizontal movement distance, and vertical movement distance.

[0038] In the present invention, during the movement of the virtual joystick, the total distance that the camera pan-tilt needs to move in the horizontal direction satisfies the relational expression with the control parameters: ; wherein, is the total distance that the camera pan-tilt needs to move in the horizontal direction, is the sensitivity coefficient of the camera pan-tilt in the horizontal direction, is the initial moment, is the current moment and .

[0039] The total distance that the camera pan-tilt needs to move in the vertical direction satisfies the relational expression with the control parameters: ; wherein, is the total distance that the camera pan-tilt needs to move in the vertical direction, is the sensitivity coefficient of the camera pan-tilt in the vertical direction.

[0040] The movement path of the camera pan-tilt can be constructed through the above two relational expressions as a curve .

[0041] Since the camera pan-tilt cannot rotate exactly along the movement path, it is necessary to discretize the movement path to obtain a series of discrete coordinate points ( ), ( ), …, ( ), ( ) are the positions of the camera pan-tilt at the initial moment, and ( ) is the target position that the camera pan-tilt needs to reach. Each pair of adjacent discrete coordinate points corresponds to a rotation stage of the camera pan-tilt, and v and h in each rotation stage satisfy the relational expressions: ; wherein, , are two adjacent discrete coordinate points.

[0042] The horizontal movement distance in each rotation stage is the difference between the abscissas of two adjacent discrete coordinate points corresponding to this rotation stage, that is ; the vertical movement distance is the difference between the ordinates of two adjacent discrete coordinate points corresponding to this rotation stage, that is . For example, in the first rotation stage , .

[0043] In some embodiments, the movement speed s of the camera pan-tilt can be a fixed value or calculated according to the distance L. Dividing the horizontal movement distance in each rotation stage by the movement speed s can obtain the horizontal movement time of this rotation stage, and dividing the vertical movement distance in each rotation stage by the movement speed s can obtain the vertical movement time of the rotation stage.

[0044] It can be understood that in any rotation stage, controlling the camera pan-tilt to move horizontally at a speed s for time can make the camera pan-tilt move horizontally by distance; controlling the camera pan-tilt to move vertically at a speed s for time can make the camera pan-tilt move vertically by distance; thus, the rotation of this rotation stage can be completed, as shown in Figure 5 . That is, step S22 may include: Controlling the camera pan-tilt to move horizontally at the movement speed in each rotation stage, and the movement duration is the horizontal movement time corresponding to the rotation stage; Control the camera pan-tilt to move in the vertical direction at a moving speed during each rotation stage, and the moving duration is the vertical moving time corresponding to the rotation stage.

[0045] Among them, the movement of the camera pan-tilt in the horizontal and vertical directions has no sequence relationship. It can move vertically first and then horizontally, or move horizontally first and then vertically.

[0046] As mentioned above, the moving speed s can be a fixed value. However, when the L of the virtual joystick is large, the distance that the camera pan-tilt needs to move is large. If s is too small, it will cause the camera pan-tilt to take too long to reach the target position. In order to match the moving speed s with the distance that the camera pan-tilt needs to move, in some embodiments, the control signal of the present invention may further include the moving speed; Before obtaining the moving speed of the camera pan-tilt, step S21 may further include: Based on the principle that the moving speed is positively correlated with the distance, determine the moving speed according to the distance.

[0047] In this way, the larger the L, the larger the moving speed s of the camera pan-tilt, and the time required for the camera pan-tilt to reach the target position can be shortened.

[0048] In some embodiments, determining the moving speed according to the distance may further include: Obtain the maximum speed of the camera pan-tilt and the maximum displacement of the virtual joystick; Determine the moving speed according to the distance, the maximum speed and the maximum displacement.

[0049] Among them, the maximum speed of the camera pan-tilt is the maximum moving speed that the camera pan-tilt can reach, and the maximum displacement of the virtual joystick is the farthest distance that the virtual joystick can deviate from the center point. Determining the moving speed s according to the distance L, the maximum speed and the maximum displacement D may include: .

[0050] In this way, the moving speed s can be set as a percentage of the maximum speed to match the distance that the camera pan-tilt needs to move.

[0051] Of course, the present invention can also obtain the rotation direction of the camera pan-tilt according to the control parameters, and specifically, it can correspond to the up, down, left, and right rotation directions according to the positive and negative of the control parameters.

[0052] As Figure 6 shown, the camera pan-tilt control device provided by the present invention includes: An acquisition module, configured to acquire control parameters of a virtual joystick during the process of controlling a camera pan-tilt to rotate; the control parameters include the distance of the virtual joystick deviating from the center point, the angle between the virtual joystick and the horizontal plane, and the moving duration of the virtual joystick. A control module, configured to control the camera pan-tilt to perform horizontal movement and vertical movement in each rotation stage according to the control parameters.

[0053] In some embodiments, the control module may specifically be configured to: Map the control parameters to control signals of the camera pan-tilt in each rotation stage; Based on the control signals, control the camera pan-tilt to perform horizontal movement and vertical movement in each rotation stage in sequence.

[0054] In some embodiments, the control signals may include horizontal movement time and vertical movement time; The control module may further be configured to: Determine the movement path of the camera pan-tilt according to the control parameters; Discretize the movement path to obtain a plurality of discrete coordinate points; Determine the horizontal movement distance and vertical movement distance of the camera pan-tilt in each rotation stage according to the plurality of discrete coordinate points; Obtain the movement speed of the camera pan-tilt, and determine the horizontal movement time and vertical movement time according to the movement speed, horizontal movement distance, and vertical movement distance.

[0055] In some embodiments, the control signals may further include movement speed; The control module may further be configured to: Based on the principle that the movement speed is positively correlated with the distance, determine the movement speed according to the distance.

[0056] In some embodiments, the control module may further be configured to: Obtain the maximum speed of the camera pan-tilt and the maximum displacement of the virtual joystick; Determine the movement speed according to the distance, maximum speed, and maximum displacement.

[0057] In some embodiments, the control module may specifically be configured to: Control the camera pan-tilt to move horizontally at the movement speed in each rotation stage, and the moving duration is the horizontal movement time corresponding to the rotation stage; Control the camera pan-tilt to move vertically at the movement speed in each rotation stage, and the moving duration is the vertical movement time corresponding to the rotation stage.

[0058] It should be noted that the camera pan-tilt control device provided by the present invention can execute the camera pan-tilt control method described in any of the above embodiments during specific operation, and details thereof are not described in this embodiment.

[0059] Figure 7 is a schematic structural diagram of the electronic device provided by the present invention. As Figure 7 shown, the electronic device may include: a processor, a communication interface, a memory, and a communication bus. Among them, the processor, the communication interface, and the memory complete mutual communication through the communication bus. The processor can call the logical instructions in the memory to execute the camera pan-tilt control method, which includes: during the process of controlling the camera pan-tilt to rotate with a virtual joystick, obtaining the control parameters of the virtual joystick; the control parameters include the distance of the virtual joystick deviating from the center point, the angle between the virtual joystick and the horizontal plane, and the moving duration of the virtual joystick; controlling the camera pan-tilt to perform horizontal and vertical movements in each rotation stage in sequence according to the control parameters.

[0060] In addition, when the logical instructions in the above-mentioned memory are implemented in the form of a software functional unit and sold or used as an independent product, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs, etc., which can store program codes.

[0061] On the other hand, the present invention also provides a computer program product. The computer program product includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the camera pan-tilt control methods provided in the above embodiments. The method includes: during the process of controlling the camera pan-tilt to rotate with a virtual joystick, obtaining the control parameters of the virtual joystick; the control parameters include the distance of the virtual joystick deviating from the center point, the angle between the virtual joystick and the horizontal plane, and the moving duration of the virtual joystick; controlling the camera pan-tilt to perform horizontal and vertical movements in each rotation stage in sequence according to the control parameters.

[0062] In another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it is configured to execute the camera pan-tilt control method provided in the above-mentioned embodiments. The method includes: during the process of controlling the camera pan-tilt to rotate with a virtual joystick, obtaining the control parameters of the virtual joystick; the control parameters include the distance of the virtual joystick deviating from the center point, the angle between the virtual joystick and the horizontal plane, and the moving duration of the virtual joystick; and controlling the camera pan-tilt to perform horizontal movement and vertical movement in each rotation stage in sequence according to the control parameters.

[0063] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without creative efforts.

[0064] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the essence of the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disc, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0065] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A camera pan-tilt control method, characterized in that, Including: During the process of the virtual joystick controlling the rotation of the camera pan-tilt, obtain the control parameters of the virtual joystick; the control parameters include the distance of the virtual joystick deviating from the center point, the angle between the virtual joystick and the horizontal plane, and the movement duration of the virtual joystick. Control the horizontal movement and vertical movement of the camera pan-tilt in each rotation stage in sequence according to the control parameters.

2. The camera pan-tilt control method according to claim 1, wherein, The controlling the horizontal movement and vertical movement of the camera pan-tilt in each rotation stage in sequence according to the control parameters includes: Map the control parameters to the control signals of the camera pan-tilt in each rotation stage. Based on the control signals, control the horizontal movement and vertical movement of the camera pan-tilt in each rotation stage in sequence.

3. The camera pan-tilt control method according to claim 2, wherein, The control signals include the horizontal movement time and the vertical movement time. The mapping the control parameters to the control signals of the camera pan-tilt in each rotation stage includes: Determine the movement path of the camera pan-tilt according to the control parameters. Discretize the movement path to obtain a plurality of discrete coordinate points. Determine the horizontal movement distance and the vertical movement distance of the camera pan-tilt in each rotation stage according to the plurality of discrete coordinate points. Obtain the movement speed of the camera pan-tilt, and determine the horizontal movement time and the vertical movement time according to the movement speed, the horizontal movement distance, and the vertical movement distance.

4. The camera pan-tilt control method according to claim 3, wherein The control signals further include the movement speed. Before obtaining the movement speed of the camera pan-tilt, the mapping the control parameters to the control signals of the camera pan-tilt in each rotation stage further includes: Based on the principle that the movement speed is positively correlated with the distance, determine the movement speed according to the distance.

5. The camera pan-tilt control method according to claim 4, wherein The determining the movement speed according to the distance includes: Obtain the maximum speed of the camera pan-tilt and the maximum displacement of the virtual joystick. Determine the movement speed according to the distance, the maximum speed, and the maximum displacement.

6. The camera pan-tilt control method according to claim 3, characterized in that, The controlling the horizontal movement and vertical movement of the camera pan-tilt in each rotation stage in sequence based on the control signals includes: Control the camera pan-tilt to move horizontally at the movement speed in each rotation stage, and the movement duration is the horizontal movement time corresponding to the rotation stage. Control the camera pan-tilt to move vertically at the movement speed in each rotation stage, and the movement duration is the vertical movement time corresponding to the rotation stage.

7. A camera pan-tilt control device, characterized in that, Including: An acquisition module, configured to obtain the control parameters of the virtual joystick during the process of the virtual joystick controlling the rotation of the camera pan-tilt; the control parameters include the distance of the virtual joystick deviating from the center point, the angle between the virtual joystick and the horizontal plane, and the movement duration of the virtual joystick. A control module, configured to control the horizontal movement and vertical movement of the camera pan-tilt in each rotation stage in sequence according to the control parameters.

8. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the camera pan-tilt control method according to any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the camera pan-tilt control method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the camera pan-tilt control method according to any one of claims 1 to 6.