Target tracking turntable control method and system based on vision
The key frequency peak is determined through Fourier transform and triple judgment screening method, the turntable angle compensation value is calculated, and combined with PID control, the tracking accuracy and stability problems of traditional turntable control systems in complex environments are solved, and the turntable control effect is significantly improved.
Patent Information
- Application Number
- CN202411457239.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-18
- Publication Date
- 2025-01-10
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When facing high-frequency vibration or low-frequency drift in complex environments, the traditional vision-based turntable control system has low tracking accuracy and is susceptible to light changes and noise, making it difficult to effectively screen key frequency peaks, resulting in low signal-to-noise ratio of the system and Poor compensation effect.
The frequency domain data of the error signal is analyzed by Fourier transform, the key frequency peak is determined by using the triple judgment screening method, the turntable angle compensation value is calculated, and the turntable angle is updated to improve tracking accuracy and stability in combination with the adjustment amount of the PID controller.
It significantly improves the tracking accuracy and robustness of the system, enhances compensation capabilities, optimizes performance, significantly improves the effect of turntable control, reduces the impact of noise, and ensures accurate selection and accurate compensation of key frequency peaks.
Smart Images

Figure CN119292351A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of turntable control, and in particular to a turntable control method and system based on vision-based target tracking. Background Art
[0002] Vision-based turntable control technology plays a crucial role in modern target tracking systems. Traditional turntable control systems typically use a PID (proportional-integral-derivative) controller to calculate the turntable's angular adjustment based on target position information captured by a camera. This control strategy provides relatively stable tracking performance, especially when handling linear or slowly changing target motion. However, with the diversification of application scenarios and increasing technical requirements, relying solely on PID control is no longer sufficient to meet the high-precision tracking requirements in complex environments.
[0003] The currently widely used vision-based turntable control methods mainly include the following aspects: First, computer vision technology is used to analyze the image captured by the camera in real time and identify the position of the target object. Then, the PID control algorithm is used and based on the change in the target position, the PID controller generates an error signal by comparing the expected target position with the actual measured target position. Finally, the PID controller calculates the adjustment amount of the turntable angle. The calculation formula for the existing turntable angle adjustment amount is: ; in, Represents the turntable angle adjustment amount; represents the proportional gain, which determines how strongly the controller reacts to the current error; Represents the integral gain, which is used to eliminate steady-state errors but may cause system oscillation; Represents the differential gain, which can predict the changing trend of the error, help reduce overshoot and speed up the response; represents the error signal; represents the error signal accumulation; Represents the rate of change of the error signal.
[0004] Although these methods have achieved certain results, they still have certain limitations in practical applications: First, although the traditional PID controller can effectively cope with tracking tasks in most cases, its response speed and accuracy are often not ideal for disturbances within certain specific frequency ranges, such as high-frequency vibration or low-frequency drift. These disturbance sources that are not fully considered often lead to a decrease in tracking accuracy. Second, the existing PID control is essentially a reactive control method, that is, corrective measures are taken only when deviations occur, which leads to inevitable time delays. Third, the images acquired by the camera are easily affected by various factors, including changes in lighting, which can easily introduce additional noise. If not properly processed, these noises will be mistaken for real target displacements, thereby affecting the judgment of the PID controller and reducing the signal-to-noise ratio of the system. Fourth, for error signals containing multiple frequency peaks, existing methods often fail to effectively screen out the key frequency peaks that truly affect the turntable angle. Therefore, in the absence of a scientific and reasonable screening process, some frequency peaks with smaller amplitudes or lower correlations are easily mistakenly included in the analysis and calculation, thereby affecting the final compensation effect.
[0005] Therefore, the existing technology urgently needs a technical solution for a turntable control method and system based on vision-based target tracking. Summary of the Invention
[0006] In order to solve the above technical problems, the present invention provides a turntable control method based on vision-based target tracking, which is characterized by comprising the following steps: Step S1: acquiring a target image through a camera, and extracting target position information from the target image; Step S2: Calculate the target position change between the current frame and the previous frame as an error signal based on the target position information, and use a PID controller to calculate the turntable angle adjustment based on the error signal; Step S3: extracting data from the error signal and analyzing the data to obtain a turntable angle compensation value; Step S3a, extracting data of at least two consecutive time points from the error signal, preprocessing the data, and storing the preprocessed data as time series data; Step S3b: convert the time series data into the frequency domain using Fourier transform, analyze the frequency peaks of the amplitude spectrum in the frequency domain, and determine the key frequency peaks that affect the turntable angle based on the analysis results; Step S3b1, extracting the frequency peaks of the amplitude spectrum in the frequency domain, and performing preliminary determination and screening on the frequency peaks to obtain the frequency peaks that are initially retained; Step S3b11: setting a first threshold interval for the extracted frequency peaks, and performing preliminary determination and screening on the extracted frequency peaks using the first threshold interval; Step S3b12: If the extracted frequency peak is within the first threshold interval, it is retained and used as the initially retained frequency peak; if the extracted frequency peak is not within the first threshold interval, it is removed; Step S3b2, performing secondary determination and screening on the initially retained frequency peaks to obtain secondary retained frequency peaks; Step S3b21: Analyze the influence of the initially retained frequency peaks on the turntable angle, and assign weights to the initially retained frequency peaks based on the analysis results; Step S3b22: synthesize the weights of the preliminarily retained frequency peaks and perform averaging processing to obtain the average weights of the preliminarily retained frequency peaks; Step S3b23: setting the average weight as a weight threshold, and performing secondary determination and screening on the initially retained frequency peaks based on the weight threshold and the weights of the initially retained frequency peaks; Step S3b24: If the weight of the initially retained frequency peak is greater than or equal to the weight threshold, it is retained and used as the secondary retained frequency peak; if the weight of the initially retained frequency peak is less than the weight threshold, it is removed; Step S3b3: Perform final determination and screening on the secondary retained frequency peaks to obtain key frequency peaks; Step S3b31: Analyze the correlation between the secondary retained frequency peak and the turntable angle to obtain a correlation coefficient between the secondary retained frequency peak and the turntable angle; Step S3b32: setting a second threshold interval for the correlation coefficient, and using the second threshold interval and the correlation coefficient between the secondary retained frequency peak and the turntable angle to perform final determination and screening on the secondary retained frequency peak; Step S3b33: If the absolute value of the correlation coefficient between the secondary retained frequency peak and the turntable angle is within the second threshold range, then the secondary retained frequency peak is retained and used as the key frequency peak; if the absolute value of the correlation coefficient between the secondary retained frequency peak and the turntable angle is not within the second threshold range, then the secondary retained frequency peak is removed; Step S3c, analyzing the key frequency peak to obtain the turntable angle compensation value; Step S3c1, extracting the weight of the key frequency peak from the weights of the initially retained frequency peaks, and extracting the correlation coefficient between the key frequency peak and the turntable angle from the correlation coefficient between the secondarily retained frequency peak and the turntable angle; Step S3c2: synthesize the correlation coefficient between each key frequency peak and the turntable angle, and perform averaging processing to obtain the comprehensive correlation coefficient between all key frequency peaks and the turntable angle; Step S3c3: Obtain a comprehensive impact factor of each key frequency peak and the turntable angle based on the weight of each key frequency peak and the absolute value of the correlation coefficient between each key frequency peak and the turntable angle; The calculation formula for the comprehensive influence factor of each key frequency peak and turntable angle is: ; in, Represents the comprehensive impact factor of the i-th key frequency peak and the turntable angle; represents the weight of the i-th key frequency peak; represents the absolute value of the correlation coefficient between the i-th key frequency peak and the turntable angle; Step S3c4: extracting the frequency of each key frequency peak based on the amplitude spectrum in the frequency domain; Step S3c5: extracting the phase offset value of each key frequency peak based on the phase spectrum in the frequency domain; Step S3c6: Obtain a turntable angle compensation value based on the comprehensive correlation coefficient between all key frequency peaks and turntable angles, the comprehensive influence factor between each key frequency peak and the turntable angle, the frequency of each key frequency peak, and the phase offset value of each key frequency peak; The calculation formula for the turntable angle compensation value is: ; in, Represents the turntable angle compensation value; Represents the number of key frequency peaks; represents the compensation signal amplitude of the i-th critical frequency peak; Represents the comprehensive correlation coefficient between all key frequency peaks and turntable angle; Represents the comprehensive impact factor of the i-th key frequency peak and the turntable angle; represents the frequency of the i-th key frequency peak; represents the phase offset value of the i-th key frequency peak; Step S4: combining the turntable angle compensation value with the turntable angle adjustment value calculated by the PID controller to obtain an updated turntable angle adjustment value; The calculation formula for the turntable angle update adjustment amount is: ; in, Represents the update adjustment amount of the turntable angle; represents the turntable angle adjustment calculated by the PID controller; Represents the turntable angle compensation value; Step S5: Send the updated adjustment amount of the turntable angle to the turntable drive motor to rotate the turntable to the specified position.
[0007] The turntable control system based on vision target tracking executes the above-mentioned turntable control method based on vision target tracking, and includes the following modules: Information extraction module: used to obtain a target image through a camera and extract target position information from the target image; Adjustment value acquisition module: connected to the information extraction module, used to calculate the change in target position between the current frame and the previous frame as an error signal based on the target position information, and use the PID controller to calculate the turntable angle adjustment based on the error signal; Compensation value acquisition module: connected to the adjustment value acquisition module, used to extract data from the error signal and analyze the data to obtain the turntable angle compensation value; Update value acquisition module: connected to the compensation value acquisition module, used to combine the turntable angle compensation value with the turntable angle adjustment value calculated by the PID controller to obtain the turntable angle update adjustment value; Turntable execution module: connected to the update amount acquisition module, used to send the turntable angle update adjustment amount to the turntable drive motor to rotate the turntable to the specified position.
[0008] The embodiments of the present invention have the following technical effects: The present invention extracts data from the error signal and analyzes it to obtain a turntable angle compensation value. The turntable angle compensation value can capture high-frequency or low-frequency disturbances ignored by the PID controller, thereby improving the overall tracking accuracy of the system. After being combined with the adjustment amount calculated by the PID controller, the system can be more stable in the face of various external interferences, reducing the hysteresis effect caused by single PID control. The turntable angle compensation value, as a supplement to the PID control, can enable the system to achieve a higher performance level while providing additional adjustment capabilities. In addition, since the acquisition and analysis process of the turntable angle compensation value is completely based on the frequency peak, in order to ensure the extraction of a more scientific and accurate frequency peak, that is, the key frequency peak, the present invention selects the frequency peak by a triple judgment screening method. Among them, by performing preliminary judgment and screening on the frequency peak, those frequency peaks with smaller amplitudes can be removed to reduce the influence of noise, that is, it helps to eliminate insignificant frequency peaks and retain those that are actually useful to the system. The affected frequency peak, further, in the secondary judgment and screening process, weights are allocated based on the degree of influence of the frequency peak on the turntable angle, and the average weight is obtained through averaging, and used as the weight threshold to ensure that the retained frequency peak has a higher importance. Furthermore, in the final judgment and screening process, the correlation coefficient between the frequency peak and the turntable angle is analyzed, and the second threshold interval is used for screening to ensure that the retained frequency peak has a strong correlation with the turntable angle. The signal-to-noise ratio is significantly improved through the triple judgment and screening process to ensure that the key frequency peak ultimately used to calculate the compensation value is the frequency peak that truly affects the system. At the same time, the present invention can obtain the compensation signal amplitude, comprehensive influence factor, phase offset value, comprehensive correlation coefficient and comprehensive influence factor of each frequency component by further analyzing the key frequency peak. The determination of these parameters enables the turntable angle compensation value to accurately offset the frequency disturbance, thereby further improving the tracking accuracy and stability of the system. In summary, the present invention forms a turntable angle update adjustment amount by combining the turntable angle compensation value with the turntable angle adjustment amount calculated by the PID controller. This method not only improves the tracking accuracy and robustness of the system, but also enhances the compensation capability and optimization performance of the system. Through the triple judgment screening process, the noise is effectively removed and the signal-to-noise ratio is improved, ensuring the accurate selection of key frequency peaks. Based on further analysis and calculation of these key frequency peaks, the optimal adjustment under precise compensation is achieved, and ultimately the stability and overall performance of the system are improved. This method has significant advantages in target tracking applications and can significantly improve the effect of turntable control. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0010] Figure 1 is a flow chart of a turntable control method based on vision-based target tracking provided by an embodiment of the present invention; Figure 2 It is a framework diagram of a turntable control system for vision-based target tracking provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0011] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention are described clearly and completely below. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without inventive effort are also within the scope of protection of the present invention.
[0012] Example 1: Figure 1 As shown, the present invention provides a turntable control method based on vision target tracking, comprising the following steps: Step S1: acquiring a target image through a camera, and extracting target position information from the target image; First, install the camera on the turntable to ensure that its field of view covers the area where the target may appear. When choosing the camera type, give priority to high-resolution, low-latency industrial-grade cameras, such as global shutter cameras, to ensure that clear images can be captured in high-speed motion scenes. Then, when acquiring images, give priority to setting image acquisition parameters, including but not limited to: setting it to 30 frames per second or higher to ensure the smoothness of real-time tracking; setting it to 1920x1080 pixels or higher to obtain sufficient details; and automatically adjusting according to lighting conditions to ensure that the image is not overexposed or underexposed. During the specific acquisition process, the camera should continuously acquire images and transmit the image data to the processing unit. Each frame of the image can then be temporarily stored in the memory for subsequent processing. The types of images collected include but are not limited to original images, grayscale images, binary images and enhanced images, where original images refer to unprocessed images directly obtained from the camera; grayscale images refer to converting color images into grayscale images to reduce the amount of calculation and increase processing speed; binary images refer to converting grayscale images into binary images through threshold processing to facilitate target detection and contour extraction; enhanced images refer to using image enhancement techniques such as contrast enhancement and sharpening to improve image quality and make the target more obvious; then the target position information is extracted, and the process includes preprocessing, target detection, target position information extraction and position information output; the preprocessing process includes: using a median filter or a Gaussian filter to remove noise in the image to improve image quality, and then using background modeling methods such as mixed Gaussian models and frame difference methods to remove the background and highlight the foreground target, and finally using threshold processing, edge detection and other methods to separate the target from the background; then target detection is performed, and the process includes: using feature extraction algorithms such as SIFT, SURF, HOG, etc. to extract key feature points in the image, and then using machine learning or deep learning models such as YOLO, SSD, Faster R-CNN and other methods identify and locate the target area; then the target position information is extracted. This process includes: for the identified and located target area, the centroid formula is used to calculate its centroid coordinates, that is, As the target position information, the centroid formula is expressed as: ; in, Represents the number of pixels in the target area; Represents the coordinates of each pixel; Then draw a minimum bounding rectangle for the target area, i.e., the bounding box, and record the center coordinates of the bounding box, i.e., the calculated center of mass coordinates, as well as the width and height; Finally, the position information is output. This process includes: converting the target position information in the image coordinate system into the angle information in the turntable coordinate system. For example, when the center of the image is the origin (0, 0), the target position Corresponding angle and It can be calculated by the following formula: , ;in Represents the coordinates of the center of the image, that is, the center origin of the image; Represents the focal length of the camera; outputs the extracted target location information in a specific data format (such as JSON, CSV, etc.) for use in subsequent steps; The above embodiments describe in detail how to acquire target images through a camera and extract target position information from these images. This process includes steps such as camera configuration, image acquisition, preprocessing, target detection, position information extraction, and coordinate system conversion. Through these steps, the target position information can be accurately acquired, providing the necessary input for subsequent PID control and compensation mechanisms.
[0013] Step S2: Calculate the target position change between the current frame and the previous frame as an error signal based on the target position information, and use a PID controller to calculate the turntable angle adjustment based on the error signal; Continuously monitor the target position information, record the target position coordinates of each frame, calculate the target position change between the current frame and the previous frame, that is, the error signal, and then set the proportional gain, integral gain and differential gain respectively; then, based on the above error signal, use the PID control algorithm to calculate the turntable angle adjustment amount.
[0014] Step S3: extracting data from the error signal and analyzing the data to obtain a turntable angle compensation value; Step S3a, extracting data of at least two consecutive time points from the error signal, preprocessing the data, and storing the preprocessed data as time series data; Select at least two consecutive time points from the error signal, and you can select the error signals of the current frame and the previous frame, and record the error signal value at each time point, and then perform preprocessing operations, including denoising, outlier detection and processing, and normalization. The purpose of denoising is to remove noise to improve the accuracy of subsequent analysis. The operation process uses filters such as low-pass filters or median filters to smooth the error signal. The low-pass filter retains low-frequency components and removes high-frequency noise by setting a cutoff frequency. The median filter replaces the value of the center point by calculating the median within a certain window, effectively removing spike noise; outlier detection and processing The purpose of normalization is to identify and process outliers to avoid their impact on subsequent analysis. The operation process uses statistical methods such as Z-score and IQR to detect outliers and replace them with adjacent values or eliminate them. The Z-score method is used to calculate the standard score of each error signal. If it exceeds a certain threshold, it is regarded as an outlier. The IQR method is used to calculate the interquartile range, and values beyond the upper and lower limits are regarded as outliers. The purpose of normalization is to make the data on the same scale for subsequent analysis. The operation process uses minimum-maximum normalization or Z-score normalization. The minimum-maximum normalization is used to scale the data to the [0, 1] interval, and the Z-score normalization is used to standardize the data to a mean of 0 and a standard deviation of 1. Finally, the preprocessed data is stored as time series data, mainly to facilitate subsequent Fourier transform and other time domain to frequency domain conversions. Lists or arrays are usually used to store time series data, and each element contains a timestamp and the corresponding error signal value.
[0015] Step S3b: convert the time series data into the frequency domain using Fourier transform, analyze the frequency peaks of the amplitude spectrum in the frequency domain, and determine the key frequency peaks that affect the turntable angle based on the analysis results; This embodiment mainly explains how to convert time series data into the frequency domain through Fourier transform; first, the error signal value is extracted from the time series data to form a one-dimensional array, and then the sampling interval of the time series data is determined. For example, when the timestamps of the time series data are equally spaced, the time difference between two adjacent time points is calculated, and then the sampling frequency is calculated based on the sampling interval; then the time series data is converted into the frequency domain using fast Fourier transform, and then the amplitude spectrum, that is, the amplitude of each frequency, is calculated. Since the result of Fourier transform is symmetrical, only the positive frequency part is considered, and the amplitude spectrum of the positive frequency part is extracted. Then, the positive frequency part and the corresponding amplitude spectrum are combined into frequency domain data for subsequent analysis; through the above steps, how to use Fourier transform to convert time series data into the frequency domain is described in detail. The specific process includes: 1. Prepare time series data: extract the error signal value from the preprocessed time series data; 2. Calculate the sampling frequency: calculate the sampling interval and sampling frequency based on the timestamp of the time series data; 3. Apply Fourier transform: use fast Fourier transform FFT to convert the time series data into the frequency domain and calculate the amplitude spectrum; 4. Obtain the positive frequency part: extract the amplitude spectrum of the positive frequency part for subsequent analysis; the frequency domain data processed in this way can be directly used for further frequency peak analysis to determine the key frequency peak that affects the turntable angle.
[0016] Step S3b1, extracting the frequency peaks of the amplitude spectrum in the frequency domain, and performing preliminary determination and screening on the frequency peaks to obtain the frequency peaks that are initially retained; Step S3b11: setting a first threshold interval for the extracted frequency peaks, and performing preliminary determination and screening on the extracted frequency peaks using the first threshold interval; Step S3b12: If the extracted frequency peak is within the first threshold interval, it is retained and used as the initially retained frequency peak; if the extracted frequency peak is not within the first threshold interval, it is removed; First, based on an understanding of the physical characteristics of the turntable system, determine the critical frequency range that may affect the turntable angle. This is typically based on the system's mechanical characteristics, control system response time, and other factors, and should be set in conjunction with reference to previous empirical data or relevant frequency ranges reported in the literature. Based on this, define the first threshold interval, setting the lower and upper limits of the critical frequency range, and use this range as the first threshold interval.
[0017] Step S3b2, performing secondary determination and screening on the initially retained frequency peaks to obtain secondary retained frequency peaks; Step S3b21: Analyze the influence of the initially retained frequency peaks on the turntable angle, and assign weights to the initially retained frequency peaks based on the analysis results; In the process of analyzing the degree of influence of the preliminarily retained frequency peaks on the turntable angle, the frequency domain contribution analysis method can be used, that is, calculating the proportion of the energy of each frequency peak to the total energy. This proportion is the contribution. If the energy proportion of a certain frequency peak is large, that is, the contribution is high, it means that it has a significant impact on the turntable angle. Then, based on this analysis result, the preliminarily retained frequency peaks are weighted according to the principle that the higher the contribution, the greater the impact.
[0018] Step S3b22: synthesize the weights of the preliminarily retained frequency peaks and perform averaging processing to obtain the average weights of the preliminarily retained frequency peaks; Step S3b23: setting the average weight as the weight threshold, and performing secondary determination and screening on the initially retained frequency peaks based on the weight threshold and the weights of the initially retained frequency peaks; Step S3b24: If the weight of the initially retained frequency peak is greater than or equal to the weight threshold, it is retained and used as the secondary retained frequency peak; if the weight of the initially retained frequency peak is less than the weight threshold, it is removed; Step S3b3: Perform final determination and screening on the secondary retained frequency peaks to obtain key frequency peaks; Step S3b31: Analyze the correlation between the secondary retained frequency peak and the turntable angle to obtain a correlation coefficient between the secondary retained frequency peak and the turntable angle; Step S3b32: setting a second threshold interval for the correlation coefficient, and using the second threshold interval and the correlation coefficient between the secondary retained frequency peak and the turntable angle to perform final determination and screening on the secondary retained frequency peak; Step S3b33: If the absolute value of the correlation coefficient between the secondary retained frequency peak and the turntable angle is within the second threshold range, then the secondary retained frequency peak is retained and used as the key frequency peak; if the absolute value of the correlation coefficient between the secondary retained frequency peak and the turntable angle is not within the second threshold range, then the secondary retained frequency peak is removed; Step S3c, analyzing the key frequency peak to obtain the turntable angle compensation value; Step S3c1, extracting the weight of the key frequency peak from the weights of the initially retained frequency peaks, and extracting the correlation coefficient between the key frequency peak and the turntable angle from the correlation coefficient between the secondarily retained frequency peak and the turntable angle; Step S3c2: synthesize the correlation coefficient between each key frequency peak and the turntable angle, and perform averaging processing to obtain the comprehensive correlation coefficient between all key frequency peaks and the turntable angle; Step S3c3: Obtain a comprehensive impact factor of each key frequency peak and the turntable angle based on the weight of each key frequency peak and the absolute value of the correlation coefficient between each key frequency peak and the turntable angle; The calculation formula for the comprehensive influence factor of each key frequency peak and turntable angle is: ; in, Represents the comprehensive impact factor of the i-th key frequency peak and the turntable angle; represents the weight of the i-th key frequency peak; represents the absolute value of the correlation coefficient between the i-th key frequency peak and the turntable angle; Step S3c4: extracting the frequency of each key frequency peak based on the amplitude spectrum in the frequency domain; Step S3c5: extracting the phase offset value of each key frequency peak based on the phase spectrum in the frequency domain; Step S3c6: Obtain a turntable angle compensation value based on the comprehensive correlation coefficient between all key frequency peaks and turntable angles, the comprehensive influence factor between each key frequency peak and the turntable angle, the frequency of each key frequency peak, and the phase offset value of each key frequency peak; The calculation formula for the turntable angle compensation value is: ; in, Represents the turntable angle compensation value; Represents the number of key frequency peaks; represents the compensation signal amplitude of the i-th critical frequency peak; Represents the comprehensive correlation coefficient between all key frequency peaks and turntable angle; Represents the comprehensive impact factor of the i-th key frequency peak and the turntable angle; represents the frequency of the i-th key frequency peak; represents the phase offset value of the i-th key frequency peak; Step S4: combining the turntable angle compensation value with the turntable angle adjustment value calculated by the PID controller to obtain an updated turntable angle adjustment value; The calculation formula for the turntable angle update adjustment amount is: ; in, Represents the update adjustment amount of the turntable angle; represents the turntable angle adjustment calculated by the PID controller; Represents the turntable angle compensation value; Step S5: Send the updated adjustment amount of the turntable angle to the turntable drive motor to rotate the turntable to the specified position; First, according to the communication requirements between the control system and the turntable drive motor, select the appropriate communication interface and protocol. Common communication methods include but are not limited to: serial communication, CAN bus, Ethernet and wireless communication. Then define a standard command format to ensure that the turntable drive motor can correctly parse the received data. Taking the serial communication in the above communication method as an example, initialize the serial communication interface on the control system side, and then construct a command based on the calculated turntable angle update adjustment amount. Then, send the command to the turntable drive motor through the serial communication interface. Immediately afterwards, initialize the corresponding communication interface on the turntable drive motor side, read and parse the data from the communication interface, and finally, after repeatedly confirming that the drive motor is in position control mode, the position of the motor can be directly controlled, and then use the PID controller to accurately control the position of the motor to ensure that the turntable can accurately rotate to the specified position.
[0019] Example 2: Figure 2 As shown, the present invention also proposes a turntable control system based on vision-based target tracking, which implements the above-mentioned turntable control method based on vision-based target tracking, including the following modules: Information extraction module: used to obtain a target image through a camera and extract target position information from the target image; Adjustment value acquisition module: connected to the information extraction module, used to calculate the change in target position between the current frame and the previous frame as an error signal based on the target position information, and use the PID controller to calculate the turntable angle adjustment based on the error signal; Compensation value acquisition module: connected to the adjustment value acquisition module, used to extract data from the error signal and analyze the data to obtain the turntable angle compensation value; Update value acquisition module: connected to the compensation value acquisition module, used to combine the turntable angle compensation value with the turntable angle adjustment value calculated by the PID controller to obtain the turntable angle update adjustment value; Turntable execution module: connected to the update amount acquisition module, used to send the turntable angle update adjustment amount to the turntable drive motor to rotate the turntable to the specified position.
[0020] It should be noted that the terms used in the present invention are only for describing specific embodiments and are not intended to limit the scope of this application. As shown in the present specification, unless the context clearly indicates an exception, the words "one", "a", "a kind of" and / or "the" do not specifically refer to the singular and may also include the plural. The terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method or device comprising a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method or device. In the absence of further restrictions, the elements defined by the sentence "comprise a..." do not exclude the presence of other identical elements in the process, method or device comprising the elements.
[0021] It should also be noted that the terms "center", "up", "down", "left", "right", "vertical", "horizontal", "inside", "outside", etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, they cannot be understood as limitations on the present invention. Unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", etc. should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or an indirect connection through an intermediate medium, or it can be a communication between the internal parts of two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0022] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the technical solutions of the embodiments of the present invention.
Claims
1. A turntable control method based on vision-based target tracking, characterized in that: The following steps are involved: Step S1, acquiring a target image through a camera, and extracting target position information from the target image; Step S2, calculating the change amount of the target position between the current frame and the previous frame as an error signal according to the target position information, and using a PID controller to calculate the turntable angle adjustment amount based on the error signal; Step S3, extracting data from the error signal, and analyzing the data to obtain a turntable angle compensation value; Step S4, combining the turntable angle compensation value with the turntable angle adjustment amount calculated by the PID controller to obtain the turntable angle update adjustment amount; Step S5: Send the turntable angle update adjustment amount to the turntable drive motor to rotate the turntable to a specified position.
2. The turntable control method based on vision-based target tracking according to claim 1, characterized in that: The step of extracting data from the error signal and analyzing the data to obtain a turntable angle compensation value includes: Step S3a, extracting data of at least two consecutive time points from the error signal, preprocessing the data, and storing the preprocessed data as time series data; Step S3b, converting the time series data into the frequency domain by Fourier transform, and analyzing the frequency peak of the amplitude spectrum in the frequency domain, and determining the key frequency peak that affects the turntable angle according to the analysis result; Step S3c: Analyze the critical frequency peak to obtain the turntable angle compensation value.
3. The turntable control method based on vision-based target tracking according to claim 2, characterized in that: The Fourier transform is used to convert the time series data into the frequency domain, and the frequency peak of the amplitude spectrum in the frequency domain is analyzed. According to the analysis results, the key frequency peak that affects the turntable angle is determined, including: Step S3b1, extracting the frequency peak of the amplitude spectrum in the frequency domain, and performing preliminary determination and screening on the frequency peak to obtain the frequency peak that is initially retained; Step S3b2, performing secondary determination and screening on the initially retained frequency peaks to obtain secondary retained frequency peaks; Step S3b3: Perform final determination and screening on the secondary retained frequency peaks to obtain key frequency peaks.
4. The turntable control method based on vision-based target tracking according to claim 2, characterized in that: The analysis of the key frequency peak to obtain the turntable angle compensation value includes: Step S3c1, extracting the weight of the key frequency peak from the weight of the frequency peak initially retained, and extracting the correlation coefficient between the key frequency peak and the turntable angle from the correlation coefficient between the frequency peak and the turntable angle retained for the second time; Step S3c2, synthesizing the correlation coefficient between each key frequency peak and the turntable angle, and performing averaging processing to obtain the comprehensive correlation coefficient between all key frequency peaks and the turntable angle; Step S3c3, obtaining a comprehensive influence factor of each key frequency peak and the turntable angle according to the weight of each key frequency peak and the absolute value of the correlation coefficient between each key frequency peak and the turntable angle; The calculation formula for the comprehensive influence factor of each key frequency peak and turntable angle is: ; in, Represents the comprehensive impact factor of the i-th key frequency peak and the turntable angle; represents the weight of the i-th key frequency peak; represents the absolute value of the correlation coefficient between the i-th key frequency peak and the turntable angle; Step S3c4, extracting the frequency of each key frequency peak based on the amplitude spectrum in the frequency domain; Step S3c5, extracting the phase offset value of each key frequency peak based on the phase spectrum in the frequency domain; Step S3c6, obtaining the turntable angle compensation value according to the comprehensive correlation coefficient of all key frequency peaks and turntable angles, the comprehensive influence factor of each key frequency peak and turntable angle, the frequency of each key frequency peak, and the phase offset value of each key frequency peak.
5. The turntable control method based on vision-based target tracking according to claim 3, characterized in that: The step of extracting the frequency peak of the amplitude spectrum in the frequency domain and performing preliminary determination and screening on the frequency peak to obtain the frequency peak that is initially retained includes: Step S3b11, setting a first threshold interval for the extracted frequency peaks, and using the first threshold interval to perform preliminary determination and screening on the extracted frequency peaks; Step S3b12: If the extracted frequency peak value is within the first threshold interval, it is retained and used as the initially retained frequency peak value; if the extracted frequency peak value is not within the first threshold interval, it is removed.
6. The turntable control method based on vision-based target tracking according to claim 3, characterized in that: The performing secondary determination and screening on the initially retained frequency peaks to obtain the secondary retained frequency peaks comprises: Step S3b21, analyzing the influence of the initially retained frequency peak on the turntable angle, and assigning weights to the initially retained frequency peak according to the analysis results; Step S3b22, synthesizing the weights of the frequency peaks initially retained, and performing averaging processing to obtain the average weights of the frequency peaks initially retained; Step S3b23, setting the average weight as the weight threshold, and performing secondary determination and screening on the initially retained frequency peaks based on the weight threshold and the weights of the initially retained frequency peaks; Step S3b24: If the weight of the initially retained frequency peak is greater than or equal to the weight threshold, it is retained and used as the secondary retained frequency peak; if the weight of the initially retained frequency peak is less than the weight threshold, it is removed.
7. The turntable control method based on vision-based target tracking according to claim 3, characterized in that: The final determination and screening of the secondary retained frequency peaks to obtain the key frequency peaks includes: Step S3b31, analyzing the correlation between the secondary retained frequency peak and the turntable angle, and obtaining a correlation coefficient between the secondary retained frequency peak and the turntable angle; Step S3b32, setting a second threshold interval for the correlation coefficient, and using the second threshold interval and the correlation coefficient between the secondary retained frequency peak and the turntable angle to perform final determination and screening on the secondary retained frequency peak; Step S3b33: If the absolute value of the correlation coefficient between the secondary retained frequency peak and the turntable angle is within the second threshold interval, it is retained and used as the key frequency peak; if the absolute value of the correlation coefficient between the secondary retained frequency peak and the turntable angle is not within the second threshold interval, it is eliminated.
8. The turntable control method based on vision-based target tracking according to claim 4, characterized in that: The calculation formula for obtaining the turntable angle compensation value is: ; in, Represents the turntable angle compensation value; Represents the number of critical frequency peaks; represents the compensation signal amplitude of the i-th critical frequency peak; Represents the comprehensive correlation coefficient between all key frequency peaks and turntable angle; Represents the comprehensive impact factor of the i-th key frequency peak and the turntable angle; represents the frequency of the i-th critical frequency peak; Represents the phase offset value of the i-th critical frequency peak.
9. The turntable control method based on vision-based target tracking according to claim 1, characterized in that: The calculation formula for obtaining the update adjustment amount of the turntable angle is: ; in, Represents the update adjustment amount of the turntable angle; represents the turntable angle adjustment calculated by the PID controller; Represents the turntable angle compensation value.
10. A turntable control system based on vision target tracking, used to execute the turntable control method based on vision target tracking according to any one of claims 1 to 9, characterized in that: The system comprises: Information extraction module: used to obtain a target image through a camera and extract target position information from the target image; Adjustment value acquisition module: connected to the information extraction module, used to calculate the change of the target position between the current frame and the previous frame as an error signal according to the target position information, and based on the error signal, use the PID controller to calculate the turntable angle adjustment value; Compensation value acquisition module: connected to the adjustment value acquisition module, used to extract data from the error signal and analyze the data to obtain the turntable angle compensation value; Update amount acquisition module: connected to the compensation value acquisition module, used to combine the turntable angle compensation value with the turntable angle adjustment amount calculated by the PID controller to obtain the turntable angle update adjustment amount; Turntable execution module: connected to the update amount acquisition module, used to send the turntable angle update adjustment amount to the turntable drive motor to rotate the turntable to the specified position.
Citation Information
Cited By
Rotary table accurate alignment control method based on multi-modal sensing fusion
CN120909137A
Self-calibration high-precision angle measurement turntable control system and method
CN121349172A