Tracking control method, control device, equipment and medium based on image acquisition
By acquiring the current captured image during the fixed-point shooting period of the image acquisition cycle and determining the angle adjustment parameters according to the positional relationship of the target object, the problem of image defects caused by continuous rotation of the gimbal is solved, and real-time tracking of the target object and improvement of image quality are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HANGZHOU HUACHENG SOFTWARE TECH CO LTD
- Filing Date
- 2023-04-12
- Publication Date
- 2026-07-31
AI Technical Summary
In security monitoring, the movement of the target object causes the pan-tilt unit to rotate continuously, resulting in image blurring and other defects, reducing monitoring quality, or even causing the target object to be lost.
During the fixed-point shooting period of the image acquisition cycle, the current image is acquired. The angle adjustment parameters are determined based on the relationship between the actual position of the target object and the target area, and the adjustment is performed during the angle adjustment period to ensure that the target object is located in the target area in the next image.
By adjusting the position of the target object in real time, image ghosting is avoided, and image quality during the tracking process is improved.
Smart Images

Figure CN116709029B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of video surveillance technology, and in particular to a tracking and control method, control device, equipment and medium based on image acquisition. Background Technology
[0002] Currently, in security monitoring applications, devices such as mobile phones, cameras, and camcorders equipped with pan-tilt mounts are often used to automatically track moving targets, keeping them within a specified area of the displayed image.
[0003] However, as the target object moves, the PTZ (pan-tilt unit) will also rotate continuously to track it, resulting in artifacts such as motion blur in the captured images, which reduces the monitoring quality and may even lead to the loss of monitoring of the target object. Summary of the Invention
[0004] This application provides at least one tracking control method, control device, equipment, and medium based on image acquisition.
[0005] The first aspect of this application provides a tracking control method based on image acquisition, comprising: acquiring a currently captured image during a fixed-point shooting period in a preset current image acquisition cycle during the tracking control process; determining an angle adjustment parameter based on the positional relationship between the actual position of a target object detected in the current captured image and a target region in the current captured image, wherein the angle adjustment parameter is used to ensure that the actual position of the target object in a next captured image captured in the next image acquisition cycle is located within the target region of the next captured image, wherein the shooting time of the next image acquisition cycle is later than that of the current image acquisition cycle; and performing angle adjustment processing based on the angle adjustment parameter during the angle adjustment period of the image acquisition cycle.
[0006] In one embodiment, the step of performing angle adjustment processing based on the angle adjustment parameters during the angle adjustment period of the image acquisition cycle includes: obtaining preset adjustment parameters corresponding to the angle adjustment period of the current image acquisition cycle; and performing angle adjustment processing based on the comparison result between the angle adjustment parameters and the preset adjustment parameters.
[0007] In one embodiment, the step of performing angle adjustment processing based on the comparison result between the angle adjustment parameter and the target adjustment parameter includes: if the angle adjustment parameter is greater than the preset adjustment parameter, then performing angle adjustment processing based on the preset adjustment parameter; calculating a first adjustment difference between the angle adjustment parameter and the preset adjustment parameter; retaining the first adjustment difference in the angle adjustment parameter of the next image acquisition cycle to obtain the angle adjustment parameter of the next image acquisition cycle, wherein the angle adjustment parameter of the next image acquisition cycle represents the sum of parameters between the angle adjustment parameter determined based on the actual position of the target object in the next captured image and the first adjustment difference.
[0008] In one embodiment, the step of performing angle adjustment processing based on the comparison result between the angle adjustment parameter and the target adjustment parameter includes: if the angle adjustment parameter is less than or equal to the preset adjustment parameter, then performing angle adjustment processing based on the angle adjustment parameter; calculating a second adjustment difference between the angle adjustment parameter and the preset adjustment parameter; if the angle adjustment parameter adjustment of the current image acquisition cycle ends, waiting for the waiting time corresponding to the second adjustment difference, then acquiring the next captured image during the fixed-point shooting period of the next image acquisition cycle, and performing angle adjustment processing for the next image acquisition cycle based on the positional relationship between the actual position of the target object in the next captured image and the target area in the next captured image.
[0009] In one embodiment, the fixed-point shooting period includes the image exposure time, and the step of obtaining the preset adjustment parameters corresponding to the angle adjustment period of the current image acquisition cycle includes: determining the angle adjustment period based on the acquired image acquisition frame rate and the image exposure time; and calculating the preset adjustment parameters based on the angle adjustment period and the preset angle adjustment rate.
[0010] In one embodiment, the step of determining the angle adjustment parameter based on the positional relationship between the actual position of the target object detected in the current captured image and the target area in the current captured image includes: obtaining the starting coordinate data of the target object in the current captured image and the target coordinate data of the target area in the current captured image; and calculating the angle adjustment parameter based on the difference between the starting coordinate data and the target coordinate data.
[0011] In one embodiment, the method further includes: acquiring corresponding captured images during fixed-point shooting periods in each image acquisition cycle; performing target detection on the captured images to obtain the target object; and determining the actual position of the target object in the captured images.
[0012] A second aspect of this application provides a control device, comprising: an acquisition module, configured to acquire a currently captured image during a fixed-point shooting period in a preset current image acquisition cycle during the tracking control process; a calculation module, configured to determine an angle adjustment parameter based on the positional relationship between the actual position of a target object detected in the currently captured image and a target area in the currently captured image, wherein the angle adjustment parameter is used to ensure that the actual position of the target object in a next captured image captured in the next image acquisition cycle is located within the target area of the next captured image, wherein the shooting time of the next image acquisition cycle is later than that of the current image acquisition cycle; and an adjustment module, configured to perform angle adjustment processing based on the angle adjustment parameter during an angle adjustment period in the image acquisition cycle.
[0013] A third aspect of this application provides an electronic device, including a memory and a processor, wherein the processor is used to execute program instructions stored in the memory to implement the above-described image acquisition-based tracking control method.
[0014] The fourth aspect of this application provides a computer-readable storage medium having program instructions stored thereon, which, when executed by a processor, implement the above-described tracking and control method based on image acquisition.
[0015] The above scheme acquires a current image containing the target object during a fixed-point shooting period. Based on the actual position of the target object in the current image and the position of the target area in the image, it determines the angle adjustment parameters that will display the target object in the target area of the next image. Angle adjustment is then performed based on the angle adjustment parameters and the angle adjustment period. This allows for real-time tracking of the target object by capturing the current image during the fixed-point shooting period and adjusting the angle based on the current image during the angle adjustment period. This avoids problems such as image ghosting caused by movement during shooting and improves the image quality captured during the tracking process.
[0016] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this application. Attached Figure Description
[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the specification, serve to explain the technical solutions of this application.
[0018] Figure 1 This is an application scenario diagram of the tracking and control method based on image acquisition in this application;
[0019] Figure 2 This is a flowchart illustrating an exemplary embodiment of the tracking and control method based on image acquisition according to this application;
[0020] Figure 3 This is a schematic diagram illustrating the effect of determining the angle adjustment parameters in the method of this application;
[0021] Figure 4 yes Figure 2 A flowchart illustrating an exemplary embodiment of step S230 in the image acquisition-based tracking control method is shown.
[0022] Figure 5 yes Figure 4 A flowchart illustrating an exemplary embodiment of step S420 in the image acquisition-based tracking control method is shown.
[0023] Figure 6 yes Figure 4 A flowchart illustrating an exemplary embodiment of step S420 in the image acquisition-based tracking control method is shown.
[0024] Figure 7 This is a block diagram of a camera for which the image acquisition-based tracking control method of this application can be applied;
[0025] Figure 8 This is a block diagram illustrating an image acquisition-based tracking control device, as shown in an exemplary embodiment of this application.
[0026] Figure 9 This is a schematic diagram of the structure of an embodiment of the electronic device of this application;
[0027] Figure 10 This is a schematic diagram of the structure of an embodiment of the computer-readable storage medium of this application. Detailed Implementation
[0028] The embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0029] In the following description, specific details such as particular system architectures, interfaces, and technologies are presented for illustrative purposes rather than for limiting purposes, in order to provide a thorough understanding of this application.
[0030] In this document, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " generally indicates that the preceding and following related objects have an "or" relationship. Furthermore, "many" in this document means two or more. Moreover, the term "at least one" in this document means any combination of at least two of any one or more of a plurality of objects. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.
[0031] As illustrated by an example, this method can control an image acquisition device equipped with a pan-tilt unit, especially during the tracking of a target object, by controlling the angular rotation of the pan-tilt unit. This angular rotation includes, but is not limited to, horizontal, vertical, and diagonal rotation. For details, please refer to... Figure 1 An application scenario diagram of the tracking and control method based on image acquisition.
[0032] Please see Figure 2 , Figure 2 This is a flowchart illustrating an exemplary embodiment of the image acquisition-based tracking and control method of this application. Specifically, it may include the following steps:
[0033] Step S210: When the tracking control process is in the fixed-point shooting period of the preset current image acquisition cycle, acquire the current captured image.
[0034] The tracking and control process includes fixed-point imaging and target tracking.
[0035] The image acquisition cycle includes a fixed-point shooting period and an angle adjustment period for target tracking.
[0036] Fixed-point shooting period refers to the period when the gimbal is in a fixed state and the image acquisition device is shooting. When the gimbal is in a fixed state, it will not rotate, that is, the stepper motor in the gimbal will not operate. When the gimbal is not in a fixed state, whether it rotates depends on the specific situation.
[0037] Step S220: Based on the positional relationship between the actual position of the target object detected in the current captured image and the target area in the current captured image, determine the angle adjustment parameters. The angle adjustment parameters are used to ensure that the actual position of the target object in the next captured image captured in the next image acquisition cycle is located within the target area of the next captured image. The capture time of the next image acquisition cycle is later than that of the current image acquisition cycle.
[0038] The actual position of the target object refers to its position relative to the frame of the captured image.
[0039] The target area refers to a pre-specified area in the captured image. The purpose of the target area is to place the target object within the target area to ensure real-time tracking of the target object. It can be understood that the frame of the captured image depends on the field of view of the image acquisition device. Therefore, the target area can also be a specified area within the field of view.
[0040] Specifically, based on the actual position of the target object and the positional relationship between the target area and the target area, the angle adjustment parameters used to display the target object in the target area are determined.
[0041] For example, please refer to 3. Figure 3 This is a schematic diagram illustrating the effect of determining the angle adjustment parameters in this application, combined with... Figure 3 Referring to step S220, the actual position of the target object can be determined by the centroid of the target object or by the geometric center of the target detection box of the target object. The target area can be, but is not limited to, the central area of the captured image. The target area can also be represented in the form of target points.
[0042] Step S230: Angle adjustment processing is performed during the angle adjustment period of the image acquisition cycle based on the angle adjustment parameters.
[0043] The angle adjustment period refers to the time during which the pan-tilt unit (PTZ) adjusts its angle within the image acquisition cycle.
[0044] Specifically, the gimbal is controlled to perform angle adjustment processing during the angle adjustment period according to the angle adjustment parameters, so that the target object can be displayed in the target area of the captured image.
[0045] As can be seen, by acquiring images containing the target object during the fixed-point shooting period, and determining the angle adjustment parameters that can display the target object in the target area of the next shooting image based on the actual position of the target object in the shooting image and the position of the target area in the shooting image, and performing angle adjustment processing based on the angle adjustment parameters and the angle adjustment period, it is possible to capture the current shooting image during the fixed-point shooting period and adjust the angle based on the current shooting image during the angle adjustment period, thereby achieving real-time tracking of the target object, avoiding problems such as image ghosting caused by movement during shooting, and improving the image quality captured during the tracking process.
[0046] Based on the above embodiments, the embodiments of this application adopt... Figure 4 The flowchart shown details the steps involved in angle adjustment processing based on angle adjustment parameters during the angle adjustment period of the image acquisition cycle. Please refer to [link / reference]. Figure 4 , Figure 4 yes Figure 2 The diagram illustrates an exemplary embodiment of step S230 in the image acquisition-based tracking control method. Specifically, the method of this embodiment includes the following steps:
[0047] Step S410: Obtain the preset adjustment parameters corresponding to the angle adjustment time period of the current image acquisition cycle.
[0048] The preset adjustment parameter refers to the angle that the gimbal can adjust within the angle adjustment period, that is, the adjustment angle corresponding to the angle adjustment period. The preset adjustment parameter can be calculated based on the angle adjustment period and the preset angle adjustment rate. It should be noted that the angle adjustment parameter is the angle required to adjust the position of the target object to the position of the target area, while the preset adjustment parameter is the maximum angle that the gimbal can adjust within the angle adjustment period. The angle adjustment parameter can be greater than, less than or equal to the preset adjustment parameter.
[0049] Step S420: Perform angle adjustment processing based on the comparison result between the angle adjustment parameters and the preset adjustment parameters.
[0050] Specifically, the comparison results include angle adjustment parameters greater than preset adjustment parameters, angle adjustment parameters equal to preset adjustment parameters, and angle adjustment parameters less than preset adjustment parameters. Based on different comparison results, the gimbal is adjusted in different ways to prevent the gimbal angle adjustment process from affecting the image capture, thereby improving the quality of the captured image.
[0051] Based on the above embodiments, the embodiments of this application adopt... Figure 5 The flowchart shown details the steps of angle adjustment processing during the angle adjustment period of the image acquisition cycle, based on the angle adjustment parameter when the angle adjustment parameter is greater than the preset adjustment parameter. Please refer to [link to flowchart documentation]. Figure 5 , Figure 5 yes Figure 4 The diagram illustrates an exemplary embodiment of step S420 in the image acquisition-based tracking control method. Specifically, the method of this embodiment includes the following steps:
[0052] Step S510: If the angle adjustment parameter is greater than the preset adjustment parameter, then the angle adjustment process is performed based on the preset adjustment parameter.
[0053] Specifically, if the angle adjustment parameter is greater than the preset adjustment parameter, it means that the angle to be adjusted is greater than the angle that the pan-tilt unit can adjust within the angle adjustment period of a single image acquisition cycle. That is, within the angle adjustment period of an image acquisition cycle, the target object cannot be positioned in the target area by rotating the pan-tilt unit. Therefore, the corresponding angle is adjusted according to the preset adjustment parameter.
[0054] Step S520: Calculate the first adjustment difference between the angle adjustment parameter and the preset adjustment parameter.
[0055] The above steps are illustrated by example. Since the angle adjustment parameter is greater than the preset adjustment parameter, there is a certain difference between the angle to be adjusted and the angle that can be adjusted within a single image acquisition cycle. This results in the inability to rotate the angle corresponding to the angle adjustment parameter within the angle adjustment period of a single image acquisition cycle. Therefore, the angle difference between the angle adjustment parameter and the preset adjustment parameter is calculated to obtain the first adjustment difference, which is the angle that still needs to be adjusted.
[0056] It should be noted that the execution order of steps S510 and S520 is not limited by the order of description in this embodiment. It can be that the angle adjustment process is performed first according to step S510, and then the adjustment difference is calculated according to step S520; or the adjustment difference is calculated first according to step S520, and then the angle adjustment process is performed according to step S510; or steps S510 and S520 are performed simultaneously.
[0057] Step S530: The first difference to be adjusted is retained in the angle adjustment parameters of the next image acquisition cycle to obtain the angle adjustment parameters of the next image acquisition cycle. The angle adjustment parameters of the next image acquisition cycle represent the sum of parameters between the angle adjustment parameters determined based on the actual position of the target object in the next captured image and the first difference to be adjusted.
[0058] It should be noted that, under normal circumstances, image acquisition devices are equipped with an image acquisition frame rate, which is the frequency of image acquisition, and the image acquisition cycle also depends on the image acquisition frame rate.
[0059] Understandably, for video surveillance, since the image acquisition frame rate is fixed and the image acquisition process is continuous, the next image acquisition cycle begins as soon as the current one ends. Therefore, if the pan-tilt unit (PTZ) does not complete the angle adjustment parameters during the angle adjustment period of the current image acquisition cycle, the unadjusted angle adjustment parameters need to be carried over to the angle adjustment period of the next image acquisition cycle for adjustment. It should be noted that the unadjusted angle adjustment parameters are also known as the first difference to be adjusted.
[0060] To further explain, if the target object is detected to move again in the next image acquisition cycle, the total angle to be adjusted in the next image acquisition cycle needs to be determined based on the angle adjustment parameter determined by the image captured in the next image acquisition cycle and the parameter of the first difference to be adjusted, and this is used as the angle adjustment parameter for the next image acquisition cycle.
[0061] Based on the above embodiments, the embodiments of this application adopt... Figure 6 The flowchart shown details the steps of angle adjustment processing based on the angle adjustment parameters during the angle adjustment period of the image acquisition cycle, provided that the angle adjustment parameters are less than or equal to the preset adjustment parameters. Please refer to [link / reference needed]. Figure 6 , Figure 6 yes Figure 4 The diagram illustrates an exemplary embodiment of step S420 in the image acquisition-based tracking control method. Specifically, the method of this embodiment includes the following steps:
[0062] Step S610: If the angle adjustment parameter is less than or equal to the preset adjustment parameter, then perform angle adjustment processing based on the angle adjustment parameter.
[0063] Specifically, if the angle adjustment parameter is less than or equal to the preset adjustment parameter, it means that the gimbal can adjust the angle adjustment parameter within the angle adjustment period of a single image acquisition cycle. That is, within the angle adjustment period of an image acquisition cycle, the gimbal can be rotated by the angle corresponding to the angle adjustment parameter so that the target object is located in the target area. Therefore, the corresponding angle is adjusted according to the angle adjustment parameter.
[0064] Step S620: Calculate the second adjustment difference between the angle adjustment parameter and the preset adjustment parameter.
[0065] The above steps are illustrated by example. If the angle adjustment parameter is less than the preset adjustment parameter, it means that after the angle adjustment is performed according to the angle adjustment parameter, there is still time remaining in the angle adjustment period of a single image acquisition cycle. Therefore, the angle difference between the angle adjustment parameter and the preset adjustment parameter is calculated to obtain the second adjustment difference.
[0066] To further explain, if the angle adjustment parameter is equal to the preset adjustment parameter, the next image acquisition cycle will begin immediately when the angle adjustment process is performed according to the angle adjustment parameter.
[0067] It should be noted that the distinction between "first" and "second" in "first difference to be adjusted" and "second difference to be adjusted" mentioned in this application is for illustrative purposes only and does not limit other attributes of the two.
[0068] Step S630: If the angle adjustment parameter adjustment of the current image acquisition cycle is completed, wait for the waiting time corresponding to the second adjustment difference, and then acquire the next captured image during the fixed-point shooting period of the next image acquisition cycle. Based on the actual position of the target object in the next captured image and the positional relationship between the target area in the next captured image, the angle adjustment process of the next image acquisition cycle is performed.
[0069] Understandably, if the angle adjustment parameter is less than the preset adjustment parameter, and the gimbal is adjusted according to the angle adjustment parameter, it is necessary to wait for the waiting time corresponding to the second adjustment difference before entering the next image acquisition cycle.
[0070] It should be noted that during the waiting time corresponding to the second adjustment difference, the target object can continue to be identified, and the image exposure of the next image acquisition cycle can be waited for.
[0071] Optionally, if the angle adjustment parameter is less than the preset adjustment parameter, and the gimbal adjustment is completed according to the angle adjustment parameter, the waiting time corresponding to the second adjustment difference can be reset, and the next image acquisition cycle can be started immediately.
[0072] Based on the above embodiments, the steps for obtaining the preset adjustment parameters corresponding to the angle adjustment time period of the current image acquisition cycle are described by way of example. The specific steps include:
[0073] The angle adjustment period is determined based on the acquired image capture frame rate and image exposure time; preset adjustment parameters are calculated based on the angle adjustment period and the preset angle adjustment rate. Frame rate is the frequency (rate) at which a bitmap image appears continuously on a display, measured in frames. This term also applies to film and cameras, computer graphics, and motion capture systems. Frame rate can also be called frame frequency and is expressed in Hertz (Hz).
[0074] In this application, the image acquisition frame rate refers to the frequency at which the image acquisition device acquires captured images, and each frame acquisition process corresponds to one image acquisition cycle.
[0075] Exposure refers to the process in which light enters the lens and shines on the image sensor during photography, enabling the image sensor to record the current light and shadow information and then form an image.
[0076] Image exposure time refers to the exposure time during image acquisition, that is, the time for the photosensitive element to be exposed to light. It should be noted that the image acquisition process includes, but is not limited to, a series of processes such as exposure, imaging and storage. Similarly, the fixed-point shooting period also includes image exposure time. Image exposure time can be a fixed value or an adjustable floating value based on the light-sensing capability of the photosensitive element.
[0077] The angle adjustment rate refers to the rate at which the gimbal adjusts its angle. Normally, the gimbal adjusts according to the received pulse commands. Each time the gimbal receives a pulse command, it controls the stepper motor to rotate for the number of steps corresponding to the pulse command. The stepper motor usually rotates according to a preset step angle.
[0078] Specifically, the non-exposure period during image acquisition is determined based on the image acquisition frame rate and image exposure time. Adjusting the gimbal during the non-exposure period will not affect the image quality. The non-exposure period or a portion of the non-exposure period is taken as the angle adjustment period. The angle that can be adjusted within the angle adjustment period is determined based on the angle adjustment rate, i.e., the preset adjustment parameters.
[0079] The above embodiments will be described by way of example, with step angle ∝ ° The step time t0ms / step is used as a parameter of the gimbal stepper motor, and the image acquisition frame rate x and image exposure time t1ms are used as parameters of the image acquisition device. The tracking control process is explained, and (1000 / x-t1)>0 should be satisfied.
[0080] Based on the location coordinates (x0, y0) of the target area and the actual location coordinates (x1, y1) of the target object, the angle adjustment parameter r° is determined, and the total required angle adjustment parameter r° / ∝ can be calculated. ° The mathematical expression for the angle adjustment period, determined by the image acquisition frame rate and image exposure time, is (1000 / x-t1). Therefore, the number of pulses corresponding to the angle adjustment period is (1000 / x-t1) / t0. Comparing the total number of pulses required with the number of pulses corresponding to the angle adjustment period, if r° / ∝ ° If the value is greater than (1000 / x-t1) / t0, it proves that during the angle adjustment period of a single-frame image acquisition process, the position of the target object cannot be adjusted to match the position of the target area. After the image exposure time ends, (1000 / x-t1) / t0 pulses are performed, and the preset adjustment parameter r1° corresponding to the angle adjustment period is obtained. ° *(1000 / x-t1) / t0, and the first adjustment difference r°-r1°, the first adjustment difference is retained to the next image acquisition cycle; if r° / ∝ ° If <(1000 / x-t1) / t0, it proves that during the angle adjustment period of the single-frame image acquisition process, the position of the target object can be adjusted to match the position of the target area. After the image exposure time ends, r° / ∝ is then used. ° The second pulse is used to obtain the second angle adjustment difference r1°-r° and the waiting time corresponding to the second angle adjustment difference.
[0081] After the angle adjustment period ends, the gimbal stops rotating, enters the next image acquisition cycle, and starts image exposure to identify the target object.
[0082] Therefore, by following the above steps, the movement of the gimbal and the image acquisition by the photosensitive element are ensured to be independent of each other. The exposure and acquisition of the photosensitive element will not cause image distortion due to the rotation of the gimbal. The gimbal can also move freely without the problem of the gimbal constantly swaying left and right due to the asynchronous rotation angle and the detection angle calculated by the target detection.
[0083] Based on the above embodiments, this application embodiment explains the steps for determining angle adjustment parameters according to the positional relationship between the actual position of the target object detected in the currently captured image and the target area in the currently captured image. Specific steps include:
[0084] Obtain the starting coordinates of the target object in the currently captured image and the target coordinates of the target area in the currently captured image; calculate the angle adjustment parameters based on the difference between the starting coordinates and the target coordinates.
[0085] It should be noted that the process of adjusting the coordinates of the target object from f(x0, y0) to f(x1, y1) and the angle adjustment parameter g(r°) can satisfy a certain linear or nonlinear functional relationship, which is not limited here.
[0086] Based on the above embodiments, this application describes the process of determining the actual position of the target object in the captured image, as detailed below:
[0087] The corresponding captured images are acquired during the fixed-point shooting period in each image acquisition cycle; target detection is performed on the captured images to obtain the target objects; and the actual position of the target objects in the captured images is determined. Specifically, the acquired captured images are input into a pre-trained target detection model to obtain the target objects and detection boxes output by the target detection model. The actual position of the target objects in the captured images is determined based on the centroid of the identified target objects or the geometric center of the detection boxes.
[0088] Optionally, regarding the selection of target objects, if there are multiple candidate objects in the captured image, the target object to be tracked can be determined by comparing the size of the detection boxes of the candidate objects and / or the movement speed of the detection boxes.
[0089] It should be further noted that the entity executing the image acquisition-based tracking and control method can be an image acquisition-based tracking and control device. For example, the image acquisition-based tracking and control method can be executed by a terminal device, a server, or other processing devices. The terminal device can be a user equipment (UE), computer, mobile device, user terminal, terminal, cellular phone, cordless phone, personal digital assistant (PDA), handheld device, computing device, vehicle-mounted device, wearable device, etc.
[0090] Furthermore, you can refer to Figure 7 , Figure 7 The diagram shows a structural block diagram of a camera equipped with a pan-tilt unit (PTZ). The execution entity of the image acquisition-based tracking control method can also be the PTG module within the camera. In some possible implementations, this image acquisition-based tracking control method can be implemented by a processor calling computer-readable instructions stored in memory.
[0091] Figure 8This is a block diagram illustrating an image acquisition-based tracking control device, as shown in an exemplary embodiment of this application. Figure 8 As shown, the exemplary tracking control device 800 includes: an acquisition module 810, a calculation module 820, and an adjustment module 830. Specifically:
[0092] The acquisition module 810 is used to acquire the currently captured image when the tracking control process is in the fixed-point shooting period of the preset current image acquisition cycle.
[0093] The calculation module 820 is used to determine the angle adjustment parameters based on the positional relationship between the actual position of the target object detected in the current captured image and the target area in the current captured image. The angle adjustment parameters are used to ensure that the actual position of the target object in the next captured image in the next image acquisition cycle is located within the target area of the next captured image. The capture time of the next image acquisition cycle is later than that of the current image acquisition cycle.
[0094] The adjustment module 830 is used to perform angle adjustment processing during the angle adjustment period of the image acquisition cycle based on the angle adjustment parameters.
[0095] In this exemplary control device, by acquiring a captured image containing the target object during a fixed-point shooting period, determining an angle adjustment parameter that can display the target object in the target area of the next captured image based on the actual position of the target object in the captured image and the position of the target area in the captured image, and performing angle adjustment processing based on the angle adjustment parameter and the angle adjustment period, the target object can be tracked in real time through image acquisition, and the image quality captured during the tracking process can be improved.
[0096] The functions of each module can be found in the embodiment of the tracking and control method based on image acquisition, and will not be repeated here.
[0097] Please see Figure 9 , Figure 9 This is a schematic diagram of an embodiment of the electronic device of this application. The electronic device 900 includes a memory 910 and a processor 920. The processor 920 is used to execute program instructions stored in the memory 910 to implement the steps in any of the above-described embodiments of the image acquisition-based tracking and control method. In a specific implementation scenario, the electronic device 900 may include, but is not limited to, a microcomputer or a server. In addition, the electronic device 900 may also include mobile devices such as laptops and tablets, which are not limited here.
[0098] Specifically, the processor 920 controls itself and the memory 910 to implement the steps in any of the above-described image acquisition-based tracking control method embodiments. The processor 920 can also be referred to as a CPU (Central Processing Unit). The processor 920 may be an integrated circuit chip with signal processing capabilities. The processor 920 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor or any conventional processor. Furthermore, the processor 920 can be implemented using integrated circuit chips.
[0099] The above scheme acquires images containing the target object during a fixed-point shooting period. Based on the actual position of the target object in the captured image and the position of the target area in the captured image, it determines the angle adjustment parameters that will display the target object in the target area of the next captured image. Angle adjustment processing is then performed based on the angle adjustment parameters and the angle adjustment period. This allows for real-time tracking of the target object through image acquisition and improves the quality of the images captured during the tracking process.
[0100] Please see Figure 10 , Figure 10 This is a schematic diagram of a computer-readable storage medium according to an embodiment of the present application. The computer-readable storage medium 1000 stores program instructions 1010 that can be executed by a processor. The program instructions 1010 are used to implement the steps in any of the above-described embodiments of the image acquisition-based tracking and control method.
[0101] The above scheme acquires images containing the target object during a fixed-point shooting period. Based on the actual position of the target object in the captured image and the position of the target area in the captured image, it determines the angle adjustment parameters that will display the target object in the target area of the next captured image. Angle adjustment processing is then performed based on the angle adjustment parameters and the angle adjustment period. This allows for real-time tracking of the target object through image acquisition and improves the quality of the images captured during the tracking process.
[0102] In some embodiments, the functions or modules of the apparatus provided in this disclosure can be used to perform the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0103] The description of the various embodiments above tends to emphasize the differences between the various embodiments. The similarities or similarities between them can be referred to, and for the sake of brevity, they will not be repeated here.
[0104] In the several embodiments provided in this application, it should be understood that the disclosed methods and apparatus can be implemented in other ways. For example, the apparatus implementations described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.
[0105] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
Claims
1. A tracking control method based on image acquisition, characterized in that, Each frame of image acquisition corresponds to an image acquisition cycle, which includes a fixed-point shooting period and an angle adjustment period. The fixed-point shooting period refers to the time when the gimbal is in a fixed state and the image acquisition device is shooting. The angle adjustment period refers to the time when the gimbal is adjusting its angle. The non-exposure period in the image acquisition process is determined based on the image acquisition frame rate and image exposure time. The non-exposure period, or a portion thereof, is used as the angle adjustment period. The method includes: When the tracking control process is in the fixed-point shooting period of the preset current image acquisition cycle, the currently captured image is acquired; Based on the positional relationship between the actual position of the target object detected in the current captured image and the target area in the current captured image, an angle adjustment parameter is determined. The angle adjustment parameter is used to ensure that the actual position of the target object in the next captured image captured in the next image acquisition cycle is located within the target area of the next captured image. The capture time of the next image acquisition cycle is later than that of the current image acquisition cycle. Obtain the preset adjustment parameters corresponding to the angle adjustment time period of the current image acquisition cycle; If the angle adjustment parameter is greater than the preset adjustment parameter, then angle adjustment processing is performed based on the preset adjustment parameter; calculate the first adjustment difference between the angle adjustment parameter and the preset adjustment parameter; retain the first adjustment difference in the angle adjustment parameter of the next image acquisition cycle to obtain the angle adjustment parameter of the next image acquisition cycle, wherein the angle adjustment parameter of the next image acquisition cycle represents the parameter sum between the angle adjustment parameter determined based on the actual position of the target object in the next captured image and the first adjustment difference; If the angle adjustment parameter is less than or equal to the preset adjustment parameter, then the angle adjustment process is performed based on the angle adjustment parameter.
2. The method of claim 1, wherein, If the angle adjustment parameter is less than or equal to the preset adjustment parameter, then after performing angle adjustment processing based on the angle adjustment parameter, the method further includes: Calculate the second adjustment difference between the angle adjustment parameter and the preset adjustment parameter; If the angle adjustment parameter adjustment for the current image acquisition cycle is completed, wait for the waiting time corresponding to the second adjustment difference, then acquire the next captured image during the fixed-point shooting period of the next image acquisition cycle, and perform angle adjustment processing for the next image acquisition cycle based on the actual position of the target object in the next captured image and the positional relationship between the target area in the next captured image.
3. The method of claim 1, wherein, The fixed-point shooting period includes the image exposure time, and the step of obtaining the preset adjustment parameters corresponding to the angle adjustment period of the current image acquisition cycle includes: The angle adjustment period is determined based on the acquired image acquisition frame rate and the image exposure time; The preset adjustment parameters are calculated based on the angle adjustment period and the preset angle adjustment rate.
4. The method according to claim 1, characterized in that, The step of determining the angle adjustment parameters based on the positional relationship between the actual position of the target object detected in the current captured image and the target region in the current captured image includes: Acquire the starting coordinate data of the target object in the currently captured image and the target coordinate data of the target region in the currently captured image; The angle adjustment parameter is calculated based on the difference between the starting coordinate data and the target coordinate data.
5. The method of claim 1, wherein, The method further includes: Acquire the corresponding captured images during the fixed-point shooting period in each image acquisition cycle; The captured image is subjected to target detection to obtain the target object; Determine the actual position of the target object in the captured image.
6. A control device characterized by comprising: Each frame of image acquisition corresponds to an image acquisition cycle, which includes a fixed-point shooting period and an angle adjustment period. The fixed-point shooting period refers to the time when the gimbal is in a fixed state and the image acquisition device is shooting. The angle adjustment period refers to the time when the gimbal is adjusting its angle. The non-exposure period in the image acquisition process is determined based on the image acquisition frame rate and image exposure time. The non-exposure period, or a portion thereof, is used as the angle adjustment period. The control device includes: The acquisition module is used to acquire the currently captured image when the tracking control process is in the fixed-point shooting period of the preset current image acquisition cycle; The calculation module is used to determine angle adjustment parameters based on the positional relationship between the actual position of the target object detected in the current captured image and the target area in the current captured image. The angle adjustment parameters are used to ensure that the actual position of the target object in the next captured image captured in the next image acquisition cycle is located within the target area of the next captured image. The capture time of the next image acquisition cycle is later than that of the current image acquisition cycle. An adjustment module is used to obtain a preset adjustment parameter corresponding to the angle adjustment time period of the current image acquisition cycle; if the angle adjustment parameter is greater than the preset adjustment parameter, then angle adjustment processing is performed based on the preset adjustment parameter; calculate a first adjustment difference between the angle adjustment parameter and the preset adjustment parameter; retain the first adjustment difference in the angle adjustment parameter of the next image acquisition cycle to obtain the angle adjustment parameter of the next image acquisition cycle, wherein the angle adjustment parameter of the next image acquisition cycle represents the parameter sum between the angle adjustment parameter determined based on the actual position of the target object in the next captured image and the first adjustment difference; if the angle adjustment parameter is less than or equal to the preset adjustment parameter, then angle adjustment processing is performed based on the angle adjustment parameter.
7. An electronic device, comprising: The method includes a memory and a processor, the processor being configured to execute program instructions stored in the memory to implement the method according to any one of claims 1 to 5.
8. A computer-readable storage medium having stored thereon program instructions, wherein, When the program instructions are executed by the processor, they implement the method described in any one of claims 1 to 5.