Motion camera anti-shake method and system based on inertia prediction

Through a dual-mode stabilization method based on inertial prediction, active predictive stabilization of sports cameras is achieved by processing IMU sensor and gyroscope data, which solves the response lag problem of traditional stabilization systems in complex environments and improves the stabilization effect.

CN120676249AInactive Publication Date: 2025-09-19SHENZHEN ZHENCHENG TECH CO LTD
View PDF 0 Cites 8 Cited by

Patent Information

Application Number
CN202511188344.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-25
Publication Date
2025-09-19
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional action camera stabilization systems cannot effectively distinguish between gentle motion and sudden high-frequency jitter in complex and changing motion environments, resulting in poor stabilization effects, especially when the camera encounters sudden impacts and experiences delayed response or insufficient compensation.

Method used

A dual-mode anti-shake method based on inertial prediction is adopted. Acceleration data is collected through the IMU sensor, and cubic spline interpolation curve fitting and time domain extrapolation prediction are performed on the gyroscope angular velocity data to achieve active predictive anti-shake for smooth motion. In the event of sudden impact, the second-order differential detection algorithm is switched to generate a compensation drive signal to achieve a rapid response.

Benefits of technology

It significantly improves the adaptability and compensation accuracy in complex motion environments, reduces compensation delay, and enhances anti-shake performance and real-time response capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120676249A_ABST
    Figure CN120676249A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of camera anti-shake, and discloses a motion camera anti-shake method and system based on inertial prediction, and the method comprises the steps: collecting the three-axis acceleration original data of an IMU sensor in a motion camera, and calculating a first motion intensity value; when the first motion intensity value is smaller than an acceleration change rate threshold value, starting a first anti-shake mode, and extracting angular velocity data of the gyroscope; performing cubic spline interpolation curve fitting and time domain extrapolation prediction on the angular velocity data of the gyroscope to obtain a three-axis angular displacement predicted value and generate a first lens compensation driving signal in a first anti-shake mode; continuously monitoring the motion camera, switching to a second anti-shake mode when a second motion intensity value exceeds the acceleration change rate threshold value, acquiring three-axis acceleration sudden change data, and generating a second lens compensation driving signal in the second anti-shake mode, compared with a traditional single-mode anti-shake method, the method improves the adaptability and compensation precision in a complex motion environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of camera anti-shake technology, and in particular to a motion camera anti-shake method and system based on inertia prediction. Background Art

[0002] Action cameras are widely used in scenarios such as sports photography, outdoor adventures, and daily recording. However, traditional single-mode stabilization (STAR) systems have significant limitations when used in complex and dynamic environments. Existing STAR systems typically employ fixed control strategies and prediction parameters, failing to effectively distinguish between gentle motion and sudden, high-frequency jitter. This results in poor STAR performance in dynamic motion scenarios. In particular, traditional methods often experience delayed response or insufficient compensation when the camera system encounters sudden impacts. Summary of the Invention

[0003] The present invention provides a motion camera anti-shake method and system based on inertial prediction. Compared with traditional single-mode anti-shake methods, the present invention improves adaptability and compensation accuracy in complex motion environments, realizes active predictive anti-shake, and significantly improves overall anti-shake performance and real-time response capabilities.

[0004] In a first aspect, the present invention provides a motion camera anti-shake method based on inertia prediction, the motion camera anti-shake method based on inertia prediction comprising: Collecting the three-axis acceleration raw data of the IMU sensor in the motion camera and calculating the first motion intensity value; When the first motion intensity value is less than the acceleration change rate threshold, a first anti-shake mode is activated, and gyroscope angular velocity data is extracted; Performing cubic spline interpolation curve fitting and time domain extrapolation prediction on the gyroscope angular velocity data to obtain a three-axis angular displacement prediction value and generate a first lens compensation drive signal in a first anti-shake mode; The motion camera is continuously monitored, and when the second motion intensity value exceeds the acceleration change rate threshold, the second anti-shake mode is switched to obtain three-axis acceleration mutation data and generate a second lens compensation drive signal in the second anti-shake mode.

[0005] In combination with the first aspect, in a first implementation of the first aspect of the present invention, collecting the three-axis acceleration raw data of the IMU sensor in the motion camera and calculating the first motion intensity value includes: Collecting the three-axis acceleration raw data of the IMU sensor in the motion camera, wherein the three-axis acceleration raw data includes X-axis acceleration data, Y-axis acceleration data, and Z-axis acceleration data; Inputting the three-axis acceleration raw data into a first time window buffer and a second time window buffer respectively for parallel storage, wherein the storage duration of the first time window buffer is five times the storage duration of the second time window buffer; Performing first-order difference calculation on the three-axis acceleration raw data at each sampling point to obtain the acceleration change rate of the X axis, the acceleration change rate of the Y axis, and the acceleration change rate of the Z axis respectively; The X-axis acceleration change rate, the Y-axis acceleration change rate, and the Z-axis acceleration change rate are input into a Euclidean norm calculator for performing square and square root operations to obtain a first exercise intensity value.

[0006] In combination with the first aspect, in a second implementation of the first aspect of the present invention, when the first motion intensity value is less than the acceleration change rate threshold, initiating the first anti-shake mode and extracting gyroscope angular velocity data includes: Inputting the first motion intensity value into a value comparator, performing a subtraction operation on the value from the acceleration change rate threshold stored in the threshold register, and determining the motion mode type based on the positive or negative value of the operation result to obtain a mode discrimination signal; When the mode discrimination signal is negative, a first anti-shake mode activation condition is triggered, and a continuity monitoring mechanism is activated to track and verify the motion intensity values ​​of consecutive sampling points. When three consecutive sampling points all meet a condition that the value is less than a threshold, it is confirmed that the first anti-shake mode has been entered; Inputting the first start signal of the first anti-shake mode into the data reading controller of the first time window buffer to obtain a set of raw data of the three-axis gyroscope; The three-axis gyroscope raw data set is subjected to time series rearrangement and drift reference correction to form gyroscope angular velocity data.

[0007] In combination with the first aspect, in a third implementation of the first aspect of the present invention, performing cubic spline interpolation curve fitting and time-domain extrapolation prediction on the gyroscope angular velocity data to obtain a three-axis angular displacement prediction value and generate a first lens compensation drive signal in the first anti-shake mode includes: Dividing the gyroscope angular velocity data into sub-intervals according to a time axis to obtain a segmented angular velocity data set; Establishing a cubic polynomial constraint equation group based on the segmented angular velocity data set, and setting boundary conditions and continuity conditions to solve the polynomial coefficients to obtain a cubic polynomial coefficient combination for each subinterval; constructing an angular velocity curve based on the cubic polynomial coefficient combination, and performing extrapolation prediction on the angular velocity curve to obtain a three-axis angular velocity prediction sequence; Performing a time domain integration operation on the three-axis angular velocity prediction sequence to obtain a three-axis angular displacement prediction value; A first lens compensation driving signal in a first anti-shake mode is generated based on the three-axis angular displacement prediction value.

[0008] In combination with the first aspect, in a fourth implementation of the first aspect of the present invention, constructing an angular velocity curve based on the cubic polynomial coefficient combination, and performing extrapolation prediction on the angular velocity curve to obtain a three-axis angular velocity prediction sequence includes: The cubic polynomial coefficients are input into a spline curve constructor, and the cubic polynomial functions of each subinterval are connected into a single continuous function through a piecewise function splicing algorithm. At the same time, the smoothness of the junction points of adjacent subintervals is verified to obtain an angular velocity curve; Based on the cubic polynomial parameters of the last subinterval in the angular velocity curve, the cubic polynomial function form of the last subinterval is analytically extended in the positive direction of time to obtain an angular velocity extension function of the extrapolated time period; Discrete sampling is performed based on the angular velocity continuation function to obtain multiple sampling points, and the time coordinate of each sampling point is substituted into the angular velocity continuation function to perform function calculation to obtain a set of discrete angular velocity data points within the extrapolation time period; The angular velocity discrete data point set is subjected to three-axis separation to form a three-axis angular velocity prediction sequence.

[0009] In combination with the first aspect, in a fifth implementation of the first aspect of the present invention, generating a first lens compensation drive signal in a first anti-shake mode based on the three-axis angular displacement prediction value includes: Inputting the X-axis angular displacement prediction component and the Y-axis angular displacement prediction component of the three-axis angular displacement prediction value into a kinematic inverse solver, converting the angular domain data into spatial domain data through a coordinate transformation operation multiplied by a lens focal length parameter to obtain a two-dimensional spatial compensation vector; Calculating a feedforward control signal based on the two-dimensional spatial compensation vector to obtain a dual-axis motor drive voltage combination; Based on the dual-axis motor drive voltage combination, the X-axis motor control voltage and the Y-axis motor control voltage are respectively transmitted to the corresponding stepper motor drivers. The X-axis motor and the Y-axis motor of the lens stabilizer are driven to move synchronously through voltage-to-pulse conversion processing, thereby generating a first lens compensation drive signal in the first anti-shake mode.

[0010] In combination with the first aspect, in a sixth implementation of the first aspect of the present invention, continuously monitoring the motion camera, switching to a second anti-shake mode when the second motion intensity value exceeds the acceleration change rate threshold, acquiring three-axis acceleration mutation data, and generating a second lens compensation drive signal in the second anti-shake mode include: continuously monitoring the motion camera and obtaining a second motion intensity value, and confirming to switch to a second anti-shake mode when the second motion intensity value exceeds the acceleration change rate threshold; inputting a second start signal of the second anti-shake mode into a fast reading controller of a second time window buffer to extract a triaxial acceleration data set; Performing mutation detection on the triaxial acceleration data set to obtain triaxial acceleration mutation data; Inputting the triaxial acceleration mutation data into a second-order difference calculator to perform acceleration change rate calculation to form impact characteristic parameters; A second lens compensation driving signal in a second anti-shake mode is generated based on the impact characteristic parameter and the mechanical response delay time.

[0011] In combination with the first aspect, in a seventh implementation of the first aspect of the present invention, inputting the triaxial acceleration mutation data into a second-order difference calculator to perform acceleration change rate calculation to form the impact characteristic parameter includes: Inputting the three-axis acceleration mutation data into the X-axis differential operation unit, the Y-axis differential operation unit, and the Z-axis differential operation unit for time sequence marking, respectively, to obtain the X-axis acceleration mutation sequence, the Y-axis acceleration mutation sequence, and the Z-axis acceleration mutation sequence; Performing first-order difference operations on the X-axis acceleration mutation sequence, the Y-axis acceleration mutation sequence, and the Z-axis acceleration mutation sequence to obtain an X-axis acceleration change rate sequence, a Y-axis acceleration change rate sequence, and a Z-axis acceleration change rate sequence; Inputting the X-axis acceleration rate change sequence, the Y-axis acceleration rate change sequence, and the Z-axis acceleration rate change sequence into corresponding second-order difference operation modules for processing, respectively, to generate X-axis second-order difference results, Y-axis second-order difference results, and Z-axis second-order difference results; Peak value extraction and amplitude calculation are performed on the X-axis second-order difference result, the Y-axis second-order difference result, and the Z-axis second-order difference result to obtain impact characteristic parameters.

[0012] In combination with the first aspect, in an eighth implementation of the first aspect of the present invention, generating the second lens compensation drive signal in the second anti-shake mode based on the impact characteristic parameter and the mechanical response delay time includes: Performing adaptive bandpass filtering on the X-axis impact intensity value, the Y-axis impact intensity value, and the Z-axis impact intensity value in the impact characteristic parameters to obtain a three-axis filtered impact signal; Calculating the impact direction vector based on the three-axis filtered impact signal to obtain three-dimensional impact vector information; Performing time advance correction on the impact compensation signal according to the three-dimensional impact vector information and the mechanical response delay time to obtain a time-corrected impact compensation vector; Based on the time-corrected impact compensation vector, the impact compensation vector components of the X-axis and the Y-axis are taken as the values ​​of the reverse compensation force and converted into corresponding motor control instructions, and the reverse compensation force is directly output to the lens stabilizer to generate a second lens compensation drive signal in the second anti-shake mode.

[0013] In a second aspect, the present invention provides a motion camera anti-shake system based on inertial prediction, the motion camera anti-shake system based on inertial prediction comprising: An acquisition module is used to acquire the original data of the three-axis acceleration of the IMU sensor in the motion camera and calculate the first motion intensity value; an extraction module, configured to activate a first anti-shake mode when the first motion intensity value is less than an acceleration change rate threshold, and extract gyroscope angular velocity data; a prediction module, configured to perform cubic spline interpolation curve fitting and time domain extrapolation prediction on the gyroscope angular velocity data to obtain a three-axis angular displacement prediction value and generate a first lens compensation drive signal in a first anti-shake mode; The switching module is used to continuously monitor the motion camera, switch to the second anti-shake mode when the second motion intensity value exceeds the acceleration change rate threshold, obtain three-axis acceleration mutation data and generate a second lens compensation drive signal in the second anti-shake mode.

[0014] The technical solution provided by the present invention utilizes an intelligent dual-mode switching mechanism, employing cubic spline interpolation prediction and second-order difference impact detection algorithms for smooth motion and sudden impact, respectively. This significantly improves adaptability and compensation accuracy in complex motion environments compared to traditional single-mode anti-shake methods. The dual-time-scale processor's five-fold storage duration ratio design, combined with an adaptive threshold adjustment algorithm, enables precise motion mode identification and stable switching, avoiding the limitations of fixed-parameter methods. The piecewise polynomial fitting of cubic spline interpolation accurately captures the nonlinear characteristics of motion trajectories, while continuous second-order difference operations sensitively identify sudden impact signals. The two work together to ensure optimal processing strategies under different motion states. The mechanical response delay compensator significantly reduces compensation delay compared to traditional passive response modes through eight-millisecond advance output correction and exponential decay modulation, combined with a PID feedforward control strategy. This enables active predictive anti-shake, significantly improving overall anti-shake performance and real-time response capabilities. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. 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 creative work.

[0016] Figure 1 A schematic diagram of a flow chart of a motion camera anti-shake method based on inertial prediction provided in an embodiment of the present application; Figure 2 This is a schematic block diagram of the structure of a motion camera anti-shake system based on inertial prediction provided in an embodiment of the present application. DETAILED DESCRIPTION

[0017] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0018] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, combined, or partially merged, so the actual execution order may change based on actual circumstances.

[0019] It should also be understood that the terms used in this specification are for the purpose of describing specific embodiments only and are not intended to limit the present application. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms unless the context clearly indicates otherwise.

[0020] It should be further understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0021] The following describes some embodiments of the present application in detail with reference to the accompanying drawings. In the absence of conflict, the following embodiments and features in the embodiments may be combined with each other.

[0022] See also Figure 1 , Figure 1 A flowchart of a motion camera anti-shake method based on inertial prediction provided in an embodiment of the present application is shown in FIG. Figure 1As shown, the motion camera anti-shake method based on inertial prediction provided by the embodiment of the present application includes steps S100 to S600.

[0023] Step S100: collecting the original data of the three-axis acceleration of the IMU sensor in the motion camera and calculating the first motion intensity value; It is understandable that the execution subject of the present invention may be a motion camera anti-shake system based on inertial prediction, or a terminal or a server, which is not limited here. The embodiment of the present invention is described by taking a server as the execution subject as an example.

[0024] Specifically, the motion camera uses an IMU sensor to continuously sample acceleration in three spatial directions at a high frequency of 1000 Hz to capture subtle changes during high-speed motion. The raw acceleration data collected includes X-axis acceleration data, Y-axis acceleration data, and Z-axis acceleration data, representing the instantaneous acceleration information of the camera in the horizontal, vertical, and axial directions, respectively. After data acquisition, a parallel caching strategy is implemented, simultaneously feeding the three-axis acceleration raw data into two time window buffers. The first time window buffer is used for long-term data buffering, with a storage duration of 100ms and accommodating 100 sampling points, for trend analysis and prediction of gentle motion. The second time window buffer is a short-term buffer with a storage duration of 20ms corresponding to 20 sampling points, used for sudden impulse response and rapid jitter feature extraction. To extract the changing trend of motion state and determine the current motion intensity, the acceleration data in these buffers are subjected to first-order difference calculations on a sample-by-sample basis. For each time series data point, the difference between two adjacent acceleration samples in the X, Y, and Z axes is calculated and divided by the sampling interval to obtain the acceleration rate at the current moment. The three resulting rates are the X-axis acceleration rate, the Y-axis acceleration rate, and the Z-axis acceleration rate, respectively, reflecting the instantaneous rate of change of the camera's acceleration in each of these three directions over time. The X-axis acceleration rate, the Y-axis acceleration rate, and the Z-axis acceleration rate are input into the Euclidean norm calculator, which quantifies the overall intensity of the acceleration rate. The calculation involves squared and summing the acceleration rates in each of the three directions, and taking the square root of the sum to obtain a scalar value, the first motion intensity value. This value is considered the modulus of the acceleration rate vector in three-dimensional space at the current moment and represents the intensity of the current dynamic change of the motion camera.

[0025] Step S200: when the first motion intensity value is less than the acceleration change rate threshold, the first anti-shake mode is activated, and gyroscope angular velocity data is extracted; Specifically, the first motion intensity value is input into the numerical comparator module, while the preset acceleration rate threshold stored in the threshold register is used as a reference. The threshold is set to 3.2 g / s to define the boundary between smooth and impact motion. The comparator performs a moment-by-moment subtraction operation on the motion intensity value and the threshold. Based on the positive or negative sign of the subtraction result, it outputs a mode discrimination signal. When the calculated result is less than zero, meaning the motion intensity is below the threshold, indicating that the current state is closer to smooth motion, the discrimination signal becomes negative, triggering the activation condition for the first anti-shake mode. To prevent misjudgments caused by instantaneous data fluctuations, the system activates a continuity monitoring mechanism upon receiving this negative mode discrimination signal, continuously tracking and verifying the motion intensity values ​​at subsequent sampling points. The set continuity verification condition requires that the motion intensity values ​​at three consecutive sampling points from the current moment are all less than the acceleration rate threshold. Only when this condition is met is the determination result confirmed to be stable and continuous, and a activation signal for the first anti-shake mode is generated. After the first anti-shake mode is officially triggered, the activation signal is sent to the data read controller of the first time window buffer. This buffer stores previously collected long-term three-axis gyroscope raw data, including angular velocity measurements in the X, Y, and Z directions, with a sampling duration of 100ms. The data read controller executes a read operation based on a start signal and extracts the three-axis gyroscope raw data set. This data set is then time-sequenced and drift-referenced. Time-sequence reordering aims to synchronize and sort the sampling timestamps, eliminating out-of-order or abnormal interval data that occurs during the sampling process and ensuring the temporal consistency of the angular velocity data. To eliminate the effects of bias error and integral drift generated by the gyroscope sensor in static or low-dynamic states, a drift reference calculation is performed on the angular velocity data in each direction. The average offset within this time window is estimated and uniformly subtracted to form the corrected gyroscope angular velocity data.

[0026] Step S300: performing cubic spline interpolation curve fitting and time domain extrapolation prediction on the gyroscope angular velocity data to obtain three-axis angular displacement prediction values ​​and generate a first lens compensation drive signal in a first anti-shake mode; Specifically, the continuous angular velocity data is divided into several sub-intervals of equal length based on the time axis. Each sub-interval contains a fixed number of sampling points. For example, a 100ms time window is divided into 10 sub-segments of 10ms to form a set of segmented angular velocity data sets. A corresponding cubic polynomial function model is established for each segmented data set, and the angular velocity change curve in each sub-interval is described by a set of polynomial coefficients to be determined. In order to ensure the continuity and smoothness of the multi-segment spline curve on the entire time axis, polynomial boundary conditions and first-order and second-order derivative continuity conditions are introduced in the model construction process to form a complete set of cubic spline fitting constraint equations. This set of equations uniformly solves the polynomial coefficients of each sub-interval based on the global angular velocity data, forming a combination of cubic polynomial coefficients corresponding to each sub-interval, forming a three-dimensional angular velocity continuous fitting curve. Based on the fitting results, the angular velocity curve is temporally extrapolated beyond the current time range, with an extrapolation timeframe of 30ms. Three-axis angular velocity predictions are generated for the next thirty time points in 1ms increments, forming a sequence of angular velocity predictions for the X, Y, and Z axes. Due to the smoothness and piecewise continuity of spline fitting, this extrapolated angular velocity sequence maintains the trend characteristics of the original data and exhibits good scalability of boundary behavior, making it suitable for the high-precision feedforward control strategies required in short-term prediction scenarios. By performing a time-domain integration operation on the three-axis angular velocity prediction sequence, the predicted angular velocity data is converted into angular displacement increments, resulting in future angular displacement predictions for the X, Y, and Z axes. To convert the angular displacements into compensation behavior on a spatial plane, the focal length factor, set in the lens' physical parameters, is used to convert the angular displacement values ​​into displacement compensation vectors in the image coordinate system. For example, when the focal length is fixed, the lateral and longitudinal compensation components on the image plane are calculated. This compensation vector is input into the drive control module configured for the first anti-shake mode, which generates the first lens compensation drive signal using a proportional, integral, and differential control strategy. This signal drives the actuator in the form of voltage or displacement to perform compensation operations, achieving an advanced response to the impending slow vibration.

[0027] Step S400: continuously monitor the motion camera, switch to the second anti-shake mode when the second motion intensity value exceeds the acceleration change rate threshold, obtain three-axis acceleration mutation data and generate a second lens compensation drive signal in the second anti-shake mode.

[0028] Specifically, the system continuously collects triaxial acceleration data from the IMU sensor and updates a second motion intensity value in real time based on the current motion state. This value is calculated by applying the Euclidean norm to the rate of change of the triaxial acceleration. Its physical meaning is the overall magnitude of change in the acceleration vector per unit time. When this second motion intensity value exceeds a preset acceleration rate change threshold, such as 3.2 g / s, indicating that the camera's state has transitioned from steady or slow motion to an impact state with high-frequency or high-amplitude disturbances, the system immediately switches to the second anti-shake mode and generates a corresponding second activation signal. After the second anti-shake mode is triggered, the second activation signal is input into a fast read controller in a second time window buffer. This buffer is designed as a 20ms short-term storage structure, which records and retains a set of triaxial acceleration data within a very short period before and after the impact. Based on the activation signal, the fast read controller immediately dispatches the data in the buffer and extracts the complete sequence of X-axis, Y-axis, and Z-axis acceleration values ​​within the short time window. To identify characteristic impact change points, mutation detection is performed on the extracted triaxial acceleration data set. By analyzing the nonlinear temporal trends of acceleration values, locations with significant transitions are identified, generating acceleration mutation data in all three axes. This acceleration mutation data is then fed into a second-order difference calculator to calculate the acceleration rate of change in the temporal dimension, i.e., the second-order derivative of acceleration in each direction, to form impact characteristic parameters describing the impact process. These parameters reflect the impact intensity, impact direction, and its temporal structure. Simultaneously, a delay model related to the mechanical structure response is invoked, with a mechanical response delay of 8ms to compensate for the lag in the actuator or lens assembly's actual execution after receiving the compensation command. Based on the impact characteristic parameters and the response delay, compensation signal generation logic is executed, constructing a reverse compensation force based on the impact direction. The compensation signal is then output in advance according to the lag time. Furthermore, an amplitude attenuation mechanism for the compensation signal is incorporated to control the gradual reduction of the compensation behavior after the impact ends, avoiding excessive response or oscillatory rebound. The resulting second lens compensation drive signal is sent to the anti-shake actuation module in a high-frequency, low-latency form, driving the lens to perform a reverse displacement action, effectively offsetting the disturbance from external impact.

[0029] In a specific embodiment, the process of executing step S100 may specifically include the following steps: Collect the three-axis acceleration raw data of the IMU sensor in the motion camera. The three-axis acceleration raw data includes X-axis acceleration data, Y-axis acceleration data, and Z-axis acceleration data; Inputting the three-axis acceleration raw data into the first time window buffer and the second time window buffer respectively for parallel storage, wherein the storage time length of the first time window buffer is five times the storage time length of the second time window buffer; Perform first-order difference calculation on the original data of the three-axis acceleration at each sampling point to obtain the acceleration change rate of the X-axis, Y-axis and Z-axis respectively; The X-axis acceleration change rate, the Y-axis acceleration change rate, and the Z-axis acceleration change rate are input into a Euclidean norm calculator for performing square and square root operations to obtain a first exercise intensity value.

[0030] Specifically, a motion camera continuously collects three-dimensional spatial acceleration data from the accelerometer in the inertial measurement unit (IMU) at a set sampling frequency (1000Hz). These acceleration data correspond to the linear acceleration changes in the camera's X, Y, and Z axes, reflecting the camera's dynamic behavior under different postures or environmental disturbances. The collected three-axis acceleration raw data is fed into two parallel time window buffers. These two buffers correspond to two different processing modes: a first time window buffer for trend determination and spline fitting, and a second time window buffer for mutation detection and impact analysis. In this architecture, the first time window buffer is designed as a high-capacity, long-term buffer with a storage duration of 100 milliseconds. It holds 100 sampling points at a sampling frequency of 1000Hz, enabling analysis of acceleration trends over long time scales and high-precision prediction calculations. The second time window buffer is designed as a short-term, fast-response structure with a storage duration of 20 milliseconds and accommodating 20 sampling points. It is used to monitor the occurrence of sudden acceleration disturbances or severe impact events. A first-order difference calculation is performed on the three-axis acceleration data in these two buffers, sampling point by sampling point. The acceleration values ​​of two adjacent sampling points in each direction are subtracted and divided by the sampling interval to obtain the acceleration rate of change corresponding to that point in time. This process is performed independently on the X-axis, Y-axis, and Z-axis acceleration data, generating the instantaneous acceleration derivatives of the X-axis acceleration rate of change, the Y-axis acceleration rate of change, and the Z-axis acceleration rate of change, reflecting the trend and magnitude of acceleration change over time. These three acceleration rates of change are simultaneously input into the Euclidean norm calculation module, which synthesizes the rate of change values ​​in the three directions and converts them into a scalar output, which serves as a unified measure of exercise intensity. The calculation process squares the acceleration rate of change in each direction, sums the three squared values, and finally takes the square root of the sum. The resulting value is the first motion intensity value. Physically, this value represents the composite intensity of the rate of change of the camera's acceleration vector in three-dimensional space per unit time.

[0031] In a specific embodiment, the process of executing step S200 may specifically include the following steps: Input the first motion intensity value into the value comparator, perform subtraction operation on the acceleration change rate threshold value stored in the threshold register, and determine the motion mode type according to the positive or negative value of the operation result to obtain a mode discrimination signal; When the mode discrimination signal is negative, the first anti-shake mode start condition is triggered. At the same time, the continuity monitoring mechanism is activated to track and verify the motion intensity values ​​of consecutive sampling points. When three consecutive sampling points all meet the condition of being less than the threshold, it is confirmed that the first anti-shake mode has been entered; Inputting a first start signal of the first anti-shake mode into a data reading controller of the first time window buffer to obtain a set of raw data of the three-axis gyroscope; The three-axis gyroscope raw data set is time-series rearranged and drift reference corrected to form gyroscope angular velocity data.

[0032] Specifically, the first motion intensity value is input into a numerical comparator. This module internally presets a programmable acceleration rate threshold, which is stored in a separate threshold register to ensure stability and repeatability. The numerical comparator subtracts the input first motion intensity value from the threshold, generating a difference. The positive or negative value of this difference is used to determine the current camera motion mode. If the calculated result is positive, meaning the motion intensity exceeds the threshold, the system determines a non-stationary state and enters shock monitoring preparation. If the calculated result is negative, meaning the motion intensity is below the threshold, the system preliminarily determines a smooth motion state and outputs a corresponding negative mode discrimination signal. To prevent erroneous system switching caused by transient interference or noise errors, the anti-shake system does not immediately enter the first anti-shake mode upon the first negative discrimination signal. Instead, it simultaneously activates a continuous monitoring mechanism to track and verify motion intensity values ​​at multiple consecutive sampling points in the subsequent time series. This mechanism requires that the first motion intensity values ​​obtained within three consecutive sampling periods meet the discrimination condition of being less than the threshold before confirming that the current state is stable and smooth in time. Based on this, the activation condition signal for the first anti-shake mode is officially issued. The first activation signal for the first anti-shake mode is input to the data read controller of the first time window buffer. The controller retrieves the three-axis gyroscope raw data set corresponding to the current moment from the buffer. This buffer stores gyroscope angular velocity data within 100 milliseconds, divided into independent channels for the X, Y, and Z axes. The sampling frequency is also 1000 Hz, resulting in 100 high-precision raw angular velocity data points for each channel. After receiving the first activation signal, the read controller extracts the data stored in the buffer in a structured manner in chronological order and outputs a three-axis angular velocity raw sequence. A time series reordering operation is performed on the extracted raw data set, which sorts and verifies the data timestamps to ensure that all sampling points are in chronological order and eliminate any order distortion caused by buffer scheduling delays. A gyroscope drift baseline correction mechanism is implemented, calculating the average angular velocity data for each direction within the entire 100 millisecond time window as a static drift reference for that period. This average is then deducted from the raw data for the corresponding direction as a correction offset. The three-axis angular velocity data after this drift correction has higher time consistency and signal stability, which can effectively eliminate the systematic offset of the prediction model caused by static errors, and ultimately form the corrected gyroscope angular velocity data.

[0033] In a specific embodiment, the process of executing step S300 may specifically include the following steps: The gyroscope angular velocity data is divided into sub-intervals according to the time axis to obtain a segmented angular velocity data set; A cubic polynomial constraint equation system is established based on the segmented angular velocity data set, and boundary conditions and continuity conditions are set to solve the polynomial coefficients to obtain the cubic polynomial coefficient combination for each subinterval; The angular velocity curve is constructed based on the combination of cubic polynomial coefficients, and the angular velocity curve is extrapolated and predicted to obtain a three-axis angular velocity prediction sequence; Perform time domain integration operation on the three-axis angular velocity prediction sequence to obtain the three-axis angular displacement prediction value; A first lens compensation driving signal in a first anti-shake mode is generated based on the three-axis angular displacement prediction value.

[0034] Specifically, the gyroscope angular velocity data is sub-intervaled along the time axis. The angular velocity data acquisition window length is 100 milliseconds, and the sampling frequency is 1000 Hz, resulting in a total of 100 sampling points. The system divides these 100 time series data points into 10 sub-intervals, each containing 10 sampling points, to ensure uniform temporal division. A local model is then built for fitting each data segment. The data within each sub-interval is treated as an independent dataset, and a corresponding set of cubic polynomial constraint equations is established based on these segmented angular velocity data sets. The angular velocity trend within each sub-interval is fitted using a cubic polynomial function, and the fitting coefficients are obtained by solving the system of equations. The system incorporates boundary conditions and continuity constraints as basic control mechanisms when constructing the system of equations. Boundary conditions restrict the known derivative information of the overall curve at the starting and ending points, while continuity constraints ensure continuity of function values, derivative values, and second-order derivative values ​​at the connection points between adjacent sub-intervals. These conditions concatenate all subintervals in the time series into a continuous, differentiable, and smooth piecewise function system, improving the accuracy of fitting the angular velocity evolution. By simultaneously solving these equations, the system obtains a cubic polynomial coefficient combination corresponding to each subinterval. These coefficient combinations together form a three-dimensional angular velocity fitting model, corresponding to the angular velocity variations along the X, Y, and Z axes. Based on these cubic polynomial coefficient combinations, the system constructs an angular velocity curve that represents the temporal evolution of angular velocity in a piecewise continuous manner throughout the 100-millisecond sampling interval. This fitted curve is then extrapolated into the future to predict angular velocity trends in the short term. The system sets the prediction period to 30 milliseconds and the prediction step size to 1 millisecond. This generates angular velocity predictions for 30 time points in each of the X, Y, and Z directions, forming a three-axis angular velocity prediction sequence. Because the prediction is based on a continuous and smooth spline fitting function, the extrapolated results are highly stable and accurate over short timeframes, reflecting the future behavior of inertial-driven camera motion. A time-domain integration operation is performed on the three-axis angular velocity prediction sequence, converting the predicted angular velocity changes into predicted angular displacements. This integration process is performed numerically with a time step of 1 millisecond, achieving an area accumulation operation under the angular velocity change curves in the X, Y, and Z directions, thereby obtaining angular displacement predictions in each of the three directions. These angular displacement predictions reflect the total angular deviation of the camera in each direction over the next 30 milliseconds and provide a dynamic estimate of the future attitude change trend. To apply these angular displacement predictions to lens attitude compensation control, the three-axis angular displacement predictions are converted into compensation amounts on the spatial image plane.Considering the fixed proportional relationship between the lens imaging process and angular displacement in action cameras, the system spatially maps the predicted angular displacement according to the preset focal length parameter, deriving the corresponding displacement compensation vector in the image coordinate system. This includes lateral compensation in the X direction and longitudinal compensation in the Y direction. After generating the target compensation, this compensation vector is input into the feedforward control module, which modulates the displacement error using a proportional, integral, and differential control strategy to ultimately generate a lens compensation drive signal for the first anti-shake mode. This drive signal, in analog or digital form, acts on the camera's internal attitude control actuators, such as the gimbal driver or electromagnetic coil, to achieve active adjustment of the lens attitude.

[0035] In a specific embodiment, the step of constructing an angular velocity curve based on a combination of cubic polynomial coefficients and performing extrapolation prediction on the angular velocity curve to obtain a three-axis angular velocity prediction sequence may specifically include the following steps: The cubic polynomial coefficients are combined and input into the spline curve constructor. The cubic polynomial functions of each sub-interval are connected into a single continuous function through the piecewise function splicing algorithm. At the same time, the smoothness of the junction points of adjacent sub-intervals is verified to obtain the angular velocity curve. Based on the cubic polynomial parameters of the last subinterval in the angular velocity curve, the cubic polynomial function form of the last subinterval is analytically extended in the positive direction of time to obtain the angular velocity extension function of the extrapolated time period; Discrete sampling is performed based on the angular velocity extension function to obtain multiple sampling points, and the time coordinate of each sampling point is substituted into the angular velocity extension function to perform function calculation to obtain a set of discrete angular velocity data points within the extrapolated time period; The set of discrete angular velocity data points is separated into three axes to form a three-axis angular velocity prediction sequence.

[0036] Specifically, the cubic polynomial coefficients are combined and fed into a spline curve constructor, a core component of the data fitting processing module. This constructor, which serves as the core component of the data fitting processing module, combines the local polynomial functions within each subinterval into a single target function that is continuous over the global time range through segment-by-segment splicing. During implementation, the system defines the corresponding cubic polynomial function within the corresponding time interval based on the start and end times of each subinterval, forming a set of interval-defined functions. These functions are then arranged sequentially on the time axis using a segment-by-segment function splicing algorithm. During the splicing process, the system verifies the smoothness of the junction points between each set of adjacent subintervals. Specifically, the system performs continuity checks on the function values, first-order derivatives, and second-order derivatives at the junction points to ensure that the entire angular velocity curve does not exhibit sudden function changes or derivative discontinuities at the junction points of the subintervals. This smoothness verification is performed by determining whether the boundary values ​​of the left and right subintervals at the splicing point are equal. If discontinuities or large deviations are found, the system corrects the fitting results by fine-tuning the parameters of the adjacent polynomials or re-iteratively solving the corresponding system of equations. In this way, a continuous angular velocity curve with good definition and smoothness condition is obtained over the entire input time period, which belongs to C in mathematical sense. 2A continuous curve possesses continuity in function values, first-order derivatives, and second-order derivatives. Based on the cubic polynomial parameters of the last subinterval in the angular velocity curve, which is closest to the current moment, the cubic polynomial parameters it contains best reflect the current angular velocity trend. The cubic polynomial function corresponding to the last subinterval is used as the fitting expression for the current angular velocity state, and analytical extension is performed on this basis in the positive time direction. Analytical extension refers to the structure and parameters of the current polynomial function. Instead of terminating within its original defined interval, the function formula is extended further back on the time axis, forming an extended function defined for a future time period. This extended function is used to extrapolate the angular velocity trend over a short future timeframe. Its mathematical expression remains consistent with the function in the last interval, with only its time domain shifted and extended backward. To convert this extended angular velocity function into discrete data suitable for prediction calculations, it is discretized and sampled based on a set time step. The sampling time range is set to 30 milliseconds, and the sampling interval is set to 1 millisecond, generating 30 equally spaced time sampling points. Starting from the start time of the extension interval, the system generates a series of time coordinate points in the positive direction of time. Each time point is substituted into the angular velocity extension function as a function input. The system then calls this function to calculate and obtain the corresponding angular velocity prediction value for each time point. This process is performed separately for the X, Y, and Z axes to ensure the integrity and independence of the three-dimensional angular velocity information. Each function call returns a three-dimensional vector, representing the angular velocity components in each of the three directions at that moment. After the function call is completed for 30 time points, the system organizes all calculation results into a time series, forming a set of 30 discrete angular velocity data points. This data set is then subjected to three-axis separation processing, extracting and organizing the X, Y, and Z axis components of each three-dimensional data point into independent time series. This constructs three independent angular velocity prediction signal traces: the X-axis angular velocity prediction series, the Y-axis angular velocity prediction series, and the Z-axis angular velocity prediction series. Each series represents the predicted trend of angular velocity in that direction over the next 30 milliseconds, demonstrating strong temporal coherence and physical interpretability.

[0037] In a specific embodiment, the process of generating the first lens compensation driving signal in the first anti-shake mode based on the three-axis angular displacement prediction value may specifically include the following steps: The X-axis angular displacement prediction component and the Y-axis angular displacement prediction component of the three-axis angular displacement prediction value are input into the kinematic inverse solver, and the angle domain data is converted into spatial domain data through a coordinate transformation operation multiplied by the lens focal length parameter to obtain a two-dimensional spatial compensation vector; The feedforward control signal is calculated based on the two-dimensional spatial compensation vector to obtain the dual-axis motor drive voltage combination; Based on the dual-axis motor drive voltage combination, the X-axis motor control voltage and the Y-axis motor control voltage are respectively transmitted to the corresponding stepper motor drivers. Through voltage-to-pulse conversion processing, the X-axis motor and Y-axis motor of the lens stabilizer are driven to move synchronously, generating a first lens compensation drive signal in the first anti-shake mode.

[0038] Specifically, the X-axis and Y-axis angular displacement components are input into an inverse kinematic solver, which establishes an analytical relationship model between the angular and spatial domains. Given the known focal length parameters of the motion camera lens structure, there is a definite proportional relationship between the angular change and the image point position offset on the imaging plane. The system multiplies the predicted angular displacement components by the focal length to complete a linear mapping from the angular domain to the two-dimensional image coordinate domain. The predicted X-axis angular displacement component is converted into a vertical spatial displacement on the image plane by multiplying it with the lens focal length, while the predicted Y-axis angular displacement component is converted into a horizontal spatial displacement. These two components are combined to form a two-dimensional spatial compensation vector, which physically represents the target displacement direction and compensation magnitude required by the camera lens based on the predicted future motion trend. This two-dimensional spatial compensation vector is then input into the feedforward control signal calculation module, which uses a proportional-integral-differential algorithm framework based on the characteristics of the control system's drive structure to perform real-time calculations of the control voltage output. Because the system operates in feedforward mode, compensation actions do not rely on current error feedback. Instead, target control commands are constructed directly based on predicted values. Therefore, the calculation process focuses more on speed response and filter stability. In this feedforward control structure, the system uses each directional component of the compensation vector as the target displacement input. Its current value, cumulative value, and rate of change are weighted and summed according to preset proportional gain, integral gain, and differential gain parameters. This results in a set of voltage outputs encompassing the X- and Y-axis control directions, known as the dual-axis motor drive voltage combination. This control signal, expressed in voltage form, represents the required electrical drive strength of the compensation mechanism in two orthogonal directions. It offers high real-time performance and minimal response lag, making it suitable for predictive stabilizer control scenarios. The dual-axis motor drive voltage combination is transmitted via a hardware control interface to the corresponding X- and Y-axis stepper motor drivers, respectively. These drivers, as key components of the electrical-mechanical interface, convert the received analog voltage or PWM modulated signals into standardized motor control pulse trains. This conversion process is performed according to the voltage-to-step pulse conversion function internally defined by the driver, enabling high-resolution position control and speed regulation. When the X-axis control voltage is transmitted to the X-axis driver, a corresponding pulse sequence is generated and input to the X-axis stepper motor driver at a set frequency, achieving vertical displacement of the lens structure. Similarly, the Y-axis control voltage is converted into horizontal motor drive pulses, thereby synchronously completing Y-axis displacement compensation. As the X-axis and Y-axis motors enter a synchronized operating state after receiving the control pulse signals, the lens stabilizer moves synchronously in the two-dimensional plane in the opposite direction of the predicted compensation vector, effectively offsetting image shift caused by inertial posture changes and achieving image stabilization. The joint drive action performed by the X-axis and Y-axis motors at this moment is defined as the first lens compensation drive signal in the first stabilization mode.

[0039] In a specific embodiment, the process of executing step S400 may specifically include the following steps: Continuously monitoring the motion camera and obtaining a second motion intensity value, and confirming to switch to the second anti-shake mode when the second motion intensity value exceeds an acceleration change rate threshold; Inputting a second start signal of the second anti-shake mode into a fast reading controller of the second time window buffer to extract a triaxial acceleration data set; Perform mutation detection on the triaxial acceleration data set to obtain triaxial acceleration mutation data; Input the triaxial acceleration mutation data into the second-order difference calculator to calculate the acceleration change rate to form the impact characteristic parameters; A second lens compensation driving signal in the second anti-shake mode is generated based on the impact characteristic parameter and the mechanical response delay time.

[0040] Specifically, the system continuously collects raw triaxial acceleration data from the IMU sensor and, based on the aforementioned Euclidean norm calculation logic, calculates a second motion intensity value corresponding to the current time point in real time. This value, a scalar signal reflecting the rate of change of spatial acceleration over a short period of time, effectively reveals the presence of large-amplitude, short-period external disturbances. When the system determines that the current second motion intensity value exceeds a preset acceleration rate threshold, it deems the camera to be in a nonlinear impact state. The smooth trend prediction mechanism originally applied in the first anti-shake mode will not be able to address such disturbances. Therefore, the system immediately issues a mode switch command, entering the high-response, high-speed compensation logic path and generating a corresponding second anti-shake mode activation signal. This second activation signal is input to the fast read controller of the second time window buffer. This buffer is a high-speed cache module designed for short-duration, sudden impact events. Its time span is 20 milliseconds and its sampling frequency is maintained at 1000 Hz. Therefore, it stores triaxial acceleration data for the most recent 20 sampling points. Upon receiving the activation signal, the fast read controller retrieves the buffer contents in a non-blocking manner and outputs a complete set of acceleration data, including the X, Y, and Z axes. The system performs mutation detection on the extracted triaxial acceleration data set to identify rapid, discontinuous changes in acceleration values ​​within a very short period of time. The system calculates the first-order derivatives of the acceleration curve between adjacent sampling points and uses thresholds to determine the magnitude and speed of the change, thereby screening out mutation points. Mutation detection not only records the magnitude of the acceleration mutation but also marks the time and direction of the mutation. This generates triaxial acceleration mutation data, where the mutation amplitudes in the X, Y, and Z directions correspond to the severity of the force or disturbance applied to the camera in the corresponding spatial dimension. This triaxial acceleration mutation data is input into a second-order difference calculator to perform a derivative calculation of the acceleration rate of change. This calculation process performs a second-order difference between the first-order derivatives at adjacent time points to obtain the second-order derivative of acceleration, or jerk data. This physically represents the rate of acceleration change, which is defined by the system as shock intensity. By extracting the maximum second-order difference amplitude in each of the three axes, the system obtains shock signature indicators for the X, Y, and Z axes. Combined with the calculation of the three-dimensional modulus, this generates a unified set of shock signature parameters. The impact characteristic parameters are coupled with the structural response model. The system pre-sets a response delay model adapted to the lens stabilization mechanism. A typical delay time, such as 8 milliseconds, reflects the average time it takes for the actuator to generate physical displacement after receiving a signal. Based on this delay time parameter, the system pre-times the compensation signal. That is, at the current time t, when the impact event is detected, the signal is scheduled to be released at t-8 milliseconds. This ensures that the compensation action reaches its maximum amplitude at the end of the mechanical response delay.To enhance signal response flexibility, the system incorporates an exponential decay function into the compensation drive signal construction. This ensures that the compensation response decays smoothly after the impact event, avoiding oscillation or secondary jitter caused by overcompensation. The impact compensation signal, which includes a directional component, intensity amplitude, advance trigger timing, and decay characteristics, is constructed as the second lens compensation drive signal in the second stabilization mode and transmitted as a digital voltage to the motor drive channels for the X and Y axes, respectively.

[0041] In a specific embodiment, the step of inputting the triaxial acceleration mutation data into a second-order difference calculator to perform acceleration change rate calculation to form the impact characteristic parameters may specifically include the following steps: The three-axis acceleration mutation data are respectively input into the X-axis differential operation unit, the Y-axis differential operation unit and the Z-axis differential operation unit for time sequence marking to obtain the X-axis acceleration mutation sequence, the Y-axis acceleration mutation sequence and the Z-axis acceleration mutation sequence; Based on the X-axis acceleration mutation sequence, the Y-axis acceleration mutation sequence and the Z-axis acceleration mutation sequence, the first-order difference operation is performed respectively to obtain the X-axis acceleration change rate sequence, the Y-axis acceleration change rate sequence and the Z-axis acceleration change rate sequence; Input the X-axis acceleration rate change sequence, the Y-axis acceleration rate change sequence, and the Z-axis acceleration rate change sequence into corresponding second-order difference operation modules for processing, thereby generating X-axis second-order difference results, Y-axis second-order difference results, and Z-axis second-order difference results; Peak value extraction and amplitude calculation are performed on the second-order difference results of the X axis, the Y axis and the Z axis to obtain the impact characteristic parameters.

[0042] Specifically, the three-axis acceleration mutation data is input into the X-axis, Y-axis, and Z-axis differential operation units, respectively, for time-stamping. The differential operation units record the input data point by point based on the sampling time and add time-stamps, forming the X-axis acceleration mutation sequence, the Y-axis acceleration mutation sequence, and the Z-axis acceleration mutation sequence. These sequences are structured as ordered time arrays, where each element consists of a mutation value and a corresponding timestamp. A first-order difference operation is performed on each of these three mutation sequences to calculate the rate of change of the mutation value between adjacent time nodes, thereby extracting the development trend and rate of change of acceleration mutations over a short period of time. This first-order difference operation calculates the difference between the nth mutation value and the n+1th mutation value in each sequence, dividing the difference by the sampling interval between the two values ​​to generate new acceleration rate of change data. This process yields the X-axis acceleration rate of change sequence, the Y-axis acceleration rate of change sequence, and the Z-axis acceleration rate of change sequence, respectively. Each data point in these sequences reflects the direction and magnitude of acceleration changes in the time dimension. Based on the three first-order rate-of-change sequences, second-order difference processing is performed to obtain the time-dependent trend of the acceleration rate, i.e., the estimated jerk, enhancing the time sensitivity and dynamic response of the shock signature. Specifically, the system inputs the X-axis acceleration rate sequence into the X-axis second-order difference calculation module, where it performs a first-order rate-of-change calculation between the current and previous data points. The X-axis second-order difference results are then constructed. Similarly, the Y-axis and Z-axis acceleration rate sequences are input into their respective second-order difference modules, where they are constructed into the Y-axis and Z-axis second-order difference results. These three sets of second-order difference data reflect the rate of change of the acceleration intensity per unit time in each spatial direction. They are the most time-sensitive core indicators in shock identification, reflecting the "steepness" of the disturbance signal, i.e., the rapidity of the shock's rising and falling edges. Peak value extraction and amplitude calculation are performed on the X-axis, Y-axis, and Z-axis second-order difference results. The goal of peak extraction is to find the location with the largest value from the second-order difference sequence in each direction, that is, to identify the point of maximum sudden acceleration in that direction. The system completes this process by traversing each item in the sequence and performing a maximum value operation. The amplitude calculation normalizes or squares the maximum value to obtain a dimensionless impact amplitude parameter that reflects the intensity level of the current impact event in each direction. The system then uses the maximum second-order difference value on the X-axis, Y-axis, and Z-axis as the directional peak value, and combines the three-axis amplitude results to perform a modulus calculation to obtain the total impact intensity index in three-dimensional space, forming an impact characteristic parameter group.

[0043] In a specific embodiment, the process of generating the second lens compensation driving signal in the second anti-shake mode based on the impact characteristic parameter and the mechanical response delay time may specifically include the following steps: Adaptively bandpass filtering the X-axis impact intensity value, the Y-axis impact intensity value, and the Z-axis impact intensity value in the impact characteristic parameters to obtain a three-axis filtered impact signal; The impact direction vector is calculated based on the three-axis filtered impact signal to obtain three-dimensional impact vector information; Performing time advance correction on the impact compensation signal according to the three-dimensional impact vector information and the mechanical response delay time to obtain a time-corrected impact compensation vector; Based on the time-corrected impact compensation vector, the impact compensation vector components of the X-axis and Y-axis are taken as the numerical values ​​of the reverse compensation force and converted into corresponding motor control instructions. The reverse compensation force is directly output to the lens stabilizer to generate the second lens compensation drive signal in the second anti-shake mode.

[0044] Specifically, the X-axis impact intensity value, the Y-axis impact intensity value, and the Z-axis impact intensity value in the impact characteristic parameters are adaptively band-pass filtered. The center frequency of the band-pass filter is automatically adjusted according to the modulus size of the current impact event. The center frequency is set to a basic frequency of 10 Hz, and is dynamically increased by multiplying the impact modulus value by a proportional factor. For example, when the impact intensity is large, the center frequency is increased to 20 Hz or higher to adapt to the main frequency distribution of the strong disturbance signal, while keeping the passband width within a controllable range. The filter passband is set to plus or minus 5 Hz of the center frequency, thereby ensuring the retention of the impact frequency area, while effectively suppressing high-frequency electromagnetic interference or low-frequency drift errors in other irrelevant frequency bands. After the impact intensity values ​​of the X-axis, Y-axis, and Z-axis are processed separately by the adaptive band-pass filter, three-axis filtered impact signals are obtained respectively. The impact direction vector is calculated based on the three-axis filtered impact signal. Since the three-axis filtered impact signal can be viewed as components in three directions in three-dimensional space, the system constructs an impact direction vector in Euclidean space based on these three components, generating three-dimensional impact vector information. This vector contains the directionality and magnitude of the impact force, enabling the determination of the primary impact direction and its resultant force path. During processing, the system uses the filtered signal in each direction as a component of this direction vector and combines them into a complete three-dimensional vector structure. This vector is input into the compensation control module to guide the reaction path of lens compensation. Because physical mechanical structures cannot fully respond instantaneously after receiving the control signal, the system applies time compensation to the impact vector to account for the time delay of the structural response. The lens stabilizer has a response delay of 8 milliseconds, and the system uses this delay to advance the impact compensation signal so that the control force is applied before the actual impact event occurs, enabling synchronous hedging at the peak impact effect. The time correction method is based on an exponentially delayed response model. By shifting the impact signal forward and modulating it with a delay function, the time-corrected impact compensation vector is generated. This time-corrected impact compensation vector is then processed separately along the three axes. Because stabilization applies a force in the direction of impact to counteract inertia, the system uses negative values ​​for the X- and Y-axis compensation vector components as the basis for the actual counter-compensation force. This negative value represents a control force in the opposite direction of impact, counteracting the mechanical motion caused by the inertial guidance system. The system inputs the counter-compensation force values ​​in these two directions into the motor control command generation module, where a proportional function or table lookup function converts these values ​​into standardized stepper motor control voltages or voltage amplitude pulses, creating a control signal format tailored to the current motor response characteristics. These control commands are transmitted via dedicated drive channels to the X- and Y-axis motor actuators in the lens stabilizer, ensuring that the stabilizer receives counter-compensation signals synchronously in both main directions.In the motor drive module, the voltage signal or pulse sequence is directly converted into an electromagnetic force response, generating a directional torque in the motor windings, thereby driving the lens mount to achieve active translation or attitude correction in the direction of the impact. Because the system takes into account delay correction and advance response, the compensation signal is at its peak at the moment of impact, minimizing the inertial effects of the impact and ensuring that the lens returns to a relatively balanced position in a very short time. This compensation signal, when actually executed by the lens stabilizer, constitutes the second lens compensation drive signal in the second anti-shake mode.

[0045] See also Figure 2 , Figure 2 This is a schematic block diagram of the structure of the motion camera anti-shake system 200 based on inertial prediction provided in an embodiment of the present application, as shown in FIG. Figure 2 As shown, the motion camera anti-shake system 200 based on inertial prediction includes: The acquisition module 210 is used to acquire the three-axis acceleration raw data of the IMU sensor in the motion camera and calculate the first motion intensity value; an extraction module 220 for activating a first anti-shake mode and extracting gyroscope angular velocity data when the first motion intensity value is less than an acceleration change rate threshold; Prediction module 230, configured to perform cubic spline interpolation curve fitting and time domain extrapolation prediction on the gyroscope angular velocity data to obtain a three-axis angular displacement prediction value and generate a first lens compensation drive signal in a first anti-shake mode; The switching module 240 is used to continuously monitor the motion camera and switch to the second anti-shake mode when the second motion intensity value exceeds the acceleration change rate threshold, obtain the three-axis acceleration mutation data and generate a second lens compensation drive signal in the second anti-shake mode.

[0046] Through the collaborative efforts of these components, the system automatically switches between the first and second anti-shake modes based on motion intensity thresholds. Different algorithmic strategies are employed for gentle motion and sudden impact, significantly improving adaptability in complex motion environments compared to traditional single-mode systems. A continuity verification mechanism and mode switching confidence assessment are also introduced to prevent frequent false switching and ensure system stability. A dynamic threshold adjustment algorithm based on the statistical characteristics of historical motion data more accurately identifies motion pattern changes than static threshold settings. An adaptive bandpass filter dynamically adjusts its center frequency based on impact intensity, offering greater signal adaptability than fixed-frequency filters. A dual-time-scale processing architecture establishes both long-term and short-term window buffers for gentle motion prediction and impulse response processing, respectively. A five-fold storage duration ratio optimizes the balance between data processing speed and accuracy in different modes, resulting in higher computational efficiency than single-time-scale processing. Cubic spline interpolation prediction employs piecewise cubic polynomial fitting and extrapolation, more accurately capturing the nonlinear characteristics of motion trajectories than traditional linear prediction methods. Boundary conditions and continuity constraints ensure smoothness of the prediction curve, improving long-term prediction stability. Second-order differential shock detection accurately extracts shock characteristic parameters through two consecutive differential operations. Compared with simple amplitude detection, it can more keenly identify sudden motion changes. The combined algorithm of peak extraction and local variance calculation effectively distinguishes between true shock signals and noise interference. Mechanical response delay compensation is based on the early output correction of the eight-millisecond mechanical response time. Compared with the passive response mode, it significantly reduces the compensation delay. The introduction of the exponential decay factor ensures the rationality of the compensation signal in the time domain, avoiding overcompensation and system oscillation. The PID feedforward control strategy replaces traditional feedback control and has faster response speed and higher compensation accuracy than hysteresis compensation. The coordinate transformation algorithm of the kinematic inverse solver realizes the precise mapping conversion from the angle domain to the spatial domain.

[0047] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems, systems and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0048] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program code.

[0049] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application 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 make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A motion camera anti-shake method based on inertial prediction, characterized in that: include: Collecting the three-axis acceleration raw data of the IMU sensor in the motion camera and calculating the first motion intensity value; When the first motion intensity value is less than the acceleration change rate threshold, a first anti-shake mode is activated, and gyroscope angular velocity data is extracted; Performing cubic spline interpolation curve fitting and time domain extrapolation prediction on the gyroscope angular velocity data to obtain a three-axis angular displacement prediction value and generate a first lens compensation drive signal in a first anti-shake mode; The motion camera is continuously monitored, and when the second motion intensity value exceeds the acceleration change rate threshold, the second anti-shake mode is switched to obtain three-axis acceleration mutation data and generate a second lens compensation drive signal in the second anti-shake mode.

2. The motion camera anti-shake method based on inertial prediction according to claim 1, characterized in that: The collecting of the three-axis acceleration raw data of the IMU sensor in the motion camera and calculating the first motion intensity value includes: Collecting the three-axis acceleration raw data of the IMU sensor in the motion camera, wherein the three-axis acceleration raw data includes X-axis acceleration data, Y-axis acceleration data, and Z-axis acceleration data; Inputting the three-axis acceleration raw data into a first time window buffer and a second time window buffer respectively for parallel storage, wherein the storage duration of the first time window buffer is five times the storage duration of the second time window buffer; Performing first-order difference calculation on the three-axis acceleration raw data at each sampling point to obtain the acceleration change rate of the X axis, the acceleration change rate of the Y axis, and the acceleration change rate of the Z axis respectively; The X-axis acceleration change rate, the Y-axis acceleration change rate, and the Z-axis acceleration change rate are input into a Euclidean norm calculator for performing square and square root operations to obtain a first exercise intensity value.

3. The motion camera anti-shake method based on inertial prediction according to claim 2, characterized in that: The step of starting the first anti-shake mode and extracting gyroscope angular velocity data when the first motion intensity value is less than an acceleration change rate threshold comprises: Inputting the first motion intensity value into a value comparator, performing a subtraction operation on the value from the acceleration change rate threshold stored in the threshold register, and determining the motion mode type based on the positive or negative value of the operation result to obtain a mode discrimination signal; When the mode discrimination signal is negative, a first anti-shake mode activation condition is triggered, and a continuity monitoring mechanism is activated to track and verify the motion intensity values ​​of consecutive sampling points. When three consecutive sampling points all meet a condition that the value is less than a threshold, it is confirmed that the first anti-shake mode has been entered; Inputting the first start signal of the first anti-shake mode into the data reading controller of the first time window buffer to obtain a set of raw data of the three-axis gyroscope; The three-axis gyroscope raw data set is subjected to time series rearrangement and drift reference correction to form gyroscope angular velocity data.

4. The motion camera anti-shake method based on inertial prediction according to claim 1, characterized in that: The performing cubic spline interpolation curve fitting and time domain extrapolation prediction on the gyroscope angular velocity data to obtain a three-axis angular displacement prediction value and generate a first lens compensation drive signal in the first anti-shake mode includes: Dividing the gyroscope angular velocity data into sub-intervals according to a time axis to obtain a segmented angular velocity data set; Establishing a cubic polynomial constraint equation group based on the segmented angular velocity data set, and setting boundary conditions and continuity conditions to solve the polynomial coefficients to obtain a cubic polynomial coefficient combination for each subinterval; constructing an angular velocity curve based on the cubic polynomial coefficient combination, and performing extrapolation prediction on the angular velocity curve to obtain a three-axis angular velocity prediction sequence; Performing a time domain integration operation on the three-axis angular velocity prediction sequence to obtain a three-axis angular displacement prediction value; A first lens compensation driving signal in a first anti-shake mode is generated based on the three-axis angular displacement prediction value.

5. The motion camera anti-shake method based on inertial prediction according to claim 4, characterized in that: The step of constructing an angular velocity curve based on the cubic polynomial coefficient combination and performing extrapolation prediction on the angular velocity curve to obtain a three-axis angular velocity prediction sequence includes: The cubic polynomial coefficients are input into a spline curve constructor, and the cubic polynomial functions of each subinterval are connected into a single continuous function through a piecewise function splicing algorithm. At the same time, the smoothness of the junction points of adjacent subintervals is verified to obtain an angular velocity curve; Based on the cubic polynomial parameters of the last subinterval in the angular velocity curve, the cubic polynomial function form of the last subinterval is analytically extended in the positive direction of time to obtain an angular velocity extension function of the extrapolated time period; Discrete sampling is performed based on the angular velocity continuation function to obtain multiple sampling points, and the time coordinate of each sampling point is substituted into the angular velocity continuation function to perform function calculation to obtain a set of discrete angular velocity data points within the extrapolation time period; The angular velocity discrete data point set is subjected to three-axis separation to form a three-axis angular velocity prediction sequence.

6. The motion camera anti-shake method based on inertial prediction according to claim 5, characterized in that: Generating a first lens compensation driving signal in a first anti-shake mode based on the three-axis angular displacement prediction value includes: Inputting the X-axis angular displacement prediction component and the Y-axis angular displacement prediction component of the three-axis angular displacement prediction value into a kinematic inverse solver, converting the angular domain data into spatial domain data through a coordinate transformation operation multiplied by a lens focal length parameter to obtain a two-dimensional spatial compensation vector; Calculating a feedforward control signal based on the two-dimensional spatial compensation vector to obtain a dual-axis motor drive voltage combination; Based on the dual-axis motor drive voltage combination, the X-axis motor control voltage and the Y-axis motor control voltage are respectively transmitted to the corresponding stepper motor drivers. The X-axis motor and the Y-axis motor of the lens stabilizer are driven to move synchronously through voltage-to-pulse conversion processing, thereby generating a first lens compensation drive signal in the first anti-shake mode.

7. The motion camera anti-shake method based on inertial prediction according to claim 6, characterized in that: The method of continuously monitoring the motion camera, switching to a second anti-shake mode when a second motion intensity value exceeds the acceleration change rate threshold, acquiring three-axis acceleration mutation data, and generating a second lens compensation drive signal in the second anti-shake mode includes: continuously monitoring the motion camera and obtaining a second motion intensity value, and confirming to switch to a second anti-shake mode when the second motion intensity value exceeds the acceleration change rate threshold; inputting a second start signal of the second anti-shake mode into a fast reading controller of a second time window buffer to extract a triaxial acceleration data set; Performing mutation detection on the triaxial acceleration data set to obtain triaxial acceleration mutation data; Inputting the triaxial acceleration mutation data into a second-order difference calculator to perform acceleration change rate calculation to form impact characteristic parameters; A second lens compensation driving signal in a second anti-shake mode is generated based on the impact characteristic parameter and the mechanical response delay time.

8. The motion camera anti-shake method based on inertial prediction according to claim 7, characterized in that: The step of inputting the triaxial acceleration mutation data into a second-order difference calculator to perform acceleration change rate calculation to form impact characteristic parameters includes: Inputting the three-axis acceleration mutation data into the X-axis differential operation unit, the Y-axis differential operation unit, and the Z-axis differential operation unit for time sequence marking, respectively, to obtain the X-axis acceleration mutation sequence, the Y-axis acceleration mutation sequence, and the Z-axis acceleration mutation sequence; Performing first-order difference operations on the X-axis acceleration mutation sequence, the Y-axis acceleration mutation sequence, and the Z-axis acceleration mutation sequence to obtain an X-axis acceleration change rate sequence, a Y-axis acceleration change rate sequence, and a Z-axis acceleration change rate sequence; Inputting the X-axis acceleration rate change sequence, the Y-axis acceleration rate change sequence, and the Z-axis acceleration rate change sequence into corresponding second-order difference operation modules for processing, respectively, to generate X-axis second-order difference results, Y-axis second-order difference results, and Z-axis second-order difference results; Peak value extraction and amplitude calculation are performed on the X-axis second-order difference result, the Y-axis second-order difference result, and the Z-axis second-order difference result to obtain impact characteristic parameters.

9. The motion camera anti-shake method based on inertial prediction according to claim 8, characterized in that: Generating a second lens compensation driving signal in a second anti-shake mode based on the impact characteristic parameter and the mechanical response delay time includes: Performing adaptive bandpass filtering on the X-axis impact intensity value, the Y-axis impact intensity value, and the Z-axis impact intensity value in the impact characteristic parameters to obtain a three-axis filtered impact signal; Calculating the impact direction vector based on the three-axis filtered impact signal to obtain three-dimensional impact vector information; Performing time advance correction on the impact compensation signal according to the three-dimensional impact vector information and the mechanical response delay time to obtain a time-corrected impact compensation vector; Based on the time-corrected impact compensation vector, the impact compensation vector components of the X-axis and the Y-axis are taken as the values ​​of the reverse compensation force and converted into corresponding motor control instructions, and the reverse compensation force is directly output to the lens stabilizer to generate a second lens compensation drive signal in the second anti-shake mode.

10. A motion camera anti-shake system based on inertial prediction, characterized in that: The method for anti-shake of a motion camera based on inertial prediction according to any one of claims 1 to 9 comprises: An acquisition module is used to acquire the original data of the three-axis acceleration of the IMU sensor in the motion camera and calculate the first motion intensity value; an extraction module, configured to activate a first anti-shake mode when the first motion intensity value is less than an acceleration change rate threshold, and extract gyroscope angular velocity data; a prediction module, configured to perform cubic spline interpolation curve fitting and time domain extrapolation prediction on the gyroscope angular velocity data to obtain a three-axis angular displacement prediction value and generate a first lens compensation drive signal in a first anti-shake mode; The switching module is used to continuously monitor the motion camera, switch to the second anti-shake mode when the second motion intensity value exceeds the acceleration change rate threshold, obtain three-axis acceleration mutation data and generate a second lens compensation drive signal in the second anti-shake mode.

Citation Information

Cited By

  • Jitter compensation method and device, electronic equipment and optical anti-shake system

    CN121099195A

  • Shake compensation method and device, electronic equipment and optical image stabilization system

    CN121099195B

  • Pig farm track robot video anti-shake interpolation method based on PWM and FOC

    CN121126028A

  • Dynamic resonance suppression image stabilization feedback control method and system

    CN121254615A

  • A dynamic resonance suppression image stabilization feedback control method, system, computing device, and storage medium

    CN121254615B