Optical image stabilization testing methods, systems, computer equipment, and storage media

By generating simulated motion sensor signals without physical vibration to drive the motor for anti-shake motion, and combining image sensor acquisition and recognition, the problem of low efficiency in traditional optical image stabilization testing is solved, and more efficient and accurate test results are achieved.

CN121253114BActive Publication Date: 2026-03-06NINGBO SUNNY OPTOELECTRONICS SOFTWARE DEV CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511804665.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-03
Publication Date
2026-03-06
Estimated Expiration
2045-12-03

AI Technical Summary

Technical Problem

Traditional optical image stabilization testing methods rely on physical vibration tables, resulting in low testing efficiency and complex operation, which affects production line capacity.

Method used

By generating simulated motion sensor signals without physical vibration, the motor is driven to perform anti-shake motion. The target reference point is tracked and identified by acquiring images of the target plate through an image sensor, and the measured motion curve is fitted. The test results are calculated based on preset waveform parameters and the measured motion curve, replacing the excitation of the traditional physical vibration table.

Benefits of technology

It improves the efficiency and accuracy of optical image stabilization testing, reduces the time lost due to equipment start-up and shutdown and periodic inspections, achieves continuity and repeatability of the testing process, and significantly speeds up the testing process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121253114B_ABST
    Figure CN121253114B_ABST
Patent Text Reader

Abstract

This application relates to an optical image stabilization testing method, system, computer equipment, and storage medium. The method includes: generating a simulated motion sensor signal without physical vibration based on preset waveform parameters; applying the simulated motion sensor signal to a target optical image stabilization module to drive a motor for stabilization motion; tracking and identifying a target reference point in a target image acquired by an image sensor, and fitting a measured motion curve of the target reference point in the target image; determining a theoretical motion curve of the target reference point in the target image based on the preset waveform parameters and the measured motion curve; and determining the test result of the target optical image stabilization module based on the deviation calculation result between the measured motion curve and the theoretical motion curve. This method can improve the efficiency and accuracy of optical image stabilization testing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of testing technology, and in particular to an optical image stabilization testing method, system, computer equipment, and storage medium. Background Technology

[0002] In the production process of camera modules, optical image stabilization (OIS) testing is a crucial inspection step used to evaluate the module's image stabilization performance. Currently, traditional OIS testing methods typically rely on specialized equipment such as physical vibration tables to generate vibration signals and use gyroscopes to collect data to drive the stabilization motion. However, this traditional method requires a separate testing process, is time-consuming, and necessitates periodic equipment downtime for inspection and maintenance, resulting in low testing efficiency and impacting production line capacity.

[0003] This shows that traditional technologies still suffer from low testing efficiency and complex operation. Summary of the Invention

[0004] Therefore, it is necessary to provide an optical image stabilization testing method, system, computer equipment, and storage medium that can improve the efficiency and accuracy of optical image stabilization testing in response to the above-mentioned technical problems.

[0005] In a first aspect, this application provides an optical image stabilization testing method, applied to an optical image stabilization testing system, the optical image stabilization testing method comprising:

[0006] Based on preset waveform parameters, a simulated motion sensor signal without physical vibration is generated; the simulated motion sensor signal is applied to the target optical image stabilization module to drive the motor to perform image stabilization motion;

[0007] The target reference point is tracked and identified in the target plate image acquired by the image sensor, and the measured motion curve of the target reference point in the target plate image is obtained by fitting.

[0008] Based on the preset waveform parameters and the measured motion curve, the theoretical motion curve of the target reference point in the target image is determined;

[0009] The test results of the target optical image stabilization module are determined based on the deviation calculation results between the measured motion curve and the theoretical motion curve.

[0010] In one embodiment, the preset waveform parameters include at least one of frequency, amplitude, phase value, and offset; generating a simulated motion sensor signal without physical vibration based on the preset waveform parameters includes:

[0011] The signal data format is determined based on the communication protocol of the target optical image stabilization module;

[0012] A simulated vibration signal is generated based on the preset waveform parameters;

[0013] Based on the simulated vibration signal and the signal data format, a simulated motion sensor signal is generated; the simulated motion sensor signal is used to send to the target optical image stabilization module based on the communication protocol.

[0014] In one embodiment, generating the analog motion sensor signal based on the analog vibration signal and the signal data format includes:

[0015] Based on the simulated vibration signal, calculate the angular velocity information at the current moment;

[0016] Based on the signal data format and the angular velocity information, a simulated motion sensor signal is generated.

[0017] In one embodiment, the target reference point identification of the target image acquired by the image sensor includes:

[0018] Based on the predicted coordinates and target reference point coordinates determined at the previous moment, target reference point identification is performed on the target image to obtain the target reference point coordinates at the current moment. Determining the predicted coordinates at the previous moment includes: acquiring the magnetic field sensor signal of the motor; based on the time difference between the acquisition of the magnetic field sensor signal and the target image, the target reference point coordinates or reference point coordinates at the previous moment, and the displacement ratio coefficient between the motor and the target reference point, predicting the motion trajectory of the target reference point to obtain preliminary predicted coordinates; the reference reference point coordinates are the coordinates of the target reference point closest to the image center in the first target image acquired before the target optical image stabilization module activates its image stabilization function; based on the preliminary predicted coordinates, the reference point coordinates in the target image are calculated to obtain the predicted coordinates.

[0019] In one embodiment, the fitting of the measured motion curve of the target reference point in the target image includes:

[0020] Based on the Levenberg-Marquardt method, the coordinates of the target reference point at multiple time points are fitted to obtain the measured motion curve.

[0021] In one embodiment, determining the theoretical motion curve of the target reference point in the target image based on the preset waveform parameters and the measured motion curve includes:

[0022] Construct a theoretical waveform curve based on preset waveform parameters;

[0023] Based on the theoretical ambiguity amplitude, the waveform frequency of the measured motion curve, and the phase difference between the measured motion curve and the theoretical waveform curve, the parameters of the theoretical waveform curve are corrected to obtain the theoretical motion curve; the theoretical ambiguity amplitude is the maximum displacement of the target reference point when the anti-shake function is off.

[0024] In one embodiment, obtaining the deviation calculation result between the measured motion curve and the theoretical motion curve includes:

[0025] Based on the measured motion curve and the theoretical motion curve, discrete measured coordinate sequence and discrete theoretical coordinate sequence are obtained respectively;

[0026] Based on the discrete measured coordinate sequence and the discrete theoretical coordinate sequence, the Euclidean distance at each moment is calculated to obtain the single-point deviation.

[0027] The maximum value among the multiple single-point deviations is determined as the deviation calculation result.

[0028] In one embodiment, determining the test result of the target optical image stabilization module based on the deviation calculation result includes:

[0029] Based on the deviation calculation results and the theoretical blur amplitude, the compression ratio of the target optical image stabilization module is calculated;

[0030] Based on the comparison between the compression ratio and the preset specification threshold, the test results of the target optical image stabilization module are determined.

[0031] Secondly, this application provides an optical image stabilization testing system, which includes a host control device, a microcontroller unit, and a test plate;

[0032] The host control device is used to set the preset waveform parameters of the microcontroller unit;

[0033] The microcontroller unit is used to generate a simulated motion sensor signal without physical vibration according to the preset waveform parameters; the simulated motion sensor signal is applied to the target optical image stabilization module to drive the motor to perform image stabilization movement;

[0034] The host control device is also used to track and identify target reference points in the corresponding target image acquired by the image sensor, and fit the measured motion curve of the target reference point in the target image; determine the theoretical motion curve of the target reference point in the target image based on the preset waveform parameters and the measured motion curve; and determine the test result of the target optical image stabilization module based on the deviation calculation result between the measured motion curve and the theoretical motion curve.

[0035] In one embodiment, the inspection plate includes staggered black and white squares, with a reference point graphic set at the center of each black square; wherein, one black square and one white square occupy no more than 0.15 fields of view, and the field of view deviation does not exceed 0.04F.

[0036] The aforementioned optical image stabilization testing method, system, computer equipment, and storage medium generate a simulated motion sensor signal without physical vibration based on preset waveform parameters. This simulated motion sensor signal is then applied to the target optical image stabilization module to drive a motor for stabilization. The system tracks and identifies the target reference point in the target image captured by the image sensor, fitting a measured motion curve of the target reference point in the target image. Based on the preset waveform parameters and the measured motion curve, a theoretical motion curve of the target reference point in the target image is determined. Finally, the test result of the target optical image stabilization module is determined based on the deviation between the measured and theoretical motion curves. This method replaces traditional methods by generating a simulated motion sensor signal without physical vibration. Physical vibration table excitation eliminates the need for external mechanical devices in the testing system, thus eliminating time losses caused by equipment start-up, shutdown, positioning, and periodic inspections. Specifically, by directly injecting simulated motion sensor signals into the sensor input port of the target optical image stabilization module, and continuously acquiring its actual displacement sequence in the image coordinate system through image sensor acquisition, the measured motion curve can be formed by fitting. This reflects the actual response process of the module to the excitation, thereby reducing process connection links and human intervention factors, improving the continuity and repeatability of the testing rhythm, and significantly accelerating the testing speed without reducing the accuracy of evaluation, achieving the technical effect of improving the efficiency and accuracy of optical image stabilization testing. Attached Figure Description

[0037] Figure 1 This is an application environment diagram of an optical image stabilization test method in one embodiment;

[0038] Figure 2 This is a flowchart illustrating an optical image stabilization testing method in one embodiment;

[0039] Figure 3 This is a schematic diagram of a standard plate in one embodiment;

[0040] Figure 4 This is a framework control logic diagram of an embedded platform in one embodiment;

[0041] Figure 5 This is a flowchart illustrating the IIC trigger control process in one embodiment;

[0042] Figure 6 This is a schematic diagram of the SPI data packet composition in one embodiment;

[0043] Figure 7This is a flowchart of the fitting process for a sine wave in one embodiment;

[0044] Figure 8 This is a schematic diagram of the Mark point tracking and positioning process in one embodiment;

[0045] Figure 9 This is a schematic diagram of the Mark point tracking and positioning process in another embodiment;

[0046] Figure 10 This is a schematic diagram of the P_oison calculation process in one embodiment;

[0047] Figure 11 This is a flowchart illustrating a static testing method in one embodiment;

[0048] Figure 12 This is a structural block diagram of an optical image stabilization test system in one embodiment;

[0049] Figure 13 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0050] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0051] The optical image stabilization testing method provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with the optical image stabilization module 104 under test via a wired network. The optical image stabilization module 104 under test has a built-in drive device and motor. Camera 106 faces a target plate 108, and the motor controls the camera's reverse movement in response to shaking. Terminal 102 generates a simulated motion sensor signal without physical vibration based on preset waveform parameters. This simulated motion sensor signal is applied to the target optical image stabilization module to drive the motor for stabilization movement. The target reference point is tracked and identified in the target plate image acquired by the image sensor, and a measured motion curve of the target reference point in the target plate image is obtained by fitting the target reference point. Based on the preset waveform parameters and the measured motion curve, a theoretical motion curve of the target reference point in the target plate image is determined. Based on the deviation calculation result between the measured motion curve and the theoretical motion curve, the test result of the target optical image stabilization module is determined. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, etc.

[0052] In one embodiment, such as Figure 2 As shown, an optical image stabilization testing method is provided, which is then applied to... Figure 1Taking terminal 102 as an example, the explanation includes the following steps:

[0053] Step S100: Based on preset waveform parameters, a simulated motion sensor signal without physical vibration is generated. The simulated motion sensor signal is applied to the target optical image stabilization module to drive the motor for image stabilization.

[0054] The preset waveform parameters can be a set of parameters used to describe the time-domain characteristics of the simulated motion sensor signal. For example, they can include information such as frequency, amplitude, phase, and waveform type, serving as the basic input for generating the simulated motion sensor signal. In this embodiment, the preset waveform parameters can be pre-configured by the test system according to a standard test excitation mode, thereby generating a simulated angular velocity signal based on the preset waveform parameters. For example, the preset waveform parameters can include, but are not limited to, one or more of sine wave parameters, square wave parameters, and triangular wave parameters.

[0055] It is understood that the optical image stabilization testing method of this embodiment can be applied to optical image stabilization testing systems without a physical vibration table. Correspondingly, the simulated motion sensor signal can be an artificially generated electrical signal that does not require physical vibration excitation, used to simulate motion sensing data output by real motion sensors such as gyroscopes or accelerometers, thereby replacing the inertial excitation generated by a traditional physical vibration table. In an exemplary embodiment, the simulated motion sensor signal can be synthesized in real time by an MCU microcontroller based on preset waveform parameters to output the simulated motion sensor signal in real time.

[0056] The target optical image stabilization module can be a camera component with optical image stabilization under test, including a lens, a drive motor, and a motion sensing feedback path, or it can be a stabilization device with a drive motor and a motion sensing feedback path alone. In one specific embodiment, the target optical image stabilization module can enter the testing station after assembly on the production line, and receive externally injected analog motion sensor signals to activate the internal stabilization control logic to drive the motor to perform reverse movement.

[0057] The motor can be an actuator that enables minute displacements of the lens or image sensor within a plane to counteract camera shake, and can be used to perform specific displacement compensation actions. In this embodiment, the motor can receive drive current from the image stabilization control circuit and adjust its position based on closed-loop feedback.

[0058] Based on preset waveform parameters, a simulated motion sensor signal without physical vibration is generated. This can be achieved by synthesizing the preset waveform parameters into a simulated sensor data stream conforming to a communication protocol format. It is understood that this embodiment enables the anti-shake module to perform anti-shake operations without external physical vibration by simulating the output signals of motion sensors such as gyroscopes and accelerometers. For example, the motion sensor signal can be generated in real-time using FPGA logic circuits, or an embedded processor can run software algorithms to output I2C / SPI simulated data packets, thereby avoiding the use of physical vibration devices and eliminating the preparation time and maintenance interruptions caused by mechanical excitation.

[0059] Applying analog motion sensor signals to the target optical image stabilization module to drive the motor for image stabilization can be achieved by injecting the generated analog signal into the module's motion sensor input interface, causing the control components of the image stabilization module to believe that it is experiencing real shaking, thereby triggering the image stabilization compensation mechanism.

[0060] Step S200: Target reference point tracking and identification are performed on the target plate image acquired by the image sensor, and the measured motion curve of the target reference point in the target plate image is obtained by fitting.

[0061] The image sensor can be an image sensor that matches the target optical image stabilization module. In this embodiment, it is used to acquire images of the target board for subsequent visual analysis to extract the image stabilization response trajectory.

[0062] The target image can be an image captured by an image sensor of the target, thus providing a stable visual reference source for accurate identification of displacement changes at the target reference point. In an exemplary embodiment, the target can be fixed in front of the lens during testing. Exemplarily, the target image can vary depending on the pattern design, including checkerboard target images, concentric circle target images, cross array target images, etc.

[0063] The target reference point can be a specific pixel location or the center of a feature region in the target image used to track displacement changes, and can be used as a benchmark observation point to measure the accuracy of the image stabilization system's response. In an exemplary embodiment, the actual position of the target reference point in each frame can be determined by an image recognition and tracking algorithm. Furthermore, in the first frame image, the reference point can be the one closest to the image center.

[0064] Target reference point tracking and identification in target images acquired by an image sensor can be achieved by using image processing algorithms to calibrate and track the positional changes of the same feature point in consecutive frames. For example, target reference point tracking and identification in target images acquired by an image sensor can be performed using Harris corner detection combined with LK optical flow for continuous tracking. Alternatively, template matching algorithms can be used to relocate the target reference point in each frame, thereby obtaining high spatiotemporal resolution displacement observation data and supporting precise dynamic analysis.

[0065] The measured motion curve can be a time-displacement function curve formed by fitting the displacement trajectory of the target reference point in consecutive frame images. It is used to characterize the actual response behavior of the image stabilization system to simulated excitation and can reflect the dynamic performance of the image stabilization module. Correspondingly, the measured motion curve of the target reference point in the target image can be obtained by constructing a continuous function expression from the discrete target reference point coordinate sequence using mathematical methods. For example, the measured motion curve can be obtained using different fitting methods, including spline interpolation curves, least squares fitting curves, Kalman filter trajectory curves, etc.

[0066] Step S300: Determine the theoretical motion curve of the target reference point in the target plate image based on the preset waveform parameters and the measured motion curve.

[0067] The theoretical motion curve can be the expected motion trajectory of the target reference point derived based on preset waveform parameters and the ideal response model of the system, and is used for comparative analysis with measured results. Furthermore, the theoretical motion curve can be compared with the measured motion curve, so that the deviation between the two can be used to quantify performance.

[0068] Based on preset waveform parameters and measured motion curves, the theoretical motion curve is determined. This can be done by deriving the trajectory of the target reference point under ideal conditions based on known excitation parameters and system geometric relationships. For example, the waveform parameters can be mapped to the desired displacement in the image coordinate system using a calibrated projection model. Furthermore, the phase of the theoretical curve can be corrected by combining it with a module response delay model, thereby establishing a comparable ideal response benchmark and enhancing the objectivity of the evaluation.

[0069] Step S400: Based on the deviation calculation results between the measured motion curve and the theoretical motion curve, determine the test results of the target optical image stabilization module.

[0070] The deviation calculation result can be a mathematical quantification of the difference between the measured motion curve and the theoretical motion curve, used as an intermediate basis for judging the quality of image stabilization performance. In an exemplary embodiment, the deviation calculation result can be calculated using cosine similarity, Euclidean distance, etc.

[0071] The test results can be a final determination of whether the performance of the target optical image stabilization module is qualified, derived from the comprehensive deviation calculation results. In an exemplary embodiment, compression ratio analysis can be performed based on the deviation calculation results to determine whether the module meets the test requirements. In this embodiment, by determining the test results of the target optical image stabilization module based on the deviation calculation results of the measured motion curve and the theoretical motion curve, an automated performance evaluation process can be achieved, improving test consistency and reliability.

[0072] This embodiment provides an optical image stabilization testing method. It generates a simulated motion sensor signal without physical vibration based on preset waveform parameters. This simulated motion sensor signal is applied to a target optical image stabilization module to drive a motor for stabilization. The method tracks and identifies target reference points in a target image captured by an image sensor, and fits the measured motion curve of the target reference point in the target image. Based on the preset waveform parameters and the measured motion curve, a theoretical motion curve of the target reference point in the target image is determined. The test result of the target optical image stabilization module is determined based on the deviation between the measured and theoretical motion curves. This method replaces traditional physical vibration by generating a simulated motion sensor signal without physical vibration. The dynamic stage excitation eliminates the need for external mechanical devices in the testing system, thus eliminating time losses caused by equipment start-up, shutdown, positioning, and periodic inspections. Specifically, by directly injecting simulated motion sensor signals into the sensor input port of the target optical image stabilization module, and continuously acquiring its actual displacement sequence in the image coordinate system through image sensor acquisition, the measured motion curve is formed by fitting. This reflects the actual response process of the module to the excitation, thereby reducing process connection links and human intervention factors, improving the continuity and repeatability of the testing rhythm, and significantly accelerating the testing speed without reducing the accuracy of evaluation, achieving the technical effect of improving the efficiency and accuracy of optical image stabilization testing.

[0073] In one embodiment, the preset waveform parameters include at least one of frequency, amplitude, phase value, and offset; generating a simulated motion sensor signal without physical vibration based on the preset waveform parameters includes:

[0074] The signal data format is determined based on the communication protocol of the target optical image stabilization module;

[0075] Simulated vibration signals are generated based on preset waveform parameters;

[0076] Based on the simulated vibration signal and signal data format, a simulated motion sensor signal is generated; the simulated motion sensor signal is then sent to the target optical image stabilization module based on a communication protocol.

[0077] The communication protocol can be a set of standardized rules followed by the target optical image stabilization module and its control unit for data exchange. For example, it can include serial communication protocols such as SPI and I2C, so as to ensure that the simulated motion sensor signals generated by the external test system can be correctly parsed and received by the module.

[0078] The signal data format can be a specific data organization form that simulates motion sensor signals under a specific communication protocol. For example, it can include field length, byte order, data type, payload layout, etc. In a specific embodiment, the signal data can include 2 bytes of temperature data, 6 bytes of angular velocity data, and 6 bytes of angular acceleration data, adapted to the host SPI packet data length. For example, the signal data format can be adapted according to different protocols, including but not limited to register mapping format, data packet header and footer format, streaming byte format, etc. Accordingly, the signal data format is determined according to the communication protocol of the target optical image stabilization module. This can be done by reading the module interface documentation or through reverse communication interaction analysis to extract its data encapsulation requirements for the motion sensor input signals and adapting the corresponding data format.

[0079] Furthermore, based on the simulated vibration signal and signal data format, the simulated motion sensor signal can be generated by quantizing, truncating, padding, and byte arranging the mathematically generated simulated vibration signal according to the requirements of the signal data format to form a complete data packet that conforms to the protocol specification.

[0080] This embodiment provides an optical image stabilization testing method. By determining the signal data format according to the communication protocol of the target optical image stabilization module, generating a simulated vibration signal based on preset waveform parameters, and generating a simulated motion sensor signal based on the simulated vibration signal and the signal data format, this method can introduce adaptation to the communication protocol of the target optical image stabilization module on the basis of the original electrical signal excitation. This allows the generated simulated vibration signal to be accurately encapsulated into an input signal that the module can recognize, ensuring that the simulated motion sensor signal can be normally received and processed by the module at both the electrical and semantic levels. This eliminates the need to design dedicated hardware interfaces for different modules, reduces debugging costs and integration complexity, and enhances the versatility and stability of the system while maintaining high-precision image stabilization evaluation, thereby achieving the technical effect of improving testing efficiency and accuracy.

[0081] In one embodiment, generating the analog motion sensor signal based on the analog vibration signal and the signal data format includes:

[0082] Calculate the angular velocity information at the current moment based on the simulated vibration signal;

[0083] Based on the signal data format and angular velocity information, a simulated motion sensor signal is generated.

[0084] The simulated vibration signal can be a continuous-time-domain mathematical signal generated based on preset waveform parameters to characterize an ideal motion state. Angular velocity information can be a physical quantity describing the speed and direction of an object's rotation around an axis, and can serve as the core input quantity for controlling the target optical image stabilization module. Furthermore, the angular velocity information can also include X-axis angular velocity information, Y-axis angular velocity information, Z-axis angular velocity information, etc.

[0085] Correspondingly, calculating the angular velocity information at the current moment based on the simulated vibration signal can be achieved by taking the amplitude of the simulated vibration signal at a certain sampling moment, interpreting it as the instantaneous angular velocity value in the corresponding direction, and performing unit conversion and sign processing. For example, a lookup table method can be used to read the angular velocity value corresponding to the current phase from a pre-generated sine wave array, realizing the mapping from function value to angular velocity value.

[0086] Generating analog motion sensor signals based on signal data format and angular velocity information can be achieved by encoding the calculated angular velocity information according to the byte length, arrangement order, and data type specified in the signal data format, and then packaging it into a data frame conforming to the communication protocol. For example, generating analog motion sensor signals based on signal data format and angular velocity information can convert the angular velocity value into a 16-bit signed integer and write it to a specified byte position in the data packet in little-endian order, thereby achieving compliant encapsulation of digital signals.

[0087] This embodiment provides an optical image stabilization testing method that calculates the angular velocity information at the current moment based on simulated vibration signals and generates simulated motion sensor signals based on signal data format and angular velocity information. This effectively triggers the module's internal control mechanism, realizing a complete mapping chain from mathematical waveforms to physical excitation and then to protocol-compatible signals. This enhances the realism and reliability of the simulated signals, further improving the consistency and accuracy of the test, and achieving the technical effect of improving test efficiency and evaluation rationality.

[0088] In one embodiment, target reference point identification of the target image acquired by the image sensor includes:

[0089] Based on the predicted coordinates and target reference point coordinates determined at the previous moment, target reference point identification is performed on the target image to obtain the target reference point coordinates at the current moment. Determining the predicted coordinates at the previous moment includes: acquiring the magnetic field sensor signal of the motor; based on the time difference between the acquisition of the magnetic field sensor signal and the target image, the target reference point coordinates or baseline reference point coordinates at the previous moment, and the displacement ratio coefficient between the motor and the target reference point, predicting the motion trajectory of the target reference point to obtain preliminary predicted coordinates; the baseline reference point coordinates are the coordinates of the target reference point closest to the image center in the first target image acquired before the target optical image stabilization module activates its image stabilization function; based on the preliminary predicted coordinates, the reference point coordinates in the target image are calculated to obtain the predicted coordinates.

[0090] The magnetic field sensor signal can be an electrical signal collected by a magnetic induction element installed inside or near the motor, reflecting changes in the motor coil current and rotor position, and is used to provide direct feedback on the actual motion state of the motor. In an exemplary embodiment, the magnetic field sensor signal can be a Hall sensor that detects changes in magnetic field strength generated by the relative motion between the permanent magnet and the coil in the motor in real time and outputs a corresponding voltage signal. It is understood that the magnetic field sensor signal can be one or more of the following, including but not limited to Hall effect signals, magnetoresistive change signals, induced electromotive force signals, etc., and can also be other electrical signals that can represent changes in rotor position; this embodiment does not limit the specific type of signal.

[0091] The motor-to-target reference point displacement ratio can be a proportional constant describing the linear mapping relationship between the physical displacement of the motor and the pixel displacement of the target reference point in the image, used to achieve cross-domain transformation from the motor's own motion to the displacement in the image coordinate system. In an exemplary embodiment, the motor-to-target reference point displacement ratio can be determined a priori through a calibration process; that is, a target image can be acquired under known motor drive displacement, the pixel movement of the target reference point can be calculated, and the conversion ratio between physical displacement and pixel displacement can be established. Furthermore, the motor-to-target reference point displacement ratio can include, but is not limited to, static calibration coefficients, dynamic compensation coefficients, and temperature adaptability correction coefficients.

[0092] The reference point coordinates can be the initial position coordinates of the target reference point closest to the image center identified in the first frame of the target optical image stabilization module before the image stabilization function is activated, and are used as the initial reference point for the entire tracking sequence. In one specific embodiment, the reference point coordinates can be obtained by acquiring the first target image before the image stabilization system is activated at the beginning of the test, and using the coordinates of the reference point closest to the image center as the reference point coordinates.

[0093] The preliminary predicted coordinates can be a rough estimate of the target reference point's position in the current frame, calculated based on the magnetic field sensor signal, time difference, and displacement scaling factor. This estimate can serve as the starting search position for subsequent precise identification. For example, the preliminary predicted coordinates can utilize the reference or measured coordinates from the previous moment, combined with the timestamp of the Hall feedback signal and the image acquisition time difference, to calculate the displacement increment using kinematic formulas, and then superimpose it onto the previous coordinates to obtain the predicted value.

[0094] Based on the time difference between the acquisition of the magnetic field sensor signal and the target image, the coordinates of the target reference point or the baseline reference point at the previous moment, and the displacement ratio coefficient between the motor and the target reference point, the motion trajectory of the target reference point is predicted to obtain the preliminary predicted coordinate point. For example, it can be that the motor magnetic field feedback data and the visual acquisition time synchronization information are combined, and the approximate position of the target at the next moment is deduced by using the motion continuity assumption.

[0095] Predicted coordinates can be estimated coordinates that are closer to the actual location, obtained by combining preliminary predicted coordinate points and local optimization algorithms before target recognition in the current frame. This is used to narrow down the search range for image recognition. Correspondingly, the process of obtaining predicted coordinates can involve setting a local search window based on the preliminary predicted coordinate points and performing fine feature matching within a limited area to obtain a more accurate estimate.

[0096] This embodiment provides an optical image stabilization testing method. By acquiring the magnetic field sensor signal of the motor, and based on the time difference between the acquisition of the magnetic field sensor signal and the target image, the coordinates of the target reference point or the reference point at the previous moment, and the displacement ratio coefficient between the motor and the target reference point, the method predicts the motion trajectory of the target reference point to obtain preliminary predicted coordinates. Based on the preliminary predicted coordinates, the method calculates the coordinates of the reference point in the target image to obtain the predicted coordinates. Then, based on the predicted coordinates and the target reference point coordinates, the method identifies the target reference point in the target image to obtain the target reference point coordinates at the current moment. By using the magnetic field sensor signal as a direct observation source of the motor's motion state and combining the time difference and displacement ratio coefficient for motion trajectory prediction, a cross-modal motion prediction mechanism can be constructed. Predicted coordinates are generated through fine matching of local regions to guide the target recognition process in the current frame, significantly compressing the search space. Under high-frequency image stabilization, this method can effectively alleviate the tracking lag or loss of lock caused by image processing delay, improve the real-time performance and robustness of recognition, and optimize the performance bottleneck of the target tracking link without increasing additional hardware complexity. This further improves the overall efficiency and evaluation accuracy of optical image stabilization testing.

[0097] In one embodiment, fitting the measured motion curve of the target reference point in the target image includes:

[0098] Based on the Levenberg-Marquardt method, the coordinates of the target reference point at multiple time points are fitted to obtain the measured motion curve.

[0099] The Levenburg-Marquardt method is an iterative optimization algorithm for solving nonlinear least squares problems. It can be used to achieve high-precision fitting of target reference point coordinate sequences containing noise or nonlinear characteristics. In this embodiment, the Levenburg-Marquardt method can be used to adjust the damping factor in each iteration, dynamically balancing local convergence and global stability, thereby minimizing the sum of squared residuals between the observed data and the model predictions.

[0100] The target reference point coordinates can be the pixel position of the target reference point identified in each image. In an exemplary embodiment, the target reference point coordinates can be obtained by feature extraction and point tracking of the target image.

[0101] Based on the Levenberg-Marquardt method, the coordinates of the target reference point at multiple time points are fitted. For example, discretely acquired target reference point coordinates can be used as observation data. After setting initial parameters, the Levenberg-Marquardt method is used to iteratively optimize the nonlinear model parameters, making the fitted curve approximate the actual motion trajectory and minimizing the sum of squared errors. In a specific embodiment, a sinusoidal function model can be used as the fitting basis function. By optimizing the amplitude, frequency, phase, and offset, the measured motion curve is obtained, thereby improving the fitting accuracy and enhancing the robustness of the measured motion curve to nonlinear response and measurement noise.

[0102] This embodiment provides an optical image stabilization testing method. By fitting the coordinates of the target reference point at multiple time points based on the Levenberg-Marquardt method to obtain the measured motion curve, and by iteratively optimizing the nonlinear model parameters, dynamically balancing convergence and stability, and minimizing the sum of squared errors, it can effectively suppress the influence of image sampling noise and positioning errors while preserving motion details, generating a higher fidelity measured motion curve. This achieves the technical effect of improving the accuracy of performance evaluation and enhancing the reliability and efficiency of the testing system.

[0103] In one embodiment, determining the theoretical motion curve of the target reference point in the target image based on preset waveform parameters and measured motion curves includes:

[0104] Construct a theoretical waveform curve based on preset waveform parameters;

[0105] Based on the theoretical ambiguity amplitude, the waveform frequency of the measured motion curve, and the phase difference between the measured motion curve and the theoretical waveform curve, the parameters of the theoretical waveform curve are corrected to obtain the theoretical motion curve; the theoretical ambiguity amplitude is the maximum displacement of the target reference point when the anti-shake function is off.

[0106] The theoretical waveform curve can be the trajectory of the expected target reference point in the image coordinate system corresponding to the ideal input signal, which is directly generated based on preset waveform parameters. In this embodiment, the theoretical waveform curve can be generated by substituting the frequency, amplitude, and initial phase of the preset waveform parameters into a standard sine function expression to generate a time-displacement curve under ideal conditions.

[0107] The theoretical ambiguity amplitude can be the maximum displacement of the target reference point without compensation when the stabilization function is off. It can reflect the original jitter response amplitude of the module when stabilization is not activated. It can be understood that the theoretical ambiguity amplitude can be obtained in the initial stage of testing by tracking the target reference point and extracting its maximum displacement extreme value throughout the entire vibration cycle.

[0108] The waveform frequency can be the number of repetitions per unit time of the periodic changes presented by the measured motion curve, reflecting the actual response rhythm of the anti-shake system to external stimuli. In this embodiment, the waveform frequency can be obtained by performing a fast Fourier transform or a zero-crossing detection algorithm on the measured motion curve to identify the dominant vibration frequency components.

[0109] Phase difference can be the offset angle of the measured motion curve relative to the theoretical waveform curve on the time axis, used to correct the time starting point of the theoretical waveform curve. It can be understood that the phase difference can be obtained by cross-correlation or Fourier transform of the measured motion curve and the theoretical waveform curve to extract the dominant frequency component, comparing their initial phases, and calculating the phase offset between the two.

[0110] In a specific embodiment, the theoretical motion curve can be obtained by replacing its amplitude with the theoretical ambiguity amplitude, updating the frequency to the actual frequency of the measured motion curve, and correcting the time axis offset according to the phase difference, so as to obtain a theoretical motion curve that closely approximates the real physical behavior.

[0111] This embodiment provides an optical image stabilization testing method. It constructs a theoretical waveform curve based on preset waveform parameters and corrects the theoretical waveform curve based on the theoretical ambiguity amplitude, the waveform frequency of the measured motion curve, and the phase difference, to obtain a theoretical motion curve. By introducing the theoretical ambiguity amplitude, the phase difference between the actual waveform frequency of the measured motion curve and the theoretical waveform curve, and other parameters, the frequency, amplitude, and time axis of the initial theoretical waveform curve are dynamically corrected. This generates a theoretical motion curve that more closely matches actual physical characteristics, allowing deviations to more accurately reflect the control precision of the image stabilization system. This reduces the risk of misjudgment due to model mismatch, thereby improving the efficiency and reliability of optical image stabilization testing.

[0112] In one embodiment, the calculation result of the deviation between the measured motion curve and the theoretical motion curve includes:

[0113] Based on the measured motion curves and the theoretical motion curves, discrete measured coordinate sequences and discrete theoretical coordinate sequences are obtained, respectively.

[0114] Based on the discrete measured coordinate sequence and the discrete theoretical coordinate sequence, the Euclidean distance at each time moment is calculated to obtain the single-point deviation;

[0115] The maximum value among multiple single-point deviations is determined as the deviation calculation result.

[0116] The discrete measured coordinate sequence can be a set of target reference point pixel positions extracted from the measured motion curve at equal time intervals, or it can be a set of target reference point pixel positions before the measured motion curve is fitted. In this embodiment, the discrete measured coordinate sequence can be based on target reference point tracking and identification obtained from continuously acquired target images by an image sensor, and arranged into a sequence according to timestamps.

[0117] The discrete theoretical coordinate sequence can be a set of the positions of the target reference point at each time point derived from preset waveform parameters and ideal response model. In an exemplary embodiment, the discrete theoretical coordinate sequence can be combined with preset waveform parameters, calibrated optical projection relationship and system delay compensation model to generate a desired coordinate sequence that is time-aligned with the measured sequence.

[0118] Single-point deviation can be a measure of the spatial distance between discrete measured coordinates and corresponding discrete theoretical coordinates at a certain moment. It represents the jitter error that the image stabilization system has not fully compensated for, reflecting the tracking accuracy of the system at a specific instant and revealing instantaneous performance fluctuations or abnormal responses. In one specific embodiment, single-point deviation can be obtained by calculating the Euclidean distance between two two-dimensional coordinates, that is, the straight-line distance between the measured coordinates and the theoretical coordinates on the two-dimensional plane. In other embodiments, single-point deviation can also be calculated using Manhattan distance deviation, Chebyshev distance deviation, etc.

[0119] Calculate the Euclidean distance at each time point to obtain the single-point deviation. This can be achieved by aligning the time axes of the discrete measured coordinate sequence and the discrete theoretical coordinate sequence, performing the Euclidean distance calculation between the two-dimensional coordinates at each time point, and generating the corresponding deviation value.

[0120] The maximum value among multiple single-point deviations is determined as the deviation calculation result. This can be achieved by iterating through all calculated single-point deviations, filtering out the maximum value, and using it as the final quantitative indicator for judgment.

[0121] This embodiment provides an optical image stabilization testing method. By obtaining discrete measured coordinate sequences and discrete theoretical coordinate sequences based on measured motion curves and theoretical motion curves respectively, the Euclidean distance at each moment is calculated to obtain the single-point deviation. The maximum value among multiple single-point deviations is determined as the deviation calculation result. By converting the measured motion curve and theoretical motion curve into discrete coordinate sequences for fine comparison and calculating the Euclidean distance at each moment, the deviation calculation result is determined by the maximum Euclidean distance. Compared with traditional techniques, this method can effectively improve the consistency of test results and the reliability of criteria, achieving the technical effect of improving test efficiency while maintaining high-precision evaluation.

[0122] In one embodiment, the test results of the target optical image stabilization module are determined based on the deviation calculation results, including:

[0123] Based on the deviation calculation results and the theoretical blur amplitude, the compression ratio of the target optical image stabilization module is calculated.

[0124] The test results of the target optical image stabilization module are determined based on the comparison between the compression ratio and the preset specification threshold.

[0125] Among them, the theoretical ambiguity amplitude can be the maximum displacement of the target reference point due to lack of compensation when the anti-shake function is turned off. It can reflect the original jitter response amplitude of the module when anti-shake is not activated.

[0126] Compression ratio can be a performance evaluation index constructed by the logarithmic ratio of the theoretical blur amplitude and the deviation calculation result, and can be used to quantify the relative performance level of the image stabilization system. The preset specification threshold can be a pre-defined minimum acceptable compression ratio value, used as a criterion boundary for automated judgment to compare compression ratios and output a pass / fail result. In a specific embodiment, the preset specification threshold can be set according to product technical specifications or historical yield data and stored in the test system configuration.

[0127] Correspondingly, the compression ratio of the target optical image stabilization module can be calculated based on the deviation calculation results and the theoretical blur amplitude. This can be achieved by substituting the theoretical blur amplitude and the deviation calculation results into the logarithmic function formula to calculate the compression ratio value, comparing the calculated compression ratio with the preset specification threshold, and determining whether it passes or fails based on the comparison result.

[0128] This embodiment provides an optical image stabilization testing method. It calculates the compression ratio of the target optical image stabilization module based on deviation calculation results and theoretical blur amplitude, and determines the test result of the target optical image stabilization module based on the comparison result between the compression ratio and a preset specification threshold. By using the theoretical blur amplitude as a quantitative benchmark for the original shake intensity and automatically comparing the compression ratio with the preset specification threshold, the image stabilization capabilities of different modules under different excitation conditions can be compared on a unified scale, eliminating evaluation bias. This achieves the technical effect of improving the efficiency and accuracy of optical image stabilization testing while ensuring test accuracy.

[0129] To more clearly illustrate the technical solution of this application, a detailed embodiment is also provided.

[0130] In one embodiment, a static inspection method for the OIS effect based on an optical image stabilization module is provided to address numerous problems in traditional methods, such as slow testing efficiency and complex inspection. This method can be applied to embedded platforms. The static inspection method in this embodiment is specifically solved through the following technical solution:

[0131] 1. The OIS static inspection standard is designed for compatibility, enabling testing of multiple test items and multiple workstations without the need for alignment and spot checks.

[0132] like Figure 3 As shown, the test chart consists of tilted black and white squares of the same size, with a small white circle marker at the center of each black square for positioning and tracking. Considering the impact of field-of-view differences during Stabilization Ratio (SR) testing, the combined field of view occupied by one black square and one white square must not exceed 0.15 fields of view. This ensures that the field-of-view deviation of the tracked servoon position test point during imaging does not exceed 0.04F. This chart has advantages such as no FOV eccentricity, no need for equipment alignment, and compatibility with SFR testing. The stabilization ratio can be calculated by recording the image displacement under OIS on and off states, and then calculating it based on the displacement path of the reference marker point (such as a dot) in the image.

[0133] 2. Using MCU single-chip microcomputer sine wave construction technology, accurate output of simulated vibration signal is achieved under no-vibration conditions.

[0134] By simulating Gyro data using an MCU, the module can perform OIS (Optical Image Stabilization) testing without real physical vibration. This function has high requirements for real-time response performance and data reliability. At the same time, controllability and communication convenience are also primary design goals. The embedded framework design needs to combine hardware characteristics, real-time requirements, and modular thinking, and achieve high cohesion and low coupling through layered architecture and interface decoupling.

[0135] The core of Gyro simulation is to use external data to replace the vibration table and gyroscope module, and to simulate the communication behavior of the gyroscope so that the OIS module can update the angular velocity changes normally.

[0136] The embedded platform uses an STM32L432KU MCU development board. The embedded architecture includes communication logic and data processing logic, such as... Figure 4 As shown, the framework control logic includes IIC signals input to the MCU and the OIS driver or SOIS, respectively. The MCU includes an SPI slave, and the OIS driver or SOIS acts as the SPI master, exchanging MOSI, MISO, CLK, and CS signals. The IIC signals are input to the MCU's IIC bus control module, then sent to the REG MAP register logic table module. The REG MAP is then sent to the signal generation and calculation module, which is connected to the RAM module. The OIS driver, acting as the SPI master, sends the CS chip select signal and the CLK signal to trigger the DMA controller. The DMA controller triggers the calculation module to generate and update the timestamp and gyroscope signals. The RAM module interacts with the DMA controller.

[0137] like Figure 5 As shown, after IIC input, parameters are set, the module's OIS switches to ON, the MCU's SPI switches to ON, and DMA switches to ON. SPI is then triggered to determine if DMA is OVER. If so, calculation is triggered (condition: driver SPI host protocol matching), and DMA is reset, returning to the DMA ON stage. After IIC input, the MCU is reset, triggering the MCU SPI to switch OFF, and subsequently, DMA switches OFF.

[0138] The MCU interacts with the host computer via I2C slave mode. It receives control commands (such as operating mode switching and parameter updates) from the host computer, parses them into internal events through the I2C slave interface, and triggers system state machine updates. The MCU can also return raw data to the host computer, supporting real-time monitoring and debugging.

[0139] The MCU and driver IC can interact via SPI slave mode. The SPI is configured to be compatible with OIS driver's SPI 3-Line or 4-Line communication mode. SPI data transmission is triggered by the OIS driver SPI master sending the CS chip select signal and CLK signal. After triggering, the data is managed by the DMA controller. After each transmission, the DMA controller sets the trigger calculation module to calculate, generate, and update the timestamp and Gyro signal. The DMA controller responds to host data requests in real time, updating the timestamp upon successful response.

[0140] In this embodiment, parameter updates are uniformly managed by the IIC module. After receiving data, the MCU updates the data in real time to the specially designed REG MAP. Specific calculation parameters can be updated from the defined REG data in the MAP, such as the amplitude (Amp), frequency (Fre), and offset (offset) values ​​required for simulating Gyro waveform calculations. Real-time data can also be updated to a specific defined register address REG ADDR, such as timestamps and simulated angular velocities.

[0141] Understandably, protocol adaptation requires strict adherence to the gyroscope's technical specifications and the host SPI data format, such as... Figure 6 As shown, the composition of the SPI data packet varies slightly depending on the number of lines. The data packet can include 2 bytes of temperature data, 6 bytes of angular velocity data, and 6 bytes of angular acceleration data. The address order and high / low bytes of the data are determined according to the gyroscope's technical specifications. The host SPI can freely read the required data based on the first transmitted byte (Addr) and the length of each data acquisition. For example, if the host SPI's first transmitted byte (Addr) points to GyroX and a 4-byte CLK clock is transmitted, then the data contents of GyroX and GyroY can be retrieved.

[0142] The basic formula for Gyro simulation follows this formula: GyroRaw = Amp × sin(2pi × Fre × cnt / 1000000 + θ) + offset, where GyroRaw is the original value of the vibration signal, Amp is the amplitude, Fre is the frequency, cnt is the time count, θ is the phase value, and offset is the offset. Based on the characteristics of vibration motion, the angular velocity is maximum at the 0 position and minimum at the peak position. Therefore, the initial phase physically represents the angular velocity at the starting point of vibration, and also relatively represents the position of that point throughout the entire vibration cycle. The initial phase is strongly correlated with the stability of the algorithm.

[0143] The output frequency of the MCU analog signal is determined by the host OISSPI or SOISSPI. The sampling rate can be 1KHz, 2.5KHz, 5KHz, etc. The MCU will calculate the Raw value based on the current unit (microseconds, us) timestamp at the time of triggering and send it. At the same time, the MCU needs to have enough time to respond to the trigger according to the embedded platform architecture.

[0144] In this embodiment, the basic OIS test process simulated by Gyro is controlled by IIC. The simplified process includes: MCU mode setting → setting analog signal parameters (GyroType / AXIS / Fre / Amp / pffset) → setting drive parameters → module OISON → enabling MCU SPI data transmission → reading RAWDATA (on demand) → shutting down.

[0145] After obtaining the target reference point signal determined by tracking and identifying the target plate image, the target reference point signal sequence is fitted to obtain the measured motion curve.

[0146] The core of the least squares fitting method is to minimize the sum of squared errors between the model's predicted and observed values ​​by adjusting the model parameters. For a Sine wave signal, the mathematical expression is: Theoretical model: y(t) = Asin(ωt + b) + c, where A is the amplitude, ωt is the angular frequency, b is the phase, and c is the DC offset. The error function is... However, this Sine wave model is nonlinear (the parameters ω and b exist inside the trigonometric functions), so it cannot be solved directly by the linear least squares method and requires the help of iterative optimization algorithms (such as the LM algorithm).

[0147] The Levenberg-Marquardt (LM) algorithm is a combination of gradient descent and Gauss-Newton's method, balancing the advantages of both algorithms by dynamically adjusting the "damping factor." Gradient descent converges stably but slowly, and is suitable for situations where parameters are far from the optimal solution; Gauss-Newton's method converges quickly but may diverge, and is suitable for situations where parameters are close to the optimal solution.

[0148] The mathematical derivation and iterative process of the LM algorithm include:

[0149] ① Linearization of the nonlinear model to approximate the Sine wave model with current parameters Nearby Taylor expansion, ignoring higher-order terms: .

[0150] in, Here, is the Jacobian matrix, representing the model's sensitivity to each parameter: The specific expression is:

[0151]

[0152] ② Construct the LM iterative equation.

[0153] Substituting the linearized model into the error function, the objective becomes finding the parameter increment that minimizes the error. :

[0154]

[0155] To avoid potential divergence issues in the Gauss-Newton method, the LM algorithm incorporates a damping term into the normal equations:

[0156]

[0157] in, The damping factor, It is a diagonal matrix, only retaining The diagonal elements.

[0158] ③ Iterative updates and damping factor adjustments.

[0159] a. Parameter update: calculation Then, update the parameters as follows ;

[0160] b. Error assessment: Compare the sum of squared errors before and after the update. and ;

[0161] c. Damping factor adjustment: If This indicates that the update is effective. Reduce (e.g., multiply by 0.1) to approximate the Gauss-Newton method;

[0162] Accelerate convergence; if This indicates that the update was invalid. Increasing the value (e.g., multiplying by 10) enhances the gradient descent properties and improves stability.

[0163] like Figure 7 As shown, the sine wave fitting process includes: initializing the fitting curve parameters → iterating the parameters to minimize the error function → obtaining the optimal fitting curve.

[0164] By fitting Sine waves using the LM algorithm, in terms of robustness, it is less sensitive to initial parameter values ​​than the pure Gauss-Newton method. Even if the initial value deviates from the true value, it can avoid divergence by adjusting the damping factor. In terms of convergence efficiency, since it automatically switches to the Gauss-Newton method when it is close to the optimal solution, the convergence speed is faster than the traditional gradient descent. In terms of adaptability, there is no need to manually adjust the learning rate, and the damping factor automatically optimizes the iteration step size according to the error change.

[0165] Image recognition and tracking algorithms are used to improve the accuracy and efficiency of target Mark circle positioning and tracking.

[0166] (1) Mark point tracking and calculation process:

[0167] When the module is in serve-on state, it takes a picture and calculates the position of the Mark point (width / 2, height / 2) closest to the center of the image as the reference coordinate for subsequent tracking.

[0168] The MCU sends a jitter sine wave signal, the module activates the oison state, and captures multiple cycle motor motion Hall feedback signals at high frequency under IIC communication mode, and records the start time point t1 of signal acquisition. The algorithm fits the Hall_sin signal wave; the continuous frame image acquisition buffer records the start time point t2 of image acquisition; based on the reference coordinates, time difference Δt0(t2-t1) and motor sensitivity, the motion trajectory of Mark points in the continuous frame images is predicted, and the coordinates of the reference point are initially calculated.

[0169] The actual image Mark point position is calculated based on the reference point coordinates, and the phase difference between the two sine curves is calculated. The time difference Δt is updated to update the reference point coordinates. Based on the new reference coordinates and the Mark coordinates of the previous frame image, the actual Mark coordinate position information (Mark_sin1) of consecutive frame images is accurately calculated.

[0170] like Figure 8 As shown, the Mark point tracking and positioning process includes: servoon reference point calculation → jitter signal input, OISON activation → hall data & continuous frame acquisition from host computer → taking 30 frames of image reference points for correction → calculating image coordinates based on reference points.

[0171] (2) Optimization of Mark point tracking and calculation process efficiency:

[0172] like Figure 9 As shown, the optimized Mark point tracking and positioning process can include: servoon reference point calculation → jitter signal input, OISON activation → hall data acquisition → embedded continuous frame calculation of all Mark points in the image → hall and Mark point matching. Compared to the above Mark point tracking and positioning process, it reduces the algorithm calculation time of 30 additional images, and after changing the host computer to a lower-level (embedded) solution, the tooling's low-level stream processing of images reduces image transmission time. Compared to the above Mark point tracking and positioning process, the optimized Mark point tracking and positioning process reduces software time from 12.5s to 3.2s, an efficiency improvement of 74.4%.

[0173] For image stabilization evaluation, this embodiment employs a new evaluation and calculation method, improving the accuracy of image stabilization (SR) calculation. Compared to the oscillating table SR test, the static SR test uses an MCU to simulate jitter signals, and the subsequent test chart adjustments and OISON stabilization state ambiguity calculation methods have changed, as detailed below:

[0174] Table 1 Comparison of Module Differences

[0175]

[0176] The process of calculating the anti-shake deviation blur amount (P_oison) is as follows: First, the measured Mark_sin1 signal is fitted with a sine wave; then, the theoretical off blur amount amplitude, theoretical vibration frequency and phase are corrected according to the fitting formula to obtain the theoretical Mark_sin2 waveform formula; finally, the theoretical waveform is restored back to the discrete Mark coordinates, and the corresponding frame position max(theoretical Mark_sin - measured Mark_sin) is calculated.

[0177] like Figure 10 As shown, the P_oison calculation process includes: Mark point waveform fitting: → Frequency & off ambiguity & phase difference correction, to obtain the theoretical waveform: → Calculate the Mark point position of the theoretical waveform → Calculate the maximum deviation (P_oison) between the theoretical Mark point and the actual Mark point position.

[0178] P_oison can be calculated using several methods, including:

[0179] (1) The single-point range calculation method is the maximum value of the difference between the measured and theoretical Mark coordinates, including:

[0180] Data preparation:

[0181] Measured coordinate sequence: A sequence of marker point positions with image stabilization compensation obtained through sensors and algorithms. Mark_measured=[(x1,y1),(x2,y2),...,(xn,yn)].

[0182] Theoretical coordinate sequence: Based on the fitted and corrected theoretical model, the sequence of positions that the marker should be in under perfectly ideal anti-shake (i.e., the theoretical value of OISOFF) conditions is calculated. Mark_theoretical=[(X1,Y1),(X2,Y2),...,(Xn,Yn)].

[0183] Frame-by-frame deviation calculation: For each frame i, calculate the Euclidean distance (i.e., single-point deviation) between the measured coordinates and the theoretical coordinates. i =sqrt((x i -X i ) 2 +(y i -Y i ) 2 ), deviation i This represents the remaining, not fully compensated, jitter error of the image stabilization system at that specific moment.

[0184] Determine P_oison: Iterate through the deviations of all frames. iFind the maximum value among them: P_oison = max(deviation1,deviation2,...,deviation) n ).

[0185] The physical significance and advantages include: (1) Capturing the worst-case scenario: The weakness of image stabilization performance is determined by its performance at its worst moment. The single-point range method accurately captures the moment when the image stabilization effect is weakest during the entire test process, reflecting the maximum pressure that the system needs to cope with. (2) Conforming to the SR calculation logic: The formula for calculating SR is 20×log10(P_oison / off). Here, off is the theoretical total jitter amplitude. Using the maximum deviation P_oison as the numerator, the calculated SR value can most realistically reflect the image stabilization system's ability to suppress peak jitter, which is directly related to user experience (e.g., whether a clear photo can be taken under severe jitter). (3) Sensitive to outliers: It can effectively expose the instantaneous failure or performance degradation that may occur when the image stabilization algorithm deals with specific frequency or phase jitter.

[0186] (2) The single-point difference mean is calculated as the mean of the difference between the measured and theoretical Mark coordinates, including:

[0187] Data preparation: Same as method (1), obtain Mark_measured and Mark_theoretical.

[0188] Frame-by-frame deviation calculation: Same as method (1), calculate the deviation for each frame. i .

[0189] Determine P_oison: Calculate all deviations i The arithmetic mean P_oison = (deviation1 + deviation2 + ... + deviation) n ).

[0190] Physical significance and disadvantages: (1) Reflects average performance: It describes the "average error level" of the image stabilization system over the entire time period. (2) Masking peaks: This is its biggest drawback. If the image stabilization works well most of the time, but there are a few frames with severe shaking, these "peaks" will be diluted by a large number of "normal values" when averaging. This results in the calculated P_oison being too small, thus overestimating the SR value and failing to truly reflect the performance under the worst conditions. (3) Disconnected from user experience: The user's perception of a blurry photo is often determined by the moment of the most shaking during the shooting process, rather than the average shaking of the entire process.

[0191] (3) The single-point peak value calculation method is the deviation between the measured and theoretical Mark coordinate peak values, including:

[0192] Data preparation: Same as method (1).

[0193] Finding the peak value: Find the displacement peak value (usually half the distance from the peak to the trough, or the maximum amplitude) of each of the measured coordinate sequences and the theoretical coordinate sequences during the entire vibration period. The measured peak value is peak_measured = amplitude_of(Mark_measured), and the theoretical peak value is peak_theoretical = amplitude_of(Mark_theoretical).

[0194] Determine P_oison: Calculate the difference between the two peaks: P_oison = |peak_measured - peak_theoretical|.

[0195] Physical significance and disadvantages: (1) Comparing the overall amplitude: It focuses on how much the anti-shake system reduces the overall amplitude of the shake. (2) Ignoring phase and waveform distortion: This is its fatal flaw. The anti-shake system may introduce phase delay or change the waveform shape. For example, in the phase delay scenario: the measured waveform is perfect with the theoretical waveform, but there is a time difference. At this time, peak_measured≈peak_theoretical, the calculated P_oison will be very small, and the SR value will be very high. But in reality, due to the phase misalignment, there is a deviation at every moment, and the actual anti-shake effect is not good; in the waveform distortion scenario, the measured waveform is no longer a perfect sine wave and distortion occurs. At this time, even if the overall peak value is reduced, the "glitch" and "distortion point" on the waveform produce a large instantaneous deviation.

[0196] Comparative analysis and testing were conducted using the three methods described above:

[0197] Associated with real blurred images: During the test, actual images or chart screens are acquired synchronously.

[0198] The correlation analysis between the P_oison and SR values ​​calculated by the three methods and the actual blur degree of the image (which can be calculated by image analysis software) was performed. The expected result was that the SR value calculated by method (1) single-point range method had the highest correlation with the actual blur degree of the image. This is because the blur of the image is usually determined by the maximum relative displacement during exposure.

[0199] Data distribution analysis: Plot the distribution of the frame-by-frame deviation sequence deviation_i calculated using method (1) (such as a histogram or time series plot). Expected results: The distribution plot can clearly show the statistics of the deviation, and the largest P_oison value will serve as a clear and traceable "worst point". This provides a clear direction for algorithm optimization.

[0200] The components required for SR testing based on a full-field-of-view target include an MCU microcontroller, a target, a light source, a jitter signal acquisition system, a module, and testing software. For example... Figure 11 As shown, the static verification method for the OIS effect based on the optical image stabilization module can include: MCUIIC initialization; MCU outputting a jitter signal; enabling the driver firmware to activate the image stabilization effect; acquiring continuous frames, calculating the pixel offset of the image Mark center of each continuous frame, and synthesizing the Mark_sin1 waveform; based on the Mark_sin1 waveform, correcting according to the theoretical blur amplitude A, theoretical frequency, and phase difference to obtain the fitted Mark_sin2 waveform; calculating the maximum deviation value P_oison between the Mark_sin1 waveform and the Mark_sin2 waveform; the calculation formula is SR=20×log10×(A / P_oison); determining whether SR meets the specifications; if yes, the test result is OK; otherwise, the test result is No.

[0201] This embodiment provides a static inspection method for the OIS effect based on an optical image stabilization module. Through a compatible OIS static inspection standard board, it enables multi-item and multi-station testing without the need for centering or spot checks. It employs MCU single-chip microcomputer sine wave construction technology to achieve accurate output of simulated vibration signals under vibration-free conditions. A sine wave fitting algorithm is used to construct waveform simulation signals. Image recognition and tracking algorithms are employed to improve the accuracy of target mark circle positioning and tracking. A new anti-shake evaluation and calculation method is used to improve the calculation accuracy of SR, thereby meeting testing requirements while reducing production steps and significantly improving the testing efficiency, stability, and operability of the production line.

[0202] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0203] Based on the same inventive concept, this application also provides an optical image stabilization testing system for implementing the optical image stabilization testing method described above. The solution provided by this system is similar to the solution described in the above method; therefore, the specific limitations in one or more optical image stabilization testing system embodiments provided below can be found in the limitations of the optical image stabilization testing method described above, and will not be repeated here.

[0204] In one embodiment, such as Figure 12 As shown, an optical image stabilization testing system is provided, which includes a host control device 310, a microcontroller unit 320, and a test plate 330.

[0205] The host control device 310 is used to set the preset waveform parameters of the microcontroller 320;

[0206] The microcontroller unit 320 is used to generate an analog motion sensor signal without physical vibration according to preset waveform parameters; the analog motion sensor signal is applied to the target optical image stabilization module to drive the motor to perform image stabilization movement;

[0207] The host control device 310 is also used to track and identify target reference points in the corresponding target image acquired by the image sensor, and fit the measured motion curve of the target reference point in the target image; determine the theoretical motion curve of the target reference point in the target image based on the preset waveform parameters and the measured motion curve; and determine the test result of the target optical image stabilization module based on the deviation calculation result between the measured motion curve and the theoretical motion curve.

[0208] In one embodiment, the test plate 330 includes staggered black and white squares, with a reference point graphic set at the center of each black square; wherein a black square and a white square occupy no more than 0.15 fields of view, and the field of view deviation does not exceed 0.04F.

[0209] Each module in the aforementioned optical image stabilization testing system can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0210] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 13 As shown, the computer device includes a processor, memory, communication interface, display screen, and input system connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements an optical image stabilization testing method. The display screen can be an LCD screen or an e-ink display. The input system can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.

[0211] Those skilled in the art will understand that Figure 13 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0212] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the optical image stabilization testing method of any of the above embodiments:

[0213] Based on preset waveform parameters, a simulated motion sensor signal without physical vibration is generated; the simulated motion sensor signal is applied to the target optical image stabilization module to drive the motor to perform image stabilization motion;

[0214] The target reference point is tracked and identified in the target plate image acquired by the image sensor, and the measured motion curve of the target reference point in the target plate image is obtained by fitting.

[0215] Based on the preset waveform parameters and the measured motion curve, the theoretical motion curve of the target reference point in the target image is determined;

[0216] The test results of the target optical image stabilization module are determined based on the deviation calculation results between the measured motion curve and the theoretical motion curve.

[0217] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the optical image stabilization testing method of any of the above embodiments:

[0218] Based on preset waveform parameters, a simulated motion sensor signal without physical vibration is generated; the simulated motion sensor signal is applied to the target optical image stabilization module to drive the motor to perform image stabilization motion;

[0219] The target reference point is tracked and identified in the target plate image acquired by the image sensor, and the measured motion curve of the target reference point in the target plate image is obtained by fitting.

[0220] Based on the preset waveform parameters and the measured motion curve, the theoretical motion curve of the target reference point in the target image is determined;

[0221] The test results of the target optical image stabilization module are determined based on the deviation calculation results between the measured motion curve and the theoretical motion curve.

[0222] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0223] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0224] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0225] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. An optical image stabilization test method, characterized by, The optical anti-shake test method is applied to an optical anti-shake test system, and the optical anti-shake test method comprises the following steps: According to the preset waveform parameters, a simulated motion sensor signal without physical vibration is generated; the simulated motion sensor signal is applied to a target optical anti-shake module to drive a motor to perform anti-shake movement; Target reference point tracking and identification are performed on a target plate image collected by an image sensor, and a measured motion curve of the target reference point in the target plate image is fitted; According to the preset waveform parameters and the measured motion curve, a theoretical motion curve of the target reference point in the target plate image is determined; the determination of the theoretical motion curve of the target reference point in the target plate image according to the preset waveform parameters and the measured motion curve comprises the following steps: a theoretical waveform curve is constructed based on the preset waveform parameters; the parameters of the theoretical waveform curve are corrected based on a theoretical blur amplitude, a waveform frequency of the measured motion curve, and a phase difference between the measured motion curve and the theoretical waveform curve, to obtain the theoretical motion curve; the theoretical blur amplitude is a maximum displacement of the target reference point in a state in which an anti-shake function is turned off; According to a deviation calculation result of the measured motion curve and the theoretical motion curve, a test result of the target optical anti-shake module is determined.

2. The optical image stabilization test method according to claim 1, wherein The preset waveform parameters at least include one of a frequency, an amplitude, a phase value, and an offset; the generation of the simulated motion sensor signal without physical vibration according to the preset waveform parameters comprises the following steps: According to a communication protocol of the target optical anti-shake module, a signal data format is determined; An analog vibration signal is generated based on the preset waveform parameters; An analog motion sensor signal is generated based on the analog vibration signal and the signal data format; the analog motion sensor signal is used to be sent to the target optical anti-shake module based on the communication protocol.

3. The optical image stabilization test method according to claim 2, wherein The generation of the analog motion sensor signal based on the analog vibration signal and the signal data format comprises the following steps: Based on the analog vibration signal, angular velocity information at a current time is calculated; Based on the signal data format and the angular velocity information, the analog motion sensor signal is generated.

4. The optical image stabilization test method according to claim 1, wherein The target reference point identification of the target plate image collected by the image sensor comprises the following steps: According to a predicted coordinate determined at a previous time and a target reference point coordinate, target reference point identification of the target plate image is performed to obtain a target reference point coordinate at a current time; wherein the determination of the predicted coordinate at the previous time comprises the following steps: a magnetic field sensor signal of the motor is acquired; based on a time difference between the acquisition of the magnetic field sensor signal and the target plate image, a target reference point coordinate or a reference point coordinate at the previous time, and a displacement proportionality coefficient of the motor and the target reference point, a motion trajectory of the target reference point is predicted to obtain a preliminary predicted coordinate point; the reference point coordinate in the target plate image is calculated based on the preliminary predicted coordinate point to obtain the predicted coordinate.

5. The optical image stabilization test method according to claim 1, wherein The fitting of the measured motion curve of the target reference point in the target plate image comprises the following steps: The target reference point coordinates at multiple time points are fitted based on the Levenberg-Marquardt method to obtain the measured motion curve.

6. The optical image stabilization test method according to claim 1, wherein The deviation calculation result of the measured motion curve and the theoretical motion curve includes: Based on the measured motion curve and the theoretical motion curve, a discrete measured coordinate sequence and a discrete theoretical coordinate sequence are obtained respectively; Based on the discrete measured coordinate sequence and the discrete theoretical coordinate sequence, the Euclidean distance at each time point is calculated to obtain a single-point deviation; The maximum value of multiple single-point deviations is determined as the deviation calculation result.

7. The optical image stabilization test method according to claim 6, wherein Based on the deviation calculation result, the test result of the target optical anti-shake module includes: Based on the deviation calculation result and the theoretical blur amount amplitude, the compression ratio of the target optical anti-shake module is calculated; Based on the comparison result of the compression ratio and the preset specification threshold, the test result of the target optical anti-shake module is determined.

8. An optical image stabilization test system, characterized by, The optical anti-shake test system includes an upper control device, a micro control unit and a test target plate; The upper control device is used to set the preset waveform parameters of the micro control unit; The micro control unit is used to generate an analog motion sensor signal without physical vibration according to the preset waveform parameters; the analog motion sensor signal is applied to the target optical anti-shake module to drive the motor to perform anti-shake motion; The upper control device is also used to track and identify the target reference points of the corresponding target plate images collected by the image sensor to obtain the measured motion curve of the target reference points in the target plate images; according to the preset waveform parameters and the measured motion curve, the theoretical motion curve of the target reference points in the target plate images is determined; according to the deviation calculation result of the measured motion curve and the theoretical motion curve, the test result of the target optical anti-shake module is determined; According to the preset waveform parameters and the measured motion curve, the theoretical motion curve of the target reference points in the target plate images includes: constructing a theoretical waveform curve based on the preset waveform parameters; Based on the theoretical blur amount amplitude, the waveform frequency of the measured motion curve, and the phase difference between the measured motion curve and the theoretical waveform curve, the parameters of the theoretical waveform curve are corrected to obtain the theoretical motion curve; the theoretical blur amount amplitude is the maximum displacement of the target reference points in the off state of the anti-shake function.

9. The optical image stabilization test system of claim 8, wherein, The test target plate includes staggered black squares and white squares, and the center of each black square is provided with a reference point pattern; wherein one black square and one white square share a field of view of not more than 0.15 field of view, and the field of view deviation is not more than 0.04F.

Citation Information

Patent Citations

  • Detection method, device and equipment of optical anti-vibration module and storage medium

    CN117560484A

  • Shooting anti-shake method and device, computer readable medium and electronic equipment

    CN118632126A

  • Optical image stabilizer anti-shake detection method and related equipment

    CN120751112A