WO2022057800A1 - Gimbal camera, gimbal camera tracking control method and apparatus, and device - Google Patents

Gimbal camera, gimbal camera tracking control method and apparatus, and device Download PDF

Info

Publication number
WO2022057800A1
WO2022057800A1 PCT/CN2021/118345 CN2021118345W WO2022057800A1 WO 2022057800 A1 WO2022057800 A1 WO 2022057800A1 CN 2021118345 W CN2021118345 W CN 2021118345W WO 2022057800 A1 WO2022057800 A1 WO 2022057800A1
Authority
WO
WIPO (PCT)
Prior art keywords
pan
tilt
change value
frame
target object
Prior art date
Application number
PCT/CN2021/118345
Other languages
French (fr)
Chinese (zh)
Inventor
李林芝
郭一民
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from CN202011232127.8A external-priority patent/CN114268732A/en
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022057800A1 publication Critical patent/WO2022057800A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast

Definitions

  • the present application relates to the technical field of video surveillance, and in particular, to a pan-tilt camera and a tracking control method, device and device for a pan-tilt camera.
  • the PTZ camera is a camera that supports adjusting the shooting direction and the focal length of the lens.
  • the PTZ camera observes the surrounding objects in all directions, and the user's field of view is not limited by factors such as the installation position, installation angle and lens angle of the PTZ camera.
  • PTZ cameras are often used to automatically track moving target objects (such as motor vehicles, non-motor vehicles, pedestrians, etc.), so that the target object remains in the set area of the displayed image, such as the central area. .
  • PTZ proportional integral derivative
  • a proportional integral derivative (PID) controller can be used in the gimbal, and a certain linear proportional relationship is formed between the output signal of the controller and the output error signal, and the steady-state error can be eliminated.
  • the change of the moving speed and running direction of the target object is cumbersome and unruly, causing the target object to change non-linearly, which is essentially different from the linear change in the aforementioned automatic control method to eliminate errors, which is easy to lead to the aforementioned automatic control method.
  • the error elimination effect becomes poor, and even the target object is lost.
  • the embodiments of the present application provide a pan-tilt camera, a tracking control method, device, and device for a pan-tilt camera, which can solve the problem of tracking and losing the target object due to the drastic changes in the motion of the target object, and realize the accurate tracking of the target with drastic changes in motion. object, so that the target object can always be displayed at the target position in subsequent frame images.
  • an embodiment of the present application provides a pan-tilt camera, including a camera body, a pan-tilt, and a pan-tilt controller.
  • the PTZ controller is used to obtain the first frame of images and the second frame of images collected by the camera body.
  • the first frame of images is collected late at the acquisition moment of the second frame of image.
  • the pan-tilt controller is further configured to determine a first distance difference between the position of the target object in the first frame of image and the target position of the first frame of image.
  • the pan-tilt controller is further configured to determine the distance change value between the position of the target object in the first frame image and the position of the target object in the second frame image.
  • the PTZ controller is also used to adjust the shooting angle of the camera body based on the first distance difference value and the distance change value, so that the target object is displayed at the target position of the third frame image collected by the camera body, and the third frame image is collected.
  • the time is later than the acquisition time of the first frame image.
  • the first distance difference value can represent the distance error that the position of the target object displayed in the first frame image deviates from the target position of the first frame image, that is, the first distance difference value can indicate the movement posture change of the target object.
  • the distance change value can represent the position change rate of the target object from the second frame image to the first frame image, that is, the distance change value can indicate the relative spatial position of the target image.
  • the error value between the position of the target object in the current frame image and the target position of the current frame image and the difference between the target object in the current frame image and any frame image before the current frame image are analyzed
  • the change value of the error distance between the two can accurately obtain the information such as the movement posture change and relative spatial position of the target object, so as to analyze the current speed change of the target object in multiple dimensions. Therefore, the spatial position between the target object and the PTZ camera is calculated, and the shooting angle of the camera body is precisely adjusted, so as to correct the position of the target object in the subsequent frame images in time, so that the target object is always kept at the target of the subsequent frame images.
  • Position solves the situation that the tracking of the target object is lost due to the drastic changes in the motion of the target object, improves the accuracy of tracking the target object with drastic changes in motion, and improves the tracking ability of the target object with drastic changes in motion.
  • the gimbal controller is specifically configured to obtain a control quantity parameter based on the first distance difference value and the distance change value, and the control quantity parameter includes the distance change value of the gimbal in the horizontal direction and the change value of the gimbal in the horizontal direction.
  • the distance change value in the vertical direction control the first motor in the gimbal to rotate the gimbal according to the distance change value of the gimbal in the horizontal direction, and control the second motor in the gimbal to change according to the distance of the gimbal in the vertical direction value to rotate the gimbal to adjust the shooting angle of the camera body.
  • the pan-tilt server changes the rotation angle of the pan-tilt in the horizontal and vertical directions, and can precisely adjust the posture of the pan-tilt, thereby adjusting the shooting angle of the camera body, so that the target object can be displayed in the subsequent frame images. target location.
  • control quantity parameter further includes a change value of the focal length of the camera body in the direction of the optical axis.
  • the pan-tilt controller is also used to adjust the focal length of the camera body according to the focal length change value of the camera body in the optical axis direction, so that the target object is displayed at the target position of the third frame image.
  • the gimbal server can also learn the current movement line of the target object based on the first distance difference and the distance change value.
  • the magnification of the angular velocity change of the speed on the spherical surface of the camera body, and the focal length change value of the camera body in the direction of the optical axis is obtained. Therefore, the PTZ server can adjust the shooting angle of the camera body and adjust the focal length of the camera in time, so that the target object can be displayed in the target position of the subsequent frame image, which improves the accuracy of tracking the target object that moves rapidly at a short distance, and improves the accuracy of tracking the target object in close range.
  • the pan-tilt controller is specifically used to perform fuzzy processing on the first distance difference value and the distance change value to obtain the proportional-integral-derivative PID control coefficient; based on the proportional-integral-derivative PID control coefficient, obtain the control parameter parameter .
  • the pan-tilt controller is specifically used to perform fuzzy processing on the first distance difference value and the distance change value to obtain a proportional-integral-derivative PID correction coefficient;
  • the product of the initial coefficients is determined as the proportional-integral-derivative PID control coefficient; based on the proportional-integral-derivative PID control coefficient, the control quantity parameter is obtained.
  • the proportional-integral-derivative PID server in the PTZ server can obtain more accurate control parameters, reducing the position of the target object in the subsequent frame image and the subsequent frame image.
  • the position of the target object in the subsequent frame image is adjusted in time, so that the target object is displayed in the target position of the subsequent frame image, and the PTZ camera can track the target object more accurately.
  • the gimbal controller is also used to obtain the depression angle of the gimbal in the vertical direction at the acquisition moment of the first frame of image; since the depression angle of the gimbal in the vertical direction increases, the target can be determined The subject is rapidly approaching the gimbal camera. Therefore, when the depression angle is greater than or equal to the preset angle, the pan-tilt server can determine that the moving linear velocity of the target object increases, which means that the target object moves rapidly. Therefore, the PTZ server can increase at least one of the distance change value of the PTZ in the horizontal direction and the distance change value of the PTZ in the vertical direction, so that the control parameter becomes larger, and the increased control value is obtained. parameter; determine the increased control value parameter as the control value parameter. Therefore, the pan-tilt controller can control the distance of the pan-tilt to change in unit time to increase based on the control parameter parameters, so that the pan-tilt can track the fast-moving target object in time.
  • the value range of the preset angle is greater than or equal to 20° and less than or equal to 90°.
  • the pan-tilt controller is also used to determine the area change value of the target object in the first frame image and the second frame image. Since the proportion of the area of the target object in the image is increasing rapidly, it can be determined that the target object has a tendency to approach the PTZ camera quickly or deviate from the target position quickly. If the area of the target object in the image is small or even negatively increases, it can be determined that the target object has a tendency to quickly move away from the PTZ camera.
  • the pan-tilt controller will determine the distance change value of the pan-tilt in the horizontal direction, the cloud Adjust at least one value of the distance change value of the stage in the vertical direction and the focal length change value of the camera body in the optical axis direction, so that the control amount parameter changes, and the adjusted control amount parameter is obtained; Determined as the control parameter.
  • the pan-tilt controller can control the pan-tilt change in unit time based on the control parameter parameters, and can track the fast-moving target object in time.
  • the pan-tilt controller is also used to acquire the focal length of the camera body at the acquisition moment of the first frame of image.
  • the pan/tilt controller changes the distance change value of the pan/tilt in the horizontal direction, the distance change value of the pan/tilt in the vertical direction, and the focal length of the camera body in the direction of the optical axis. At least one of the values is reduced so that the control quantity parameter becomes smaller, and the reduced control quantity parameter is obtained; the reduced control quantity parameter is determined as the control quantity parameter. Therefore, the pan-tilt controller can control the distance that the pan-tilt changes in unit time to become smaller based on the control parameter parameters, so that the pan-tilt can track the fast-moving target object in time.
  • the pan-tilt controller changes the distance change value of the pan-tilt head in the horizontal direction, the distance change value of the pan-tilt head in the vertical direction, and the focal length change of the camera body in the optical axis direction. At least one of the values is increased so that the control variable parameter becomes larger, and the increased control variable parameter is obtained; the increased control variable parameter is determined as the control variable parameter. Therefore, the pan-tilt controller can control the distance of the pan-tilt to change in unit time to increase based on the control parameter parameters, so that the pan-tilt can track the fast-moving target object in time.
  • the PTZ server can evaluate the current motion of the target object by reading parameters such as the depression angle of the PTZ in the vertical direction, the area change value of the target object in the first frame image and the second frame image, and the focal length of the camera body.
  • the linear velocity is the magnification of the angular velocity change on the spherical surface of the camera body, which realizes the timely adjustment of the shooting angle of the camera body and the focal length of the camera body, so that the target object can display the target position in the subsequent frame images, so that the PTZ camera can be more Accurately track the target object that moves quickly at a short distance, which improves the tracking ability and accuracy of the target object that moves quickly at a short distance.
  • the pan-tilt controller is specifically configured to determine a second distance difference between the position of the target object in the second frame image and the target position of the second frame image; based on the first distance difference and the second distance difference to determine the distance change value.
  • the target position is the central area of any frame of images.
  • an embodiment of the present application provides a tracking control method for a pan-tilt camera, which starts the method when a target object complies with a preset rule or receives an instruction to track the target object instructed by a user.
  • the method includes: obtaining a first frame of images and a second frame of images collected by a camera body, where the collection time of the first frame image is later than the collection time of the second frame image.
  • a first distance difference between the position of the target object in the first frame image and the target position of the first frame image is determined.
  • a distance change value between the position of the target object in the first frame image and the position of the target object in the second frame image is determined.
  • adjusting the shooting angle of the camera body based on the first distance difference value and the distance change value includes: obtaining a control amount parameter based on the first distance difference value and the distance change value, and the control amount parameter includes a pan/tilt head
  • the distance change value in the horizontal direction and the distance change value of the gimbal in the vertical direction Control the first motor in the gimbal to rotate the gimbal according to the distance change value of the gimbal in the horizontal direction, and control the second motor in the gimbal to rotate the gimbal according to the distance change value of the gimbal in the vertical direction, so as to Adjust the shooting angle of the camera body.
  • control quantity parameter further includes a change value of the focal length of the camera body in the direction of the optical axis.
  • the method further includes: adjusting the focal length of the camera body according to the focal length change value of the camera body in the direction of the optical axis, so that the target object is displayed at the target position of the third frame image.
  • obtaining the control parameter parameters based on the first distance difference and the distance change value includes: performing fuzzy processing on the first distance difference and the distance change value to obtain the proportional-integral-derivative PID control coefficient. Based on the proportional-integral-derivative PID control coefficients, the control parameters are obtained.
  • obtaining the control parameter parameters based on the first distance difference value and the distance change value includes: performing fuzzy processing on the first distance difference value and the distance change value to obtain a proportional-integral-derivative PID correction coefficient.
  • the product of the proportional integral derivative PID correction coefficient and the proportional integral derivative PID initial coefficient is determined as the proportional integral derivative PID control coefficient.
  • the control parameters are obtained.
  • the method further includes: at the acquisition moment of the first frame of image, acquiring the depression angle of the pan/tilt head in the vertical direction.
  • the depression angle is greater than or equal to the preset angle, at least one of the distance change value of the gimbal in the horizontal direction and the distance change value of the gimbal in the vertical direction is increased to obtain the increased control parameter;
  • the larger control quantity parameter is determined as the control quantity parameter.
  • the value range of the preset angle is greater than or equal to 20° and less than or equal to 90°.
  • the method further includes: determining area change values of the target object in the first frame image and the second frame image.
  • the area change value is greater than the first threshold, or, when the area change value is smaller than the second threshold and the absolute value of the area change value is greater than the third threshold, the distance change value of the gimbal in the horizontal direction and the distance change of the gimbal in the vertical direction Adjust at least one of the distance change value and the focal length change value of the camera body in the direction of the optical axis to obtain the adjusted control amount parameter; the adjusted control amount parameter is determined as the control amount parameter.
  • the method further includes: at the acquisition moment of the first frame of image, acquiring the focal length of the camera body.
  • the focal length of the camera body is greater than the fourth threshold, change at least one of the distance change value of the pan/tilt in the horizontal direction, the distance change value of the pan/tilt in the vertical direction, and the focal length change value of the camera body in the optical axis direction Adjust it to a smaller value to obtain the reduced control quantity parameter; determine the reduced control quantity parameter as the control quantity parameter.
  • the method further includes: at the acquisition moment of the first frame of image, acquiring the focal length of the camera body.
  • the focal length of the camera body is less than the fifth threshold, at least one of the distance change value of the pan/tilt head in the horizontal direction, the distance change value of the pan/tilt head in the vertical direction, and the focal length change value of the camera body in the optical axis direction Increase the control value to obtain the control value parameter after the increase; determine the control value parameter after the increase as the control value parameter.
  • determining the distance change value between the position of the target object in the first frame image and the position of the target object in the second frame image includes: determining the position of the target object in the second frame image A second distance difference from the target position of the second frame image. A distance change value is determined based on the first distance difference value and the second distance difference value.
  • the target position is the central area of any frame of images.
  • the beneficial effects of the tracking control method can refer to the beneficial effects brought by the first aspect and the possible implementations of the first aspect. The effect will not be repeated here.
  • an embodiment of the present application provides a tracking control device for a pan-tilt camera, including: an acquisition module configured to acquire information about the camera body when the target object conforms to a preset rule or receives an instruction to track the target object instructed by a user. For the first frame image and the second frame image collected, the collection time of the first frame image is later than the collection time of the second frame image.
  • the determining module is configured to determine the first distance difference between the position of the target object in the first frame image and the target position of the first frame image.
  • the determining module is further configured to determine a distance change value between the position of the target object in the first frame of image and the position of the target object in the second frame of image.
  • the adjustment module is used to adjust the shooting angle of the camera body based on the first distance difference value and the distance change value, so that the target object is displayed at the target position of the third frame image collected by the camera body, and the collection time of the third frame image is later than The acquisition moment of the first frame of image.
  • the adjustment module is specifically configured to obtain a control amount parameter based on the first distance difference value and the distance change value, and the control amount parameter includes the distance change value of the pan/tilt in the horizontal direction and the pan/tilt in the vertical direction
  • the distance change value on the PTZ control the first motor in the gimbal to rotate the gimbal according to the distance change value of the gimbal in the horizontal direction, and control the second motor in the gimbal to rotate the gimbal according to the distance change value of the gimbal in the vertical direction.
  • the gimbal rotates to adjust the shooting angle of the camera body.
  • control quantity parameter further includes a change value of the focal length of the camera body in the direction of the optical axis.
  • the adjustment module is further configured to adjust the focal length of the camera body according to the focal length change value of the camera body in the direction of the optical axis, so that the target object is displayed at the target position of the third frame image.
  • the adjustment module is specifically configured to perform fuzzy processing on the first distance difference value and the distance change value to obtain a proportional-integral-derivative PID control coefficient; based on the proportional-integral-derivative PID control coefficient, obtain a control parameter parameter.
  • an adjustment module which is specifically used to perform fuzzy processing on the first distance difference value and the distance change value to obtain a proportional-integral-derivative PID correction coefficient; and determine the product of the proportional-integral-derivative PID correction coefficient and the proportional-integral-derivative PID initial coefficient as proportional-integral Differential PID control coefficient; based on the proportional integral derivative PID control coefficient, the control parameter is obtained.
  • the device further includes: a first acquisition module, configured to acquire the depression angle of the pan/tilt head in the vertical direction at the acquisition moment of the first frame of image.
  • the adjustment module is also used to increase at least one of the distance change value of the gimbal in the horizontal direction and the distance change value of the gimbal in the vertical direction when the depression angle is greater than or equal to the preset angle, to obtain the increased value.
  • Control quantity parameter determine the enlarged control quantity parameter as the control quantity parameter.
  • the value range of the preset angle is greater than or equal to 20° and less than or equal to 90°.
  • the determining module is further configured to determine the area change value of the target object in the first frame image and the second frame image.
  • the adjustment module is also used for adjusting the distance change value of the pan/tilt in the horizontal direction, the cloud value when the area change value is greater than the first threshold value, or when the area change value is smaller than the second threshold value and the absolute value of the area change value is greater than the third threshold value. Adjust at least one of the distance change value of the stage in the vertical direction and the focal length change value of the camera body in the optical axis direction to obtain the adjusted control quantity parameter; the adjusted control quantity parameter is determined as the control quantity parameter.
  • the device further includes: a second acquisition module, configured to acquire the focal length of the camera body at the acquisition moment of the first frame of image.
  • the adjustment module is also used to change the distance change value of the gimbal in the horizontal direction, the distance change value of the gimbal in the vertical direction, and the focal length change of the camera body in the direction of the optical axis when the focal length of the camera body is greater than the fourth threshold At least one of the values is reduced to obtain a reduced control quantity parameter; the reduced control quantity parameter is determined as a controlled quantity parameter.
  • the adjustment module is also used to adjust the distance change value of the pan/tilt in the horizontal direction, the distance change value of the pan/tilt in the vertical direction, and the distance change of the camera body in the optical axis direction when the focal length of the camera body is smaller than the fifth threshold. At least one of the focal length change values is increased to obtain an increased control amount parameter; the increased control amount parameter is determined as a control amount parameter.
  • the determining module is specifically configured to determine a second distance difference between the position of the target object in the second frame image and the target position of the second frame image; based on the first distance difference and the first distance difference Two distance difference, determine the distance change value.
  • the target position is the central area of any frame of images.
  • the beneficial effects of the tracking control device can refer to the beneficial effects brought by the possible implementations of the second aspect and the second aspect. The effect will not be repeated here.
  • the present application provides an electronic device, comprising: a memory and a processor; the memory is used to store program instructions; the processor is used to call the program instructions in the memory to enable the electronic device to execute the second aspect and any possibility of the second aspect The tracking control method of the PTZ camera in the design.
  • the present application provides a chip system, which is applied to an electronic device including a memory, a display screen, and a sensor; the chip system includes: a processor; when the processor executes the computer instructions stored in the memory, the electronic device executes the first The tracking control method of the PTZ camera in the second aspect and any possible design of the second aspect.
  • the present application provides a computer-readable storage medium on which a computer program is stored, and the computer program is executed by the processor to enable the electronic device to implement the second aspect and the PTZ in any possible design of the second aspect.
  • Camera tracking control method
  • the present application provides a computer program product, comprising: execution instructions, the execution instructions are stored in a readable storage medium, at least one processor of an electronic device can read the execution instructions from the readable storage medium, and at least one processor Executing the execution instruction enables the electronic device to implement the second aspect and the tracking control method for the pan-tilt camera in any possible design of the second aspect.
  • FIGS. 1A-1B are schematic structural diagrams of a pan-tilt camera provided by an embodiment of the application.
  • FIG. 2 is a schematic flowchart of a tracking control method for a PTZ camera provided by an embodiment of the present application
  • FIG. 3 is a schematic diagram of a proportional-integral-derivative PID controller using fuzzy control provided by an embodiment of the present application;
  • FIG. 4 is a schematic diagram of a scene of a tracking control method for a PTZ camera provided by an embodiment of the present application
  • FIG. 5 is a schematic scene diagram of a tracking control method for a PTZ camera provided by an embodiment of the present application
  • FIG. 6 is a schematic structural diagram of a tracking control device for a pan-tilt camera according to an embodiment of the present application.
  • the present application provides a pan-tilt camera, a tracking control method for a pan-tilt camera, a tracking control device for a pan-tilt camera, an electronic device, a computer storage medium, a computer program product, and a chip system, which can accurately know the movement posture change of a target object, relative Spatial position and other information, multi-dimensional analysis of the speed change of the target object, so as to solve the spatial position between the target object and the PTZ camera, and accurately adjust the shooting angle of the camera body, so as to correct the target object in subsequent frame images
  • the position of the target object is always kept at the target position of the subsequent frame image, which solves the situation that the target object tracking is lost due to the drastic changes in the motion of the target object, improves the tracking accuracy of the target object with drastic changes in motion, and improves the accuracy of the target object.
  • FIGS. 1A-1B are schematic structural diagrams of a pan-tilt camera according to an embodiment of the present application.
  • the pan-tilt camera in this embodiment of the present application may include: a camera body 101 , a pan-tilt 102 , and a pan-tilt controller 103 .
  • the camera body 101 and the pan-tilt controller 103 are communicatively connected, and the pan-tilt controller 103 and the pan-tilt 102 are electrically connected.
  • the camera may be a dome camera (spherical camera) or a camera connected to the external pan/tilt 102 .
  • the pan-tilt controller 103 may be integrated in the camera body 101 , or may be provided separately from the camera body 101 .
  • the camera body 101 and the pan/tilt head 102 may be integrally provided, or may be provided separately.
  • the embodiments of the present application do not limit the foregoing contents.
  • the camera body 101 includes a lens, a sensor and a processor.
  • the function of the lens is to present the light image of the observed target on the sensor of the camera.
  • the lens combines various optical parts (reflectors, transmission mirrors, prisms) of different shapes and different media (plastic, glass or crystal) in a certain way, so that after the light is transmitted or reflected by these optical parts, according to people's expectations. It is necessary to change the transmission direction of the light to be received by the receiving device to complete the optical imaging process of the object.
  • each lens is composed of multiple groups of lenses with different curved curvatures combined at different intervals.
  • the focal length of the lens is determined by the selection of indicators such as spacing, lens curvature, and light transmittance.
  • the main parameters of the lens include: effective focal length, aperture, maximum image plane, field of view, distortion, relative illumination, etc. The value of each index determines the overall performance of the lens.
  • a sensor also known as an image sensor
  • CCD charge-coupled device
  • CMOS complementary metal oxide semiconductor
  • Both CCD and CMOS have a large number (eg, tens of millions) of photodiodes, each photodiode is called a photosensitive cell, and each photosensitive cell corresponds to a pixel.
  • the photodiode converts the light signal into an electrical signal containing brightness (or brightness and color) after receiving light, and the image is reconstructed accordingly.
  • Bayer array is a common image sensor technology that can be used in CCD and CMOS.
  • Bayer array uses Bayer color filter to make different pixels only sensitive to one of the three primary colors of red, blue and green. These pixels are interleaved and then interpolated by demosaicing to restore the original image.
  • Bayer arrays can be applied to CCD or CMOS, and sensors using Bayer arrays are also called Bayer sensors.
  • sensor technologies such as X3 (developed by Foveon). X3 technology uses three layers of photosensitive elements, each layer records one of the color channels of RGB, so it can capture all colors on one pixel. Image sensor.
  • a processor also known as an image processor is used to perform operations such as digital signal processing, image signal processing (ISP), and encoding.
  • the pan/tilt 102 is a supporting device for installing and fixing the camera body 101 . With the rotation of the pan/tilt 102, the camera body 101 can be driven to rotate, thereby changing the rotation angle of the camera body 101, so that the camera body 101 can automatically scan a predetermined area.
  • the gimbal 102 can be divided into a horizontal rotating gimbal that can only rotate left and right, and an omnidirectional gimbal that can rotate left and right as well as up and down.
  • the pan/tilt head 102 may be a mounting platform composed of a first motor and a second motor.
  • the first motor can be used to realize the rotation of the pan-tilt 102 in the horizontal direction
  • the second motor can be used to realize the rotation of the pan-tilt 102 in the vertical direction
  • the first motor and the second motor may be AC motors or DC motors.
  • FIG. 1B shows that the pan/tilt head 102 can rotate in the horizontal direction along the P-axis, and can also rotate in the vertical direction along the T-axis.
  • the P axis pan
  • the horizontal rotation axis is perpendicular to the horizontal plane.
  • the T-axis (tilt), called the vertical axis of rotation, is parallel to the horizontal plane.
  • the pan-tilt controller 103 is configured to output control parameters to the pan-tilt 102 based on the tracking control method provided by the embodiment of the present application, so that the motor in the pan-tilt 102 controls the pan-tilt 102 to rotate based on the control-level parameters, so as to adjust the camera body Rotation angle of 101. And the pan-tilt controller 103 is also used for adjusting the focal length of the camera body 101 based on the control parameter. Wherein, the present application does not limit parameters such as the quantity and model of the PTZ controller 103 .
  • the camera body 101 can transmit the collected images to the pan-tilt controller 103 so that the pan-tilt controller 103 can identify the target object in each frame of image.
  • the target object There may be one or more target objects, which is not limited in this embodiment of the present application.
  • an algorithm module may be set in the pan-tilt controller 103, so that the pan-tilt controller 103 determines whether the target object conforms to the preset rule through the algorithm module.
  • the preset rules may include but are not limited to rules such as violating traffic rules, breaking into a private residence, or matching images of criminal suspects.
  • the pan-tilt controller 103 can trigger to execute the tracking control method provided by the embodiment of the present application, so as to correct the position of the target object in the subsequent frame images.
  • the pan-tilt controller 103 may be connected to the terminal device in communication, and the pan-tilt controller 103 may receive an instruction to track the target object instructed by the user from the terminal device.
  • the pan-tilt controller 103 may be communicatively connected to the server, and the server may be communicatively connected to the terminal device, and the pan-tilt controller 103 may receive, through the server, an instruction to track the target object indicated by the user and sent by the terminal device.
  • the present application does not limit the specific implementation manner of the instruction.
  • the user designates the target object as the target A, or the user designates the target object as the target appearing in each frame of the image at the target moment.
  • the pan-tilt controller 103 can trigger to execute the tracking control method provided by the embodiment of the present application to correct the position of the target object in the subsequent frame images.
  • FIG. 2 is a schematic flowchart of a tracking control method for a pan-tilt camera according to an embodiment of the present application.
  • the PTZ server 103 is used as the main body of execution, and the current frame image is taken as an example of the first frame image, any frame image before the current frame image is taken as an example of the second frame image, and any frame image after the current frame image is taken as an example.
  • One frame of image is illustrated by taking the third frame of image as an example.
  • the tracking control method of the pan-tilt camera according to the embodiment of the present application may include:
  • the PTZ server 103 has learned the target object and the position of the target object in the subsequent frame images that needs to be corrected.
  • the pan-tilt server 103 can determine the position of the target object in the first frame of image, and the target position of the first frame of image (ie, the position where the target object is correctly displayed in the first frame of image).
  • the present application does not limit the specific position of the target position in the first frame of image.
  • the target position is the central area of the first frame image.
  • the pan-tilt server 103 can obtain the first distance difference based on the position of the target object in the first frame of image and the target position of the first frame of image.
  • the present application does not limit the implementation manner in which the PTZ server 103 obtains the first distance difference.
  • the PTZ server 103 may equate the position of the target object in the first frame image with the center coordinates of the target object in the first frame image. Likewise, the pan-tilt server 103 may equate the target position of the first frame image with the center coordinates of the target position. Therefore, the pan-tilt server 103 can obtain the first distance difference by taking the difference between the aforementioned two center coordinates.
  • the PTZ server 103 may be provided with a first initial model.
  • the first initial model is a model of the distance difference between two irregular images.
  • the pan-tilt server 103 may obtain a plurality of boundary coordinates from the position of the target object in the first frame image.
  • the pan-tilt server 103 can also take a plurality of boundary coordinates from the target position of the first frame of image. Therefore, the pan-tilt server 103 inputs the aforementioned two sets of boundary coordinates into the first initial model, and trains the first initial model to obtain the first distance difference.
  • S103 Determine a distance change value between the position of the target object in the first frame image and the position of the target object in the second frame image.
  • the PTZ server 103 may determine the position of the target object in the first frame of image and the position of the target object in the second frame of image.
  • the acquisition time of the first frame of image is later than the acquisition time of the second frame of image.
  • the second frame of image may be the previous frame of the first frame of image, or may be the Nth frame of image before the first frame of image, where N is greater than or equal to 2, which is not limited in this embodiment of the present application.
  • the pan-tilt server 103 can obtain the distance change value based on the position of the target object in the first frame of image and the position of the target object in the second frame of image.
  • the embodiment of the present application does not limit the specific implementation manner in which the pan-tilt server 103 obtains the distance change value.
  • the pan-tilt server 103 determines the second distance between the position of the target object in the second frame image and the target position of the second frame image in the same manner as the first distance difference value obtained in step S101 difference. Therefore, the pan-tilt server 103 may use the form of the difference or quotient of the first distance difference and the second distance difference as the distance change value. Wherein, the target position of the first frame image is the same as the target position of the second frame image.
  • the PTZ server 103 may be provided with a second initial model.
  • the second initial model is a model of the distance change value of the same target in the two images.
  • the pan-tilt server 103 may obtain a plurality of boundary coordinates from the position of the target object in the first frame image.
  • the pan-tilt server 103 may also obtain a plurality of boundary coordinates from the position of the target object in the second frame image. Therefore, the PTZ server 103 inputs the aforementioned two sets of boundary coordinates into the second initial model, and trains the second initial model to obtain the distance change value.
  • steps S102 and S103 have no sequential order, and steps S102 and S103 may be performed simultaneously or sequentially.
  • the pan-tilt server 103 can know the distance error of the target object deviating from the target position of the first frame image based on the first distance difference value, so as to know the movement posture change of the target object.
  • the pan-tilt server 103 can know the position change rate of the target object from the second frame image to the first frame image based on the distance change value, so as to know the relative spatial position of the target object moving from the second frame image to the first frame image .
  • the PTZ server 103 can analyze the speed change of the target object in a multi-dimensional manner, which is beneficial to solve the problem between the target object and the PTZ camera. In order to precisely adjust the shooting angle of the camera body, to adjust the position of the target object in the third frame image, so that the target object can be displayed in the target position of the third frame image.
  • the acquisition time of the third frame of image is later than the acquisition time of the first frame of image.
  • the third frame of image may be the next frame of the first frame of image, or may be the M-th frame of image after the first frame of image, where M is greater than or equal to 2, which is not limited in this embodiment of the present application.
  • the tracking control method of the PTZ camera provided by the present application, by analyzing the error value between the position of the target object in the current frame image and the target position of the current frame image and any one of the target object before the current frame image and the current frame image.
  • the change value of the error distance between the frame images can accurately know the movement posture change, relative spatial position and other information of the target object, so as to analyze the current speed change of the target object in multiple dimensions. Therefore, the spatial position between the target object and the PTZ camera is calculated, and the shooting angle of the camera body is precisely adjusted, so as to correct the position of the target object in the subsequent frame images in time, so that the target object is always kept at the target of the subsequent frame images.
  • Position solves the situation that the tracking of the target object is lost due to the drastic changes in the motion of the target object, improves the accuracy of tracking the target object with drastic changes in motion, and improves the tracking ability of the target object with drastic changes in motion.
  • the pan-tilt server 103 can obtain the control amount parameter based on the first distance difference value and the distance change value.
  • the pan/tilt 102 is a supporting device for installing and fixing the camera body 101 . Therefore, the rotation of the pan/tilt head 102 in the horizontal direction and the vertical direction can drive the camera body 101 to rotate in any direction within the mechanical movement range, so that the camera body 101 can monitor the predetermined area in real time.
  • control amount parameter can be used to adjust the posture of the gimbal 102 , so that the adjustment of the shooting angle of the camera body 101 can change with the change of the posture of the gimbal 102 .
  • the PTZ server 103 obtains the proportional-integral-derivative PID control coefficient based on the first distance difference value and the distance change value.
  • the PTZ server 103 can use a PID controller with proportional integral derivative PID control coefficients to perform fuzzy processing on the attitude of the PTZ 102 to obtain control parameters.
  • the gimbal server 103 can decompose the control quantity parameter orthogonally along the P-axis and the T-axis into the components in the horizontal direction and the vertical direction, that is, The distance change value of the gimbal 102 in the horizontal direction and the distance change value of the gimbal 102 in the vertical direction.
  • the gimbal server 103 can decompose the first distance difference orthogonally along the P-axis and the T-axis into the horizontal direction and the vertical direction.
  • the pan-tilt server 103 obtains the proportional-integral-derivative PID control coefficient in the horizontal direction based on the component of the first distance difference in the horizontal direction and the component of the distance change value in the horizontal direction.
  • the pan-tilt server 103 can use a PID controller with proportional-integral-derivative PID control coefficients in the horizontal direction to perform fuzzy processing on the posture of the pan-tilt 102 to obtain the distance change value of the pan-tilt 102 in the horizontal direction.
  • the PTZ server 103 obtains the proportional-integral-derivative PID control coefficient in the vertical direction based on the vertical component of the first distance difference value and the vertical component of the distance change value.
  • the PTZ server 103 can use a PID controller with proportional integral derivative PID control coefficients in the vertical direction to perform fuzzy processing on the attitude of the PTZ 102 to obtain the distance change value of the PTZ 102 in the vertical direction.
  • the pan-tilt controller 103 can output the distance change value of the pan-tilt 102 in the horizontal direction to the first motor in the pan-tilt 102, so that the first motor in the pan-tilt 102 is in accordance with the position of the pan-tilt 102.
  • the distance change value in the horizontal direction determines the speed change value of the first motor.
  • the first motor in the gimbal 102 rotates the gimbal 102 based on the change value of the rotational speed of the first motor, and changes the rotation angle of the gimbal 102 in the horizontal direction, so that the shooting angle of the camera body 101 is adjusted according to the rotation of the gimbal 102 change by rotation.
  • the gimbal controller 103 can output the distance change value of the gimbal 102 in the vertical direction to the second motor in the gimbal 102 , so that the second motor in the gimbal 102 changes according to the distance of the gimbal 102 in the vertical direction value to determine the rotational speed change value of the second motor.
  • the second motor in the gimbal 102 rotates the gimbal 102 based on the rotational speed change value of the second motor to change the rotation angle of the gimbal 102 in the vertical direction.
  • the embodiments of the present application do not limit parameters such as specific types, parameters, and models of the first motor and the second motor.
  • the pan-tilt server 103 can accurately adjust the posture of the pan-tilt 102 in the horizontal and vertical directions, so that the shooting angle of the camera body 101 is adjusted as the pan-tilt 102 rotates.
  • the pan-tilt server 103 can also precisely adjust the posture of the pan-tilt 102 in the horizontal direction or the vertical direction, and it is not necessary to adjust the posture of the pan-tilt 102 in both directions.
  • the pan-tilt server 103 can also change the focal length of the camera body 101 . That is, when the focal length of the camera body 101 changes, the position of the target object captured by the camera body 101 in the current frame image will change.
  • the focal length of the camera body 101 refers to Z zoom, which is called zoom zoom.
  • Zooming changing the distance between the lens and the imaging surface to achieve the target object with a clear image, that is, the focal length of the objective lens remains unchanged, and the focal length of the eyepiece is changed to achieve the purpose of zooming.
  • Zoom Change the focal length of the lens, that is, change the angle of view, that is, the focal length of the eyepiece remains unchanged, and the focal length of the objective lens is changed to achieve the purpose of zooming.
  • control parameter parameters can also be used to adjust the posture of the pan/tilt head 102 and the focal length of the camera body 101 , so that both the shooting angle of the camera body 101 and the focal length of the camera body 101 can be changed.
  • control parameter in addition to the distance change value of the gimbal 102 in the horizontal direction and the distance change value of the gimbal 102 in the vertical direction, the control parameter may further include: the focal length of the camera body 101 in the optical axis direction change value.
  • the pan-tilt server 103 can obtain the magnification of the angular velocity change of the current linear velocity of the target object on the spherical surface of the camera body 101, and obtain the focal length of the camera body 101 in the direction of the optical axis change value. Therefore, the pan-tilt controller 103 can precisely adjust the focal length of the camera body 101 according to the change value of the focal length of the camera body 101 in the optical axis direction, so that the target object is displayed at the target position of the third frame image, which improves the tracking speed at close range. The accuracy of moving target objects improves the tracking ability of fast moving target objects at close range.
  • the PTZ server 103 is provided with a proportional-integral-derivative PID controller that adopts fuzzy control as exemplarily shown in FIG. 3 .
  • the PTZ server 103 inputs the first distance difference value and the distance change value into the proportional-integral-derivative PID controller.
  • the proportional-integral-derivative PID controller calculates the first distance difference and the distance change value through the fuzzy algorithm, and can obtain the proportional-integral-derivative PID correction coefficients, namely Ka, Kb, Kc in Fig. 3 .
  • the proportional-integral-derivative PID controller determines the product of the proportional-integral-derivative PID correction coefficient and the proportional-integral-derivative PID initial coefficient (that is, Kp, Ki, Kd in Fig. 3) as the proportional-integral-derivative PID control coefficient, that is, in Fig. 3 Ka*Kp, Kb*Ki, Kc*Kd.
  • the proportional integral derivative PID control coefficient can affect the size of each control factor in the proportional integral derivative PID controller
  • the proportional integral derivative PID initial coefficient is the control parameter initially set by the proportional integral derivative PID controller.
  • the proportional-integral-derivative PID controller can obtain the control parameters based on the proportional-integral-derivative PID control coefficients.
  • the PTZ server 103 inputs the first distance difference value and the distance change value into the proportional-integral-derivative PID controller.
  • the proportional-integral-derivative PID controller calculates the first distance difference and the distance change value through the fuzzy algorithm, and can obtain the proportional-integral-derivative PID control coefficients, namely Ka*Kp, Kb*Ki, Kc*Kd in Figure 3.
  • the proportional-integral-derivative PID controller can obtain the control quantity parameter based on the proportional-integral-derivative PID control coefficient.
  • the proportional-integral-derivative PID server in the PTZ server 103 can obtain more accurate control parameters, reducing the position of the target object in the subsequent frame images and the subsequent frame images.
  • the position of the target object in the subsequent frame image is adjusted in time, so that the target object is displayed in the target position of the subsequent frame image, and the PTZ camera can track the target object more accurately.
  • the proportional-integral-derivative PID controller can adopt various methods, and the first distance difference value and the distance change value are calculated by the fuzzy algorithm, and the proportional-integral-derivative PID correction coefficient or the proportional-integral-derivative PID control coefficient can be obtained.
  • the proportional-integral-derivative PID controller can obtain the proportional-integral-derivative PID correction coefficient or the proportional-integral-derivative PID control coefficient based on the first distance difference and the distance change value by looking up a table, as shown in FIG. 3 . Any of Ka, Kb, Kc, Ka*Kp, Kb*Ki, Kc*Kd.
  • the variation range of the first distance difference value is [-100, 100]
  • the PTZ server 103 can be divided into five control strength intervals, which can form a 5 ⁇ 5 fuzzy table, as shown in Table 3.
  • the symbol "+” and the symbol “-” in the fuzzy table represent the control strength, respectively. Among them, one “+” means to increase the control strength, multiple “+” means that the control strength needs to continue to increase, one “-” means to weaken the control strength, and multiple “-” means that the control strength needs to continue to be weakened.
  • the proportional-integral-derivative PID controller can obtain a strategy for adjusting the control variable parameters, that is, when the first distance difference is large and the distance change value is large, the PTZ server 103 can increase the control variable parameters. Control strength. When the first distance difference is large and the distance change value is small, the PTZ server 103 can weaken the control strength of the control quantity parameter.
  • the proportional-integral-derivative PID controller can obtain the proportional-integral-derivative PID correction coefficient or the proportional-integral-derivative PID control coefficient based on the above strategy.
  • the proportional-integral-derivative PID controller can obtain the proportional-integral-derivative PID correction coefficient or the proportional-integral-derivative PID control coefficient based on the first distance difference value and the distance change value by means of a formula, as shown in FIG. 3 Any of Ka, Kb, Kc, Ka*Kp, Kb*Ki, Kc*Kd.
  • the PTZ server 103 can substitute the first distance difference value and the distance change value into Formula 1 to obtain the proportional-integral-derivative PID correction coefficient or the proportional-integral-derivative PID control coefficient:
  • a is the first distance difference, and the variation range of the first distance difference is [-A, A].
  • b is the distance change value, and the change range of the distance change value is [-2A, 2A].
  • m is the proportional-integral-derivative PID correction coefficient or the proportional-integral-derivative PID control coefficient.
  • embodiments of the present application include, but are not limited to, methods of looking up tables or formulas to obtain proportional-integral-derivative PID correction coefficients or proportional-integral-derivative PID control coefficients.
  • the PTZ server 103 can also adjust the shooting angle of the camera body 101 through other parameters, or adjust the shooting angle of the camera body 101 and the camera body 101 , so that the target object is displayed at the target position of the subsequent frame image.
  • FIG. 4 is a schematic diagram of a scene of a tracking control method for a pan-tilt camera provided by an embodiment of the present application.
  • the pan/tilt 102 is located at the observation point A, the height of the observation point A from the horizontal plane aa is h, and the distance between the target object (illustrated by taking a car as an example in FIG. 4 ) and the observation point A in the horizontal direction is s.
  • the line connecting the observation point A and the target object is the line of sight, the angle between the line of sight and the vertical direction of the observation point A is ⁇ , and ⁇ and the depression angle of the gimbal 102 in the vertical direction are complementary angles to each other.
  • the sight of the gimbal 102 rotates with the movement of the target object, so the change of ⁇ corresponds to the change of the depression angle of the gimbal 102 in the vertical direction.
  • v ⁇ is the rotational angular velocity of the gimbal 102
  • v s is the linear velocity of the target object.
  • the current linear velocity of the target object is mapped to the rotational angular velocity of the pan/tilt head 102 , which will increase significantly.
  • the pan-tilt controller 103 can acquire the depression angle of the pan-tilt 102 in the vertical direction at the acquisition moment of the first frame of image.
  • the gimbal server 103 may increase at least one of the distance change value of the gimbal 102 in the horizontal direction and the distance change value of the gimbal 102 in the vertical direction according to a certain ratio, Make the control quantity parameter larger, and obtain the enlarged control quantity parameter.
  • the pan-tilt server 103 adjusts the posture of the pan-tilt 102 by using the increased control quantity parameter as the final control parameter, so that the distance that the pan-tilt 102 changes per unit time becomes larger, and the target that moves quickly at a short distance can be tracked in time. object.
  • the embodiment of the present application does not limit the size of the preset angle.
  • the value range of the preset angle is greater than or equal to 20° and less than or equal to 90°.
  • the pan-tilt server 103 may determine that the target object has a tendency to rapidly approach the pan-tilt camera or rapidly deviate from the target position. In addition, under this trend, the pan-tilt server 103 can adjust the posture of the pan-tilt 102 in time in combination with the distance change value, so that the shooting angle of the camera body 101 changes in time. When the area ratio of the target object in the image is small or even negatively increases, the PTZ server 103 may determine that the target object tends to move away from the PTZ camera quickly.
  • the pan-tilt controller 103 can determine the area ratio value of the target object in the first frame of image, and the area ratio value of the target object in the second frame image. Therefore, the pan-tilt controller 103 takes the form of the difference or quotient of the aforementioned two area ratios as the area change value of the target object in the first frame image and the second frame image.
  • the pan/tilt controller 103 may, according to a certain proportion, measure the horizontal direction of the pan/tilt 102 in the horizontal direction. Adjust at least one of the distance change value, the distance change value of the gimbal 102 in the vertical direction, and the focal length change value of the camera body 101 in the direction of the optical axis, so that the control amount parameter changes, and the adjusted control amount parameter is obtained. .
  • the pan-tilt server 103 uses the adjusted control amount parameter as the final control amount parameter to adjust the shooting angle of the camera body 101 and the focal length of the camera body 101, so that the distance changed by the pan-tilt 102 per unit time can be tracked to the close range in time A fast-moving target object.
  • the embodiments of the present application do not limit the sizes of the first threshold, the second threshold, and the third threshold.
  • the distance of the target object affects the size of the Z zoom of the camera body 101 . In general, the farther the distance is, the larger the Z zoom will be.
  • FIG. 5 is a schematic diagram of a scene of a tracking control method for a pan-tilt camera provided by an embodiment of the present application. As shown in Figure 5, the PTZ camera is located at observation point B.
  • one target object A1 needs the Z zoom of the camera body 101 to be z times
  • the other target object A2 needs the Z zoom of the camera body 101
  • the distance ratio between the two target objects and the observation point A is about 1:20.
  • the rotation range of the gimbal 102 corresponding to the camera body 101 with a large Z zoom is smaller, and the camera body 101 with a small Z zoom corresponds to The rotation range of the gimbal 102 is relatively large.
  • the pan-tilt server 103 can determine the focal plane where the target object is located.
  • the Z zoom of the camera body 101 is large, the distance between the target object and the pan-tilt camera is long, and the rotation of the pan-tilt 102 is small, that is, the Z zoom
  • the control quantity parameter required by the pan/tilt 102 corresponding to the camera body 101 with a larger magnification is smaller than that required by the pan/tilt 102 corresponding to the camera body 101 with a smaller Z zoom.
  • the pan-tilt server 103 can determine the focal plane where the target object is located.
  • the Z zoom of the camera body 101 is small, the distance between the target object and the pan-tilt camera is short, and the rotation of the pan-tilt 102 is large, that is, the Z zoom is small.
  • the control quantity parameter required by the pan/tilt 102 corresponding to the camera body 101 of 100 is larger than that required by the pan/tilt 102 corresponding to the camera body 101 with a larger Z zoom.
  • the pan-tilt controller 103 acquires the focal length of the camera body 101 at the acquisition moment of the first frame of image.
  • the pan/tilt controller 103 may change the distance change value of the pan/tilt head 102 in the horizontal direction, the distance change value of the pan/tilt head 102 in the vertical direction, and the camera body 101 according to a certain ratio. At least one of the focal length change values in the direction of the optical axis is reduced, so that the control quantity parameter becomes smaller, and the reduced control quantity parameter is obtained.
  • the pan/tilt server 103 uses the reduced control amount parameter as the final control amount parameter to adjust the shooting angle of the camera body 101 and/or the focal length of the camera body 101, so that the distance changed by the pan/tilt 102 per unit time becomes smaller and more /or the focal length of the camera body 101 is reduced, so that a target object that moves rapidly at a short distance can be tracked in time.
  • the pan/tilt controller 103 may change the distance change value of the pan/tilt head 102 in the horizontal direction, the distance change value of the pan/tilt head 102 in the vertical direction, and the camera body 101 according to a certain ratio. At least one of the focal length change values in the direction of the optical axis is increased, so that the control amount parameter is increased, and the increased control amount parameter is obtained.
  • the pan-tilt server 103 uses the increased control amount parameter as the final control amount parameter to adjust the shooting angle of the camera body 101 and/or the focal length of the camera body 101, so that the distance changed by the pan-tilt 102 per unit time becomes larger and/or Or the focal length of the camera body 101 becomes larger, so that a target object that moves rapidly at a short distance can be tracked in time.
  • the size of the fourth threshold and the fifth threshold is not limited in this embodiment of the present application.
  • the PTZ server 103 reads the depression angle of the PTZ 102 in the vertical direction, the area change value of the target object in the first frame image and the second frame image, and the focal length of the camera body 101, etc. parameter, can evaluate the current moving linear velocity of the target object on the spherical surface of the camera body 101 angular velocity change magnification, realize the adjustment of the shooting angle of the camera body 101 and the focal length of the camera body 101, so that the PTZ camera can track more accurately
  • the target object that moves quickly at a short distance improves the tracking ability and accuracy of the target object that moves quickly at a short distance.
  • the embodiments of the present application further provide a tracking control device for a pan-tilt camera.
  • FIG. 6 is a schematic structural diagram of a tracking control device for a pan-tilt camera according to an embodiment of the present application.
  • the tracking control device of the PTZ camera according to the embodiment of the present application may include:
  • the acquisition module 11 is configured to acquire the first frame of images and the second frame of images collected by the camera body, and the collection time of the first frame of images is later than the collection time of the second frame of images.
  • the determining module 12 is used to determine the first position between the position of the target object in the first frame image and the target position of the first frame image when the target object conforms to the preset rules or receives an instruction to track the target object indicated by the user. distance difference.
  • the determining module 12 is further configured to determine a distance change value between the position of the target object in the first frame of image and the position of the target object in the second frame of image.
  • the adjustment module 13 is used to adjust the shooting angle of the camera body based on the first distance difference value and the distance change value, so that the target object is displayed at the target position of the third frame image collected by the camera body, and the third frame image is collected later. at the acquisition moment of the first frame of image.
  • the adjustment module 13 is specifically configured to obtain a control amount parameter based on the first distance difference value and the distance change value, where the control amount parameter includes the distance change value of the pan/tilt in the horizontal direction and the pan/tilt in the vertical direction the distance change value; control the first motor in the gimbal to rotate the gimbal according to the distance change value of the gimbal in the horizontal direction, and control the second motor in the gimbal to rotate the gimbal according to the distance change value of the gimbal in the vertical direction
  • the stage is rotated to adjust the shooting angle of the camera body.
  • control quantity parameter further includes a focal length change value of the camera body in the direction of the optical axis.
  • the adjustment module 13 is further configured to adjust the focal length of the camera body according to the focal length change value of the camera body in the optical axis direction, so that the target object is displayed at the target position of the third frame image.
  • the adjustment module 13 is specifically configured to perform fuzzy processing on the first distance difference value and the distance change value to obtain a proportional-integral-derivative PID control coefficient; and based on the proportional-integral-derivative PID control coefficient, obtain a control parameter parameter.
  • the adjustment module 13 is specifically configured to perform fuzzy processing on the first distance difference value and the distance change value to obtain a proportional-integral-derivative PID correction coefficient; the product of the proportional-integral-derivative PID correction coefficient and the proportional-integral-derivative PID initial coefficient is determined as a proportional Integral-derivative PID control coefficient; based on the proportional-integral-derivative PID control coefficient, the control parameter is obtained.
  • the acquisition module 11 is further configured to acquire the depression angle of the pan-tilt head in the vertical direction at the acquisition moment of the first frame of image.
  • the adjustment module 13 is also used to increase at least one value of the distance change value of the gimbal in the horizontal direction and the distance change value of the gimbal in the vertical direction when the depression angle is greater than or equal to the preset angle, so as to obtain the increased value.
  • Control quantity parameter determine the enlarged control quantity parameter as the control quantity parameter.
  • the value range of the preset angle is greater than or equal to 20° and less than or equal to 90°.
  • the determining module 12 is further configured to determine the area change value of the target object in the first frame image and the second frame image.
  • the adjustment module 13 is also used for adjusting the distance change value of the pan/tilt head in the horizontal direction, Adjust at least one of the distance change value of the gimbal in the vertical direction and the focal length change value of the camera body in the optical axis direction to obtain the adjusted control amount parameter; the adjusted control amount parameter is determined as the control amount parameter.
  • the acquiring module 11 is configured to acquire the focal length of the camera body at the acquisition moment of the first frame of image.
  • the adjustment module 13 is also used to adjust the distance change value of the pan/tilt in the horizontal direction, the distance variation value of the pan/tilt in the vertical direction, and the focal length of the camera body in the direction of the optical axis when the focal length of the camera body is greater than the fourth threshold At least one value of the change value is reduced to obtain a reduced control variable parameter; the reduced control variable parameter is determined as a controlled variable parameter.
  • the adjustment module 13 is further configured to adjust the distance change value of the pan/tilt in the horizontal direction, the distance variation value of the pan/tilt in the vertical direction, and the camera body in the optical axis direction when the focal length of the camera body is smaller than the fifth threshold. At least one value of the focal length change value of , is increased to obtain the increased control amount parameter; the increased control amount parameter is determined as the control amount parameter.
  • the determining module 12 is specifically configured to determine a second distance difference between the position of the target object in the second frame image and the target position of the second frame image; based on the first distance difference and the second distance difference Distance difference, to determine the distance change value.
  • the target position is the center area of any frame of images.
  • the tracking control device for a pan-tilt camera provided in the embodiments of the present application can execute the above method embodiments, and the specific implementation principles and technical effects thereof can be found in the above method embodiments, which are not repeated in the embodiments of the present application.
  • the present application provides an electronic device, including: a memory and a processor; the memory is used to store program instructions; the processor is used to call the program instructions in the memory to enable the electronic device to execute the tracking control of the pan-tilt camera in the foregoing embodiment. method.
  • the present application provides a chip system, which is applied to an electronic device including a memory, a display screen and a sensor; the chip system includes: a processor; when the processor executes the computer instructions stored in the memory, the electronic device executes the foregoing The tracking control method of the PTZ camera in the embodiment.
  • the present application provides a computer-readable storage medium on which a computer program is stored, and the computer program is executed by the processor to cause the electronic device to implement the tracking control method of the pan-tilt camera in the foregoing embodiment.
  • the present application provides a computer program product, comprising: execution instructions, the execution instructions are stored in a readable storage medium, at least one processor of an electronic device can read the execution instructions from the readable storage medium, and at least one processor Executing the execution instruction enables the electronic device to implement the tracking control method for the pan-tilt camera in the foregoing embodiment.
  • all or part of the functions may be implemented by software, hardware, or a combination of software and hardware.
  • software When implemented in software, it can be implemented in whole or in part in the form of a computer program product.
  • a computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the procedures or functions according to the embodiments of the present application are generated in whole or in part.
  • the computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
  • Computer instructions may be stored in a computer-readable storage medium.
  • a computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, a data center, or the like that includes an integration of one or more available media.
  • Useful media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVDs), or semiconductor media (eg, solid state disks (SSDs)), and the like.
  • the process can be completed by instructing the relevant hardware by a computer program, and the program can be stored in a computer-readable storage medium.
  • the program When the program is executed , which may include the processes of the foregoing method embodiments.
  • the aforementioned storage medium includes: ROM or random storage memory RAM, magnetic disk or optical disk and other mediums that can store program codes.

Abstract

Provided are a gimbal camera, a gimbal camera tracking control method and apparatus, and a device. When a target object satisfies a preset rule or a target object tracking instruction indicated by a user is received, an error value between the position of the target object in the current frame image and a target position of the current frame image is analyzed to obtain a change in a motion posture of the target object; and an error distance variation value between the target object in the current frame image and the target object in any of frame images before the current frame image is analyzed to obtain a relative spatial position of the target object, so as to analyze the current speed change status of the target object in multiple dimensions and calculate spatial positions of the target object and a holder of a gimbal camera. By accurately adjusting a photographing angle of a camera body, the position of the target object in a subsequent frame image is corrected in time, so that the target object is always kept at a target position of the subsequent frame image, thus solving the problem of target object tracking loss due to a violent motion change of the target object.

Description

云台摄像机、云台摄像机的追踪控制方法、装置及设备PTZ camera, tracking control method, device and device for PTZ camera
本申请要求于2020年9月16日提交中国专利局、申请号为202010974180.9、申请名称为“一种球型摄像机自动追踪智能控制方法”的中国专利申请的优先权,本申请要求于2020年11月06日提交中国专利局、申请号为202011232127.8、申请名称为“云台摄像机、云台摄像机的追踪控制方法、装置及设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202010974180.9 and the application title "An intelligent control method for automatic tracking of a spherical camera", which was submitted to the China Patent Office on September 16, 2020. This application claims to be filed on November 2020. The priority of the Chinese patent application filed with the Chinese Patent Office on March 06, the application number is 202011232127.8, and the application name is "PTZ camera, tracking control method, device and equipment for PTZ camera", the entire content of which is incorporated by reference in this application middle.
技术领域technical field
本申请涉及视频监控技术领域,尤其涉及一种云台摄像机、云台摄像机的追踪控制方法、装置及设备。The present application relates to the technical field of video surveillance, and in particular, to a pan-tilt camera and a tracking control method, device and device for a pan-tilt camera.
背景技术Background technique
云台摄像机是一种支持调整拍摄方向且镜头焦距的摄像机,其优势在于在水平方向和垂直方向上可支持拍摄角度的调整以及支持沿光轴方向上的镜头焦距的调整,使得用户能够使用云台摄像机全方位地观察四周物体,且用户视野不会受到云台摄像机的如安装位置、安装角度以及镜头视角等因素的限制。The PTZ camera is a camera that supports adjusting the shooting direction and the focal length of the lens. The PTZ camera observes the surrounding objects in all directions, and the user's field of view is not limited by factors such as the installation position, installation angle and lens angle of the PTZ camera.
因此,在安防监控应用场景中,常常利用云台摄像机对移动的目标对象(如机动车、非机动车和行人等)进行自动追踪,使得目标对象保持在显示图像的设定区域,如中央区域。Therefore, in security monitoring application scenarios, PTZ cameras are often used to automatically track moving target objects (such as motor vehicles, non-motor vehicles, pedestrians, etc.), so that the target object remains in the set area of the displayed image, such as the central area. .
通常,目标对象的移动会导致目标对象无法在显示图像的设定区域,而引起输出误差。云台摄像机中的云台需要通过自动控制方法来消除该误差。目前,云台可采用比例积分微分(proportional integral derivative,PID)控制器,借助该控制器的输出信号与输出误差信号形成一定的线性比例关系,可消除稳态的误差。Usually, the movement of the target object will cause the target object not to be in the set area of the displayed image, resulting in output errors. The PTZ in the PTZ camera needs an automatic control method to eliminate this error. At present, a proportional integral derivative (PID) controller can be used in the gimbal, and a certain linear proportional relationship is formed between the output signal of the controller and the output error signal, and the steady-state error can be eliminated.
然而,目标对象的运动速度和运行方向的变化繁琐且无章可循,使得目标对象出现非线性变化,这与前述自动控制方法中消除误差的线性变化存在本质区别,容易导致前述自动控制方法的误差消除效果变差,甚至出现跟丢目标对象的情况。However, the change of the moving speed and running direction of the target object is cumbersome and unruly, causing the target object to change non-linearly, which is essentially different from the linear change in the aforementioned automatic control method to eliminate errors, which is easy to lead to the aforementioned automatic control method. The error elimination effect becomes poor, and even the target object is lost.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供一种云台摄像机、云台摄像机的追踪控制方法、装置及设备,可以解决由于目标对象运动变化剧烈而导致目标对象追踪跟丢的问题,实现了准确跟踪运动变化剧烈的目标对象,使得目标对象能够始终显示在后续帧图像中的目标位置。The embodiments of the present application provide a pan-tilt camera, a tracking control method, device, and device for a pan-tilt camera, which can solve the problem of tracking and losing the target object due to the drastic changes in the motion of the target object, and realize the accurate tracking of the target with drastic changes in motion. object, so that the target object can always be displayed at the target position in subsequent frame images.
第一方面,本申请实施例提供一种云台摄像机,包括:摄像机本体、云台和云台控制器。In a first aspect, an embodiment of the present application provides a pan-tilt camera, including a camera body, a pan-tilt, and a pan-tilt controller.
在目标对象符合预设规则或者接收到用户指示的追踪目标对象的指令时,云台控制器,用于获得摄像机本体采集的第一帧图像和第二帧图像,第一帧图像的采集时刻 晚于第二帧图像的采集时刻。云台控制器,还用于确定目标对象在第一帧图像中的位置与第一帧图像的目标位置之间的第一距离差值。云台控制器,还用于确定目标对象在第一帧图像中的位置和目标对象在第二帧图像中的位置之间的距离变化值。云台控制器,还用于基于第一距离差值和距离变化值,调整摄像机本体的拍摄角度,以使目标对象显示在摄像机本体采集的第三帧图像的目标位置,第三帧图像的采集时刻晚于第一帧图像的采集时刻。When the target object conforms to the preset rules or receives an instruction to track the target object instructed by the user, the PTZ controller is used to obtain the first frame of images and the second frame of images collected by the camera body. The first frame of images is collected late at the acquisition moment of the second frame of image. The pan-tilt controller is further configured to determine a first distance difference between the position of the target object in the first frame of image and the target position of the first frame of image. The pan-tilt controller is further configured to determine the distance change value between the position of the target object in the first frame image and the position of the target object in the second frame image. The PTZ controller is also used to adjust the shooting angle of the camera body based on the first distance difference value and the distance change value, so that the target object is displayed at the target position of the third frame image collected by the camera body, and the third frame image is collected. The time is later than the acquisition time of the first frame image.
其中,第一距离差值可以表征出目标对象显示在第一帧图像中的位置偏离第一帧图像的目标位置的距离误差,即第一距离差值可表明目标对象的运动姿态变化。Wherein, the first distance difference value can represent the distance error that the position of the target object displayed in the first frame image deviates from the target position of the first frame image, that is, the first distance difference value can indicate the movement posture change of the target object.
其中,距离变化值可以表征出目标对象从第二帧图像显示到第一帧图像的位置变化率,即距离变化值可表明目标图像的相对空间位置。The distance change value can represent the position change rate of the target object from the second frame image to the first frame image, that is, the distance change value can indicate the relative spatial position of the target image.
通过第一方面的云台摄像机,通过分析目标对象在当前帧图像中的位置与当前帧图像的目标位置之间的误差值以及目标对象在当前帧图像和当前帧图像之前的任意一帧图像之间的误差距离变化值,可准确获知目标对象的运动姿态变化、相对空间位置等信息,以便多维度的分析出目标对象当前的速度变化情况。从而,解算出目标对象与云台摄像机之间的空间位置,对摄像机本体的拍摄角度进行精准调整,以便及时修正目标对象在后续帧图像中的位置,使得目标对象始终保持在后续帧图像的目标位置,解决了由于目标对象运动变化剧烈而造成目标对象追踪丢失的情况,提高了追踪运动变化剧烈的目标对象的准确度,提升了对运动变化剧烈的目标对象的追踪能力。Through the PTZ camera of the first aspect, the error value between the position of the target object in the current frame image and the target position of the current frame image and the difference between the target object in the current frame image and any frame image before the current frame image are analyzed The change value of the error distance between the two can accurately obtain the information such as the movement posture change and relative spatial position of the target object, so as to analyze the current speed change of the target object in multiple dimensions. Therefore, the spatial position between the target object and the PTZ camera is calculated, and the shooting angle of the camera body is precisely adjusted, so as to correct the position of the target object in the subsequent frame images in time, so that the target object is always kept at the target of the subsequent frame images. Position, solves the situation that the tracking of the target object is lost due to the drastic changes in the motion of the target object, improves the accuracy of tracking the target object with drastic changes in motion, and improves the tracking ability of the target object with drastic changes in motion.
在一种可能的设计中,云台控制器,具体用于基于第一距离差值和距离变化值,得到控制量参数,控制量参数包括云台在水平方向上的距离变化值和云台在垂直方向上的距离变化值;控制云台中的第一马达按照云台在水平方向上的距离变化值对云台进行旋转,以及控制云台中的第二马达按照云台在垂直方向上的距离变化值对云台进行旋转,以调整摄像机本体的拍摄角度。In a possible design, the gimbal controller is specifically configured to obtain a control quantity parameter based on the first distance difference value and the distance change value, and the control quantity parameter includes the distance change value of the gimbal in the horizontal direction and the change value of the gimbal in the horizontal direction. The distance change value in the vertical direction; control the first motor in the gimbal to rotate the gimbal according to the distance change value of the gimbal in the horizontal direction, and control the second motor in the gimbal to change according to the distance of the gimbal in the vertical direction value to rotate the gimbal to adjust the shooting angle of the camera body.
由此,云台服务器改变云台在水平方向和垂直方向上的旋转角度,可对云台的姿态的精准调整,从而调整了摄像机本体的拍摄角度,使得目标对象能够显示在后续帧图像中的目标位置。As a result, the pan-tilt server changes the rotation angle of the pan-tilt in the horizontal and vertical directions, and can precisely adjust the posture of the pan-tilt, thereby adjusting the shooting angle of the camera body, so that the target object can be displayed in the subsequent frame images. target location.
在一种可能的设计中,控制量参数还包括摄像机本体在光轴方向上的焦距变化值。云台控制器,还用于按照摄像机本体在光轴方向上的焦距变化值对摄像机本体的焦距进行调整,以使目标对象显示在第三帧图像的目标位置。In a possible design, the control quantity parameter further includes a change value of the focal length of the camera body in the direction of the optical axis. The pan-tilt controller is also used to adjust the focal length of the camera body according to the focal length change value of the camera body in the optical axis direction, so that the target object is displayed at the target position of the third frame image.
由此,除了云台在水平方向上的距离变化值和云台在垂直方向上的距离变化值之外,云台服务器基于第一距离差值和距离变化值,还可获知目标对象当前运动线速度在摄像机本体的视球面上角速度变化的倍率,得到摄像机本体在光轴方向上的焦距变化值。从而,云台服务器可及时调整摄像机本体的拍摄角度和调整摄像机的焦距,使得目标对象能够显示在后续帧图像的目标位置,提高了追踪近距离快速运动的目标对象的准确度,提升了对近距离快速运动的目标对象的追踪能力。Therefore, in addition to the distance change value of the gimbal in the horizontal direction and the distance change value of the gimbal in the vertical direction, the gimbal server can also learn the current movement line of the target object based on the first distance difference and the distance change value. The magnification of the angular velocity change of the speed on the spherical surface of the camera body, and the focal length change value of the camera body in the direction of the optical axis is obtained. Therefore, the PTZ server can adjust the shooting angle of the camera body and adjust the focal length of the camera in time, so that the target object can be displayed in the target position of the subsequent frame image, which improves the accuracy of tracking the target object that moves rapidly at a short distance, and improves the accuracy of tracking the target object in close range. The ability to track distances to fast-moving objects.
在一种可能的设计中,云台控制器,具体用于对第一距离差值和距离变化值进行模糊处理,得到比例积分微分PID控制系数;基于比例积分微分PID控制系数,得到控制量参数。In a possible design, the pan-tilt controller is specifically used to perform fuzzy processing on the first distance difference value and the distance change value to obtain the proportional-integral-derivative PID control coefficient; based on the proportional-integral-derivative PID control coefficient, obtain the control parameter parameter .
在一种可能的设计中,云台控制器,具体用于对第一距离差值和距离变化值进行 模糊处理,得到比例积分微分PID修正系数;将比例积分微分PID修正系数和比例积分微分PID初始系数的乘积确定为比例积分微分PID控制系数;基于比例积分微分PID控制系数,得到控制量参数。In a possible design, the pan-tilt controller is specifically used to perform fuzzy processing on the first distance difference value and the distance change value to obtain a proportional-integral-derivative PID correction coefficient; The product of the initial coefficients is determined as the proportional-integral-derivative PID control coefficient; based on the proportional-integral-derivative PID control coefficient, the control quantity parameter is obtained.
基于上述两种方式中改进的比例积分微分PID控制系数,云台服务器中的比例积分微分PID服务器可得到更为准确的控制量参数,减少目标对象在后续帧图像中的位置与后续帧图像中的目标位置之间的误差,及时调整目标对象在后续帧图像中的位置,使得目标对象显示在后续帧图像的目标位置,实现云台摄像机对目标对象更为精准的追踪。Based on the improved proportional-integral-derivative PID control coefficients in the above two methods, the proportional-integral-derivative PID server in the PTZ server can obtain more accurate control parameters, reducing the position of the target object in the subsequent frame image and the subsequent frame image. The position of the target object in the subsequent frame image is adjusted in time, so that the target object is displayed in the target position of the subsequent frame image, and the PTZ camera can track the target object more accurately.
在一种可能的设计中,云台控制器,还用于在第一帧图像的采集时刻,获取云台在垂直方向上的俯角;由于云台在竖直方向上的俯角增加,可以判定目标对象在向云台摄像机快速靠近。故,在俯角大于等于预设角度时,云台服务器可以确定目标对象的运动线速度变大,即表征目标对象快速移动。从而,云台服务器可以将云台在水平方向上的距离变化值和云台在垂直方向上的距离变化值中的至少一个值调大,使得控制量参数变大,得到调大后的控制量参数;将调大后的控制量参数确定为控制量参数。由此,云台控制器基于控制量参数可控制云台单位时间内变化的距离变大,使得云台能够及时跟踪快速移动的目标对象。In a possible design, the gimbal controller is also used to obtain the depression angle of the gimbal in the vertical direction at the acquisition moment of the first frame of image; since the depression angle of the gimbal in the vertical direction increases, the target can be determined The subject is rapidly approaching the gimbal camera. Therefore, when the depression angle is greater than or equal to the preset angle, the pan-tilt server can determine that the moving linear velocity of the target object increases, which means that the target object moves rapidly. Therefore, the PTZ server can increase at least one of the distance change value of the PTZ in the horizontal direction and the distance change value of the PTZ in the vertical direction, so that the control parameter becomes larger, and the increased control value is obtained. parameter; determine the increased control value parameter as the control value parameter. Therefore, the pan-tilt controller can control the distance of the pan-tilt to change in unit time to increase based on the control parameter parameters, so that the pan-tilt can track the fast-moving target object in time.
在一种可能的设计中,预设角度的取值范围为大于等于20°且小于等于90°。In a possible design, the value range of the preset angle is greater than or equal to 20° and less than or equal to 90°.
在一种可能的设计中,云台控制器,还用于确定目标对象在第一帧图像和第二帧图像中的面积变化值。由于目标对象在图像中的面积占比正向快速增大,可判定目标对象有快速靠近云台摄像机或者快速偏离目标位置的趋势。目标对象在图像中的面积占比较小甚至负向增大,可判定目标对象有快速远离云台摄像机的趋势。故,在面积变化值大于第一阈值,或者,面积变化值小于第二阈值且面积变化值的绝对值大于第三阈值时,云台控制器对云台在水平方向上的距离变化值、云台在垂直方向上的距离变化值以及摄像机本体在光轴方向上的焦距变化值的至少一个值进行调整,使得控制量参数发生改变,得到调整后的控制量参数;将调整后的控制量参数确定为控制量参数。由此,云台控制器基于控制量参数可控制云台单位时间内变化能够及时跟踪快速移动的目标对象。In a possible design, the pan-tilt controller is also used to determine the area change value of the target object in the first frame image and the second frame image. Since the proportion of the area of the target object in the image is increasing rapidly, it can be determined that the target object has a tendency to approach the PTZ camera quickly or deviate from the target position quickly. If the area of the target object in the image is small or even negatively increases, it can be determined that the target object has a tendency to quickly move away from the PTZ camera. Therefore, when the area change value is greater than the first threshold, or, when the area change value is less than the second threshold and the absolute value of the area change value is greater than the third threshold, the pan-tilt controller will determine the distance change value of the pan-tilt in the horizontal direction, the cloud Adjust at least one value of the distance change value of the stage in the vertical direction and the focal length change value of the camera body in the optical axis direction, so that the control amount parameter changes, and the adjusted control amount parameter is obtained; Determined as the control parameter. In this way, the pan-tilt controller can control the pan-tilt change in unit time based on the control parameter parameters, and can track the fast-moving target object in time.
在一种可能的设计中,云台控制器,还用于在第一帧图像的采集时刻,获取摄像机本体的焦距。In a possible design, the pan-tilt controller is also used to acquire the focal length of the camera body at the acquisition moment of the first frame of image.
由于云台服务器可判定目标对象所在的焦平面,在摄像机本体的焦距较大时,目标对象与云台摄像机之间的距离远,云台的转动幅度小,即需要的控制量参数需要调小。故,在摄像机本体的焦距大于第四阈值时,云台控制器将云台在水平方向上的距离变化值、云台在垂直方向上的距离变化值以及摄像机本体在光轴方向上的焦距变化值中的至少一个值调小,使得控制量参数变小,得到调小后的控制量参数;将调小后的控制量参数确定为控制量参数。由此,云台控制器基于控制量参数可控制云台单位时间内变化的距离变小,使得云台能够及时跟踪快速移动的目标对象。Since the PTZ server can determine the focal plane where the target object is located, when the focal length of the camera body is large, the distance between the target object and the PTZ camera is far, and the rotation range of the PTZ is small, that is, the required control parameters need to be reduced. . Therefore, when the focal length of the camera body is greater than the fourth threshold, the pan/tilt controller changes the distance change value of the pan/tilt in the horizontal direction, the distance change value of the pan/tilt in the vertical direction, and the focal length of the camera body in the direction of the optical axis. At least one of the values is reduced so that the control quantity parameter becomes smaller, and the reduced control quantity parameter is obtained; the reduced control quantity parameter is determined as the control quantity parameter. Therefore, the pan-tilt controller can control the distance that the pan-tilt changes in unit time to become smaller based on the control parameter parameters, so that the pan-tilt can track the fast-moving target object in time.
或者,由于云台服务器可判定目标对象所在焦平面,在摄像机本体拍摄的焦距较小时,目标对象与云台摄像机之间的距离近,云台的转动幅度大,即需要的控制量参数需要调大。故,在摄像机本体的焦距小于第五阈值时,云台控制器将云台在水平方 向上的距离变化值、云台在垂直方向上的距离变化值以及摄像机本体在光轴方向上的焦距变化值中的至少一个值调大,使得控制量参数变大,得到调大后的控制量参数;将调大后的控制量参数确定为控制量参数。由此,云台控制器基于控制量参数可控制云台单位时间内变化的距离变大,使得云台能够及时跟踪快速移动的目标对象。Or, because the PTZ server can determine the focal plane of the target object, when the focal length of the camera body is small, the distance between the target object and the PTZ camera is short, and the rotation range of the PTZ is large, that is, the required control parameters need to be adjusted. Big. Therefore, when the focal length of the camera body is less than the fifth threshold, the pan-tilt controller changes the distance change value of the pan-tilt head in the horizontal direction, the distance change value of the pan-tilt head in the vertical direction, and the focal length change of the camera body in the optical axis direction. At least one of the values is increased so that the control variable parameter becomes larger, and the increased control variable parameter is obtained; the increased control variable parameter is determined as the control variable parameter. Therefore, the pan-tilt controller can control the distance of the pan-tilt to change in unit time to increase based on the control parameter parameters, so that the pan-tilt can track the fast-moving target object in time.
由此,云台服务器通过读取云台在垂直方向上的俯角、目标对象在第一帧图像和第二帧图像中的面积变化值以及摄像机本体的焦距等参数,可以评估出目标对象当前运动线速度在摄像机本体的视球面上角速度变化的倍率,实现对摄像机本体的拍摄角度和摄像机本体的焦距的及时调整,以便目标对象能够显示在后续帧图像中的目标位置,使得云台摄像机能够更加准确地追踪近距离快速运动的目标对象,提升了对近距离快速运动的目标对象的追踪能力和准确度。Therefore, the PTZ server can evaluate the current motion of the target object by reading parameters such as the depression angle of the PTZ in the vertical direction, the area change value of the target object in the first frame image and the second frame image, and the focal length of the camera body. The linear velocity is the magnification of the angular velocity change on the spherical surface of the camera body, which realizes the timely adjustment of the shooting angle of the camera body and the focal length of the camera body, so that the target object can display the target position in the subsequent frame images, so that the PTZ camera can be more Accurately track the target object that moves quickly at a short distance, which improves the tracking ability and accuracy of the target object that moves quickly at a short distance.
在一种可能的设计中,云台控制器,具体用于确定目标对象在第二帧图像中的位置与第二帧图像的目标位置之间的第二距离差值;基于第一距离差值和第二距离差值,确定距离变化值。In a possible design, the pan-tilt controller is specifically configured to determine a second distance difference between the position of the target object in the second frame image and the target position of the second frame image; based on the first distance difference and the second distance difference to determine the distance change value.
在一种可能的设计中,目标位置为任意一帧图像的中心区域。In a possible design, the target position is the central area of any frame of images.
第二方面,本申请实施例提供一种云台摄像机的追踪控制方法,在目标对象符合预设规则或者接收到用户指示的追踪目标对象的指令时启动方法。该方法包括:获得摄像机本体所采集的第一帧图像和第二帧图像,第一帧图像的采集时刻晚于所述第二帧图像的采集时刻。确定目标对象在第一帧图像中的位置与第一帧图像的目标位置之间的第一距离差值。确定目标对象在第一帧图像中的位置和目标对象在第二帧图像中的位置之间的距离变化值。基于第一距离差值和距离变化值,调整摄像机本体的拍摄角度,以使目标对象显示在摄像机本体采集的第三帧图像的目标位置,第三帧图像的采集时刻晚于第一帧图像的采集时刻。In a second aspect, an embodiment of the present application provides a tracking control method for a pan-tilt camera, which starts the method when a target object complies with a preset rule or receives an instruction to track the target object instructed by a user. The method includes: obtaining a first frame of images and a second frame of images collected by a camera body, where the collection time of the first frame image is later than the collection time of the second frame image. A first distance difference between the position of the target object in the first frame image and the target position of the first frame image is determined. A distance change value between the position of the target object in the first frame image and the position of the target object in the second frame image is determined. Based on the first distance difference value and the distance change value, adjust the shooting angle of the camera body so that the target object is displayed at the target position of the third frame image collected by the camera body, and the collection time of the third frame image is later than that of the first frame image. Collection time.
在一种可能的设计中,基于第一距离差值和距离变化值,调整摄像机本体的拍摄角度,包括:基于第一距离差值和距离变化值,得到控制量参数,控制量参数包括云台在水平方向上的距离变化值和云台在垂直方向上的距离变化值。控制云台中的第一马达按照云台在水平方向上的距离变化值对云台进行旋转,以及控制云台中的第二马达按照云台在垂直方向上的距离变化值对云台进行旋转,以调整摄像机本体的拍摄角度。In a possible design, adjusting the shooting angle of the camera body based on the first distance difference value and the distance change value includes: obtaining a control amount parameter based on the first distance difference value and the distance change value, and the control amount parameter includes a pan/tilt head The distance change value in the horizontal direction and the distance change value of the gimbal in the vertical direction. Control the first motor in the gimbal to rotate the gimbal according to the distance change value of the gimbal in the horizontal direction, and control the second motor in the gimbal to rotate the gimbal according to the distance change value of the gimbal in the vertical direction, so as to Adjust the shooting angle of the camera body.
在一种可能的设计中,控制量参数还包括摄像机本体在光轴方向上的焦距变化值。该方法还包括:按照摄像机本体在光轴方向上的焦距变化值对摄像机本体的焦距进行调整,以使目标对象显示在第三帧图像的目标位置。In a possible design, the control quantity parameter further includes a change value of the focal length of the camera body in the direction of the optical axis. The method further includes: adjusting the focal length of the camera body according to the focal length change value of the camera body in the direction of the optical axis, so that the target object is displayed at the target position of the third frame image.
在一种可能的设计中,基于第一距离差值和距离变化值,得到控制量参数,包括:对第一距离差值和距离变化值进行模糊处理,得到比例积分微分PID控制系数。基于比例积分微分PID控制系数,得到控制量参数。In a possible design, obtaining the control parameter parameters based on the first distance difference and the distance change value includes: performing fuzzy processing on the first distance difference and the distance change value to obtain the proportional-integral-derivative PID control coefficient. Based on the proportional-integral-derivative PID control coefficients, the control parameters are obtained.
在一种可能的设计中,基于第一距离差值和距离变化值,得到控制量参数,包括:对第一距离差值和距离变化值进行模糊处理,得到比例积分微分PID修正系数。将比例积分微分PID修正系数和比例积分微分PID初始系数的乘积确定为比例积分微分PID控制系数。基于比例积分微分PID控制系数,得到控制量参数。In a possible design, obtaining the control parameter parameters based on the first distance difference value and the distance change value includes: performing fuzzy processing on the first distance difference value and the distance change value to obtain a proportional-integral-derivative PID correction coefficient. The product of the proportional integral derivative PID correction coefficient and the proportional integral derivative PID initial coefficient is determined as the proportional integral derivative PID control coefficient. Based on the proportional-integral-derivative PID control coefficients, the control parameters are obtained.
在一种可能的设计中,该方法还包括:在第一帧图像的采集时刻,获取云台在垂 直方向上的俯角。在俯角大于等于预设角度时,将云台在水平方向上的距离变化值和云台在垂直方向上的距离变化值中的至少一个值调大,得到调大后的控制量参数;将调大后的控制量参数确定为控制量参数。In a possible design, the method further includes: at the acquisition moment of the first frame of image, acquiring the depression angle of the pan/tilt head in the vertical direction. When the depression angle is greater than or equal to the preset angle, at least one of the distance change value of the gimbal in the horizontal direction and the distance change value of the gimbal in the vertical direction is increased to obtain the increased control parameter; The larger control quantity parameter is determined as the control quantity parameter.
在一种可能的设计中,预设角度的取值范围为大于等于20°且小于等于90°。In a possible design, the value range of the preset angle is greater than or equal to 20° and less than or equal to 90°.
在一种可能的设计中,该方法还包括:确定目标对象在第一帧图像和第二帧图像中的面积变化值。在面积变化值大于第一阈值,或者,面积变化值小于第二阈值且面积变化值的绝对值大于第三阈值时,对云台在水平方向上的距离变化值、云台在垂直方向上的距离变化值以及摄像机本体在光轴方向上的焦距变化值的至少一个值进行调整,得到调整后的控制量参数;将调整后的控制量参数确定为控制量参数。In a possible design, the method further includes: determining area change values of the target object in the first frame image and the second frame image. When the area change value is greater than the first threshold, or, when the area change value is smaller than the second threshold and the absolute value of the area change value is greater than the third threshold, the distance change value of the gimbal in the horizontal direction and the distance change of the gimbal in the vertical direction Adjust at least one of the distance change value and the focal length change value of the camera body in the direction of the optical axis to obtain the adjusted control amount parameter; the adjusted control amount parameter is determined as the control amount parameter.
在一种可能的设计中,该方法还包括:在第一帧图像的采集时刻,获取摄像机本体的焦距。在摄像机本体的焦距大于第四阈值时,将云台在水平方向上的距离变化值、云台在垂直方向上的距离变化值以及摄像机本体在光轴方向上的焦距变化值中的至少一个值调小,得到调小后的控制量参数;将调小后的控制量参数确定为控制量参数。In a possible design, the method further includes: at the acquisition moment of the first frame of image, acquiring the focal length of the camera body. When the focal length of the camera body is greater than the fourth threshold, change at least one of the distance change value of the pan/tilt in the horizontal direction, the distance change value of the pan/tilt in the vertical direction, and the focal length change value of the camera body in the optical axis direction Adjust it to a smaller value to obtain the reduced control quantity parameter; determine the reduced control quantity parameter as the control quantity parameter.
在一种可能的设计中,该方法还包括:在第一帧图像的采集时刻,获取摄像机本体的焦距。在摄像机本体的焦距小于第五阈值时,将云台在水平方向上的距离变化值、云台在垂直方向上的距离变化值以及摄像机本体在光轴方向上的焦距变化值中的至少一个值调大,得到调大后的控制量参数;将调大后的控制量参数确定为控制量参数。In a possible design, the method further includes: at the acquisition moment of the first frame of image, acquiring the focal length of the camera body. When the focal length of the camera body is less than the fifth threshold, at least one of the distance change value of the pan/tilt head in the horizontal direction, the distance change value of the pan/tilt head in the vertical direction, and the focal length change value of the camera body in the optical axis direction Increase the control value to obtain the control value parameter after the increase; determine the control value parameter after the increase as the control value parameter.
在一种可能的设计中,确定目标对象在第一帧图像中的位置和目标对象在第二帧图像中的位置之间的距离变化值,包括:确定目标对象在第二帧图像中的位置与第二帧图像的目标位置之间的第二距离差值。基于第一距离差值和第二距离差值,确定距离变化值。In a possible design, determining the distance change value between the position of the target object in the first frame image and the position of the target object in the second frame image includes: determining the position of the target object in the second frame image A second distance difference from the target position of the second frame image. A distance change value is determined based on the first distance difference value and the second distance difference value.
在一种可能的设计中,目标位置为任意一帧图像的中心区域。In a possible design, the target position is the central area of any frame of images.
上述第二方面以及上述第二方面的各可能的设计中所提供的云台摄像机的追踪控制方法,其有益效果可以参见上述第一方面和第一方面的各可能的实施方式所带来的有益效果,在此不再赘述。For the tracking control method of the pan-tilt camera provided in the second aspect and the possible designs of the second aspect, the beneficial effects of the tracking control method can refer to the beneficial effects brought by the first aspect and the possible implementations of the first aspect. The effect will not be repeated here.
第三方面,本申请实施例提供一种云台摄像机的追踪控制装置,包括:获取模块,用于在目标对象符合预设规则或者接收到用户指示的追踪目标对象的指令时,获得摄像机本体所采集的第一帧图像和第二帧图像,第一帧图像的采集时刻晚于第二帧图像的采集时刻。确定模块,用于确定目标对象在第一帧图像中的位置与第一帧图像的目标位置之间的第一距离差值。确定模块,还用于确定目标对象在第一帧图像中的位置和目标对象在第二帧图像中的位置之间的距离变化值。调整模块,用于基于第一距离差值和距离变化值,调整摄像机本体的拍摄角度,以使目标对象显示在摄像机本体采集的第三帧图像的目标位置,第三帧图像的采集时刻晚于第一帧图像的采集时刻。In a third aspect, an embodiment of the present application provides a tracking control device for a pan-tilt camera, including: an acquisition module configured to acquire information about the camera body when the target object conforms to a preset rule or receives an instruction to track the target object instructed by a user. For the first frame image and the second frame image collected, the collection time of the first frame image is later than the collection time of the second frame image. The determining module is configured to determine the first distance difference between the position of the target object in the first frame image and the target position of the first frame image. The determining module is further configured to determine a distance change value between the position of the target object in the first frame of image and the position of the target object in the second frame of image. The adjustment module is used to adjust the shooting angle of the camera body based on the first distance difference value and the distance change value, so that the target object is displayed at the target position of the third frame image collected by the camera body, and the collection time of the third frame image is later than The acquisition moment of the first frame of image.
在一种可能的设计中,调整模块,具体用于基于第一距离差值和距离变化值,得到控制量参数,控制量参数包括云台在水平方向上的距离变化值和云台在垂直方向上的距离变化值;控制云台中的第一马达按照云台在水平方向上的距离变化值对云台进行旋转,以及控制云台中的第二马达按照云台在垂直方向上的距离变化值对云台进行旋转,以调整摄像机本体的拍摄角度。In a possible design, the adjustment module is specifically configured to obtain a control amount parameter based on the first distance difference value and the distance change value, and the control amount parameter includes the distance change value of the pan/tilt in the horizontal direction and the pan/tilt in the vertical direction The distance change value on the PTZ; control the first motor in the gimbal to rotate the gimbal according to the distance change value of the gimbal in the horizontal direction, and control the second motor in the gimbal to rotate the gimbal according to the distance change value of the gimbal in the vertical direction. The gimbal rotates to adjust the shooting angle of the camera body.
在一种可能的设计中,控制量参数还包括摄像机本体在光轴方向上的焦距变化值。 调整模块,还用于按照摄像机本体在光轴方向上的焦距变化值对摄像机本体的焦距进行调整,以使目标对象显示在第三帧图像的目标位置。In a possible design, the control quantity parameter further includes a change value of the focal length of the camera body in the direction of the optical axis. The adjustment module is further configured to adjust the focal length of the camera body according to the focal length change value of the camera body in the direction of the optical axis, so that the target object is displayed at the target position of the third frame image.
在一种可能的设计中,调整模块,具体用于对第一距离差值和距离变化值进行模糊处理,得到比例积分微分PID控制系数;基于比例积分微分PID控制系数,得到控制量参数。或者,调整模块,具体用于对第一距离差值和距离变化值进行模糊处理,得到比例积分微分PID修正系数;将比例积分微分PID修正系数和比例积分微分PID初始系数的乘积确定为比例积分微分PID控制系数;基于比例积分微分PID控制系数,得到控制量参数。In a possible design, the adjustment module is specifically configured to perform fuzzy processing on the first distance difference value and the distance change value to obtain a proportional-integral-derivative PID control coefficient; based on the proportional-integral-derivative PID control coefficient, obtain a control parameter parameter. Or, an adjustment module, which is specifically used to perform fuzzy processing on the first distance difference value and the distance change value to obtain a proportional-integral-derivative PID correction coefficient; and determine the product of the proportional-integral-derivative PID correction coefficient and the proportional-integral-derivative PID initial coefficient as proportional-integral Differential PID control coefficient; based on the proportional integral derivative PID control coefficient, the control parameter is obtained.
在一种可能的设计中,该装置还包括:第一获取模块,用于在第一帧图像的采集时刻,获取云台在垂直方向上的俯角。调整模块,还用于在俯角大于等于预设角度时,将云台在水平方向上的距离变化值和云台在垂直方向上的距离变化值中的至少一个值调大,得到调大后的控制量参数;将调大后的控制量参数确定为控制量参数。In a possible design, the device further includes: a first acquisition module, configured to acquire the depression angle of the pan/tilt head in the vertical direction at the acquisition moment of the first frame of image. The adjustment module is also used to increase at least one of the distance change value of the gimbal in the horizontal direction and the distance change value of the gimbal in the vertical direction when the depression angle is greater than or equal to the preset angle, to obtain the increased value. Control quantity parameter; determine the enlarged control quantity parameter as the control quantity parameter.
在一种可能的设计中,预设角度的取值范围为大于等于20°且小于等于90°。In a possible design, the value range of the preset angle is greater than or equal to 20° and less than or equal to 90°.
在一种可能的设计中,确定模块,还用于确定目标对象在第一帧图像和第二帧图像中的面积变化值。调整模块,还用于在面积变化值大于第一阈值,或者,面积变化值小于第二阈值且面积变化值的绝对值大于第三阈值时,对云台在水平方向上的距离变化值、云台在垂直方向上的距离变化值以及摄像机本体在光轴方向上的焦距变化值的至少一个值进行调整,得到调整后的控制量参数;将调整后的控制量参数确定为控制量参数。In a possible design, the determining module is further configured to determine the area change value of the target object in the first frame image and the second frame image. The adjustment module is also used for adjusting the distance change value of the pan/tilt in the horizontal direction, the cloud value when the area change value is greater than the first threshold value, or when the area change value is smaller than the second threshold value and the absolute value of the area change value is greater than the third threshold value. Adjust at least one of the distance change value of the stage in the vertical direction and the focal length change value of the camera body in the optical axis direction to obtain the adjusted control quantity parameter; the adjusted control quantity parameter is determined as the control quantity parameter.
在一种可能的设计中,该装置还包括:第二获取模块,用于在第一帧图像的采集时刻,获取摄像机本体的焦距。In a possible design, the device further includes: a second acquisition module, configured to acquire the focal length of the camera body at the acquisition moment of the first frame of image.
调整模块,还用于在摄像机本体的焦距大于第四阈值时,将云台在水平方向上的距离变化值、云台在垂直方向上的距离变化值以及摄像机本体在光轴方向上的焦距变化值中的至少一个值调小,得到调小后的控制量参数;将调小后的控制量参数确定为控制量参数。The adjustment module is also used to change the distance change value of the gimbal in the horizontal direction, the distance change value of the gimbal in the vertical direction, and the focal length change of the camera body in the direction of the optical axis when the focal length of the camera body is greater than the fourth threshold At least one of the values is reduced to obtain a reduced control quantity parameter; the reduced control quantity parameter is determined as a controlled quantity parameter.
或者,调整模块,还用于在摄像机本体的焦距小于第五阈值时,将云台在水平方向上的距离变化值、云台在垂直方向上的距离变化值以及摄像机本体在光轴方向上的焦距变化值中的至少一个值调大,得到调大后的控制量参数;将调大后的控制量参数确定为控制量参数。Or, the adjustment module is also used to adjust the distance change value of the pan/tilt in the horizontal direction, the distance change value of the pan/tilt in the vertical direction, and the distance change of the camera body in the optical axis direction when the focal length of the camera body is smaller than the fifth threshold. At least one of the focal length change values is increased to obtain an increased control amount parameter; the increased control amount parameter is determined as a control amount parameter.
在一种可能的设计中,确定模块,具体用于确定目标对象在第二帧图像中的位置与第二帧图像的目标位置之间的第二距离差值;基于第一距离差值和第二距离差值,确定距离变化值。In a possible design, the determining module is specifically configured to determine a second distance difference between the position of the target object in the second frame image and the target position of the second frame image; based on the first distance difference and the first distance difference Two distance difference, determine the distance change value.
在一种可能的设计中,目标位置为任意一帧图像的中心区域。In a possible design, the target position is the central area of any frame of images.
上述第三方面以及上述第三方面的各可能的设计中所提供的云台摄像机的追踪控制装置,其有益效果可以参见上述第二方面和第二方面的各可能的实施方式所带来的有益效果,在此不再赘述。For the tracking control device of the pan-tilt camera provided in the third aspect and the possible designs of the third aspect, the beneficial effects of the tracking control device can refer to the beneficial effects brought by the possible implementations of the second aspect and the second aspect. The effect will not be repeated here.
第四方面,本申请提供一种电子设备,包括:存储器和处理器;存储器用于存储程序指令;处理器用于调用存储器中的程序指令使得电子设备执行第二方面及第二方面任一种可能的设计中的云台摄像机的追踪控制方法。In a fourth aspect, the present application provides an electronic device, comprising: a memory and a processor; the memory is used to store program instructions; the processor is used to call the program instructions in the memory to enable the electronic device to execute the second aspect and any possibility of the second aspect The tracking control method of the PTZ camera in the design.
第五方面,本申请提供一种芯片系统,芯片系统应用于包括存储器、显示屏和传感器的电子设备;芯片系统包括:处理器;当处理器执行存储器中存储的计算机指令时,电子设备执行第二方面及第二方面任一种可能的设计中的云台摄像机的追踪控制方法。In a fifth aspect, the present application provides a chip system, which is applied to an electronic device including a memory, a display screen, and a sensor; the chip system includes: a processor; when the processor executes the computer instructions stored in the memory, the electronic device executes the first The tracking control method of the PTZ camera in the second aspect and any possible design of the second aspect.
第六方面,本申请提供一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器使得电子设备执行时实现第二方面及第二方面任一种可能的设计中的云台摄像机的追踪控制方法。In a sixth aspect, the present application provides a computer-readable storage medium on which a computer program is stored, and the computer program is executed by the processor to enable the electronic device to implement the second aspect and the PTZ in any possible design of the second aspect. Camera tracking control method.
第七方面,本申请提供一种计算机程序产品,包括:执行指令,执行指令存储在可读存储介质中,电子设备的至少一个处理器可以从可读存储介质读取执行指令,至少一个处理器执行执行指令使得电子设备实现第二方面及第二方面任一种可能的设计中的云台摄像机的追踪控制方法。In a seventh aspect, the present application provides a computer program product, comprising: execution instructions, the execution instructions are stored in a readable storage medium, at least one processor of an electronic device can read the execution instructions from the readable storage medium, and at least one processor Executing the execution instruction enables the electronic device to implement the second aspect and the tracking control method for the pan-tilt camera in any possible design of the second aspect.
附图说明Description of drawings
图1A-图1B为本申请一实施例提供的云台摄像机的结构示意图;1A-1B are schematic structural diagrams of a pan-tilt camera provided by an embodiment of the application;
图2为本申请一实施例提供的云台摄像机的追踪控制方法的流程示意图;2 is a schematic flowchart of a tracking control method for a PTZ camera provided by an embodiment of the present application;
图3为本申请一实施例提供的采用模糊控制的比例积分微分PID控制器的示意图;3 is a schematic diagram of a proportional-integral-derivative PID controller using fuzzy control provided by an embodiment of the present application;
图4为本申请一实施例提供的云台摄像机的追踪控制方法的场景示意图;4 is a schematic diagram of a scene of a tracking control method for a PTZ camera provided by an embodiment of the present application;
图5为本申请一实施例提供的云台摄像机的追踪控制方法的场景示意图;FIG. 5 is a schematic scene diagram of a tracking control method for a PTZ camera provided by an embodiment of the present application;
图6为本申请一实施例提供的云台摄像机的追踪控制装置的结构示意图。FIG. 6 is a schematic structural diagram of a tracking control device for a pan-tilt camera according to an embodiment of the present application.
具体实施方式detailed description
本申请提供一种云台摄像机、云台摄像机的追踪控制方法、云台摄像机的追踪控制装置、电子设备、计算机存储介质、计算机程序产品以及芯片系统,可准确获知目标对象的运动姿态变化、相对空间位置等信息,多维度的分析出目标对象的速度变化情况,从而解算出目标对象与云台摄像机之间的空间位置,对摄像机本体的拍摄角度进行精准调整,以便修正目标对象在后续帧图像中的位置,使得目标对象始终保持在后续帧图像的目标位置,解决了由于目标对象运动变化剧烈而造成目标对象追踪丢失的情况,提高了追踪运动变化剧烈的目标对象的准确度,提升了对运动变化剧烈的目标对象的追踪能力。The present application provides a pan-tilt camera, a tracking control method for a pan-tilt camera, a tracking control device for a pan-tilt camera, an electronic device, a computer storage medium, a computer program product, and a chip system, which can accurately know the movement posture change of a target object, relative Spatial position and other information, multi-dimensional analysis of the speed change of the target object, so as to solve the spatial position between the target object and the PTZ camera, and accurately adjust the shooting angle of the camera body, so as to correct the target object in subsequent frame images The position of the target object is always kept at the target position of the subsequent frame image, which solves the situation that the target object tracking is lost due to the drastic changes in the motion of the target object, improves the tracking accuracy of the target object with drastic changes in motion, and improves the accuracy of the target object. The ability to track objects with drastic changes in motion.
请参阅图1A-图1B,图1A-图1B为本申请一实施例提供的云台摄像机的结构示意图。如图1A-图1B所示,本申请实施例的云台摄像机可以包括:摄像机本体101、云台102和云台控制器103。Please refer to FIGS. 1A-1B. FIGS. 1A-1B are schematic structural diagrams of a pan-tilt camera according to an embodiment of the present application. As shown in FIGS. 1A-1B , the pan-tilt camera in this embodiment of the present application may include: a camera body 101 , a pan-tilt 102 , and a pan-tilt controller 103 .
其中,摄像机本体101与云台控制器103之间通信连接,云台控制器103与云台102之间电连接。摄像机可以为球机(球形摄像机),也可以为外接云台102的摄像机。云台控制器103可集成设置在摄像机本体101中,也可以与摄像机本体101分开设置。摄像机本体101与云台102可以一体设置,也可以分开设置。本申请实施例对前述内容均不做限定。The camera body 101 and the pan-tilt controller 103 are communicatively connected, and the pan-tilt controller 103 and the pan-tilt 102 are electrically connected. The camera may be a dome camera (spherical camera) or a camera connected to the external pan/tilt 102 . The pan-tilt controller 103 may be integrated in the camera body 101 , or may be provided separately from the camera body 101 . The camera body 101 and the pan/tilt head 102 may be integrally provided, or may be provided separately. The embodiments of the present application do not limit the foregoing contents.
摄像机本体101包括镜头、传感器和处理器。The camera body 101 includes a lens, a sensor and a processor.
镜头的作用是把被观察目标的光像呈现在摄像机的传感器上。镜头通过将各种不同形状、不同介质(塑料、玻璃或晶体)的光学零件(反射镜、透射镜、棱镜)按一定方式组合起来,使得光线经过这些光学零件的透射或反射以后,按照人们的需要改变光线的传输方向而被接收器件接收,完成物体的光学成像过程。一般来说每个镜头都由多组不同曲面曲率的透镜按不同间距组合而成。间距和镜片曲率、透光系数等指标的选择决定了该镜头的焦距。镜头主要的参数指标包括:有效焦距、光圈、最大像面、视场角、畸变、相对照度等,各项指标数值决定了镜头的综合性能。The function of the lens is to present the light image of the observed target on the sensor of the camera. The lens combines various optical parts (reflectors, transmission mirrors, prisms) of different shapes and different media (plastic, glass or crystal) in a certain way, so that after the light is transmitted or reflected by these optical parts, according to people's expectations. It is necessary to change the transmission direction of the light to be received by the receiving device to complete the optical imaging process of the object. Generally speaking, each lens is composed of multiple groups of lenses with different curved curvatures combined at different intervals. The focal length of the lens is determined by the selection of indicators such as spacing, lens curvature, and light transmittance. The main parameters of the lens include: effective focal length, aperture, maximum image plane, field of view, distortion, relative illumination, etc. The value of each index determines the overall performance of the lens.
传感器(又称图像传感器),是一种将光学影像转换成电子信号的器件,广泛应用在数码相机和其他电子光学设备中。常见的传感器包括:感光耦合元件(charge-coupled device,CCD)和互补式金属氧化物半导体(complementary MOS,CMOS)。CCD和CMOS均拥有大量(例如数千万)的感光二极管(photodiode),每个感光二极管称为一个感光基元,每个感光基元对应一个像素。曝光时,该感光二极管在接受光线照射之后,把光信号转化成包含了亮度(或者亮度与颜色)的电信号,影像就随之被重新构建起来。拜尔(Bayer)阵列是一种常见的图像传感器技术,可以应用于CCD和CMOS中,拜耳阵列使用拜尔滤色镜让不同的像素点只对红、蓝、绿三原色光中的其中一种感光,这些像素交织在一起,然后通过去马赛克(demosaicing)内插来恢复原始影像。拜耳阵列可以应用于CCD或者CMOS中,应用了拜耳阵列的传感器又称为拜耳传感器。除了拜耳传感器之外,还有X3(Foveon公司开发)等传感器技术,X3技术采用三层感光元件,每层记录RGB的其中一个颜色通道,因此可以在一个像素上捕捉全部色彩的图像传感器。A sensor (also known as an image sensor) is a device that converts an optical image into an electronic signal, and is widely used in digital cameras and other electronic and optical devices. Common sensors include: charge-coupled device (CCD) and complementary metal oxide semiconductor (complementary MOS, CMOS). Both CCD and CMOS have a large number (eg, tens of millions) of photodiodes, each photodiode is called a photosensitive cell, and each photosensitive cell corresponds to a pixel. During exposure, the photodiode converts the light signal into an electrical signal containing brightness (or brightness and color) after receiving light, and the image is reconstructed accordingly. Bayer array is a common image sensor technology that can be used in CCD and CMOS. Bayer array uses Bayer color filter to make different pixels only sensitive to one of the three primary colors of red, blue and green. These pixels are interleaved and then interpolated by demosaicing to restore the original image. Bayer arrays can be applied to CCD or CMOS, and sensors using Bayer arrays are also called Bayer sensors. In addition to the Bayer sensor, there are also sensor technologies such as X3 (developed by Foveon). X3 technology uses three layers of photosensitive elements, each layer records one of the color channels of RGB, so it can capture all colors on one pixel. Image sensor.
处理器(又称图像处理器)用于对进行数字信号处理、图像信号处理(ISP)和编码等操作。A processor (also known as an image processor) is used to perform operations such as digital signal processing, image signal processing (ISP), and encoding.
云台102是安装、固定摄像机本体101的支撑设备。随着云台102的旋转,可带动摄像机本体101的转动,从而改变摄像机本体101的旋转角度,使得摄像机本体101能够自动扫描预定区域。云台102可分为只能左右转转的水平旋转云台,以及即能左右旋转又能够上下旋转的全方位云台。云台102可由第一马达和第二马达组成的安装平台。其中,第一马达可用于实现云台102在水平方向上的旋转,第二马达可用于实现云台102在垂直方向上的旋转。且第一马达和第二马达可以为交流电机,也可以为直流电机。The pan/tilt 102 is a supporting device for installing and fixing the camera body 101 . With the rotation of the pan/tilt 102, the camera body 101 can be driven to rotate, thereby changing the rotation angle of the camera body 101, so that the camera body 101 can automatically scan a predetermined area. The gimbal 102 can be divided into a horizontal rotating gimbal that can only rotate left and right, and an omnidirectional gimbal that can rotate left and right as well as up and down. The pan/tilt head 102 may be a mounting platform composed of a first motor and a second motor. Wherein, the first motor can be used to realize the rotation of the pan-tilt 102 in the horizontal direction, and the second motor can be used to realize the rotation of the pan-tilt 102 in the vertical direction. And the first motor and the second motor may be AC motors or DC motors.
为了便于说明,图1B示出了云台102可沿P轴在水平方向上进行旋转,也可沿T轴在竖直方向上进行旋转。其中,P轴(pan),称为水平方向旋转轴,其垂直于水平面。T轴(tilt),称为竖直方向旋转轴,其平行于水平面。For convenience of description, FIG. 1B shows that the pan/tilt head 102 can rotate in the horizontal direction along the P-axis, and can also rotate in the vertical direction along the T-axis. Among them, the P axis (pan), called the horizontal rotation axis, is perpendicular to the horizontal plane. The T-axis (tilt), called the vertical axis of rotation, is parallel to the horizontal plane.
云台控制器103用于基于本申请实施例提供的追踪控制方法,可向云台102输出控制量参数,使得云台102中的马达基于控制量参数控制云台102发生旋转,来调整摄像机本体101的旋转角度。且云台控制器103还用于基于控制量参数,来调整摄像机本体101的焦距。其中,本申请对云台控制器103的数量、型号等参数不做限定。The pan-tilt controller 103 is configured to output control parameters to the pan-tilt 102 based on the tracking control method provided by the embodiment of the present application, so that the motor in the pan-tilt 102 controls the pan-tilt 102 to rotate based on the control-level parameters, so as to adjust the camera body Rotation angle of 101. And the pan-tilt controller 103 is also used for adjusting the focal length of the camera body 101 based on the control parameter. Wherein, the present application does not limit parameters such as the quantity and model of the PTZ controller 103 .
在摄像机本体101对预定区域进行实时监控时,摄像机本体101可将采集到的图像传输给云台控制器103,使得云台控制器103可识别每帧图像中的目标对象。其中,目标对象可以为一个或者多个,本申请实施例对此不做限定。When the camera body 101 monitors the predetermined area in real time, the camera body 101 can transmit the collected images to the pan-tilt controller 103 so that the pan-tilt controller 103 can identify the target object in each frame of image. There may be one or more target objects, which is not limited in this embodiment of the present application.
在一些实施例中,云台控制器103中可设置有一算法模块,以便云台控制器103通过该算法模块确定目标对象是否符合预设规则。In some embodiments, an algorithm module may be set in the pan-tilt controller 103, so that the pan-tilt controller 103 determines whether the target object conforms to the preset rule through the algorithm module.
其中,预设规则可以包括但不限于违反交通规则、闯入到私人住宅或者与犯罪嫌疑人的图像匹配等规则。The preset rules may include but are not limited to rules such as violating traffic rules, breaking into a private residence, or matching images of criminal suspects.
从而,在目标对象符合预设规则时,云台控制器103可触发执行本申请实施例提供的追踪控制方法,来修正目标对象在后续帧图像中的位置。Therefore, when the target object complies with the preset rules, the pan-tilt controller 103 can trigger to execute the tracking control method provided by the embodiment of the present application, so as to correct the position of the target object in the subsequent frame images.
在另一些实施例中,云台控制器103可与终端设备通信连接,云台控制器103可从终端设备接收用户指示的追踪目标对象的指令。In other embodiments, the pan-tilt controller 103 may be connected to the terminal device in communication, and the pan-tilt controller 103 may receive an instruction to track the target object instructed by the user from the terminal device.
或者,云台控制器103可与服务器通信连接,服务器与终端设备通信连接,云台控制器103可通过服务器接收终端设备发送的用户指示的追踪目标对象的指令。Alternatively, the pan-tilt controller 103 may be communicatively connected to the server, and the server may be communicatively connected to the terminal device, and the pan-tilt controller 103 may receive, through the server, an instruction to track the target object indicated by the user and sent by the terminal device.
其中,本申请对该指令的具体实现方式不做限定。例如,用户指定目标对象为目标A,或者,用户指定目标对象为在目标时刻内每帧图像中出现的目标。Wherein, the present application does not limit the specific implementation manner of the instruction. For example, the user designates the target object as the target A, or the user designates the target object as the target appearing in each frame of the image at the target moment.
从而,在接收到用户指示的追踪目标对象的指令时,云台控制器103可触发执行本申请实施例提供的追踪控制方法,来修正目标对象在后续帧图像中的位置。Therefore, when receiving the instruction to track the target object indicated by the user, the pan-tilt controller 103 can trigger to execute the tracking control method provided by the embodiment of the present application to correct the position of the target object in the subsequent frame images.
请参阅图2,图2为本申请一实施例提供的云台摄像机的追踪控制方法的流程示意图。如图2所示,以云台服务器103为执行主体,且当前帧图像以第一帧图像为例,当前帧图像之前的任意一帧图像以第二帧图像为例,当前帧图像之后的任意一帧图像以第三帧图像为例进行示意,本申请实施例的云台摄像机的追踪控制方法可以包括:Please refer to FIG. 2 , which is a schematic flowchart of a tracking control method for a pan-tilt camera according to an embodiment of the present application. As shown in FIG. 2 , the PTZ server 103 is used as the main body of execution, and the current frame image is taken as an example of the first frame image, any frame image before the current frame image is taken as an example of the second frame image, and any frame image after the current frame image is taken as an example. One frame of image is illustrated by taking the third frame of image as an example. The tracking control method of the pan-tilt camera according to the embodiment of the present application may include:
S101、获得摄像机本体所采集的第一帧图像和第二帧图像。S101. Obtain a first frame of image and a second frame of image collected by the camera body.
S102、确定目标对象在第一帧图像中的位置与第一帧图像的目标位置之间的第一距离差值。S102. Determine a first distance difference between the position of the target object in the first frame image and the target position of the first frame image.
基于前述描述,云台服务器103已获知目标对象以及需要修正目标对象在后续帧图像中的位置。由此,云台服务器103可确定目标对象在第一帧图像中的位置,以及第一帧图像的目标位置(即目标对象正确显示在第一帧图像中显示的位置)。Based on the foregoing description, the PTZ server 103 has learned the target object and the position of the target object in the subsequent frame images that needs to be corrected. Thus, the pan-tilt server 103 can determine the position of the target object in the first frame of image, and the target position of the first frame of image (ie, the position where the target object is correctly displayed in the first frame of image).
其中,本申请对目标位置在第一帧图像中的具体位置不做限定。例如,目标位置为第一帧图像的中心区域。Wherein, the present application does not limit the specific position of the target position in the first frame of image. For example, the target position is the central area of the first frame image.
从而,云台服务器103基于目标对象在第一帧图像中的位置与第一帧图像的目标位置,可得到第一距离差值。Therefore, the pan-tilt server 103 can obtain the first distance difference based on the position of the target object in the first frame of image and the target position of the first frame of image.
其中,本申请对云台服务器103得到第一距离差值的实现方式不做限定。Wherein, the present application does not limit the implementation manner in which the PTZ server 103 obtains the first distance difference.
在一些实施例中,云台服务器103可将目标对象在第一帧图像中的位置等同于目标对象在第一帧图像的中心坐标。同样地,云台服务器103可将第一帧图像的目标位置等同于目标位置的中心坐标。从而,云台服务器103可将前述两个中心坐标作差得到第一距离差值。In some embodiments, the PTZ server 103 may equate the position of the target object in the first frame image with the center coordinates of the target object in the first frame image. Likewise, the pan-tilt server 103 may equate the target position of the first frame image with the center coordinates of the target position. Therefore, the pan-tilt server 103 can obtain the first distance difference by taking the difference between the aforementioned two center coordinates.
在另一些实施例中,云台服务器103中可设置有第一初始模型。其中,第一初始模型为两个不规则图像之间的距离差值的模型。云台服务器103可从目标对象在第一帧图像中的位置中取多个边界坐标。同样地,云台服务器103可也从第一帧图像的目标位置中取多个边界坐标。从而,云台服务器103将前述两组边界坐标输入到第一初始模型,并对第一初始模型进行训练,得到第一距离差值。In other embodiments, the PTZ server 103 may be provided with a first initial model. The first initial model is a model of the distance difference between two irregular images. The pan-tilt server 103 may obtain a plurality of boundary coordinates from the position of the target object in the first frame image. Similarly, the pan-tilt server 103 can also take a plurality of boundary coordinates from the target position of the first frame of image. Therefore, the pan-tilt server 103 inputs the aforementioned two sets of boundary coordinates into the first initial model, and trains the first initial model to obtain the first distance difference.
需要说明的是,本申请实施例包括但不限于上述两种实现方式。It should be noted that the embodiments of the present application include but are not limited to the above two implementation manners.
S103、确定目标对象在第一帧图像中的位置和目标对象在第二帧图像中的位置之间的距离变化值。S103: Determine a distance change value between the position of the target object in the first frame image and the position of the target object in the second frame image.
云台服务器103可确定目标对象在第一帧图像中的位置,以及目标对象在第二帧图像中的位置。其中,第一帧图像的采集时刻晚于第二帧图像的采集时刻。例如,第二帧图像可以为第一帧图像的上一帧图像,也可以为第一帧图像之前的第N帧图像,N大于等于2,本申请实施例对此不做限定。The PTZ server 103 may determine the position of the target object in the first frame of image and the position of the target object in the second frame of image. Wherein, the acquisition time of the first frame of image is later than the acquisition time of the second frame of image. For example, the second frame of image may be the previous frame of the first frame of image, or may be the Nth frame of image before the first frame of image, where N is greater than or equal to 2, which is not limited in this embodiment of the present application.
从而,云台服务器103基于目标对象在第一帧图像中的位置,以及目标对象在第二帧图像中的位置,可得到距离变化值。Therefore, the pan-tilt server 103 can obtain the distance change value based on the position of the target object in the first frame of image and the position of the target object in the second frame of image.
其中,本申请实施例对云台服务器103得到距离变化值的具体实现方式不做限定。Wherein, the embodiment of the present application does not limit the specific implementation manner in which the pan-tilt server 103 obtains the distance change value.
在一些实施例中,云台服务器103采用与步骤S101中得到第一距离差值相同的方式,确定目标对象在第二帧图像中的位置与第二帧图像的目标位置之间的第二距离差值。从而,云台服务器103可采用第一距离差值和第二距离差值的差值或商值等形式,作为距离变化值。其中,第一帧图像的目标位置与第二帧图像的目标位置相同。In some embodiments, the pan-tilt server 103 determines the second distance between the position of the target object in the second frame image and the target position of the second frame image in the same manner as the first distance difference value obtained in step S101 difference. Therefore, the pan-tilt server 103 may use the form of the difference or quotient of the first distance difference and the second distance difference as the distance change value. Wherein, the target position of the first frame image is the same as the target position of the second frame image.
在另一些实施例中,云台服务器103中可设置有第二初始模型。其中,第二初始模型为同一目标在两个图像中的距离变化值的模型。云台服务器103可从目标对象在第一帧图像中的位置中取多个边界坐标。同样地,云台服务器103可也从目标对象在第二帧图像中的位置中取多个边界坐标。从而,云台服务器103将前述两组边界坐标输入到第二初始模型,并对第二初始模型进行训练,得到距离变化值。In other embodiments, the PTZ server 103 may be provided with a second initial model. Wherein, the second initial model is a model of the distance change value of the same target in the two images. The pan-tilt server 103 may obtain a plurality of boundary coordinates from the position of the target object in the first frame image. Similarly, the pan-tilt server 103 may also obtain a plurality of boundary coordinates from the position of the target object in the second frame image. Therefore, the PTZ server 103 inputs the aforementioned two sets of boundary coordinates into the second initial model, and trains the second initial model to obtain the distance change value.
需要说明的是,本申请实施例包括但不限于上述两种实现方式。并且,步骤S102和步骤S103没有时序上的先后顺序,且步骤S102和步骤S103可同时执行,也可顺序执行。It should be noted that the embodiments of the present application include but are not limited to the above two implementation manners. Moreover, steps S102 and S103 have no sequential order, and steps S102 and S103 may be performed simultaneously or sequentially.
S104、基于第一距离差值和距离变化值,调整摄像机本体的拍摄角度,以使目标对象显示在第三帧图像的目标位置。S104. Based on the first distance difference value and the distance change value, adjust the shooting angle of the camera body, so that the target object is displayed at the target position of the third frame image.
一方面,云台服务器103基于第一距离差值可获知目标对象偏离第一帧图像的目标位置的距离误差,以便获知目标对象的运动姿态变化。On the one hand, the pan-tilt server 103 can know the distance error of the target object deviating from the target position of the first frame image based on the first distance difference value, so as to know the movement posture change of the target object.
另一方面,云台服务器103基于距离变化值可获知目标对象从第二帧图像到第一帧图像的位置变化率,以便获知目标对象从第二帧图像运动到第一帧图像的相对空间位置。On the other hand, the pan-tilt server 103 can know the position change rate of the target object from the second frame image to the first frame image based on the distance change value, so as to know the relative spatial position of the target object moving from the second frame image to the first frame image .
从而,基于上述两个方面提及的目标对象的运动姿态变化、相对空间位置等信息,云台服务器103可多维度地分析出目标对象的速度变化情况,有利于解算出目标对象与云台摄像机之间的空间位置,以便精准地调整摄像机本体的拍摄角度,来调整目标对象在第三帧图像中的位置,使得目标对象能够显示在第三帧图像的目标位置。Therefore, based on the information such as the movement posture change and relative spatial position of the target object mentioned in the above two aspects, the PTZ server 103 can analyze the speed change of the target object in a multi-dimensional manner, which is beneficial to solve the problem between the target object and the PTZ camera. In order to precisely adjust the shooting angle of the camera body, to adjust the position of the target object in the third frame image, so that the target object can be displayed in the target position of the third frame image.
其中,第三帧图像的采集时刻晚于第一帧图像的采集时刻。例如,第三帧图像可以为第一帧图像的下一帧图像,也可以为第一帧图像之后的第M帧图像,M大于等于2,本申请实施例对此不做限定。Wherein, the acquisition time of the third frame of image is later than the acquisition time of the first frame of image. For example, the third frame of image may be the next frame of the first frame of image, or may be the M-th frame of image after the first frame of image, where M is greater than or equal to 2, which is not limited in this embodiment of the present application.
本申请提供的云台摄像机的追踪控制方法,通过分析目标对象在当前帧图像中的位置与当前帧图像的目标位置之间的误差值以及目标对象在当前帧图像和当前帧图像之前的任意一帧图像之间的误差距离变化值,可准确获知目标对象的运动姿态变化、相对空间位置等信息,以便多维度的分析出目标对象当前的速度变化情况。从而,解 算出目标对象与云台摄像机之间的空间位置,对摄像机本体的拍摄角度进行精准调整,以便及时修正目标对象在后续帧图像中的位置,使得目标对象始终保持在后续帧图像的目标位置,解决了由于目标对象运动变化剧烈而造成目标对象追踪丢失的情况,提高了追踪运动变化剧烈的目标对象的准确度,提升了对运动变化剧烈的目标对象的追踪能力。The tracking control method of the PTZ camera provided by the present application, by analyzing the error value between the position of the target object in the current frame image and the target position of the current frame image and any one of the target object before the current frame image and the current frame image. The change value of the error distance between the frame images can accurately know the movement posture change, relative spatial position and other information of the target object, so as to analyze the current speed change of the target object in multiple dimensions. Therefore, the spatial position between the target object and the PTZ camera is calculated, and the shooting angle of the camera body is precisely adjusted, so as to correct the position of the target object in the subsequent frame images in time, so that the target object is always kept at the target of the subsequent frame images. Position, solves the situation that the tracking of the target object is lost due to the drastic changes in the motion of the target object, improves the accuracy of tracking the target object with drastic changes in motion, and improves the tracking ability of the target object with drastic changes in motion.
本申请实施例中,云台服务器103基于第一距离差值和距离变化值,可得到控制量参数。In the embodiment of the present application, the pan-tilt server 103 can obtain the control amount parameter based on the first distance difference value and the distance change value.
本领域技术人员可以理解,云台102是安装并固定摄像机本体101的支撑设备。从而,云台102在水平方向和竖直方向这两方向上的转动,可带动摄像机本体101在机械活动范围内向任意一个方向旋转,使得摄像机本体101对预定区域进行实时监控。Those skilled in the art can understand that the pan/tilt 102 is a supporting device for installing and fixing the camera body 101 . Therefore, the rotation of the pan/tilt head 102 in the horizontal direction and the vertical direction can drive the camera body 101 to rotate in any direction within the mechanical movement range, so that the camera body 101 can monitor the predetermined area in real time.
基于上述描述,控制量参数可用于调整云台102的姿态,使得调整摄像机本体101的拍摄角度可随着云台102的姿态的改变而发生改变。Based on the above description, the control amount parameter can be used to adjust the posture of the gimbal 102 , so that the adjustment of the shooting angle of the camera body 101 can change with the change of the posture of the gimbal 102 .
下面,结合几个实施例,介绍云台服务器103得到控制量参数的具体实现方式。Hereinafter, with reference to several embodiments, the specific implementation manner of obtaining the control parameter parameters by the PTZ server 103 is described.
在一些实施例中,云台服务器103基于第一距离差值和距离变化值,得到比例积分微分PID控制系数。云台服务器103便可采用比例积分微分PID控制系数的PID控制器,对云台102的姿态进行模糊处理,得到控制量参数。考虑到云台102可在水平方向和竖直方向上进行转动,云台服务器103可将控制量参数沿P轴与T轴正交分解为水平方向与竖直方向这两个方向的分量,即云台102在水平方向上的距离变化值和云台102在垂直方向上的距离变化值。In some embodiments, the PTZ server 103 obtains the proportional-integral-derivative PID control coefficient based on the first distance difference value and the distance change value. The PTZ server 103 can use a PID controller with proportional integral derivative PID control coefficients to perform fuzzy processing on the attitude of the PTZ 102 to obtain control parameters. Considering that the gimbal 102 can rotate in the horizontal direction and the vertical direction, the gimbal server 103 can decompose the control quantity parameter orthogonally along the P-axis and the T-axis into the components in the horizontal direction and the vertical direction, that is, The distance change value of the gimbal 102 in the horizontal direction and the distance change value of the gimbal 102 in the vertical direction.
在另一些实施例中,考虑到云台102可在水平方向和竖直方向上进行转动,云台服务器103可将第一距离差值沿P轴和T轴正交分解为水平方向与竖直方向这两个方向的分量,以及将距离变化值正交分解为水平方向与竖直方向这两个方向的分量。In other embodiments, considering that the gimbal 102 can rotate in the horizontal direction and the vertical direction, the gimbal server 103 can decompose the first distance difference orthogonally along the P-axis and the T-axis into the horizontal direction and the vertical direction. The components of the two directions, and the orthogonal decomposition of the distance change value into the components of the two directions of the horizontal direction and the vertical direction.
云台服务器103基于第一距离差值在水平方向的分量和距离变化值在水平方向的分量,得到水平方向上的比例积分微分PID控制系数。云台服务器103便可采用水平方向上的比例积分微分PID控制系数的PID控制器,对云台102的姿态进行模糊处理,得到云台102在水平方向上的距离变化值。The pan-tilt server 103 obtains the proportional-integral-derivative PID control coefficient in the horizontal direction based on the component of the first distance difference in the horizontal direction and the component of the distance change value in the horizontal direction. The pan-tilt server 103 can use a PID controller with proportional-integral-derivative PID control coefficients in the horizontal direction to perform fuzzy processing on the posture of the pan-tilt 102 to obtain the distance change value of the pan-tilt 102 in the horizontal direction.
云台服务器103基于第一距离差值在竖直方向的分量和距离变化值在竖直方向的分量,得到竖直方向上的比例积分微分PID控制系数。云台服务器103便可采用竖直方向上的比例积分微分PID控制系数的PID控制器,对云台102的姿态进行模糊处理,得到云台102在垂直方向上的距离变化值。The PTZ server 103 obtains the proportional-integral-derivative PID control coefficient in the vertical direction based on the vertical component of the first distance difference value and the vertical component of the distance change value. The PTZ server 103 can use a PID controller with proportional integral derivative PID control coefficients in the vertical direction to perform fuzzy processing on the attitude of the PTZ 102 to obtain the distance change value of the PTZ 102 in the vertical direction.
从而,基于上述两种方式,云台控制器103可向云台102中的第一马达输出云台102在水平方向上的距离变化值,使得云台102中的第一马达按照云台102在水平方向上的距离变化值,确定第一马达的转速改变值。云台102中的第一马达基于第一马达的转速改变值,对云台102进行旋转,改变云台102在水平方向上的旋转角度,使得调整摄像机本体101的拍摄角度随着云台102的旋转而发生改变。Therefore, based on the above two methods, the pan-tilt controller 103 can output the distance change value of the pan-tilt 102 in the horizontal direction to the first motor in the pan-tilt 102, so that the first motor in the pan-tilt 102 is in accordance with the position of the pan-tilt 102. The distance change value in the horizontal direction determines the speed change value of the first motor. The first motor in the gimbal 102 rotates the gimbal 102 based on the change value of the rotational speed of the first motor, and changes the rotation angle of the gimbal 102 in the horizontal direction, so that the shooting angle of the camera body 101 is adjusted according to the rotation of the gimbal 102 change by rotation.
并且,云台控制器103可向云台102中的第二马达输出云台102在垂直方向上的距离变化值,使得云台102中的第二马达按照云台102在垂直方向上的距离变化值,确定第二马达的转速改变值。云台102中的第二马达基于第二马达的转速改变值,对 云台102进行旋转,改变云台102在垂直方向上的旋转角度。In addition, the gimbal controller 103 can output the distance change value of the gimbal 102 in the vertical direction to the second motor in the gimbal 102 , so that the second motor in the gimbal 102 changes according to the distance of the gimbal 102 in the vertical direction value to determine the rotational speed change value of the second motor. The second motor in the gimbal 102 rotates the gimbal 102 based on the rotational speed change value of the second motor to change the rotation angle of the gimbal 102 in the vertical direction.
其中,本申请实施例对第一马达和第二马达的具体类型、参数、型号等参数不做限定。The embodiments of the present application do not limit parameters such as specific types, parameters, and models of the first motor and the second motor.
由此,云台服务器103在水平方向和竖直方向上实现对云台102的姿态的精准调整,使得调整摄像机本体101的拍摄角度随着云台102的旋转而发生改变。另外,云台服务器103也可在水平方向或者竖直方向上实现对云台102的姿态的精准调整,无需在两个方向上共同调整云台102的姿态。In this way, the pan-tilt server 103 can accurately adjust the posture of the pan-tilt 102 in the horizontal and vertical directions, so that the shooting angle of the camera body 101 is adjusted as the pan-tilt 102 rotates. In addition, the pan-tilt server 103 can also precisely adjust the posture of the pan-tilt 102 in the horizontal direction or the vertical direction, and it is not necessary to adjust the posture of the pan-tilt 102 in both directions.
除了摄像机本体101的拍摄角度之外,云台服务器103还可以改变摄像机本体101的焦距。也就是说,在摄像机本体101的焦距改变时,摄像机本体101拍摄到的目标对象在当前帧图像中的位置会发生改变。其中,摄像机本体101的焦距指的是Z变倍(zoom),称为变焦变倍。变倍:改变透镜和成像面的距离,达到使影像清晰的目标对象,即物镜的焦距不变,改变目镜的焦距来达到变倍的目的。变焦:改变镜头的焦距,即改变视角,即目镜的焦距不变,改变物镜的焦距来达到变焦的目的。In addition to the shooting angle of the camera body 101 , the pan-tilt server 103 can also change the focal length of the camera body 101 . That is, when the focal length of the camera body 101 changes, the position of the target object captured by the camera body 101 in the current frame image will change. Among them, the focal length of the camera body 101 refers to Z zoom, which is called zoom zoom. Zooming: changing the distance between the lens and the imaging surface to achieve the target object with a clear image, that is, the focal length of the objective lens remains unchanged, and the focal length of the eyepiece is changed to achieve the purpose of zooming. Zoom: Change the focal length of the lens, that is, change the angle of view, that is, the focal length of the eyepiece remains unchanged, and the focal length of the objective lens is changed to achieve the purpose of zooming.
基于前述描述,控制量参数还可用于调整云台102的姿态和调整摄像机本体101的焦距,使得调整摄像机本体101的拍摄角度和调整摄像机本体101的焦距均可发生改变。Based on the foregoing description, the control parameter parameters can also be used to adjust the posture of the pan/tilt head 102 and the focal length of the camera body 101 , so that both the shooting angle of the camera body 101 and the focal length of the camera body 101 can be changed.
在一些实施例中,除了云台102在水平方向上的距离变化值和云台102在垂直方向上的距离变化值之外,控制量参数还可包括:摄像机本体101在光轴方向上的焦距变化值。In some embodiments, in addition to the distance change value of the gimbal 102 in the horizontal direction and the distance change value of the gimbal 102 in the vertical direction, the control parameter may further include: the focal length of the camera body 101 in the optical axis direction change value.
其中,云台服务器103得到云台102在水平方向上的距离变化值和云台102在垂直方向上的距离变化值的具体实现方式可参见前述描述内容,此处不做赘述。The specific implementation of the distance change value of the PTZ server 103 in the horizontal direction and the distance change value of the PTZ 102 in the vertical direction can be found in the foregoing description, and will not be repeated here.
由此,云台服务器103基于第一距离差值和距离变化值,可获知目标对象当前运动线速度在摄像机本体101的视球面上角速度变化的倍率,得到摄像机本体101在光轴方向上的焦距变化值。从而,云台控制器103可按照摄像机本体101在光轴方向上的焦距变化值对摄像机本体101的焦距进行精准调整,使得目标对象显示在第三帧图像的目标位置,提高了追踪近距离快速运动的目标对象的准确度,提升了对近距离快速运动的目标对象的追踪能力。Thus, based on the first distance difference value and the distance change value, the pan-tilt server 103 can obtain the magnification of the angular velocity change of the current linear velocity of the target object on the spherical surface of the camera body 101, and obtain the focal length of the camera body 101 in the direction of the optical axis change value. Therefore, the pan-tilt controller 103 can precisely adjust the focal length of the camera body 101 according to the change value of the focal length of the camera body 101 in the optical axis direction, so that the target object is displayed at the target position of the third frame image, which improves the tracking speed at close range. The accuracy of moving target objects improves the tracking ability of fast moving target objects at close range.
本申请实施例中,云台服务器103中设置有采用如图3示例性所示模糊控制的比例积分微分PID控制器。In this embodiment of the present application, the PTZ server 103 is provided with a proportional-integral-derivative PID controller that adopts fuzzy control as exemplarily shown in FIG. 3 .
下面,结合几个实施例,介绍比例积分微分PID控制器的模糊控制的工作原理。Below, with reference to several embodiments, the working principle of the fuzzy control of the proportional-integral-derivative PID controller is introduced.
在一些实施例中,云台服务器103将第一距离差值和距离变化值输入到比例积分微分PID控制器中。比例积分微分PID控制器将第一距离差值和距离变化值通过模糊算法的计算,可得到比例积分微分PID修正系数,即图3中的Ka、Kb、Kc。In some embodiments, the PTZ server 103 inputs the first distance difference value and the distance change value into the proportional-integral-derivative PID controller. The proportional-integral-derivative PID controller calculates the first distance difference and the distance change value through the fuzzy algorithm, and can obtain the proportional-integral-derivative PID correction coefficients, namely Ka, Kb, Kc in Fig. 3 .
从而,比例积分微分PID控制器将比例积分微分PID修正系数和比例积分微分PID初始系数(即图3中的Kp、Ki、Kd)的乘积确定为比例积分微分PID控制系数,即图3中的Ka*Kp、Kb*Ki、Kc*Kd。其中,比例积分微分PID控制系数可影响比例积分微分PID控制器中各项控制因数的大小,比例积分微分PID初始系数为比例积分微分PID控制器初始设定的控制参数。比例积分微分PID控制器便可基于比例积分微分PID控制系数,得到控制量参数。Therefore, the proportional-integral-derivative PID controller determines the product of the proportional-integral-derivative PID correction coefficient and the proportional-integral-derivative PID initial coefficient (that is, Kp, Ki, Kd in Fig. 3) as the proportional-integral-derivative PID control coefficient, that is, in Fig. 3 Ka*Kp, Kb*Ki, Kc*Kd. Among them, the proportional integral derivative PID control coefficient can affect the size of each control factor in the proportional integral derivative PID controller, and the proportional integral derivative PID initial coefficient is the control parameter initially set by the proportional integral derivative PID controller. The proportional-integral-derivative PID controller can obtain the control parameters based on the proportional-integral-derivative PID control coefficients.
在另一些实施例中,云台服务器103将第一距离差值和距离变化值输入到比例积分微分PID控制器中。比例积分微分PID控制器将第一距离差值和距离变化值通过模糊算法的计算,可得到比例积分微分PID控制系数,即图3中的Ka*Kp、Kb*Ki、Kc*Kd。In other embodiments, the PTZ server 103 inputs the first distance difference value and the distance change value into the proportional-integral-derivative PID controller. The proportional-integral-derivative PID controller calculates the first distance difference and the distance change value through the fuzzy algorithm, and can obtain the proportional-integral-derivative PID control coefficients, namely Ka*Kp, Kb*Ki, Kc*Kd in Figure 3.
从而,比例积分微分PID控制器基于比例积分微分PID控制系数,便可得到控制量参数。Therefore, the proportional-integral-derivative PID controller can obtain the control quantity parameter based on the proportional-integral-derivative PID control coefficient.
基于前述两种方式中改进的比例积分微分PID控制系数,云台服务器103中的比例积分微分PID服务器可得到更为准确的控制量参数,减少目标对象在后续帧图像中的位置与后续帧图像中的目标位置之间的误差,及时调整目标对象在后续帧图像中的位置,使得目标对象显示在后续帧图像的目标位置,实现云台摄像机对目标对象更为精准的追踪。Based on the improved proportional-integral-derivative PID control coefficients in the aforementioned two methods, the proportional-integral-derivative PID server in the PTZ server 103 can obtain more accurate control parameters, reducing the position of the target object in the subsequent frame images and the subsequent frame images. The position of the target object in the subsequent frame image is adjusted in time, so that the target object is displayed in the target position of the subsequent frame image, and the PTZ camera can track the target object more accurately.
其中,比例积分微分PID控制器可采用多种方式,将第一距离差值和距离变化值通过模糊算法的计算,可得到比例积分微分PID修正系数或者比例积分微分PID控制系数。Among them, the proportional-integral-derivative PID controller can adopt various methods, and the first distance difference value and the distance change value are calculated by the fuzzy algorithm, and the proportional-integral-derivative PID correction coefficient or the proportional-integral-derivative PID control coefficient can be obtained.
在一些实施例中,比例积分微分PID控制器可通过查表的方式,基于第一距离差值和距离变化值,得到比例积分微分PID修正系数或者比例积分微分PID控制系数,如图3中的Ka、Kb、Kc、Ka*Kp、Kb*Ki、Kc*Kd中的任意一个。In some embodiments, the proportional-integral-derivative PID controller can obtain the proportional-integral-derivative PID correction coefficient or the proportional-integral-derivative PID control coefficient based on the first distance difference and the distance change value by looking up a table, as shown in FIG. 3 . Any of Ka, Kb, Kc, Ka*Kp, Kb*Ki, Kc*Kd.
假设第一距离差值的变化范围是[-100,100],距离变化值的变化范围是Assuming that the variation range of the first distance difference value is [-100, 100], the variation range of the distance variation value is
[-200,200],则第一距离差值对应的控制程度如表1所示,距离变化值对应的控制程度如表2所示。[-200, 200], the control degree corresponding to the first distance difference value is shown in Table 1, and the control degree corresponding to the distance change value is shown in Table 2.
表1第一距离差值对应的控制程度Table 1 Control degree corresponding to the first distance difference
[-100,-50)[-100,-50) [-50,-10)[-50,-10) [-10,10)[-10,10) [10,50)[10,50) [50,100][50,100]
误差反向过大Error reverse is too large 误差反向略大The error is slightly larger 误差较小less error 误差正向略大The error is slightly larger 误差正向过大Error is too large
表2距离变化值对应的控制程度Table 2 Control degree corresponding to distance change value
[-200,-50)[-200,-50) [-50,-5)[-50,-5) [-5,5)[-5,5) [5,50)[5,50) [50,200][50,200]
反向增长过快Reverse growth too fast 反向增长略快Reverse growth slightly faster 基本持平Flat 正向增长略快Positive growth slightly faster 正向增长过快Positive growth too fast
基于表1和表2,云台服务器103可划分为5个控制力度的区间,即可组成一个5×5的模糊表,如表3所示。Based on Table 1 and Table 2, the PTZ server 103 can be divided into five control strength intervals, which can form a 5×5 fuzzy table, as shown in Table 3.
表3模糊表Table 3 Fuzzy table
Figure PCTCN2021118345-appb-000001
Figure PCTCN2021118345-appb-000001
表3中,模糊表中的符号“+”和符号“-”分别表示控制力度。其中,一个“+” 表示增大控制力度,多个“+”表示控制力度需要继续增大,一个“-”表示削弱控制力度,多个“-”表示控制力度需要继续削弱。In Table 3, the symbol "+" and the symbol "-" in the fuzzy table represent the control strength, respectively. Among them, one "+" means to increase the control strength, multiple "+" means that the control strength needs to continue to increase, one "-" means to weaken the control strength, and multiple "-" means that the control strength needs to continue to be weakened.
综上,比例积分微分PID控制器基于表3,可得到调整控制量参数的策略,即在第一距离差值较大且距离变化值较大时,云台服务器103可增大控制量参数的控制力度。在第一距离差值较大且距离变化值较小时,云台服务器103可削弱控制量参数的控制力度。To sum up, based on Table 3, the proportional-integral-derivative PID controller can obtain a strategy for adjusting the control variable parameters, that is, when the first distance difference is large and the distance change value is large, the PTZ server 103 can increase the control variable parameters. Control strength. When the first distance difference is large and the distance change value is small, the PTZ server 103 can weaken the control strength of the control quantity parameter.
从而,比例积分微分PID控制器基于上述策略可以得到比例积分微分PID修正系数或者比例积分微分PID控制系数。Therefore, the proportional-integral-derivative PID controller can obtain the proportional-integral-derivative PID correction coefficient or the proportional-integral-derivative PID control coefficient based on the above strategy.
在另一些实施例中,比例积分微分PID控制器可通过公式的方式,基于第一距离差值和距离变化值,得到比例积分微分PID修正系数或者比例积分微分PID控制系数,如图3中的Ka、Kb、Kc、Ka*Kp、Kb*Ki、Kc*Kd中的任意一个。In other embodiments, the proportional-integral-derivative PID controller can obtain the proportional-integral-derivative PID correction coefficient or the proportional-integral-derivative PID control coefficient based on the first distance difference value and the distance change value by means of a formula, as shown in FIG. 3 Any of Ka, Kb, Kc, Ka*Kp, Kb*Ki, Kc*Kd.
例如,云台服务器103可将第一距离差值和距离变化值代入到公式一,得到比例积分微分PID修正系数或者比例积分微分PID控制系数:For example, the PTZ server 103 can substitute the first distance difference value and the distance change value into Formula 1 to obtain the proportional-integral-derivative PID correction coefficient or the proportional-integral-derivative PID control coefficient:
Figure PCTCN2021118345-appb-000002
Figure PCTCN2021118345-appb-000002
其中,a为第一距离差值,且第一距离差值的变化范围是[-A,A]。b为距离变化值,且距离变化值的变化范围是[-2A,2A]。m为得到比例积分微分PID修正系数或者比例积分微分PID控制系数。Among them, a is the first distance difference, and the variation range of the first distance difference is [-A, A]. b is the distance change value, and the change range of the distance change value is [-2A, 2A]. m is the proportional-integral-derivative PID correction coefficient or the proportional-integral-derivative PID control coefficient.
需要说明的是,本申请实施例包括但不限于查表或者公式的方式得到比例积分微分PID修正系数或者比例积分微分PID控制系数。It should be noted that the embodiments of the present application include, but are not limited to, methods of looking up tables or formulas to obtain proportional-integral-derivative PID correction coefficients or proportional-integral-derivative PID control coefficients.
本申请实施例中,除了第一距离差值和距离变化值之外,云台服务器103还可通过其他参数来调整摄像机本体101的拍摄角度,或者,调整摄像机本体101的拍摄角度和摄像机本体101的焦距,使得目标对象显示在后续帧图像的目标位置。In this embodiment of the present application, in addition to the first distance difference value and the distance change value, the PTZ server 103 can also adjust the shooting angle of the camera body 101 through other parameters, or adjust the shooting angle of the camera body 101 and the camera body 101 , so that the target object is displayed at the target position of the subsequent frame image.
本领域技术人员可以理解,云台102在竖直方向上的俯角增加,可以判定目标对象在向云台摄像机本体快速靠近。此时,目标对象的当前运动线速度映射于云台102的旋转角速度会显著增加。Those skilled in the art can understand that as the depression angle of the gimbal 102 in the vertical direction increases, it can be determined that the target object is rapidly approaching the gimbal camera body. At this time, the current linear velocity of the movement of the target object is mapped to the rotational angular velocity of the gimbal 102 will increase significantly.
请参阅图4,图4为本申请一实施例提供的云台摄像机的追踪控制方法的场景示意图。如图4所示,云台102位于观察点A,观察点A离水平面aa的高度为h,目标对象(图4中以小汽车为例进行示意)与观察点A在水平方向上的距离为s。观察点A与目标对象之间的连线即为视线,视线与观察点A的垂直方向之间的夹角为θ,且θ与云台102在垂直方向上的俯角互为余角。Please refer to FIG. 4 , which is a schematic diagram of a scene of a tracking control method for a pan-tilt camera provided by an embodiment of the present application. As shown in FIG. 4 , the pan/tilt 102 is located at the observation point A, the height of the observation point A from the horizontal plane aa is h, and the distance between the target object (illustrated by taking a car as an example in FIG. 4 ) and the observation point A in the horizontal direction is s. The line connecting the observation point A and the target object is the line of sight, the angle between the line of sight and the vertical direction of the observation point A is θ, and θ and the depression angle of the gimbal 102 in the vertical direction are complementary angles to each other.
假设目标对象沿水平面aa匀速向观察点A靠近,云台102的视线随着目标对象的移动而旋转,故θ发生变化,对应于云台102在竖直方向上的俯角发生变化。Assuming that the target object approaches the observation point A at a constant speed along the horizontal plane aa, the sight of the gimbal 102 rotates with the movement of the target object, so the change of θ corresponds to the change of the depression angle of the gimbal 102 in the vertical direction.
其中,通过公式二可得到θ:Among them, θ can be obtained by formula 2:
Figure PCTCN2021118345-appb-000003
Figure PCTCN2021118345-appb-000003
其中,通过公式三可得到云台102的旋转角速度与目标对象的线速度之间的关系:Wherein, the relationship between the rotational angular velocity of the gimbal 102 and the linear velocity of the target object can be obtained by formula 3:
Figure PCTCN2021118345-appb-000004
Figure PCTCN2021118345-appb-000004
其中,v θ是云台102的旋转角速度,v s是目标对象的线速度。 Among them, v θ is the rotational angular velocity of the gimbal 102 , and v s is the linear velocity of the target object.
进而,随着目标对象靠近观察点A,s逐渐变小,
Figure PCTCN2021118345-appb-000005
因子逐渐变大。因此,目标对象的当前运动线速度映射于云台102的旋转角速度会显著增加。
Furthermore, as the target object approaches the observation point A, s gradually decreases,
Figure PCTCN2021118345-appb-000005
factor gradually increases. Therefore, the current linear velocity of the target object is mapped to the rotational angular velocity of the pan/tilt head 102 , which will increase significantly.
基于上述描述,云台控制器103在第一帧图像的采集时刻,可获取云台102在垂直方向上的俯角。在俯角大于等于预设角度时,云台服务器103可按照一定比例,将云台102在水平方向上的距离变化值和云台102在垂直方向上的距离变化值中的至少一个值调大,使得控制量参数变大,得到调大后的控制量参数。从而,云台服务器103将调大后的控制量参数作为最终的控制参数来调整云台102的姿态,使得云台102单位时间内变化的距离变大,能够及时追踪到近距离快速运动的目标对象。Based on the above description, the pan-tilt controller 103 can acquire the depression angle of the pan-tilt 102 in the vertical direction at the acquisition moment of the first frame of image. When the depression angle is greater than or equal to the preset angle, the gimbal server 103 may increase at least one of the distance change value of the gimbal 102 in the horizontal direction and the distance change value of the gimbal 102 in the vertical direction according to a certain ratio, Make the control quantity parameter larger, and obtain the enlarged control quantity parameter. Therefore, the pan-tilt server 103 adjusts the posture of the pan-tilt 102 by using the increased control quantity parameter as the final control parameter, so that the distance that the pan-tilt 102 changes per unit time becomes larger, and the target that moves quickly at a short distance can be tracked in time. object.
其中,本申请实施例对预设角度的大小不做限定。例如,预设角度的取值范围为大于等于20°且小于等于90°。Wherein, the embodiment of the present application does not limit the size of the preset angle. For example, the value range of the preset angle is greater than or equal to 20° and less than or equal to 90°.
本领域技术人员可以理解,当目标对象在图像中的面积占比正向快速增大时,云台服务器103可判定目标对象有快速靠近云台摄像机或者快速偏离目标位置的趋势。另外,在此趋势下,云台服务器103再结合距离变化值可及时调整云台102的姿态,使得摄像机本体101的拍摄角度及时发生改变。当目标对象在图像中的面积占比较小甚至负向增大时,云台服务器103可判定目标对象有快速远离云台摄像机的趋势。Those skilled in the art can understand that when the area ratio of the target object in the image is rapidly increasing, the pan-tilt server 103 may determine that the target object has a tendency to rapidly approach the pan-tilt camera or rapidly deviate from the target position. In addition, under this trend, the pan-tilt server 103 can adjust the posture of the pan-tilt 102 in time in combination with the distance change value, so that the shooting angle of the camera body 101 changes in time. When the area ratio of the target object in the image is small or even negatively increases, the PTZ server 103 may determine that the target object tends to move away from the PTZ camera quickly.
基于上述描述,云台控制器103可确定目标对象在第一帧图像中的面积占比值,以及目标对象在第二帧图像中的面积占比值。从而,云台控制器103将前述两个面积占比值的差值或者商值的形式,作为目标对象在第一帧图像和第二帧图像中的面积变化值。Based on the above description, the pan-tilt controller 103 can determine the area ratio value of the target object in the first frame of image, and the area ratio value of the target object in the second frame image. Therefore, the pan-tilt controller 103 takes the form of the difference or quotient of the aforementioned two area ratios as the area change value of the target object in the first frame image and the second frame image.
在面积变化值大于第一阈值,或者,面积变化值小于第二阈值且面积变化值的绝对值大于第三阈值时,云台控制器103可按照一定比例,对云台102在水平方向上的距离变化值、云台102在垂直方向上的距离变化值以及摄像机本体101在光轴方向上的焦距变化值中的至少一个值进行调整,使得控制量参数发生改变,得到调整后的控制量参数。从而,云台服务器103将调整后的控制量参数作为最终的控制量参数来调整摄像机本体101的拍摄角度和摄像机本体101的焦距,使得云台102单位时间内变化的距离能够及时追踪到近距离快速运动的目标对象。When the area change value is greater than the first threshold, or, when the area change value is smaller than the second threshold and the absolute value of the area change value is greater than the third threshold, the pan/tilt controller 103 may, according to a certain proportion, measure the horizontal direction of the pan/tilt 102 in the horizontal direction. Adjust at least one of the distance change value, the distance change value of the gimbal 102 in the vertical direction, and the focal length change value of the camera body 101 in the direction of the optical axis, so that the control amount parameter changes, and the adjusted control amount parameter is obtained. . Therefore, the pan-tilt server 103 uses the adjusted control amount parameter as the final control amount parameter to adjust the shooting angle of the camera body 101 and the focal length of the camera body 101, so that the distance changed by the pan-tilt 102 per unit time can be tracked to the close range in time A fast-moving target object.
其中,本申请实施例对第一阈值、第二阈值和第三阈值的大小不做限定。The embodiments of the present application do not limit the sizes of the first threshold, the second threshold, and the third threshold.
本领域技术人员可以理解,云台102的同一角速度情况下,Z变倍越大,摄像机本体101的焦距越大,画面焦平面的线速度也就越大。云台102的同一线速度情况下,Z变倍越大,摄像机本体101的焦距越大,画面焦平面的角速度也就越小。且摄像机本体101的Z变倍对应于画面焦平面的线速度。故,目标对象的距离远近影响到摄像机本体101的Z变倍的大小。一般情况下,距离越远,Z变倍越大。Those skilled in the art can understand that under the condition of the same angular velocity of the gimbal 102, the larger the Z zoom, the larger the focal length of the camera body 101, and the larger the linear velocity of the focal plane of the picture. In the case of the same linear velocity of the pan/tilt head 102, the larger the Z zoom, the larger the focal length of the camera body 101, and the smaller the angular velocity of the focal plane of the screen. And the Z magnification of the camera body 101 corresponds to the linear velocity of the focal plane of the screen. Therefore, the distance of the target object affects the size of the Z zoom of the camera body 101 . In general, the farther the distance is, the larger the Z zoom will be.
请参阅图5,图5为本申请一实施例提供的云台摄像机的追踪控制方法的场景示意图。如图5所示,云台摄像机位于观察点B。Please refer to FIG. 5 , which is a schematic diagram of a scene of a tracking control method for a pan-tilt camera provided by an embodiment of the present application. As shown in Figure 5, the PTZ camera is located at observation point B.
假设两个目标对象(图5中以小汽车A1和A2为例进行示意):一个目标对象A1需要摄像机本体101的Z变倍为z倍,另一个目标对象A2需要摄像机本体101的Z 变倍为20z倍,两个目标对象分别与观察点A之间的距离比约为1:20。Suppose two target objects (cars A1 and A2 are used as examples in FIG. 5 ): one target object A1 needs the Z zoom of the camera body 101 to be z times, and the other target object A2 needs the Z zoom of the camera body 101 For 20z times, the distance ratio between the two target objects and the observation point A is about 1:20.
在两个目标对象沿同一个bb方向向云台摄像机侧向移动相同距离时,Z变倍大的摄像机本体101对应的云台102的转动幅度较小,Z变倍小的摄像机本体101拍摄对应的云台102的转动幅度较大。When the two target objects move the same distance laterally to the gimbal camera along the same bb direction, the rotation range of the gimbal 102 corresponding to the camera body 101 with a large Z zoom is smaller, and the camera body 101 with a small Z zoom corresponds to The rotation range of the gimbal 102 is relatively large.
因此,云台服务器103可判定目标对象所在的焦平面,在摄像机本体101的Z变倍较大时,目标对象与云台摄像机之间的距离远,云台102的转动幅度小,即Z变倍较大的摄像机本体101对应的云台102需要的控制量参数,比Z变倍小的摄像机本体101对应的云台102需要的控制量参数更小。Therefore, the pan-tilt server 103 can determine the focal plane where the target object is located. When the Z zoom of the camera body 101 is large, the distance between the target object and the pan-tilt camera is long, and the rotation of the pan-tilt 102 is small, that is, the Z zoom The control quantity parameter required by the pan/tilt 102 corresponding to the camera body 101 with a larger magnification is smaller than that required by the pan/tilt 102 corresponding to the camera body 101 with a smaller Z zoom.
云台服务器103可判定目标对象所在焦平面,在摄像机本体101拍摄的Z变倍较小时,目标对象与云台摄像机之间的距离近,云台102的转动幅度大,即Z变倍较小的摄像机本体101对应的云台102需要的控制量参数,比Z变倍大的摄像机本体101对应的云台102需要的控制量参数更大。The pan-tilt server 103 can determine the focal plane where the target object is located. When the Z zoom of the camera body 101 is small, the distance between the target object and the pan-tilt camera is short, and the rotation of the pan-tilt 102 is large, that is, the Z zoom is small. The control quantity parameter required by the pan/tilt 102 corresponding to the camera body 101 of 100 is larger than that required by the pan/tilt 102 corresponding to the camera body 101 with a larger Z zoom.
基于上述描述,云台控制器103在第一帧图像的采集时刻,获取摄像机本体101的焦距。Based on the above description, the pan-tilt controller 103 acquires the focal length of the camera body 101 at the acquisition moment of the first frame of image.
在摄像机本体101的焦距大于第四阈值时,云台控制器103可按照一定比例,将云台102在水平方向上的距离变化值、云台102在垂直方向上的距离变化值以及摄像机本体101在光轴方向上的焦距变化值中的至少一个值调小,使得控制量参数变小,得到调小后的控制量参数。从而,云台服务器103将调小后的控制量参数作为最终的控制量参数来调整摄像机本体101的拍摄角度和/或摄像机本体101的焦距,使得云台102单位时间内变化的距离变小和/或摄像机本体101的焦距变小,能够及时追踪到近距离快速运动的目标对象。When the focal length of the camera body 101 is greater than the fourth threshold, the pan/tilt controller 103 may change the distance change value of the pan/tilt head 102 in the horizontal direction, the distance change value of the pan/tilt head 102 in the vertical direction, and the camera body 101 according to a certain ratio. At least one of the focal length change values in the direction of the optical axis is reduced, so that the control quantity parameter becomes smaller, and the reduced control quantity parameter is obtained. Therefore, the pan/tilt server 103 uses the reduced control amount parameter as the final control amount parameter to adjust the shooting angle of the camera body 101 and/or the focal length of the camera body 101, so that the distance changed by the pan/tilt 102 per unit time becomes smaller and more /or the focal length of the camera body 101 is reduced, so that a target object that moves rapidly at a short distance can be tracked in time.
在摄像机本体101的焦距小于第五阈值时,云台控制器103可按照一定比例,将云台102在水平方向上的距离变化值、云台102在垂直方向上的距离变化值以及摄像机本体101在光轴方向上的焦距变化值中的至少一个值调大,使得控制量参数变大,得到调大后的控制量参数。从而,云台服务器103将调大后的控制量参数作为最终的控制量参数来调整摄像机本体101的拍摄角度和/或摄像机本体101的焦距,使得云台102单位时间内变化的距离变大和/或摄像机本体101的焦距变大,能够及时追踪到近距离快速运动的目标对象。When the focal length of the camera body 101 is less than the fifth threshold, the pan/tilt controller 103 may change the distance change value of the pan/tilt head 102 in the horizontal direction, the distance change value of the pan/tilt head 102 in the vertical direction, and the camera body 101 according to a certain ratio. At least one of the focal length change values in the direction of the optical axis is increased, so that the control amount parameter is increased, and the increased control amount parameter is obtained. Therefore, the pan-tilt server 103 uses the increased control amount parameter as the final control amount parameter to adjust the shooting angle of the camera body 101 and/or the focal length of the camera body 101, so that the distance changed by the pan-tilt 102 per unit time becomes larger and/or Or the focal length of the camera body 101 becomes larger, so that a target object that moves rapidly at a short distance can be tracked in time.
其中,本申请实施例对第四阈值和第五阈值的大小不做限定。The size of the fourth threshold and the fifth threshold is not limited in this embodiment of the present application.
综上,本申请实施例中,云台服务器103通过读取云台102在垂直方向上的俯角、目标对象在第一帧图像和第二帧图像中的面积变化值以及摄像机本体101的焦距等参数,可以评估出目标对象当前运动线速度在摄像机本体101的视球面上角速度变化的倍率,实现对摄像机本体101的拍摄角度和摄像机本体101的焦距的调整,使得云台摄像机能够更加准确地追踪近距离快速运动的目标对象,提升了对近距离快速运动的目标对象的追踪能力和准确度。To sum up, in the embodiment of the present application, the PTZ server 103 reads the depression angle of the PTZ 102 in the vertical direction, the area change value of the target object in the first frame image and the second frame image, and the focal length of the camera body 101, etc. parameter, can evaluate the current moving linear velocity of the target object on the spherical surface of the camera body 101 angular velocity change magnification, realize the adjustment of the shooting angle of the camera body 101 and the focal length of the camera body 101, so that the PTZ camera can track more accurately The target object that moves quickly at a short distance improves the tracking ability and accuracy of the target object that moves quickly at a short distance.
示例性地,本申请实施例还提供一种云台摄像机的追踪控制装置。Exemplarily, the embodiments of the present application further provide a tracking control device for a pan-tilt camera.
请参阅图6,图6为本申请一实施例提供的云台摄像机的追踪控制装置的结构示 意图。如图6所示,本申请实施例的云台摄像机的追踪控制装置可以包括:Please refer to FIG. 6. FIG. 6 is a schematic structural diagram of a tracking control device for a pan-tilt camera according to an embodiment of the present application. As shown in FIG. 6 , the tracking control device of the PTZ camera according to the embodiment of the present application may include:
获取模块11,用于获得摄像机本体所采集的第一帧图像和第二帧图像,第一帧图像的采集时刻晚于第二帧图像的采集时刻。The acquisition module 11 is configured to acquire the first frame of images and the second frame of images collected by the camera body, and the collection time of the first frame of images is later than the collection time of the second frame of images.
确定模块12,用于在目标对象符合预设规则或者接收到用户指示的追踪目标对象的指令时,确定目标对象在第一帧图像中的位置与第一帧图像的目标位置之间的第一距离差值。The determining module 12 is used to determine the first position between the position of the target object in the first frame image and the target position of the first frame image when the target object conforms to the preset rules or receives an instruction to track the target object indicated by the user. distance difference.
确定模块12,还用于确定目标对象在第一帧图像中的位置和目标对象在第二帧图像中的位置之间的距离变化值。The determining module 12 is further configured to determine a distance change value between the position of the target object in the first frame of image and the position of the target object in the second frame of image.
调整模块13,用于基于第一距离差值和距离变化值,调整摄像机本体的拍摄角度,以使目标对象显示在摄像机本体采集的第三帧图像的目标位置,第三帧图像的采集时刻晚于第一帧图像的采集时刻。The adjustment module 13 is used to adjust the shooting angle of the camera body based on the first distance difference value and the distance change value, so that the target object is displayed at the target position of the third frame image collected by the camera body, and the third frame image is collected later. at the acquisition moment of the first frame of image.
在一些实施例中,调整模块13,具体用于基于第一距离差值和距离变化值,得到控制量参数,控制量参数包括云台在水平方向上的距离变化值和云台在垂直方向上的距离变化值;控制云台中的第一马达按照云台在水平方向上的距离变化值对云台进行旋转,以及控制云台中的第二马达按照云台在垂直方向上的距离变化值对云台进行旋转,以调整摄像机本体的拍摄角度。In some embodiments, the adjustment module 13 is specifically configured to obtain a control amount parameter based on the first distance difference value and the distance change value, where the control amount parameter includes the distance change value of the pan/tilt in the horizontal direction and the pan/tilt in the vertical direction the distance change value; control the first motor in the gimbal to rotate the gimbal according to the distance change value of the gimbal in the horizontal direction, and control the second motor in the gimbal to rotate the gimbal according to the distance change value of the gimbal in the vertical direction The stage is rotated to adjust the shooting angle of the camera body.
在一些实施例中,控制量参数还包括摄像机本体在光轴方向上的焦距变化值。调整模块13,还用于按照摄像机本体在光轴方向上的焦距变化值对摄像机本体的焦距进行调整,以使目标对象显示在第三帧图像的目标位置。In some embodiments, the control quantity parameter further includes a focal length change value of the camera body in the direction of the optical axis. The adjustment module 13 is further configured to adjust the focal length of the camera body according to the focal length change value of the camera body in the optical axis direction, so that the target object is displayed at the target position of the third frame image.
在一些实施例中,调整模块13,具体用于对第一距离差值和距离变化值进行模糊处理,得到比例积分微分PID控制系数;基于比例积分微分PID控制系数,得到控制量参数。In some embodiments, the adjustment module 13 is specifically configured to perform fuzzy processing on the first distance difference value and the distance change value to obtain a proportional-integral-derivative PID control coefficient; and based on the proportional-integral-derivative PID control coefficient, obtain a control parameter parameter.
或者,调整模块13,具体用于对第一距离差值和距离变化值进行模糊处理,得到比例积分微分PID修正系数;将比例积分微分PID修正系数和比例积分微分PID初始系数的乘积确定为比例积分微分PID控制系数;基于比例积分微分PID控制系数,得到控制量参数。Or, the adjustment module 13 is specifically configured to perform fuzzy processing on the first distance difference value and the distance change value to obtain a proportional-integral-derivative PID correction coefficient; the product of the proportional-integral-derivative PID correction coefficient and the proportional-integral-derivative PID initial coefficient is determined as a proportional Integral-derivative PID control coefficient; based on the proportional-integral-derivative PID control coefficient, the control parameter is obtained.
在一些实施例中,获取模块11,还用于在第一帧图像的采集时刻,获取云台在垂直方向上的俯角。调整模块13,还用于在俯角大于等于预设角度时,将云台在水平方向上的距离变化值和云台在垂直方向上的距离变化值的至少一个值调大,得到调大后的控制量参数;将调大后的控制量参数确定为控制量参数。In some embodiments, the acquisition module 11 is further configured to acquire the depression angle of the pan-tilt head in the vertical direction at the acquisition moment of the first frame of image. The adjustment module 13 is also used to increase at least one value of the distance change value of the gimbal in the horizontal direction and the distance change value of the gimbal in the vertical direction when the depression angle is greater than or equal to the preset angle, so as to obtain the increased value. Control quantity parameter; determine the enlarged control quantity parameter as the control quantity parameter.
在一些实施例中,预设角度的取值范围为大于等于20°且小于等于90°。In some embodiments, the value range of the preset angle is greater than or equal to 20° and less than or equal to 90°.
在一些实施例中,确定模块12,还用于确定目标对象在第一帧图像和第二帧图像中的面积变化值。调整模块13,还用于在面积变化值大于第一阈值,或者,面积变化值小于第二阈值且面积变化值的绝对值大于第三阈值时,对云台在水平方向上的距离变化值、云台在垂直方向上的距离变化值以及摄像机本体在光轴方向上的焦距变化值的至少一个值进行调整,得到调整后的控制量参数;将调整后的控制量参数确定为控制量参数。In some embodiments, the determining module 12 is further configured to determine the area change value of the target object in the first frame image and the second frame image. The adjustment module 13 is also used for adjusting the distance change value of the pan/tilt head in the horizontal direction, Adjust at least one of the distance change value of the gimbal in the vertical direction and the focal length change value of the camera body in the optical axis direction to obtain the adjusted control amount parameter; the adjusted control amount parameter is determined as the control amount parameter.
在一些实施例中,获取模块11,用于在第一帧图像的采集时刻,获取摄像机本体的焦距。调整模块13,还用于在摄像机本体的焦距大于第四阈值时,将云台在水平方 向上的距离变化值、云台在垂直方向上的距离变化值以及摄像机本体在光轴方向上的焦距变化值的至少一个值调小,得到调小后的控制量参数;将调小后的控制量参数确定为控制量参数。In some embodiments, the acquiring module 11 is configured to acquire the focal length of the camera body at the acquisition moment of the first frame of image. The adjustment module 13 is also used to adjust the distance change value of the pan/tilt in the horizontal direction, the distance variation value of the pan/tilt in the vertical direction, and the focal length of the camera body in the direction of the optical axis when the focal length of the camera body is greater than the fourth threshold At least one value of the change value is reduced to obtain a reduced control variable parameter; the reduced control variable parameter is determined as a controlled variable parameter.
或者,调整模块13,还用于在摄像机本体的焦距小于第五阈值时,将云台在水平方向上的距离变化值、云台在垂直方向上的距离变化值以及摄像机本体在光轴方向上的焦距变化值的至少一个值调大,得到调大后的控制量参数;将调大后的控制量参数确定为控制量参数。Alternatively, the adjustment module 13 is further configured to adjust the distance change value of the pan/tilt in the horizontal direction, the distance variation value of the pan/tilt in the vertical direction, and the camera body in the optical axis direction when the focal length of the camera body is smaller than the fifth threshold. At least one value of the focal length change value of , is increased to obtain the increased control amount parameter; the increased control amount parameter is determined as the control amount parameter.
在一些实施例中,确定模块12,具体用于确定目标对象在第二帧图像中的位置与第二帧图像的目标位置之间的第二距离差值;基于第一距离差值和第二距离差值,确定距离变化值。In some embodiments, the determining module 12 is specifically configured to determine a second distance difference between the position of the target object in the second frame image and the target position of the second frame image; based on the first distance difference and the second distance difference Distance difference, to determine the distance change value.
在一些实施例中,目标位置为任意一帧图像的中心区域。In some embodiments, the target position is the center area of any frame of images.
本申请实施例提供的云台摄像机的追踪控制装置,可执行上述方法实施例,其具体实现原理和技术效果,可参见上述方法实施例,本申请实施例此处不再赘述。The tracking control device for a pan-tilt camera provided in the embodiments of the present application can execute the above method embodiments, and the specific implementation principles and technical effects thereof can be found in the above method embodiments, which are not repeated in the embodiments of the present application.
示例性地,本申请提供一种电子设备,包括:存储器和处理器;存储器用于存储程序指令;处理器用于调用存储器中的程序指令使得电子设备执行前文实施例中的云台摄像机的追踪控制方法。Exemplarily, the present application provides an electronic device, including: a memory and a processor; the memory is used to store program instructions; the processor is used to call the program instructions in the memory to enable the electronic device to execute the tracking control of the pan-tilt camera in the foregoing embodiment. method.
示例性地,本申请提供一种芯片系统,芯片系统应用于包括存储器、显示屏和传感器的电子设备;芯片系统包括:处理器;当处理器执行存储器中存储的计算机指令时,电子设备执行前文实施例中的云台摄像机的追踪控制方法。Exemplarily, the present application provides a chip system, which is applied to an electronic device including a memory, a display screen and a sensor; the chip system includes: a processor; when the processor executes the computer instructions stored in the memory, the electronic device executes the foregoing The tracking control method of the PTZ camera in the embodiment.
示例性地,本申请提供一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器使得电子设备执行时实现前文实施例中的云台摄像机的追踪控制方法。Exemplarily, the present application provides a computer-readable storage medium on which a computer program is stored, and the computer program is executed by the processor to cause the electronic device to implement the tracking control method of the pan-tilt camera in the foregoing embodiment.
示例性地,本申请提供一种计算机程序产品,包括:执行指令,执行指令存储在可读存储介质中,电子设备的至少一个处理器可以从可读存储介质读取执行指令,至少一个处理器执行执行指令使得电子设备实现前文实施例中的云台摄像机的追踪控制方法。Exemplarily, the present application provides a computer program product, comprising: execution instructions, the execution instructions are stored in a readable storage medium, at least one processor of an electronic device can read the execution instructions from the readable storage medium, and at least one processor Executing the execution instruction enables the electronic device to implement the tracking control method for the pan-tilt camera in the foregoing embodiment.
在上述实施例中,全部或部分功能可以通过软件、硬件、或者软件加硬件的组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本申请实施例的流程或功能。计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。计算机指令可以存储在计算机可读存储介质中。计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如,固态硬盘(solid state disk,SSD))等。In the above embodiments, all or part of the functions may be implemented by software, hardware, or a combination of software and hardware. When implemented in software, it can be implemented in whole or in part in the form of a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the procedures or functions according to the embodiments of the present application are generated in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable device. Computer instructions may be stored in a computer-readable storage medium. A computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, a data center, or the like that includes an integration of one or more available media. Useful media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVDs), or semiconductor media (eg, solid state disks (SSDs)), and the like.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,该流程可以由计算机程序来指令相关的硬件完成,该程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法实施例的流程。而前述的存储介质包括:ROM或随机存储记忆体RAM、磁碟或者光盘等各种可存储程序代码的介质。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented. The process can be completed by instructing the relevant hardware by a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed , which may include the processes of the foregoing method embodiments. The aforementioned storage medium includes: ROM or random storage memory RAM, magnetic disk or optical disk and other mediums that can store program codes.

Claims (27)

  1. 一种云台摄像机,其特征在于,包括:摄像机本体、云台和云台控制器;A pan-tilt camera, comprising: a camera body, a pan-tilt and a pan-tilt controller;
    在目标对象符合预设规则或者接收到用户指示的追踪目标对象的指令时,When the target object complies with the preset rules or receives an instruction to track the target object instructed by the user,
    所述云台控制器,用于获得所述摄像机本体所采集的第一帧图像和第二帧图像,所述第一帧图像的采集时刻晚于所述第二帧图像的采集时刻;the pan-tilt controller, configured to obtain the first frame of images and the second frame of images collected by the camera body, where the collection time of the first frame of images is later than the collection time of the second frame of images;
    所述云台控制器,还用于确定所述目标对象在所述第一帧图像中的位置与所述第一帧图像的目标位置之间的第一距离差值;The pan-tilt controller is further configured to determine a first distance difference between the position of the target object in the first frame of image and the target position of the first frame of image;
    所述云台控制器,还用于确定所述目标对象在所述第一帧图像中的位置和所述目标对象在所述第二帧图像中的位置之间的距离变化值;The pan-tilt controller is further configured to determine a distance change value between the position of the target object in the first frame of image and the position of the target object in the second frame of image;
    所述云台控制器,还用于基于所述第一距离差值和所述距离变化值,调整所述摄像机本体的拍摄角度,以使所述目标对象显示在所述摄像机本体采集的第三帧图像的目标位置,所述第三帧图像的采集时刻晚于所述第一帧图像的采集时刻。The pan-tilt controller is further configured to adjust the shooting angle of the camera body based on the first distance difference value and the distance change value, so that the target object is displayed on the third image collected by the camera body. The target position of the frame image, the acquisition time of the third frame image is later than the acquisition time of the first frame image.
  2. 根据权利要求1所述的云台摄像机,其特征在于,The PTZ camera according to claim 1, wherein,
    所述云台控制器,具体用于基于所述第一距离差值和所述距离变化值,得到控制量参数,所述控制量参数包括所述云台在水平方向上的距离变化值和所述云台在垂直方向上的距离变化值;控制所述云台中的第一马达按照所述云台在水平方向上的距离变化值对所述云台进行旋转,以及控制所述云台中的第二马达按照所述云台在垂直方向上的距离变化值对所述云台进行旋转,以调整所述摄像机本体的拍摄角度。The pan/tilt controller is specifically configured to obtain a control amount parameter based on the first distance difference value and the distance change value, where the control amount parameter includes the distance change value of the pan/tilt in the horizontal direction and the distance change value. the distance change value of the pan/tilt in the vertical direction; control the first motor in the pan/tilt to rotate the pan/tilt according to the distance change value of the pan/tilt in the horizontal direction, and control the first motor in the pan/tilt to rotate the pan/tilt according to the distance change value of the pan/tilt in the horizontal direction The second motor rotates the pan/tilt according to the distance change value of the pan/tilt in the vertical direction, so as to adjust the shooting angle of the camera body.
  3. 根据权利要求2所述的云台摄像机,其特征在于,所述控制量参数还包括所述摄像机本体在光轴方向上的焦距变化值;The pan-tilt camera according to claim 2, wherein the control parameter further comprises a change value of the focal length of the camera body in the direction of the optical axis;
    所述云台控制器,还用于按照所述摄像机本体在光轴方向上的焦距变化值对所述摄像机本体的焦距进行调整,以使所述目标对象显示在所述第三帧图像的目标位置。The pan-tilt controller is further configured to adjust the focal length of the camera body according to the focal length change value of the camera body in the optical axis direction, so that the target object is displayed on the target of the third frame image Location.
  4. 根据权利要求1-3任一项所述的云台摄像机,其特征在于,所述云台控制器,还用于在所述第一帧图像的采集时刻,获取所述云台在垂直方向上的俯角;在所述俯角大于等于预设角度时,将所述云台在水平方向上的距离变化值和所述云台在垂直方向上的距离变化值中的至少一个值调大,得到调大后的控制量参数;将所述调大后的控制量参数确定为所述控制量参数。The pan-tilt camera according to any one of claims 1-3, wherein the pan-tilt controller is further configured to acquire the vertical direction of the pan-tilt at the acquisition moment of the first frame of image When the depression angle is greater than or equal to the preset angle, at least one of the distance change value of the head in the horizontal direction and the distance change value of the head in the vertical direction is increased to obtain the adjustment The increased control amount parameter; the increased control amount parameter is determined as the control amount parameter.
  5. 根据权利要求4所述的云台摄像机,其特征在于,所述预设角度的取值范围为大于等于20°且小于等于90°。The pan-tilt camera according to claim 4, wherein the value range of the preset angle is greater than or equal to 20° and less than or equal to 90°.
  6. 根据权利要求1-5任一项所述的云台摄像机,其特征在于,所述云台控制器,还用于在所述第一帧图像的采集时刻,获取所述摄像机本体的焦距;在所述摄像机本体的焦距大于第四阈值时,将所述云台在水平方向上的距离变化值、所述云台在垂直方向上的距离变化值以及所述摄像机本体在光轴方向上的焦距变化值中的至少一个值调小,得到调小后的控制量参数;将所述调小后的控制量参数确定为所述控制量参数;或者,在所述摄像机本体的焦距小于第五阈值时,将所述云台在水平方向上的距离变化值、所述云台在垂直方向上的距离变化值以及所述摄像机本体在光轴方向上的焦距变化值中的至少一个值调大,得到调大后的所述控制量参数;将所述调大后的控制量参数确定为所述控制量参数。The pan-tilt camera according to any one of claims 1-5, wherein the pan-tilt controller is further configured to acquire the focal length of the camera body at the acquisition moment of the first frame of image; When the focal length of the camera body is greater than the fourth threshold, the distance change value of the pan/tilt in the horizontal direction, the distance change value of the pan/tilt in the vertical direction, and the focal length of the camera body in the optical axis direction are calculated. At least one of the changed values is reduced to obtain a reduced control amount parameter; the reduced control amount parameter is determined as the control amount parameter; or, when the focal length of the camera body is less than a fifth threshold When , at least one of the distance change value of the pan/tilt in the horizontal direction, the distance change value of the pan/tilt in the vertical direction, and the focal length variation value of the camera body in the optical axis direction is increased, Obtain the increased control amount parameter; determine the increased control amount parameter as the control amount parameter.
  7. 根据权利要求1-6任一项所述的云台摄像机,其特征在于,所述云台控制器,具体用于确定所述目标对象在所述第二帧图像中的位置与所述第二帧图像的目标位置之间的第二距离差值;基于所述第一距离差值和所述第二距离差值,确定所述距离变化值。The pan-tilt camera according to any one of claims 1-6, wherein the pan-tilt controller is specifically configured to determine the position of the target object in the second frame of image and the second frame of image a second distance difference value between the target positions of the frame images; the distance change value is determined based on the first distance difference value and the second distance difference value.
  8. 根据权利要求1-7任一项所述的云台摄像机,其特征在于,目标位置为任意一帧图像的中心区域。The pan-tilt camera according to any one of claims 1-7, wherein the target position is a central area of any frame of images.
  9. 一种云台摄像机的追踪控制方法,其特征在于,A tracking control method for a PTZ camera, characterized in that:
    在目标对象符合预设规则或者接收到用户指示的追踪目标对象的指令时启动所述方法;The method is started when the target object conforms to the preset rule or an instruction to track the target object instructed by the user is received;
    所述方法包括:The method includes:
    获得摄像机本体所采集的第一帧图像和第二帧图像,所述第一帧图像的采集时刻晚于所述第二帧图像的采集时刻;obtaining a first frame of images and a second frame of images collected by the camera body, where the collection time of the first frame of images is later than the collection time of the second frame of images;
    确定所述目标对象在第一帧图像中的位置与所述第一帧图像的目标位置之间的第一距离差值;determining a first distance difference between the position of the target object in the first frame of image and the target position of the first frame of image;
    确定所述目标对象在所述第一帧图像中的位置和所述目标对象在第二帧图像中的位置之间的距离变化值;determining the distance change value between the position of the target object in the first frame image and the position of the target object in the second frame image;
    基于所述第一距离差值和所述距离变化值,调整所述摄像机本体的拍摄角度,以使所述目标对象显示在所述摄像机本体采集的第三帧图像的目标位置,所述第三帧图像的采集时刻晚于所述第一帧图像的采集时刻。Based on the first distance difference value and the distance change value, the shooting angle of the camera body is adjusted, so that the target object is displayed at the target position of the third frame image collected by the camera body, and the third frame image is collected by the camera body. The acquisition time of the frame image is later than the acquisition time of the first frame image.
  10. 根据权利要求9所述的方法,其特征在于,所述基于所述第一距离差值和所述距离变化值,调整所述摄像机本体的拍摄角度,包括:The method according to claim 9, wherein the adjusting the shooting angle of the camera body based on the first distance difference value and the distance change value comprises:
    基于所述第一距离差值和所述距离变化值,得到控制量参数,所述控制量参数包括所述云台在水平方向上的距离变化值和所述云台在垂直方向上的距离变化值;Based on the first distance difference value and the distance change value, a control amount parameter is obtained, and the control amount parameter includes the distance change value of the pan/tilt in the horizontal direction and the distance change of the pan/tilt in the vertical direction value;
    控制所述云台中的第一马达按照所述云台在水平方向上的距离变化值对所述云台进行旋转,以及控制所述云台中的第二马达按照所述云台在垂直方向上的距离变化值对所述云台进行旋转,以调整所述摄像机本体的拍摄角度。Control the first motor in the pan/tilt to rotate the pan/tilt according to the distance change value of the pan/tilt in the horizontal direction, and control the second motor in the pan/tilt to rotate the pan/tilt according to the vertical direction of the pan/tilt. The pan/tilt is rotated by the distance change value to adjust the shooting angle of the camera body.
  11. 根据权利要求10所述的方法,其特征在于,所述控制量参数还包括所述摄像机本体在光轴方向上的焦距变化值;所述方法还包括:The method according to claim 10, wherein the control quantity parameter further comprises a focal length change value of the camera body in the direction of the optical axis; the method further comprises:
    按照所述摄像机本体在光轴方向上的焦距变化值对所述摄像机本体的焦距进行调整,以使所述目标对象显示在所述第三帧图像的目标位置。The focal length of the camera body is adjusted according to the focal length change value of the camera body in the optical axis direction, so that the target object is displayed at the target position of the third frame image.
  12. 根据权利要求9-11任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 9-11, wherein the method further comprises:
    在所述第一帧图像的采集时刻,获取所述云台在垂直方向上的俯角;At the acquisition moment of the first frame of image, acquiring the depression angle of the gimbal in the vertical direction;
    在所述俯角大于等于预设角度时,将所述云台在水平方向上的距离变化值和所述云台在垂直方向上的距离变化值中的至少一个值调大,得到调大后的控制量参数;将所述调大后的控制量参数确定为所述控制量参数。When the depression angle is greater than or equal to a preset angle, at least one of the distance change value of the pan/tilt in the horizontal direction and the distance variation value of the pan/tilt in the vertical direction is increased to obtain the increased control quantity parameter; determine the enlarged control quantity parameter as the control quantity parameter.
  13. 根据权利要求12所述的方法,其特征在于,所述预设角度的取值范围为大于等于20°且小于等于90°。The method according to claim 12, wherein the value range of the preset angle is greater than or equal to 20° and less than or equal to 90°.
  14. 根据权利要求9-13任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 9-13, wherein the method further comprises:
    在所述第一帧图像的采集时刻,获取所述摄像机本体的焦距;Obtain the focal length of the camera body at the acquisition moment of the first frame of image;
    在所述摄像机本体的焦距大于第四阈值时,将所述云台在水平方向上的距离变化值、所述云台在垂直方向上的距离变化值以及所述摄像机本体在光轴方向上的焦距变化值中的至少一个值调小,得到调小后的控制量参数;将所述调小后的控制量参数确定为所述控制量参数;When the focal length of the camera body is greater than the fourth threshold, the distance change value of the pan/tilt in the horizontal direction, the distance change value of the pan/tilt in the vertical direction, and the distance change value of the camera body in the optical axis direction are calculated. At least one of the focal length change values is reduced to obtain a reduced control amount parameter; the reduced control amount parameter is determined as the control amount parameter;
    或者,or,
    在所述摄像机本体的焦距小于第五阈值时,将所述云台在水平方向上的距离变化值、所述云台在垂直方向上的距离变化值以及所述摄像机本体在光轴方向上的焦距变化值中的至少一个值调大,得到调大后的控制量参数;将所述调大后的控制量参数确定为所述控制量参数。When the focal length of the camera body is smaller than the fifth threshold, the distance change value of the pan/tilt in the horizontal direction, the distance change value of the pan/tilt in the vertical direction, and the distance change value of the camera body in the optical axis direction are calculated. At least one of the focal length change values is increased to obtain an increased control amount parameter; the increased control amount parameter is determined as the control amount parameter.
  15. 根据权利要求9-14任一项所述的方法,其特征在于,所述确定所述目标对象在所述第一帧图像中的位置和所述目标对象在第二帧图像中的位置之间的距离变化值,包括:The method according to any one of claims 9-14, wherein the determining the position of the target object in the first frame of image and the position of the target object in the second frame of image is between The distance change value of , including:
    确定所述目标对象在所述第二帧图像中的位置与所述第二帧图像的目标位置之间的第二距离差值;determining a second distance difference between the position of the target object in the second frame image and the target position of the second frame image;
    基于所述第一距离差值和所述第二距离差值,确定所述距离变化值。The distance change value is determined based on the first distance difference value and the second distance difference value.
  16. 根据权利要求9-15任一项所述的方法,其特征在于,目标位置为任意一帧图像的中心区域。The method according to any one of claims 9-15, wherein the target position is a central area of any frame of images.
  17. 一种云台摄像机的追踪控制装置,其特征在于,包括:A tracking control device for a pan-tilt camera, characterized in that it includes:
    获取模块,用于在目标对象符合预设规则或者接收到用户指示的追踪目标对象的指令时,获得摄像机本体所采集的第一帧图像和第二帧图像,所述第一帧图像的采集时刻晚于所述第二帧图像的采集时刻;The acquisition module is used to acquire the first frame of images and the second frame of images collected by the camera body when the target object conforms to the preset rules or receives an instruction to track the target object instructed by the user, and the collection moment of the first frame of image later than the acquisition time of the second frame of images;
    确定模块,用于确定所述目标对象在第一帧图像中的位置与所述第一帧图像的目标位置之间的第一距离差值;a determining module, configured to determine the first distance difference between the position of the target object in the first frame image and the target position of the first frame image;
    确定模块,还用于确定所述目标对象在所述第一帧图像中的位置和所述目标对象在第二帧图像中的位置之间的距离变化值;a determining module, further configured to determine a distance change value between the position of the target object in the first frame of image and the position of the target object in the second frame of image;
    调整模块,用于基于所述第一距离差值和所述距离变化值,调整所述摄像机本体的拍摄角度,以使所述目标对象显示在所述摄像机本体采集的第三帧图像的目标位置,所述第三帧图像的采集时刻晚于所述第一帧图像的采集时刻。an adjustment module, configured to adjust the shooting angle of the camera body based on the first distance difference value and the distance change value, so that the target object is displayed at the target position of the third frame image collected by the camera body , the acquisition time of the third frame of image is later than the acquisition time of the first frame of image.
  18. 根据权利要求17所述的装置,其特征在于,所述调整模块,具体用于基于所述第一距离差值和所述距离变化值,得到控制量参数,所述控制量参数包括所述云台在水平方向上的距离变化值和所述云台在垂直方向上的距离变化值;控制所述云台中的第一马达按照所述云台在水平方向上的距离变化值对所述云台进行旋转,以及控制所述云台中的第二马达按照所述云台在垂直方向上的距离变化值对所述云台进行旋转,以调整所述摄像机本体的拍摄角度。The device according to claim 17, wherein the adjustment module is specifically configured to obtain a control amount parameter based on the first distance difference value and the distance change value, and the control amount parameter includes the cloud The distance change value of the head in the horizontal direction and the distance change value of the head in the vertical direction; control the first motor in the head to the head according to the change value of the distance of the head in the horizontal direction. Rotating, and controlling the second motor in the pan/tilt to rotate the pan/tilt according to the distance change value of the pan/tilt in the vertical direction, so as to adjust the shooting angle of the camera body.
  19. 根据权利要求18所述的装置,其特征在于,所述控制量参数还包括所述摄像机本体在光轴方向上的焦距变化值;The device according to claim 18, wherein the control quantity parameter further comprises a change value of the focal length of the camera body in the direction of the optical axis;
    所述调整模块,还用于按照所述摄像机本体在光轴方向上的焦距变化值对所述摄像机本体的焦距进行调整,以使所述目标对象显示在所述第三帧图像的目标位置。The adjustment module is further configured to adjust the focal length of the camera body according to the focal length change value of the camera body in the optical axis direction, so that the target object is displayed at the target position of the third frame image.
  20. 根据权利要求17-19任一项所述的装置,其特征在于,The device according to any one of claims 17-19, characterized in that,
    所述获取模块,还用于在所述第一帧图像的采集时刻,获取所述云台在垂直方向上的俯角;The acquisition module is further configured to acquire the depression angle of the pan/tilt in the vertical direction at the acquisition moment of the first frame of image;
    所述调整模块,还用于在所述俯角大于等于预设角度时,将所述云台在水平方向上的距离变化值和所述云台在垂直方向上的距离变化值中的至少一个值调大,得到调大后的控制量参数;将所述调大后的控制量参数确定为所述控制量参数。The adjustment module is further configured to, when the depression angle is greater than or equal to a preset angle, change at least one value of the distance change value of the pan/tilt in the horizontal direction and the distance variation value of the pan/tilt in the vertical direction. Increase the control amount to obtain the increased control amount parameter; determine the increased control amount parameter as the control amount parameter.
  21. 根据权利要求20所述的装置,其特征在于,所述预设角度的取值范围为大于等于20°且小于等于90°。The device according to claim 20, wherein the value range of the preset angle is greater than or equal to 20° and less than or equal to 90°.
  22. 根据权利要求17-21任一项所述的装置,其特征在于,The device according to any one of claims 17-21, characterized in that,
    所述获取模块,还用于在所述第一帧图像的采集时刻,获取所述摄像机本体的焦距;The acquisition module is further configured to acquire the focal length of the camera body at the acquisition moment of the first frame of image;
    所述调整模块,还用于在所述摄像机本体的焦距大于第四阈值时,将所述云台在水平方向上的距离变化值、所述云台在垂直方向上的距离变化值以及所述摄像机本体在光轴方向上的焦距变化值中的至少一个值调小,得到调小后的所述控制量参数;将所述调小后的控制量参数确定为所述控制量参数;The adjustment module is further configured to adjust the distance change value of the pan/tilt in the horizontal direction, the distance variation value of the pan/tilt in the vertical direction, and the At least one of the focal length variation values of the camera body in the direction of the optical axis is reduced to obtain the reduced control amount parameter; the reduced control amount parameter is determined as the control amount parameter;
    或者,or,
    所述调整模块,还用于在所述摄像机本体的焦距小于第五阈值时,将所述云台在水平方向上的距离变化值、所述云台在垂直方向上的距离变化值以及所述摄像机本体在光轴方向上的焦距变化值中的至少一个值调大,得到调大后的所述控制量参数;将所述调大后的控制量参数确定为所述控制量参数。The adjustment module is further configured to change the distance change value of the pan/tilt in the horizontal direction, the distance variation value of the pan/tilt in the vertical direction, and the At least one of the focal length change values of the camera body in the optical axis direction is increased to obtain the increased control amount parameter; the increased control amount parameter is determined as the control amount parameter.
  23. 根据权利要求17-22任一项所述的装置,其特征在于,所述确定模块,具体用于确定所述目标对象在所述第二帧图像中的位置与所述第二帧图像的目标位置之间的第二距离差值;基于所述第一距离差值和所述第二距离差值,确定所述距离变化值。The device according to any one of claims 17-22, wherein the determining module is specifically configured to determine the position of the target object in the second frame of image and the target of the second frame of image a second distance difference between locations; and the distance change value is determined based on the first distance difference and the second distance difference.
  24. 根据权利要求17-23任一项所述的装置,其特征在于,目标位置为任意一帧图像的中心区域。The device according to any one of claims 17-23, wherein the target position is a central area of any frame of images.
  25. 一种电子设备,包括:显示屏;一个或多个处理器;存储器;以及一个或多个计算机程序;其中所述一个或多个计算机程序被存储在所述存储器中;其特征在于,所述一个或多个处理器在执行所述一个或多个计算机程序时,使得所述电子设备实现如权利要求9-16任一项所述的方法。An electronic device comprising: a display screen; one or more processors; a memory; and one or more computer programs; wherein the one or more computer programs are stored in the memory; characterized in that, the The one or more processors, when executing the one or more computer programs, cause the electronic device to implement the method of any of claims 9-16.
  26. 一种计算机存储介质,其特征在于,包括计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行如权利要求9-16任一项所述的方法。A computer storage medium, characterized by comprising computer instructions, which, when the computer instructions are executed on an electronic device, cause the electronic device to perform the method according to any one of claims 9-16.
  27. 一种计算机程序产品,其特征在于,当所述计算机程序产品在计算机上运行时,使得所述计算机执行如权利要求9-16任一项所述的方法。A computer program product, characterized in that, when the computer program product runs on a computer, the computer is caused to execute the method according to any one of claims 9-16.
PCT/CN2021/118345 2020-09-16 2021-09-14 Gimbal camera, gimbal camera tracking control method and apparatus, and device WO2022057800A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202010974180.9 2020-09-16
CN202010974180 2020-09-16
CN202011232127.8A CN114268732A (en) 2020-09-16 2020-11-06 Pan-tilt camera, pan-tilt camera tracking control method, pan-tilt camera tracking control device and pan-tilt camera tracking control equipment
CN202011232127.8 2020-11-06

Publications (1)

Publication Number Publication Date
WO2022057800A1 true WO2022057800A1 (en) 2022-03-24

Family

ID=80776473

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/118345 WO2022057800A1 (en) 2020-09-16 2021-09-14 Gimbal camera, gimbal camera tracking control method and apparatus, and device

Country Status (1)

Country Link
WO (1) WO2022057800A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117557167A (en) * 2024-01-03 2024-02-13 微网优联科技(成都)有限公司 Production quality management method and system of cradle head machine
CN117648001A (en) * 2024-01-29 2024-03-05 微网优联科技(成都)有限公司 Tracking correction method and system based on cradle head machine
WO2024051330A1 (en) * 2022-09-07 2024-03-14 华为技术有限公司 Camera control method and related apparatus

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160171330A1 (en) * 2014-12-15 2016-06-16 Reflex Robotics, Inc. Vision based real-time object tracking system for robotic gimbal control
CN107016367A (en) * 2017-04-06 2017-08-04 北京精英智通科技股份有限公司 A kind of tracking and controlling method and tracking control system
CN108230362A (en) * 2017-12-29 2018-06-29 北京视觉世界科技有限公司 Environment control method, device, electronic equipment and storage medium
CN109189105A (en) * 2018-10-18 2019-01-11 上海电力学院 A kind of crusing robot cloud platform control method
CN111105429A (en) * 2019-12-03 2020-05-05 华中科技大学 Integrated unmanned aerial vehicle detection method
CN111314609A (en) * 2020-02-24 2020-06-19 浙江大华技术股份有限公司 Method and device for controlling pan-tilt tracking camera shooting

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160171330A1 (en) * 2014-12-15 2016-06-16 Reflex Robotics, Inc. Vision based real-time object tracking system for robotic gimbal control
CN107016367A (en) * 2017-04-06 2017-08-04 北京精英智通科技股份有限公司 A kind of tracking and controlling method and tracking control system
CN108230362A (en) * 2017-12-29 2018-06-29 北京视觉世界科技有限公司 Environment control method, device, electronic equipment and storage medium
CN109189105A (en) * 2018-10-18 2019-01-11 上海电力学院 A kind of crusing robot cloud platform control method
CN111105429A (en) * 2019-12-03 2020-05-05 华中科技大学 Integrated unmanned aerial vehicle detection method
CN111314609A (en) * 2020-02-24 2020-06-19 浙江大华技术股份有限公司 Method and device for controlling pan-tilt tracking camera shooting

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
LANG KEWEI: "Real-Time Target Image Transmission and Tracking System Design", CHINESE MASTER'S THESES FULL-TEXT DATABASE, INFORMATION TECHNOLOGY, no. 7, 15 July 2014 (2014-07-15), XP055913418 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024051330A1 (en) * 2022-09-07 2024-03-14 华为技术有限公司 Camera control method and related apparatus
CN117557167A (en) * 2024-01-03 2024-02-13 微网优联科技(成都)有限公司 Production quality management method and system of cradle head machine
CN117557167B (en) * 2024-01-03 2024-03-19 微网优联科技(成都)有限公司 Production quality management method and system of cradle head machine
CN117648001A (en) * 2024-01-29 2024-03-05 微网优联科技(成都)有限公司 Tracking correction method and system based on cradle head machine
CN117648001B (en) * 2024-01-29 2024-04-09 微网优联科技(成都)有限公司 Tracking correction method and system based on cradle head machine

Similar Documents

Publication Publication Date Title
WO2022057800A1 (en) Gimbal camera, gimbal camera tracking control method and apparatus, and device
CN107659774B (en) Video imaging system and video processing method based on multi-scale camera array
CN111147741B (en) Focusing processing-based anti-shake method and device, electronic equipment and storage medium
CN110166695B (en) Camera anti-shake method and device, electronic equipment and computer readable storage medium
TWI521255B (en) Automatic focusing method, and automatic focusing device, image capturing device using the same
WO2020259474A1 (en) Focus tracking method and apparatus, terminal device, and computer-readable storage medium
CN107223330B (en) Depth information acquisition method and device and image acquisition equipment
WO2019114617A1 (en) Method, device, and system for fast capturing of still frame
CN111246089B (en) Jitter compensation method and apparatus, electronic device, computer-readable storage medium
WO2017045326A1 (en) Photographing processing method for unmanned aerial vehicle
US20110157396A1 (en) Image processing apparatus, image processing method, and storage medium
WO2012151777A1 (en) Multi-target tracking close-up shooting video monitoring system
JP5843454B2 (en) Image processing apparatus, image processing method, and program
US8872944B2 (en) Method and system for image centering during zooming
CN109951638B (en) Camera anti-shake system, camera anti-shake method, electronic device, and computer-readable storage medium
WO2020253618A1 (en) Video jitter detection method and device
US20140293035A1 (en) Image processing apparatus, imaging apparatus, microscope system, image processing method, and computer-readable recording medium
CN103971375A (en) Panoramic gaze camera space calibration method based on image splicing
WO2023236508A1 (en) Image stitching method and system based on billion-pixel array camera
CN109598764A (en) Camera calibration method and device, electronic equipment, computer readable storage medium
US20240114245A1 (en) Imaging support device, imaging support system, imaging system, imaging support method, and program
CN107613216A (en) Focusing method, device, computer-readable recording medium and electronic equipment
CN113875219A (en) Image processing method and device, electronic equipment and computer readable storage medium
CN113391644A (en) Unmanned aerial vehicle shooting distance semi-automatic optimization method based on image information entropy
CN113949814B (en) Gun-ball linkage snapshot method, device, equipment and medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21868622

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21868622

Country of ref document: EP

Kind code of ref document: A1