Attitude trajectory optimization method and system based on adaptive sliding window
By using an adaptive sliding window and cubic B-spline fitting method, the problems of unstable data quality and insufficient window adaptability in attitude trajectory optimization are solved, achieving high-precision attitude analysis, adapting to different motion speed scenarios, and improving the real-time performance and robustness of attitude analysis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-11
- Publication Date
- 2026-03-13
AI Technical Summary
Existing attitude trajectory optimization techniques suffer from problems such as unstable initial data quality, insufficient window adaptability, single anomaly detection mechanism, and imbalance in fitting optimization in high-precision scenarios, making it difficult to accurately capture motion details and reliably evaluate joint motion trajectories.
An adaptive sliding window strategy and a cubic B-spline fitting method are adopted. The window size is dynamically adjusted by the adaptive sliding window. Anomaly detection is performed by combining the local median absolute deviation method and the standard skeleton ratio. Multi-stage optimization is carried out to construct an optimization system for pose feature points.
It significantly improves the spatiotemporal continuity and robustness of attitude sequences, reduces computational redundancy, adapts to different motion speed scenarios, achieves a balance between real-time response and stability, and enhances the accuracy and reliability of attitude analysis.
Smart Images

Figure CN121661711A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of visual media analysis technology, and in particular relates to a method and system for attitude trajectory optimization based on an adaptive sliding window. Background Technology
[0002] Mainstream human pose estimation methods can extract two-dimensional coordinates of key joints such as shoulders, elbows, and wrists from images or videos, providing basic data for subsequent trajectory analysis. Meanwhile, advancements in motion capture technology have driven multimodal data acquisition, with optical, inertial, and hybrid capture systems enabling high-precision motion trajectory recording. However, the raw data still faces common problems such as noise interference and outlier contamination.
[0003] Current posture trajectory optimization techniques suffer from several shortcomings that urgently need to be addressed, such as unstable initial data quality, insufficient window adaptability, a simplistic anomaly detection mechanism, and an imbalance in fitting and optimization. These shortcomings limit the performance of existing technologies in high-precision scenarios: they struggle to accurately capture subtle deviations in movement during sports training and cannot reliably assess joint motion trajectories in medical rehabilitation. Therefore, developing a posture feature point coordinate optimization technique that balances dynamic adaptability, robustness, and real-time performance has become a key requirement for enhancing the practical value of human posture analysis. Summary of the Invention
[0004] To address the aforementioned technical problems, this invention provides a posture trajectory optimization method and system based on an adaptive sliding window, which is particularly suitable for posture optimization of the human body in visual media.
[0005] The technical solution adopted in this invention is as follows: Firstly, a method for optimizing attitude trajectory based on an adaptive sliding window is provided, characterized by comprising the following steps:
[0006] S10. Acquire visual media data and decode it into a temporal image frame sequence;
[0007] S20. Perform pose estimation on each frame of the time-series image frame sequence to obtain the coordinate set of each pose feature point in each frame;
[0008] S30. Cache the coordinate set of historical attitude feature points to form a dynamic trajectory cache queue of variable length, which is used to extract the coordinate trajectory of each attitude feature point;
[0009] S40. Construct a sliding window based on the coordinate set of the pose feature points of the current frame and the previous frame;
[0010] S50. Abnormal data are removed from each coordinate trajectory within the sliding window;
[0011] S60. Perform B-spline fitting on each of the coordinate trajectories;
[0012] S70. Perform multi-stage optimization on the coordinate trajectory sequentially;
[0013] S80. Update the sliding window frame by frame. Repeat steps S40-S70 for each newly input attitude feature point in each frame to obtain the optimized temporal sequence of the attitude feature points.
[0014] Furthermore, the pose estimation includes a pre-trained pose estimation algorithm.
[0015] Further, step S40 includes the following steps:
[0016] S41, through equations Calculate motion intensity between adjacent frames Where K is the number of the posture feature points. The coordinates of the k-th pose feature point in the current frame. The coordinates of the k-th pose feature point in the previous frame;
[0017] S42, through equations Dynamically set window radius ,in The minimum value of the window radius , The maximum value of the window radius , For low empirical threshold, For high empirical thresholds;
[0018] S43, through equations Calculate the range of the sliding window ,in is the time index of the current frame, and T is the total number of frames in the time-series image frame sequence.
[0019] Further, step S50 includes the following steps:
[0020] S51. Extract the x-coordinate sequence and y-coordinate sequence for each of the attitude feature points within the sliding window;
[0021] S52. Statistical outlier detection is performed on each of the coordinate trajectories using the local median absolute deviation method.
[0022] S53. Remove the statistical outliers and use linear interpolation to fill in the missing coordinates;
[0023] S54. Based on the standard skeleton ratio and the shoulder width scale benchmark of the current frame, determine the geometric anomalies.
[0024] S55. Remove the geometric outliers and use linear interpolation to fill in the missing coordinates.
[0025] Further, step S52 includes the following steps:
[0026] S44, through equations Calculate the MAD value, where For a single coordinate value in a coordinate sequence, The median of the coordinate sequence;
[0027] S45. For each coordinate value in the coordinate sequence Satisfying the equation Then it is determined to be the statistical outlier, where For empirical threshold , Let be the coordinate sequence of the kth feature point.
[0028] Further, step S54 includes the following steps:
[0029] S46. Determine the body dimension benchmarks;
[0030] S47, Through the equation *R obtains the standard bone length. ,in R represents the standard skeletal proportions, and R represents the body scale reference.
[0031] S48, Satisfies the equation Then it is determined to be an outlier in the set, where This refers to the actual bone length. This represents the standard deviation of the length distribution of the corresponding skeleton in the standard dataset.
[0032] Further, step S60 includes the following steps:
[0033] S61. Using the time index as the independent variable and the coordinate trajectory as the dependent variable;
[0034] S62. The B-spline used is a cubic B-spline, fitted using nonparametric regression, with the objective function being: ,in To smooth out the regularization coefficients, Let k be the original coordinates of the k-th pose feature point in the i-th frame. For the integral of the square of the second derivative of the B-spline function, The B-spline function value of the k-th attitude feature point at time index i;
[0035] S63. Solve for the objective function to obtain the fitting function of the coordinate trajectory;
[0036] S64. Obtain the optimized coordinates of the pose feature points in the current frame.
[0037] Further, step S70 includes the following steps:
[0038] S71. A fixed window is used to perform coarse smoothing on the coordinate trajectory, wherein the size of the fixed window is larger than that of the sliding window;
[0039] S72. For the local coordinate trajectory of a single attitude feature point, determine the local motion intensity by the average coordinate displacement of adjacent frames, and dynamically adjust the size of the local adaptive sliding window according to the local motion intensity.
[0040] S73. Within the local adaptive sliding window, extract the coordinate sequence and use the local median absolute deviation method to detect local outliers. After removing them, fill in the missing coordinates by linear interpolation.
[0041] S74. The local coordinate trajectory after completion is optimized by using cubic B-spline fitting with smoothing regularization coefficient.
[0042] Secondly, an attitude trajectory optimization system based on an adaptive sliding window is provided, including:
[0043] Data acquisition module: used to acquire or receive visual media video streams and parse them into a time-series image frame sequence;
[0044] Pose detection module: used to extract the coordinates of pose feature points from the temporal image frame sequence, forming a set of coordinates of a single pose feature point in consecutive frames;
[0045] The trajectory caching module is used to maintain the coordinate set of each of the aforementioned attitude feature points, update the data in frame order, and support dynamic window access to historical coordinates.
[0046] Adaptive controller: used to read the coordinate change data of the posture feature points in preset historical frames, calculate the motion intensity and dynamically adjust the size of the sliding window;
[0047] Anomaly detection module: used to extract coordinate data within the sliding window according to the size of the sliding window, identify and remove abnormal coordinates, supplement missing data through linear interpolation, and output the cleaned coordinate trajectory;
[0048] B-spline fitting module: used to construct a fitting target with smooth constraints for the coordinate trajectory, solve for the B-spline fitting function, substitute the current frame index into the fitting function for calculation, and output the optimized coordinates of the attitude feature points;
[0049] Smoothing optimization module: Performs secondary optimization on the optimized coordinates. First, high-frequency noise is filtered through a large fixed window, and then B-spline fitting is performed in combination with the adaptive sliding window size.
[0050] Information output module: Used to output the final optimized coordinates of all the pose feature points in the current frame, supporting visualization or storage retrieval.
[0051] Furthermore, the trajectory caching module allocates an independent cache queue for each of the attitude feature points, with the upper limit of the queue length matching the maximum window size of the adaptive controller, and automatically removes expired coordinate data.
[0052] The advantages and positive effects of this invention are as follows: By using cubic B-spline curves to fit the time-series trajectory of human key points, compared with traditional linear filtering methods (such as moving average or Kalman filtering), it can achieve stronger nonlinear fitting capabilities. It innovatively introduces the spline fitting concept from Computer-Aided Geometric Design (CAGD) into the field of human posture post-processing, achieving smooth reconstruction of key point trajectories and interpolation of missed frames, significantly improving the spatiotemporal continuity and robustness of posture sequences, and providing stable data support for subsequent action recognition and quality assessment. Through an adaptive sliding window strategy, the window size is adjusted in real time according to human motion intensity indicators (such as the average displacement velocity of key points) to balance smoothness and responsiveness. In low-speed or static movements, the window automatically expands to enhance the smoothing effect; in high-speed movements, the window automatically shrinks to reduce response latency. This mechanism effectively solves the technical contradiction of "difficulty in balancing smoothness and responsiveness" in traditional fixed-window methods, while also reducing overall computational redundancy. Attached Figure Description
[0053] Figure 1 This is a flowchart illustrating an embodiment of the attitude trajectory optimization method of the present invention. Detailed Implementation
[0054] The present disclosure will now be described more fully with reference to the accompanying drawings, which illustrate exemplary embodiments of the present disclosure. The technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present disclosure, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present disclosure without creative effort are within the scope of protection of the present disclosure.
[0055] like Figure 1 As shown, this invention provides a pose trajectory optimization method based on an adaptive sliding window, comprising the following steps:
[0056] S10. Acquire visual media data and decode it into a temporal image frame sequence; preferably, the uniform resampling frame rate is 30 FPS.
[0057] S20. Perform pose estimation on each frame of the time-series image frame sequence to obtain the coordinate set of each pose feature point in each frame; use equations... The output pose feature points are normalized to avoid scale differences caused by different resolutions affecting the smoothing process;
[0058] S30. Cache the coordinate set of historical attitude feature points to form a dynamic trajectory cache queue of variable length, which is used to extract the coordinate trajectory of each attitude feature point;
[0059] S40. Construct a sliding window based on the coordinate set of the pose feature points of the current frame and the previous frame;
[0060] S50. Remove abnormal data from each coordinate trajectory within the sliding window;
[0061] S60. Perform B-spline fitting on each coordinate trajectory;
[0062] S70. Perform multi-stage optimization on the coordinate trajectory sequentially;
[0063] S80. Update the sliding window frame by frame. Repeat steps S40-S70 for each newly input attitude feature point in each frame to obtain the time sequence of the optimized attitude feature points.
[0064] By employing the above methods, integrating adaptive windowing, anomaly removal, and B-spline fitting, we can significantly reduce pose jitter and noise interference, and improve temporal continuity and visual stability. Multi-stage optimization balances global smoothness and local fidelity, adapts to different motion speed scenarios, and achieves a balance between real-time response and stability.
[0065] To address the issue that existing single-frame pose detection is easily limited by model accuracy, resulting in high initial coordinate noise and large errors, this embodiment provides an implementation method.
[0066] In one embodiment, pose estimation includes a pre-trained pose estimation algorithm; preferably, the pose estimation algorithm includes OpenPose, HRNet, and AlphaPose.
[0067] By employing the above method and leveraging mature pre-trained pose estimation algorithms, the accuracy and reliability of single-frame pose feature point detection are improved, and initial data errors are reduced. This reduces the processing pressure of subsequent anomaly detection and fitting, indirectly improving overall optimization efficiency and providing high-quality input for trajectory optimization.
[0068] To address the issues of traditional fixed windows being unable to adapt to different motion speeds, having insufficient noise suppression at low speeds, and experiencing lag at high speeds, this embodiment provides an implementation method.
[0069] In one embodiment, step S40 includes the following steps:
[0070] S41, through equations Calculate motion intensity between adjacent frames Where K is the number of pose feature points. The coordinates of the k-th pose feature point in the current frame. The coordinates of the k-th pose feature point in the previous frame;
[0071] S42, through equations Dynamically set window radius ,in Minimum window radius , Maximum window radius , For low empirical threshold, To establish a high empirical threshold, statistical analysis was conducted under different states. The distribution, take =25th percentile =75th percentile.
[0072] S43, through equations Calculate the range of the sliding window ,in is the time index of the current frame, and T is the total number of frames in the time-series image frame sequence.
[0073] Using the above method, the window radius is dynamically adjusted based on motion intensity. At low speeds, the window is enlarged to enhance noise suppression, and at high speeds, the window is reduced to decrease latency. The window range is clearly defined through formulaic calculations to ensure the consistency and reproducibility of window adjustments and reduce computational redundancy. It is adapted to all scenarios from static to high-speed motion, improving the dynamic adaptability of posture optimization.
[0074] To address the problem that existing methods lack a systematic anomaly detection mechanism and that statistical and geometric anomalies contaminate the fitting process, resulting in low accuracy and poor robustness of the optimization results, this embodiment provides an implementation method.
[0075] In one embodiment, step S50 includes the following steps:
[0076] S51. Extract the x-coordinate sequence and y-coordinate sequence of each attitude feature point within the sliding window;
[0077] S52. Use the local median absolute deviation method to detect outliers in each coordinate trajectory.
[0078] S53. Remove statistical outliers and use linear interpolation to fill in the missing coordinates;
[0079] S54. Based on the standard skeleton ratio and the shoulder width scale benchmark of the current frame, determine the geometric anomalies.
[0080] S55. Remove geometric outliers and use linear interpolation to fill in the missing coordinates.
[0081] Using the above method, statistical outliers are first removed, followed by geometric outliers. This dual-cleaning strategy comprehensively filters invalid data, preventing outliers from interfering with subsequent fitting. Linear interpolation is used to complete missing coordinates, ensuring trajectory continuity and providing clean and complete input data for fitting. Combining statistical methods with skeletal constraints improves the accuracy of outlier detection and enhances the robustness of the optimization results. Statistical methods and skeletal geometric consistency constraints are used to identify and remove outliers in the keypoint trajectories. For the removed missing points, linear interpolation or neighborhood reconstruction strategies are used for repair, eliminating noise points from the source and significantly improving the accuracy and robustness of the optimization results.
[0082] To address the problem that traditional methods are sensitive to extreme values and have a high false positive rate in anomaly detection, this embodiment provides an implementation method.
[0083] In one embodiment, step S52 includes the following steps:
[0084] S44, through equations Calculate the MAD value, where For a single coordinate value in a coordinate sequence, The median of the coordinate sequence;
[0085] S45. For each coordinate value in the coordinate sequence Satisfying the equation Then it is determined to be a statistical outlier, among which For empirical threshold , Let be the coordinate sequence of the k-th feature point.
[0086] Using the above methods, the MAD method is more tolerant to extreme values, accurately identifies statistical outliers in the coordinate sequence, and reduces the probability of false positives and false negatives; it strictly follows the threshold judgment logic to ensure the consistency of anomaly detection, removes noise while retaining normal motion data; and it improves the purity of the coordinate trajectory, providing more reliable basic data for subsequent geometric anomaly detection and fitting.
[0087] To address the issue that statistical methods alone cannot identify anomalies where bone proportions do not conform to human physiology, leading to posture optimization that violates common sense about human anatomy, this embodiment provides an implementation method.
[0088] In one embodiment, step S54 includes the following steps:
[0089] S46. Determine the body dimension benchmarks;
[0090] S47, Through the equation *R obtains the standard bone length. ,in The standard skeletal proportions are given, and R is the body scale reference.
[0091] S48, Satisfies the equation Then it is determined to be an outlier in the set, where This refers to the actual bone length. This represents the standard deviation of the length distribution of the corresponding skeleton in the standard dataset.
[0092] Using the above method, based on the standard skeleton ratio and the current frame shoulder width scale benchmark, we can accurately determine geometric anomalies and ensure that the posture conforms to the human physiological structure; eliminate key points with abnormal skeleton ratios to avoid fitting posture trajectories that violate common sense and improve the rationality of optimization results; supplement the deficiencies of statistical anomaly detection to form a multimodal anomaly recognition system and further enhance the robustness of the optimization method.
[0093] To address the issues of traditional linear filtering's inability to model complex nonlinear motion trajectories, poor fitting results, and significant loss of detail, this embodiment provides an implementation method.
[0094] In one embodiment, step S60 includes the following steps:
[0095] S61. Using time index as the independent variable and coordinate trajectory as the dependent variable;
[0096] S62, B-splines are used, employing cubic B-splines for nonparametric regression fitting. The objective function is: ,in To smooth out the regularization coefficients, Let be the original coordinates of the k-th pose feature point in the i-th frame. For the integral of the square of the second derivative of the B-spline function, The B-spline function value of the kth attitude feature point at time index i;
[0097] S63. Solve for the objective function to obtain the fitting function for the coordinate trajectory;
[0098] S64. Obtain the optimized coordinates of the pose feature points in the current frame.
[0099] Using the above method, cubic B-splines are used for nonparametric regression fitting to enhance the modeling ability of nonlinear motion trajectories and improve trajectory smoothness. A smoothing regularization coefficient is introduced to balance the trajectory smoothness with the fit of the original data and avoid over-smoothing or residual noise. The optimal fitting curve is obtained by solving the objective function, providing high-quality preliminary optimization coordinates for subsequent multi-stage optimization.
[0100] To address the issue that a single optimization step cannot simultaneously achieve global smoothing and local motion details, and is prone to over-smoothing leading to loss of details or residual noise, this embodiment provides an implementation method.
[0101] In one embodiment, step S70 includes the following steps:
[0102] S71. A fixed window is used to perform coarse smoothing on the coordinate trajectory, wherein the size of the fixed window is larger than that of the sliding window;
[0103] S72. For the local coordinate trajectory of a single attitude feature point, determine the local motion intensity by the average coordinate displacement of adjacent frames, and dynamically adjust the size of the local adaptive sliding window according to the local motion intensity.
[0104] The size of the adaptive sliding window is obtained based on the local motion intensity. Local anomalies are then detected and repaired within this window. High-precision trajectory reconstruction is achieved by combining small window B-spline curve fitting. The resulting optimization can accurately capture local motion details while maintaining global smoothness.
[0105] S73. Within the local adaptive sliding window, extract the coordinate sequence and use the local median absolute deviation method to detect local outliers. After removing them, fill in the missing coordinates by linear interpolation.
[0106] S74. The local coordinate trajectory after completion is optimized by using cubic B-spline fitting with smoothing regularization coefficient.
[0107] Using the above method, the fixed window coarse smoothing effectively filters high-frequency noise, providing a stable trajectory basis for fine-tuning; the adaptive window fine-tuning accurately preserves small motion details and avoids the loss of details caused by coarse smoothing.
[0108] To facilitate the use of the attitude trajectory optimization method based on an adaptive sliding window provided in this disclosure, this disclosure also provides an attitude trajectory optimization system based on an adaptive sliding window, including:
[0109] Data acquisition module: used to acquire or receive visual media video streams and parse them into a time-series image frame sequence;
[0110] The attitude detection module is used to extract the coordinates of attitude feature points from a time-series image frame sequence, forming a set of coordinates of a single attitude feature point across consecutive frames.
[0111] The trajectory caching module is used to maintain the coordinate set of each attitude feature point, update the data in frame order, and support dynamic window access to historical coordinates.
[0112] Adaptive controller: used to read the coordinate change data of the pose feature points in the preset historical frames, calculate the motion intensity and dynamically adjust the size of the sliding window;
[0113] Anomaly detection module: It is used to extract coordinate data within the sliding window according to the size of the sliding window, identify and remove abnormal coordinates, supplement missing data through linear interpolation, and output the cleaned coordinate trajectory.
[0114] B-spline fitting module: used to construct a fitting target with smooth constraints on the coordinate trajectory, solve for the B-spline fitting function, substitute the current frame index into the fitting function for calculation, and output the optimized coordinates of the attitude feature points;
[0115] Smoothing optimization module: Performs secondary optimization on the optimized coordinates. First, high-frequency noise is filtered through a large fixed window, and then B-spline fitting is performed in combination with an adaptive sliding window size.
[0116] Information output module: Used to output the final optimized coordinates of all pose feature points in the current frame, supporting visualization or storage retrieval.
[0117] In one embodiment, the trajectory caching module allocates an independent cache queue for each attitude feature point, with the upper limit of the queue length matching the maximum window size of the adaptive controller, and automatically removes expired coordinate data.
[0118] Based on embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0119] An electronic device includes at least one processor and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the attitude trajectory optimization method based on the adaptive sliding window provided herein.
[0120] Electronic devices are intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic devices can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0121] A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the attitude trajectory optimization method based on an adaptive sliding window provided herein.
[0122] The various embodiments of this disclosure can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0123] A computer program product includes a computer program / instructions that are executed by a processor. The present disclosure provides a pose trajectory optimization method based on an adaptive sliding window.
[0124] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0125] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0126] The embodiments of the present invention have been described in detail above, but the content described is only a preferred embodiment of the present invention and should not be considered as limiting the scope of the present invention. All equivalent changes and improvements made within the scope of the present invention should still fall within the patent coverage of the present invention.
Claims
1. A pose trajectory optimization method based on an adaptive sliding window, characterized in that, Includes the following steps: S10. Acquire visual media data and decode it into a temporal image frame sequence; S20. Perform pose estimation on each frame of the time-series image frame sequence to obtain the coordinate set of each pose feature point in each frame; S30. Cache the coordinate set of historical attitude feature points to form a dynamic trajectory cache queue of variable length, which is used to extract the coordinate trajectory of each attitude feature point; S40. Construct a sliding window based on the coordinate set of the pose feature points of the current frame and the previous frame; S50. Abnormal data are removed from each coordinate trajectory within the sliding window; S60. Perform B-spline fitting on each of the coordinate trajectories; S70. Perform multi-stage optimization on the coordinate trajectory sequentially; S80. Update the sliding window frame by frame. Repeat steps S40-S70 for each newly input attitude feature point in each frame to obtain the optimized temporal sequence of the attitude feature points.
2. The attitude trajectory optimization method based on adaptive sliding window according to claim 1, characterized in that: The pose estimation includes a pre-trained pose estimation algorithm.
3. The attitude trajectory optimization method based on adaptive sliding window according to claim 1, characterized in that, Step S40 includes the following steps: S41, through equations Calculate motion intensity between adjacent frames Where K is the number of the posture feature points. The coordinates of the k-th pose feature point in the current frame. The coordinates of the k-th pose feature point in the previous frame; S42, through equations Dynamically set window radius ,in The minimum value of the window radius , The maximum value of the window radius , For low empirical threshold, For high empirical thresholds; S43, through equations Calculate the range of the sliding window ,in is the time index of the current frame, and T is the total number of frames in the time-series image frame sequence.
4. The attitude trajectory optimization method based on adaptive sliding window according to claim 1, characterized in that, Step S50 includes the following steps: S51. Extract the x-coordinate sequence and y-coordinate sequence for each of the attitude feature points within the sliding window; S52. Statistical outlier detection is performed on each of the coordinate trajectories using the local median absolute deviation method. S53. Remove the statistical outliers and use linear interpolation to fill in the missing coordinates; S54. Based on the standard skeleton ratio and the shoulder width scale benchmark of the current frame, determine the geometric anomalies. S55. Remove the geometric outliers and use linear interpolation to fill in the missing coordinates.
5. The attitude trajectory optimization method based on an adaptive sliding window according to claim 4, characterized in that, Step S52 includes the following steps: S44, through equations Calculate the MAD value, where For a single coordinate value in a coordinate sequence, The median of the coordinate sequence; S45. For each coordinate value in the coordinate sequence Satisfying the equation Then it is determined to be the statistical outlier, where For empirical threshold , Let be the coordinate sequence of the kth feature point.
6. The attitude trajectory optimization method based on an adaptive sliding window according to claim 4 or 5, characterized in that, Step S54 includes the following steps: S46. Determine the body dimension benchmarks; S47, Through the equation *R obtains the standard bone length. ,in R represents the standard skeletal proportions, and R represents the body scale reference. S48, Satisfies the equation Then it is determined to be an outlier in the set, where This refers to the actual bone length. This represents the standard deviation of the length distribution of the corresponding skeleton in the standard dataset.
7. The attitude trajectory optimization method based on adaptive sliding window according to claim 1, characterized in that, Step S60 includes the following steps: S61. Using the time index as the independent variable and the coordinate trajectory as the dependent variable; S62. The B-spline used is a cubic B-spline, fitted using nonparametric regression, with the objective function being: ,in To smooth out the regularization coefficients, Let k be the original coordinates of the k-th pose feature point in the i-th frame. For the integral of the square of the second derivative of the B-spline function, The B-spline function value of the k-th attitude feature point at time index i; S63. Solve for the objective function to obtain the fitting function of the coordinate trajectory; S64. Obtain the optimized coordinates of the pose feature points in the current frame.
8. The attitude trajectory optimization method based on adaptive sliding window according to claim 1, characterized in that, Step S70 includes the following steps: S71. A fixed window is used to perform coarse smoothing on the coordinate trajectory, wherein the size of the fixed window is larger than that of the sliding window; S72. For the local coordinate trajectory of a single attitude feature point, determine the local motion intensity by the average coordinate displacement of adjacent frames, and dynamically adjust the size of the local adaptive sliding window according to the local motion intensity. S73. Within the local adaptive sliding window, extract the coordinate sequence and use the local median absolute deviation method to detect local outliers. After removing them, fill in the missing coordinates by linear interpolation. S74. The local coordinate trajectory after completion is optimized by using cubic B-spline fitting with smoothing regularization coefficient.
9. An attitude trajectory optimization system based on an adaptive sliding window, characterized in that, include: Data acquisition module: used to acquire or receive visual media video streams and parse them into a time-series image frame sequence; Pose detection module: used to extract the coordinates of pose feature points from the temporal image frame sequence, forming a set of coordinates of a single pose feature point in consecutive frames; The trajectory caching module is used to maintain the coordinate set of each of the aforementioned attitude feature points, update the data in frame order, and support dynamic window access to historical coordinates. Adaptive controller: used to read the coordinate change data of the posture feature points in preset historical frames, calculate the motion intensity and dynamically adjust the size of the sliding window; Anomaly detection module: used to extract coordinate data within the sliding window according to the size of the sliding window, identify and remove abnormal coordinates, supplement missing data through linear interpolation, and output the cleaned coordinate trajectory; B-spline fitting module: used to construct a fitting target with smooth constraints for the coordinate trajectory, solve for the B-spline fitting function, substitute the current frame index into the fitting function for calculation, and output the optimized coordinates of the attitude feature points; Smoothing optimization module: Performs secondary optimization on the optimized coordinates. First, high-frequency noise is filtered through a large fixed window, and then B-spline fitting is performed in combination with the adaptive sliding window size. Information output module: Used to output the final optimized coordinates of all the pose feature points in the current frame, supporting visualization or storage retrieval.
10. The attitude trajectory optimization system based on an adaptive sliding window according to claim 7, characterized in that: The trajectory caching module allocates an independent cache queue for each attitude feature point, with the upper limit of the queue length matching the maximum window size of the adaptive controller, and automatically removes expired coordinate data.
Citation Information
Cited By
3D human body posture estimation and multi-key-point time sequence analysis method
CN122024331A