PTZ control method, device, monitoring equipment and readable storage medium

By determining the rotation angles of the first and second gimbals and completing the rotation within the same rotation time, the problem of low control accuracy of the gimbals in the prior art is solved, and efficient tracking of the fast moving target is achieved.

CN114637342BActive Publication Date: 2024-11-01CHONGQING UNISINSIGHT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210267790.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-17
Publication Date
2024-11-01
Estimated Expiration
2042-03-17

AI Technical Summary

Technical Problem

The existing dual-globe collaborative tracking method improves the movement speed of the globe, and has low control accuracy, which may lead to the failure of target tracking.

Method used

By obtaining the coordinates of the target object, determining the rotation angles of the first and second gimbals, the two can be rotated within the same rotation time, ensuring that the target is located in the center of the ball machine screen of the second gimbal, thereby improving the gimbals control accuracy.

Benefits of technology

The rotation speed and accuracy of the second gimbal is improved, the risk of target loss is reduced, and accurate tracking of fast moving targets is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114637342B_ABST
    Figure CN114637342B_ABST
Patent Text Reader

Abstract

The pan-tilt control method, device, monitoring equipment and readable storage medium provided by the present invention include: obtaining the coordinates of the target object; determining the first rotation angle of the first pan-tilt and the second rotation angle of the second pan-tilt according to the coordinates of the target object; wherein the second pan-tilt is installed on the first pan-tilt, and the first rotation angle and the second rotation angle are respectively used to indicate that the first pan-tilt and the second pan-tilt complete the rotation movement within the same rotation time, so that the target object is located at the center of the screen of the ball camera corresponding to the rotated second pan-tilt; controlling the first pan-tilt to rotate according to the first rotation angle from the current position, and controlling the second pan-tilt to rotate according to the second rotation angle. Driven by the first pan-tilt, the second pan-tilt can quickly reach the position aligned with the target object, which not only improves the rotation speed of the second pan-tilt, but also can allocate appropriate rotation angles to the first pan-tilt and the second pan-tilt, so that the second pan-tilt can be aligned with the target, thereby reducing the risk of target loss.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of monitoring technology, and in particular to a pan / tilt control method, device, monitoring equipment and a readable storage medium. Background Art

[0002] With the rapid development of science and technology in recent years, the tracking of target objects has been increasingly widely used. In the prior art, there is a method for dual-panel cooperative tracking, which increases the moving speed of the pan-tilt by driving the other pan-tilt through one pan-tilt, and can be adapted to the tracking of fast-moving targets.

[0003] However, although the above method improves the gimbal movement speed, it does not consider the impact of the movement of one gimbal on the movement of another gimbal, and the control accuracy is low, which may cause the problem of being unable to aim at the target, resulting in target tracking failure.

[0004] Therefore, how to improve the control accuracy of the gimbal while increasing the gimbal movement speed is a technical problem that needs to be solved. Summary of the invention

[0005] One of the purposes of the present invention is to provide a pan-tilt control method, device, monitoring equipment and readable storage medium to improve the control accuracy of the pan-tilt and prevent target tracking loss.

[0006] The embodiments of the present invention can be implemented as follows:

[0007] In a first aspect, the present invention provides a pan-tilt control method, the method comprising: obtaining the coordinates of a target object; determining a first rotation angle of a first pan-tilt and a second rotation angle of a second pan-tilt according to the coordinates of the target object; wherein the second pan-tilt is installed on the first pan-tilt, and the first rotation angle and the second rotation angle are respectively used to indicate that the first pan-tilt and the second pan-tilt complete rotational movement within the same rotation time, so that the target object is located at the center of the screen of a ball camera corresponding to the rotated second pan-tilt; controlling the first pan-tilt to rotate from a current position according to the first rotation angle, and controlling the second pan-tilt to rotate according to the second rotation angle.

[0008] In a second aspect, the present invention provides a pan-tilt control device, comprising: an acquisition module for obtaining the coordinates of a target object; an analysis module for determining a first rotation angle of a first pan-tilt and a second rotation angle of a second pan-tilt according to the coordinates of the target object; wherein the second pan-tilt is installed on the first pan-tilt, and the first rotation angle and the second rotation angle are respectively used to indicate that the first pan-tilt and the second pan-tilt complete rotation within the same rotation time, so that the target object is located at the center of the screen of the ball camera corresponding to the second pan-tilt after rotation; a control module for controlling the first pan-tilt to rotate from a current position according to the first rotation angle, and controlling the second pan-tilt to rotate according to the second rotation angle.

[0009] In a third aspect, the present invention provides an imaging device, comprising a processor and a memory, wherein the memory stores a computer program executable by the processor, and the processor can execute the computer program to implement the method described in the first aspect.

[0010] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method described in the first aspect.

[0011] The present invention provides a pan / tilt control method, device, monitoring equipment and readable storage medium, the method comprising: obtaining the coordinates of the target object; determining the first rotation angle of the first pan / tilt and the second rotation angle of the second pan / tilt according to the coordinates of the target object; wherein the second pan / tilt is installed on the first pan / tilt, and the first rotation angle and the second rotation angle are respectively used to indicate that the first pan / tilt and the second pan / tilt complete the rotation movement within the same rotation time, so that the target object is located at the center of the screen of the ball camera corresponding to the second pan / tilt after rotation; controlling the first pan / tilt to rotate according to the first rotation angle from the current position, and controlling the second pan / tilt to rotate according to the second rotation angle. In the face of a target with a particularly fast moving speed, the target may be lost. In order to improve the tracking speed of the second pan / tilt, the embodiment of the present invention can first determine the angles that the first pan / tilt and the second pan / tilt need to rotate respectively. In this way, the second pan / tilt can be driven by the first pan / tilt to quickly reach the position aligned with the target object, not only improving the rotation speed of the second pan / tilt, but also allocating appropriate rotation angles to the first pan / tilt and the second pan / tilt so that the second pan / tilt can be aligned with the target object, reducing the risk of losing the target object. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0013] Figure 1 A schematic diagram of a scenario applicable to an embodiment of the present application;

[0014] Figure 2 A schematic diagram of the structure of a monitoring device provided in an embodiment of the present application;

[0015] Figure 3 A schematic diagram of the structure of a control system of a monitoring device provided in an embodiment of the present invention;

[0016] Figure 4 A schematic flow chart of a pan / tilt control method provided by an embodiment of the present invention;

[0017] Figure 5 A schematic flow chart of a possible implementation of step S402 provided in an embodiment of the present invention;

[0018] Figure 6 A schematic flowchart of an implementation method of step S402-2 provided in an embodiment of the present invention;

[0019] Figure 7 A schematic flow chart of a first implementation of step S402-3 provided in an embodiment of the present invention;

[0020] Fig. 8A A schematic diagram of a motor motion curve provided by an embodiment of the present invention;

[0021] Figure 8B A schematic diagram of another motor motion curve provided by an embodiment of the present invention;

[0022] Fig. 9 A schematic flow chart of a second implementation of step S402-3 provided in an embodiment of the present invention;

[0023] Fig.10 A schematic flow chart of another pan / tilt control method provided by an embodiment of the present invention;

[0024] Fig.11 A schematic flow chart of an implementation method of step S405 provided in an embodiment of the present invention;

[0025] Fig.12 A functional module diagram of a pan / tilt control device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0026] In order to make the purpose, 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 in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0027] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0028] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0029] In the description of the present invention, it should be noted that if the terms "upper", "lower", "inside", "outside", etc. appear to indicate an orientation or position relationship, they are based on the orientation or position relationship shown in the accompanying drawings, or are the orientation or position relationship in which the product of the invention is usually placed when used. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.

[0030] In addition, the terms “first”, “second”, etc., if used, are merely used to distinguish between the descriptions and should not be understood as indicating or implying relative importance.

[0031] It should be noted that, in the absence of conflict, the features in the embodiments of the present invention may be combined with each other.

[0032] Figure 1 This is a schematic diagram of a scenario applicable to the embodiment of the present application. Figure 1 , the scene includes a monitoring device 100, a target object 200, and a monitoring area 300. The monitoring device 100 may have one or more pan-tilt platforms, and the rotation of the pan-tilt platforms may enable the monitoring device 100 to monitor the monitoring area 300 in all directions. In an actual scene, the monitoring device 100 may perform real-time target detection on the monitoring area 300, and when it is detected that a target object 200 enters the monitoring area, real-time tracking of the target object 200 may be triggered.

[0033] At present, there is a dual-panel cooperative tracking method in the prior art. This method can improve the movement speed of the pan-tilts by driving the other pan-tilts to move, and adapt to the tracking of fast-moving targets. However, although the above method improves the movement speed of the pan-tilts, it does not consider the impact of the movement of one pan-tilt on the movement of the other pan-tilt, and the control accuracy is low, which may cause the problem of being unable to aim at the target, resulting in target tracking failure.

[0034] Therefore, in order to improve the control accuracy of the pan-tilt head while improving the movement speed of the pan-tilt head, an embodiment of the present invention provides a monitoring device and a pan-tilt head control method.

[0035] Figure 2 The schematic diagram of the structure of the monitoring device provided in the embodiment of the present application is shown in FIG. Figure 2 As shown, the monitoring device 100 may include a first camera 110 , a second camera 120 and a third camera 130 .

[0036] The second camera device 120 uses the first camera device 110 as a base, includes a first pan-tilt platform 121, and can rotate horizontally relative to the first camera device 110. The first pan-tilt platform 121 has a power mechanism that can rotate vertically, which can control the movement to rotate vertically. Since the power mechanism is limited, the vertical rotation angle is limited. The third camera device 130 uses the first pan-tilt platform 121 as a base, and includes a second pan-tilt platform 131. The second pan-tilt platform 131 can rotate horizontally and vertically, and the movement is unlimited.

[0037] Optionally, the first camera device 110 can be but is not limited to a panoramic camera. Taking a panoramic camera as an example, the first camera device 110 can be composed of 8 fixed-focus lens parts, each lens is arranged equidistantly at an angle of 45°, and the lens is tilted downward for monitoring from a high altitude downward. The lens generally adopts a focal length of 2.8mm, 4mm or 6mm. Different types of lenses can be selected according to the actual application scenario of the equipment; the lens adopts an F1.0 large aperture lens, and the image sensor adopts a 1 / 1.8" target surface, which can ensure that it can still be seen clearly even without fill light in low light at night, and the image is in color; because a large aperture design is adopted, no fill light is required for the panorama, and the fill light-related structure and hardware can be saved.

[0038] Optionally, the second camera device 120 can be a ball camera, which is composed of a small variable-magnification movement lens. The optical magnification can be between 3-6 times, covering a focal length of 2.8mm to 50mm. The movement lens can use an F1.3 aperture lens, and the image sensor can use a 1 / 1.8" target surface, which can fully ensure the low-light effect; the fill light can use mixed fill light, using 4 infrared lights and 4 white light lights for fill light. The first pan-tilt head 121 can rotate 360° horizontally, which rotates relative to the first camera device 110. At the same time, the rotation module composed of the movement lens and the fill light module can rotate vertically by 0°-30°.

[0039] Optionally, the third camera device 130 can be composed of a large zoom movement lens, the optical magnification can be more than 30 times, covering a focal length of 5mm to 250mm, the movement lens can use an F1.6 aperture lens, and the image sensor can use a 1 / 1.8" target surface to fully ensure the low-light effect; the fill light can use laser infrared fill light, and 4 long-range infrared lights, 2 medium-range infrared lights and 2 close-range infrared lights can be used for fill light. The second gimbal 131 can rotate 360° horizontally, and the rotation is rotated relative to the second camera device 12. At the same time, the rotation module composed of the movement lens and the fill light module can rotate vertically by -10°-90°.

[0040] It can be understood that the monitoring device 100 provided in the embodiment of the present application is different from the dual pan-tilt monitoring device in the prior art in that the use of the first camera device 110 for panoramic monitoring can expand the monitoring range and detect more targets. Secondly, in the process of target tracking, the second camera device 120 and the third camera device 130 can both track the target. For example, when the second camera device 120 performs target tracking, the third camera device 130 can be stationary, and when the third camera device 130 performs target tracking, the second camera device 120 is stationary; in addition, when the third camera device 130 performs target tracking, if it is necessary to quickly track a target moving at a faster speed, the first pan-tilt 121 of the second camera device 120 can be controlled to move simultaneously. In this process, the pan-tilt control method provided in the embodiment of the present invention can ensure that the third camera device 130 is accurately aimed at the target.

[0041] That is to say, in order to enable the third camera device 130 (ball camera) to quickly locate and track the target, the first pan-tilt 121 and the second pan-tilt 131 can be controlled to rotate simultaneously through the program, and the two rotate in conjunction with each other so that the second pan-tilt 131 can rotate to the position aligned with the target in the shortest time. Under normal circumstances, the maximum rotation speed of the second pan-tilt 131 is ωmax, and the maximum rotation speed of the first pan-tilt 121 is ωmax. The first pan-tilt 121 drives the second pan-tilt 131 to rotate, so that the second pan-tilt 131 can obtain a faster rotation speed, thereby accelerating the positioning time. At the same time, due to the higher rotation speed, it is easier for the second pan-tilt 131 to continuously track fast-moving targets.

[0042] Figure 3 A schematic diagram of the control system of the monitoring device provided in the embodiment of the present invention. Figure 3 As shown, it includes a processing module of the first camera device 110, a processing module of the second camera device 120, a processing module of the third camera device 130, and a gateway module.

[0043] Optionally, the processing module of the first camera device 110 may be a DSP platform, which is responsible for the acquisition of 360° panoramic images and performs some intelligent services for the panoramic images, such as human body detection, motor vehicle detection, non-motor vehicle detection, number counting, vehicle counting, etc.; at the same time, the panoramic DSP platform will interact with the ring-type pan-tilt head and the ball-type pan-tilt head for data according to the business situation, and then perform linkage;

[0044] In order to achieve tracking and capturing, the processing module of the first camera device 110 can perform intelligent analysis on the collected panoramic images, and the analysis results can be transmitted to the processing modules of the second camera device 120 and the third camera device 130 to control the two pan-tilt heads to perform corresponding actions. The transmitted data includes: target coordinates, tracking linkage mode, tracking duration, etc.;

[0045] Optionally, the processing module of the second camera device 120 can be a DSP platform, which is responsible for collecting the movement image and performing some intelligent services on the image, such as human body detection, motor vehicle detection, non-motor vehicle detection, perimeter, etc.; at the same time, the first gimbal DSP platform can receive data sent by the processing module of the first camera device 110, and perform linkage operations by parsing the data to obtain instructions; the first gimbal 121 has a vertical and horizontal motor control module, which can control the movement of the first gimbal 121 to rotate vertically and horizontally.

[0046] In order to achieve tracking and capturing, the processing module of the first camera device 110 will transmit data to the processing module of the second camera device 120, so that the processing module controls the first gimbal 121 to perform corresponding vertical and horizontal rotation movements. At the same time, the processing module of the second camera device 120 can also receive instructions from the processing module of the first camera device 110 to control the service shutdown and startup and specific service configuration; at the same time, the processing module of the second camera device 120 can also feed back its own status information to the processing module of the first camera device 110, such as the rotation angle, speed, current service status, etc. of the first gimbal 121.

[0047] Optionally, the processing module of the second camera device 120 can be a DSP platform, which is responsible for collecting the movement image and performing some intelligent services on the image, such as face capture, human body detection, motor vehicle detection, non-motor vehicle detection, structured attribute analysis, etc.; at the same time, the second gimbal 131 can receive data sent by the processing module of the first camera device 110 and the processing module of the second camera device 120, and perform linkage operations by parsing the data to obtain instructions; the second gimbal 131 has vertical and horizontal motor control modules, which can control the movement of the second gimbal 131 to rotate vertically and horizontally.

[0048] In order to achieve tracking and capturing, the processing module of the first camera device 110 will transmit data to the processing module of the third camera device 130, so that the processing module controls the second gimbal 131 to perform corresponding vertical and horizontal rotation movements. At the same time, the processing module of the third camera device 130 can also receive instructions from the processing module of the first camera device 110 to control the service shutdown and startup and specific service configuration; at the same time, the processing module of the third camera device 130 can also feed back its own status information to the processing module of the first camera device 110, such as the rotation angle, speed, current service status, etc. of the second gimbal 131.

[0049] Optionally, the gateway module is responsible for data interaction between the processing modules of the second camera device 120 , the processing modules of the second camera device 120 and the processing modules of the third camera device 130 , and is also responsible for external network interfaces.

[0050] Through the above control system, it is possible to simultaneously control the rotation of the first pan-tilt head 121 and the second pan-tilt head 131. The first pan-tilt head 121 drives the second pan-tilt head 131 to rotate, and the second pan-tilt head 131 rotates relative to the first pan-tilt head 121, so that the second pan-tilt head 131 can obtain a faster rotation speed, thereby speeding up the positioning time. At the same time, due to the higher rotation speed, it is easier for the spherical pan-tilt head to continuously track fast-moving targets.

[0051] Figure 41 is a schematic flow chart of a pan / tilt control method provided by an embodiment of the present invention. The method is described with the monitoring device 100 as the execution subject. Figure 4 , the method comprising:

[0052] S401, obtaining the coordinates of the target object.

[0053] Among them, the target object can be a person, a motor vehicle, a non-motor vehicle, etc.

[0054] In obtaining the coordinates of the target object, optionally, the collected panoramic image can be used to classify and identify people, motor vehicles, and non-motor vehicles. People, motor vehicles, or non-motor vehicles that trigger an alarm or enter the monitoring range can all be used as target objects. Feature extraction and identification (ID) assignment are performed on the detected target objects to distinguish different objects, and the coordinates of the target object are obtained based on the width and height of the detection box of each target object assigned an ID.

[0055] S402: Determine a first rotation angle of the first pan-tilt head and a second rotation angle of the second pan-tilt head according to the coordinates of the target object.

[0056] S403, controlling the first pan-tilt platform to rotate from the current position according to a first rotation angle, and controlling the second pan-tilt platform to rotate according to a second rotation angle.

[0057] Among them, the second pan-tilt head is installed on the first pan-tilt head, and the first rotation angle and the second rotation angle are respectively used to instruct the first pan-tilt head and the second pan-tilt head to complete the rotation movement within the same rotation time, so that the target object is located in the center of the screen of the ball camera corresponding to the rotated second pan-tilt head.

[0058] As Figure 2 As shown in the monitoring device in, if the third camera device 130 is used alone to track the target object, due to the limitation of the rotation speed, the target may be lost when facing a target that moves particularly fast. Therefore, in this scenario, in order to improve the tracking speed of the third camera device 130, the embodiment of the present invention can first determine the angles that the first pan-tilt head and the second pan-tilt head need to rotate respectively. In this way, the second pan-tilt head can be driven by the first pan-tilt head to quickly reach the position aligned with the target object, which not only improves the rotation speed of the second pan-tilt head, but also can allocate appropriate rotation angles to the first pan-tilt head and the second pan-tilt head so that the second pan-tilt head can be aligned with the target object, thereby reducing the risk of losing the target object.

[0059] It can be seen that the above-mentioned gimbal control method can be applied to the tracking scenario of targets moving at a faster speed. Assuming that the target object moves at a slower speed, the first gimbal or the second gimbal can be used alone to track the target object. In this case, it is only necessary to determine the rotation angle of the first gimbal, or only determine the rotation angle of the second gimbal, to achieve tracking of the target object moving at a slower speed.

[0060] Figure 5 A schematic flow chart of a possible implementation of step S402 provided in an embodiment of the present invention, the method can quickly assign a rotation angle to a first pan / tilt and a second pan / tilt, the method comprising:

[0061] S402-1, obtain the center coordinates of the screen of the ball camera.

[0062] Among them, the ball machine can be understood as Figure 2 The third camera device 130 in the ball camera has a center coordinate (X mid ,Y mid ) can be determined based on the images captured by the ball camera.

[0063] S402-2, determining the position difference between the second pan / tilt head and the target object according to the relative position information between the coordinates of the target object and the coordinates of the center of the screen, and the relative position information between the coordinates of the center of the screen and the center of the lens of the ball camera.

[0064] Among them, the coordinates of the target object and the center coordinates of the screen are both coordinates in the plane rectangular coordinate system, and the second gimbal is in the space coordinate system. It is necessary to map the coordinates in the plane rectangular coordinate system to the space coordinate system to determine the position difference between the second gimbal and the target object.

[0065] Figure 6 A schematic flow chart of an implementation of step S402-2 provided in an embodiment of the present invention, the method can quickly determine the position difference between the second gimbal and the target object, the method comprising:

[0066] S402-2-1, establish a spatial coordinate system with the center of the lens as the origin.

[0067] S402-2-2, mapping the coordinates of the target object and the coordinates of the center of the picture to the space coordinate system respectively, and determining the mapping points of the coordinates of the target object and the coordinates of the center of the picture in the space coordinate system;

[0068] S402-2-3, based on the coordinates of the target object and the coordinates of the center of the picture respectively mapping points in the space coordinate system, determine the relative position information of the coordinates of the target object and the coordinates of the center of the picture, and the relative position information of the coordinates of the center of the picture and the center of the camera lens;

[0069] S402-2-4, obtain the position difference between the second pan-tilt head and the target object based on the field of view parameter information of the ball camera in the spatial coordinate system, the relative position information between the coordinates of the target object and the center coordinates of the screen, and the relative position information between the center coordinates of the screen and the lens center of the ball camera.

[0070] Among them, the spatial coordinate system is established with the center of the lens as the origin. The coordinates of the center of the picture are known to be (X mid ,Y mid ), the horizontal half field of view angle H of the ball camera, the vertical half field of view angle V, then the line vector between the center coordinates of the screen and the origin Among them, P and T represent the horizontal angle and vertical angle of the mapping point of the center of the picture in the spatial coordinate system respectively, and the line vector between the coordinates (X, Y) of the target object and the origin Among them, P′ and T′ represent the horizontal angle and vertical angle of the mapping point of the target object in the spatial coordinate system respectively. Then when the target object is in the center of the ball camera's screen, the horizontal target position and vertical target position of the second pan / tilt should be as shown in the following formula:

[0071] P′=P 当前水平位置 +θ s

[0072]

[0073]

[0074] It should be noted that the pan / tilt positions in the embodiments of the present invention refer to the angles of the pan / tilt in the spatial coordinate system, θ s This is the position difference that needs to be determined in the embodiment of the present invention. For example, assuming that the position difference θ is determined s If the first pan-tilt or the second pan-tilt is used alone for tracking, it is only necessary to rotate the first pan-tilt or the second pan-tilt 30 degrees to aim at the target. If the first pan-tilt is required to drive the second pan-tilt to move, the embodiment of the present invention can be based on the provided θ s Determine the first rotation angle θ of the first gimbal r , the second rotation angle θ of the second gimbal b The sum of the first rotation angle and the second rotation angle is the position difference θ s .

[0075] It should be noted that steps S402-2-1 to S402-2-4 establish a spatial coordinate system based on the lens center of the second gimbal, and determine the position difference based on the field of view angle parameter information of the second gimbal. This is suitable for scenarios where the first gimbal needs to drive the second gimbal for tracking. If the first gimbal needs to be tracked separately, the above steps S402-2-1 to S402-2-4 establish a spatial coordinate system based on the lens center of the first gimbal, and determine the position difference based on the field of view angle parameter information of the first gimbal. The calculation method is similar and will not be repeated here.

[0076] Next, we will introduce how to use the position difference θ s Determine the first rotation angle θ r , the second rotation angle θ of the second gimbal b .

[0077] S402-3, determining a first rotation angle of the first gimbal and a second rotation angle of the second gimbal according to the position difference.

[0078] like Figure 2 In the mechanical structure shown, the horizontal rotation of the first gimbal can affect the horizontal rotation of the second gimbal to compensate for the horizontal rotation. In the motor motion curve with constant acceleration, assuming that the maximum angular velocity of the first gimbal is V r , the maximum angular velocity of the second gimbal is V b , the first gimbal needs to move at an angle of θ r , the angle θ that the second gimbal needs to move b , the position difference is θ s .

[0079] When considering the acceleration and deceleration intervals of the first gimbal and the second gimbal, one implementation method is as follows: Figure 7 As shown, Figure 7 A schematic flow chart of a first implementation of step S402-3 provided in an embodiment of the present invention, wherein the method can quickly allocate appropriate angles to the first pan-tilt and the second pan-tilt according to the position difference to ensure that the second pan-tilt can be aligned with the target object after rotation, and the method comprises:

[0080] S402-3-1a, obtaining the maximum angular velocity information corresponding to the first gimbal and the second gimbal respectively;

[0081] S402-3-2a, determining the speed difference information between the first gimbal and the second gimbal in the same rotation time according to the maximum angular velocity information corresponding to each of the first gimbal and the second gimbal;

[0082] S402-3-3a, determining a first rotation angle of the first gimbal and a second rotation angle of the second gimbal according to an angle allocation model corresponding to the speed difference information.

[0083] Among them, in order to ensure that the second gimbal can quickly and accurately reach the target position, the first gimbal and the second gimbal can start accelerating at the same time and decelerate and stop at the same time. Then, according to the motor acceleration curve with constant acceleration, the position difference θ can be obtained: s Satisfies the following relationship:

[0084]

[0085]

[0086]

[0087] Among them, a s is the acceleration of the first gimbal and the second gimbal.

[0088] The analytical diagram of the above relationship can be found in Fig. 8A and Figure 8B As shown, Fig. 8A A schematic diagram of a motor motion curve provided by an embodiment of the present invention, Figure 8B A schematic diagram of another motor motion curve provided by an embodiment of the present invention, Fig. 8A and Figure 8B What is reflected is: Assuming that the acceleration of the first gimbal and the second gimbal is the same and constant, then at a known position difference θ s In this case, the first gimbal and the second gimbal need to complete acceleration and deceleration within the same rotation time to ensure that the second gimbal can be aimed at the target. However, due to the speed difference between the first gimbal and the second gimbal, the first gimbal and the second gimbal need to have a speed difference within the same rotation time. For example, within the acceleration and deceleration interval, due to the maximum speed difference between the first gimbal and the second gimbal, both gimbals may be able to accelerate to the maximum speed and then decelerate, or only one gimbal may be able to accelerate to the maximum speed, or both gimbals may not be able to accelerate to the maximum speed. This speed difference results in different rotation angles allocated to the first gimbal and the second gimbal.

[0089] According to the above different speed difference information, the angle distribution model corresponding to each speed difference information can be obtained as follows:

[0090]

[0091]

[0092] θ b =θ s -θ r

[0093] For example, when This indicates that the first gimbal and the second gimbal have not reached the maximum speed in the acceleration and deceleration range. In this case, the position difference is evenly divided, that is, This ensures that the first gimbal quickly drives the second gimbal to move and aim at the target object. For example, This indicates that both the first gimbal and the second gimbal reach their maximum speeds within the acceleration and deceleration range. The corresponding speed distribution model is: θ b =θ s -θ r .

[0094] After obtaining the first rotation angle and the second rotation angle by the method, the horizontal target positions to which the first pan-tilt head and the second pan-tilt head are to be rotated can be obtained as follows:

[0095] P′ 第一云台 =P 第一云台当前水平位置 +θ r

[0096] P′ 第二云台 =P 第二云台当前水平位置 +θ b

[0097] When the acceleration and deceleration intervals of the first and second gimbals are not considered, another implementation method can be as follows Fig. 9 As shown, Fig. 9 A schematic flow chart of a second implementation of step S402-3 provided in an embodiment of the present invention, the method may include:

[0098] S402-3-1b, obtaining the maximum angular velocity information corresponding to the first gimbal and the second gimbal respectively;

[0099] S402-3-2b, according to the maximum angular velocity information corresponding to the first gimbal and the second gimbal respectively, the position difference is allocated by angle to obtain a first rotation angle of the first gimbal and a second rotation angle of the second gimbal.

[0100] Since the second gimbal has less displacement in the acceleration and deceleration interval, the acceleration and deceleration interval can be ignored. Then the angle allocation method based on the position difference can be:

[0101]

[0102]

[0103] After obtaining the first rotation angle and the second rotation angle by the method, the horizontal target positions to which the first pan-tilt head and the second pan-tilt head are to be rotated can be obtained as follows:

[0104]

[0105]

[0106] In the embodiment of the present application, the second gimbal is controlled to move to the target position, and real-time magnification scaling processing can be performed according to the target frame width and height of the target. When the target size is appropriate, automatic focusing is triggered to finally make the target clear.

[0107] Fig.10 A schematic flow chart of another pan / tilt control method provided by an embodiment of the present invention, the method can determine the speed at which the pan / tilt tracks a target to prevent target tracking failure, the method comprising:

[0108] S404, determining the current position change of the first pan / tilt and the maximum displacement increment of the target object in the picture corresponding to the first pan / tilt; or determining the current position change of the second pan / tilt and the maximum displacement increment of the target object in the picture of the ball camera;

[0109] The manner of determining the tracking speed of the first pan-tilt and the second pan-tilt is similar, and the following description will be made taking the second pan-tilt as an example.

[0110] In determining the current displacement increment of the second gimbal, optionally, it can be determined according to the current position of the second gimbal and the historical position when the last frame of image was captured, and the horizontal position and the vertical position are explained separately here.

[0111] Assume that the current position of the first PTZ is (P′, T′) and the historical position is (P′ k-1 ,T′ k-1 ), then the horizontal position change can be expressed as: DeltaPan = P′-P′ k-1 , the vertical position change can be expressed as: DeltaTilt = T'-T' k-1 .

[0112] The maximum horizontal displacement increment DeltaMaxPan can be the target space position increment corresponding to the target moving from the center to the upper right corner or the lower left corner. The maximum vertical displacement increment DeltaMaxTilt is similar.

[0113] S405, determining the tracking speed of the first gimbal according to the relative difference information between the current position change of the first gimbal and the maximum displacement increment; or determining the tracking speed of the second gimbal according to the relative difference information between the current position change of the second gimbal and the maximum displacement increment.

[0114] Considering that the maximum tracking speeds suitable for the pan / tilt at different magnifications are different, the pan / tilt running speed will be lower at a larger magnification. Therefore, an implementation method for determining the tracking speed is provided in an embodiment of the present invention.

[0115] Fig.11 A schematic flow chart of an implementation of step S405 provided in an embodiment of the present invention, wherein the method can determine the tracking speed according to the optical parameter information of different pan / tilt heads, and the method comprises:

[0116] S405-1, obtaining current optical parameter information and maximum tracking speed of the second gimbal;

[0117] S405-2, determining a speed change of the second pan / tilt head according to the current optical parameter information and the maximum tracking speed;

[0118] S405-3, determining the tracking speed of the second pan / tilt according to the relative difference information and the speed change of the second pan / tilt.

[0119] Next, we will continue to use the second gimbal as an example to explain how to determine the tracking speed. The first gimbal is similar. For example, assuming that the maximum horizontal tracking speed of the second gimbal is MaxPeedPan, the maximum vertical tracking speed is MaxPeedTilt, and the magnification of the second gimbal acquired in real time is Ration, based on the DeltaPan and DeltaTilt obtained above, the tracking speed of the second gimbal in the horizontal direction and the tracking speed in the vertical direction can be expressed as:

[0120] SpeedPan=DeltaPan*(MaxPeedPan / Ration) / DeltaMaxPan

[0121] SpeedTilt=DeltaTilt*(MaxPeedTilt / Ration) / DeltaMaxTilt

[0122] S406, controlling the second pan-tilt platform to move at the tracking speed, or controlling the second pan-tilt platform to move at the tracking speed.

[0123] Through the above method, if the first gimbal or the second gimbal performs tracking independently, the tracking speed of the first gimbal or the second gimbal can be determined independently to prevent target tracking failure.

[0124] After determining the position and speed information that the second gimbal or the first gimbal needs to move in the horizontal direction, the position information and speed information can be simultaneously transmitted to the underlying drive of the first gimbal or the second gimbal to simultaneously accelerate and decelerate in the two horizontal directions to control the horizontal direction to reach the target position. At the same time, the position that needs to be moved in the vertical direction is transmitted to the spherical gimbal to run to the target position in the vertical direction.

[0125] Based on the same inventive concept, the present invention also provides a pan / tilt control device, see Fig.12 , Fig.12The functional module diagram of the pan / tilt control device provided by the embodiment of the present invention includes:

[0126] An acquisition module 510 is used to obtain the coordinates of a target object;

[0127] An analysis module 520, configured to determine a first rotation angle of the first pan-tilt head and a second rotation angle of the second pan-tilt head according to the coordinates of the target object;

[0128] The second pan-tilt head is installed on the first pan-tilt head, and the first rotation angle and the second rotation angle are respectively used to instruct the first pan-tilt head and the second pan-tilt head to complete rotation within the same rotation time, so that the target object is located at the center of the screen of the ball camera corresponding to the rotated second pan-tilt head;

[0129] The control module 530 is used to control the first pan-tilt platform to rotate from a current position according to a first rotation angle, and control the second pan-tilt platform to rotate according to a second rotation angle.

[0130] In an optional implementation, the analysis module 520 is specifically used to: obtain the center coordinates of the screen of the ball camera; determine the position difference between the second pan-tilt head and the target object based on the relative position information between the coordinates of the target object and the center coordinates of the screen, and the relative position information between the center coordinates of the screen and the lens center of the ball camera; determine the first rotation angle of the first pan-tilt head and the second rotation angle of the second pan-tilt head based on the position difference.

[0131] In an optional embodiment, the analysis module 520 is specifically used to: obtain the maximum angular velocity information corresponding to each of the first gimbal and the second gimbal; determine the speed difference information of the first gimbal and the second gimbal within the same rotation time based on the maximum angular velocity information corresponding to each of the first gimbal and the second gimbal; determine the first rotation angle of the first gimbal and the second rotation angle of the second gimbal based on an angle allocation model corresponding to the speed difference information.

[0132] In an optional implementation, the analysis module 520 is specifically used to: establish a spatial coordinate system with the lens center as the origin; map the coordinates of the target object and the coordinates of the center of the picture to the spatial coordinate system respectively, and determine the mapping points of the coordinates of the target object and the coordinates of the center of the picture in the spatial coordinate system; determine the relative position information of the coordinates of the target object and the coordinates of the center of the picture, as well as the relative position information of the coordinates of the center of the picture and the center of the lens of the ball camera based on the mapping points of the coordinates of the target object and the coordinates of the center of the picture in the spatial coordinate system; obtain the position difference between the second pan-tilt head and the target object according to the field of view parameter information of the ball camera in the spatial coordinate system, the relative position information of the coordinates of the target object and the coordinates of the center of the picture, as well as the relative position information of the coordinates of the center of the picture and the center of the lens of the ball camera.

[0133] In an optional implementation, the analysis module 520 is specifically used to: obtain the maximum angular velocity information corresponding to the first gimbal and the second gimbal respectively; according to the maximum angular velocity information corresponding to the first gimbal and the second gimbal respectively, perform angle allocation on the position difference to obtain a first rotation angle of the first gimbal and a second rotation angle of the second gimbal.

[0134] In an optional embodiment, the analysis module 520 is also used to determine the current position change of the first pan-tilt head and the maximum displacement increment of the target object in the picture corresponding to the first pan-tilt head; or, to determine the current position change of the second pan-tilt head and the maximum displacement increment of the target object in the picture of the ball camera; to determine the tracking speed of the first pan-tilt head based on the relative difference information between the current position change of the first pan-tilt head and the maximum displacement increment; or, to determine the tracking speed of the second pan-tilt head based on the relative difference information between the current position change of the second pan-tilt head and the maximum displacement increment; the control module 530 is also used to control the second pan-tilt head to move at the tracking speed, or, to control the second pan-tilt head to move at the tracking speed.

[0135] In an optional implementation, the analysis module 520 is specifically used to obtain current optical parameter information and a maximum tracking speed of the second gimbal; determine a speed change of the second gimbal based on the current optical parameter information and the maximum tracking speed; and determine a tracking speed of the second gimbal based on the relative difference information and the speed change of the second gimbal.

[0136] The embodiment of the present invention further provides another structure of a monitoring device 100, the monitoring device 100 includes a processor, a memory, a bus, a first pan-tilt station 121, and a second pan-tilt station 131. The processor, the memory, the first pan-tilt station 121, and the second pan-tilt station 131 are connected via a bus.

[0137] The processor is used to execute executable modules stored in the memory, such as computer programs. The processor can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the movement calibration method provided in this embodiment can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software.

[0138] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0139] The memory may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory.

[0140] The memory is used to store programs, such as the program corresponding to the pan-tilt control device 500 provided in this embodiment. The pan-tilt control device 500 provided in this embodiment includes at least one software function module that can be stored in the memory in the form of software or firmware or fixed in the operating system (OS) of the monitoring device 100. After receiving the execution instruction, the processor executes the program to implement the movement calibration method provided in the embodiment of the present invention.

[0141] The bus may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc.

[0142] The embodiment of the present invention further provides a readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, a PTZ control method as described in any one of the above embodiments is implemented. The computer readable storage medium can be, but is not limited to, a U disk, a mobile hard disk, a ROM, a RAM, a PROM, an EPROM, an EEPROM, a magnetic disk, or an optical disk, and other media that can store program codes.

[0143] It should be understood that the device and method disclosed in the present invention can also be implemented in other ways. The device embodiments described above are only schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and a module, a program segment or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0144] In addition, the functional modules in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.

[0145] If the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes. It should be noted that in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.

[0146] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention. It should be noted that similar numbers and letters represent similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.

Claims

1. A pan / tilt control method, It is characterized in that The method comprises: Get the coordinates of the target object; Determining a first rotation angle of a first pan / tilt head and a second rotation angle of a second pan / tilt head according to the coordinates of the target object; comprising: Under the condition that the acceleration and deceleration intervals of the first gimbal and the second gimbal are taken into consideration, the maximum angular velocity information corresponding to each of the first gimbal and the second gimbal is obtained; according to the maximum angular velocity information corresponding to each of the first gimbal and the second gimbal, the speed difference information of the first gimbal and the second gimbal in the same rotation time is determined; according to the angle allocation model corresponding to the speed difference information, the first rotation angle of the first gimbal and the second rotation angle of the second gimbal are determined; wherein the angle allocation model corresponding to each speed difference information is as follows: Without considering the acceleration and deceleration intervals of the first gimbal and the second gimbal, the maximum angular velocities corresponding to the first gimbal and the second gimbal are obtained. According to the maximum angular velocities corresponding to the first gimbal and the second gimbal, the position difference is angle-allocated to obtain a first rotation angle of the first gimbal and a second rotation angle of the second gimbal. The manner of angle allocation according to the position difference is: Among them, a s is the acceleration of the first gimbal and the second gimbal; the maximum angular velocity information of the first gimbal is V r , the maximum angular velocity information of the second gimbal is V b , the first rotation angle is θ r , the second rotation angle is θ b θ s is the position difference; The second pan-tilt head is mounted on the first pan-tilt head, and the first rotation angle and the second rotation angle are respectively used to instruct the first pan-tilt head and the second pan-tilt head to complete rotational motion within the same rotation time, so that the target object is located at the center of the screen of the ball camera corresponding to the second pan-tilt head after rotation; The first pan-tilt platform is controlled to rotate according to the first rotation angle from a current position, and the second pan-tilt platform is controlled to rotate according to the second rotation angle.

2. The pan / tilt control method according to claim 1, It is characterized in that According to the coordinates of the target object, a first rotation angle of the first pan / tilt head and a second rotation angle of the second pan / tilt head are determined. Obtaining the center coordinates of the screen of the ball camera; Determine the position difference between the second pan / tilt head and the target object according to the relative position information between the coordinates of the target object and the center coordinates of the picture, and the relative position information between the center coordinates of the picture and the lens center of the ball camera; A first rotation angle of the first gimbal and a second rotation angle of the second gimbal are determined according to the position difference.

3. The pan / tilt control method according to claim 2, It is characterized in that Determining the position difference between the second pan / tilt head and the target object according to the relative position information between the coordinates of the target object and the center coordinates of the screen, and the relative position information between the center coordinates of the screen and the lens center of the ball camera, including: Establishing a spatial coordinate system with the center of the lens as the origin; Mapping the coordinates of the target object and the coordinates of the center of the picture to the space coordinate system respectively, and determining the mapping points of the coordinates of the target object and the coordinates of the center of the picture in the space coordinate system; Based on the coordinates of the target object and the coordinates of the center of the picture respectively mapping points in the space coordinate system, determine the relative position information of the coordinates of the target object and the coordinates of the center of the picture, and the relative position information of the coordinates of the center of the picture and the center of the lens of the ball camera; The position difference between the second pan / tilt head and the target object is obtained according to the field of view parameter information of the ball camera in the spatial coordinate system, the relative position information of the coordinates of the target object and the center coordinates of the screen, and the relative position information of the center coordinates of the screen and the lens center of the ball camera.

4. The PTZ control method according to claim 1, It is characterized in that The method further comprises: Determine the current position change of the first pan-tilt head and the maximum displacement increment of the target object in the picture corresponding to the first pan-tilt head; or determine the current position change of the second pan-tilt head and the maximum displacement increment of the target object in the picture of the ball camera; Determine the tracking speed of the first gimbal according to the relative difference information between the current position change of the first gimbal and the maximum displacement increment; or determine the tracking speed of the second gimbal according to the relative difference information between the current position change of the second gimbal and the maximum displacement increment; Control the second pan-tilt platform to move at the tracking speed, or control the second pan-tilt platform to move at the tracking speed.

5. The pan / tilt control method according to claim 4, It is characterized in that Determining a tracking speed of the second pan-tilt platform according to relative difference information between a current position change of the second pan-tilt platform and the maximum displacement increment; Obtaining current optical parameter information and maximum tracking speed of the second pan / tilt; Determine a speed change of the second pan / tilt head according to the current optical parameter information and the maximum tracking speed; The tracking speed of the second pan-tilt platform is determined according to the relative difference information and the speed change of the second pan-tilt platform.

6. A pan / tilt control device, It is characterized in that include: An acquisition module is used to obtain the coordinates of the target object; An analysis module, used to determine a first rotation angle of the first pan-tilt head and a second rotation angle of the second pan-tilt head according to the coordinates of the target object, comprising: Under the condition that the acceleration and deceleration intervals of the first gimbal and the second gimbal are taken into consideration, the maximum angular velocity information corresponding to each of the first gimbal and the second gimbal is obtained; according to the maximum angular velocity information corresponding to each of the first gimbal and the second gimbal, the speed difference information of the first gimbal and the second gimbal in the same rotation time is determined; according to the angle allocation model corresponding to the speed difference information, the first rotation angle of the first gimbal and the second rotation angle of the second gimbal are determined; wherein the angle allocation model corresponding to each speed difference information is as follows: Without considering the acceleration and deceleration intervals of the first gimbal and the second gimbal, the maximum angular velocities corresponding to the first gimbal and the second gimbal are obtained. According to the maximum angular velocities corresponding to the first gimbal and the second gimbal, the position difference is angle-allocated to obtain a first rotation angle of the first gimbal and a second rotation angle of the second gimbal. The manner of angle allocation according to the position difference is: Among them, a s is the acceleration of the first gimbal and the second gimbal; the maximum angular velocity information of the first gimbal is V r , the maximum angular velocity information of the second gimbal is V b , the first rotation angle is θ r , the second rotation angle is θ b θ s is the position difference; The second pan-tilt head is mounted on the first pan-tilt head, and the first rotation angle and the second rotation angle are respectively used to instruct the first pan-tilt head and the second pan-tilt head to complete rotational motion within the same rotation time, so that the target object is located at the center of the screen of the ball camera corresponding to the second pan-tilt head after rotation; The second pan-tilt head is mounted on the first pan-tilt head, and the first rotation angle and the second rotation angle are respectively used to instruct the first pan-tilt head and the second pan-tilt head to complete rotation within the same rotation time, so that the target object is located at the center of the screen of the ball camera corresponding to the second pan-tilt head after rotation; The control module is used to control the first pan-tilt head to rotate according to the first rotation angle from a current position, and to control the second pan-tilt head to rotate according to the second rotation angle.

7. A monitoring device, It is characterized in that The method comprises at least a processor and a memory, wherein the memory stores a computer program executable by the processor, and the processor can execute the computer program to implement the method according to any one of claims 1 to 5.

8. A readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.