Anti-shake test method and device, test equipment and medium

By acquiring each frame of the preview stream while the electronic device is vibrating, the target position is determined, which solves the problems of low efficiency and poor reliability in the existing anti-shake testing technology and realizes efficient and reliable anti-shake testing.

CN121967665APending Publication Date: 2026-05-01BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING XIAOMI MOBILE SOFTWARE CO LTD
Filing Date
2024-10-31
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

In the existing technology, the optical image stabilization test of electronic devices is inefficient and unreliable, mainly because the image storage and transmission time is long and cannot fully reflect the motion process of the optical image stabilization system.

Method used

By acquiring each frame of the preview stream while the electronic device is vibrating, the target position of the subject is determined, and the image stabilization effect is reflected by the target position. This avoids image storage and transmission, improves efficiency by cropping and grayscale processing, and optimizes the image stabilization system by adjusting the gain value.

Benefits of technology

It significantly improves the efficiency and reliability of image stabilization testing, reduces testing time, enhances the response to the motion process of the optical image stabilization system, and simplifies the troubleshooting and calibration process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121967665A_ABST
    Figure CN121967665A_ABST
Patent Text Reader

Abstract

The invention relates to an anti-shake test method and device, test equipment and a medium. The anti-shake test method comprises the following steps: when the electronic equipment is in a vibration state, obtaining a preview stream collected by the electronic equipment; determining a target position of a shot object in each frame of image of the preview flow; and determining whether the anti-shake effect of the electronic equipment meets the anti-shake requirement or not according to each target position. The anti-shake effect of the electronic equipment is verified according to the target position of the shot object in each frame of image, and the time required for verifying the anti-shake effect is not required to be reduced by storing and transmitting each frame of image, so that the anti-shake test efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Image stabilization testing methods, devices, testing equipment and media Technical Field

[0001] This disclosure relates to the field of testing technology, and in particular to a method, apparatus, testing equipment and medium for stabilization testing. Background Technology

[0002] Because different optical image stabilization (OIS) systems vary in their manufacturing and assembly processes into electronic devices, the stabilization performance of these devices needs to be tested before they leave the factory. However, the stabilization testing process is time-consuming, resulting in low efficiency. Summary of the Invention

[0003] To overcome the problems existing in related technologies, this disclosure provides a method, apparatus, testing equipment, and medium for image stabilization testing.

[0004] According to a first aspect of the present disclosure, a method for testing image stabilization is provided, the method comprising:

[0005] Acquire the preview stream collected by the electronic device while the electronic device is vibrating;

[0006] Determine the target position of the subject in each frame of the preview stream;

[0007] Based on the target positions, determine whether the image stabilization effect of the electronic device meets the image stabilization requirements.

[0008] In some embodiments of this disclosure, determining whether the image stabilization effect of the electronic device meets the image stabilization requirements based on each of the target positions includes:

[0009] Based on the respective target positions, determine the first maximum displacement of the photographed object in the first direction and the second maximum displacement in the second direction;

[0010] Based on the first maximum displacement, a first anti-shake value is determined, and the first anti-shake value is used to reflect the anti-shake effect of the optical image stabilization system in the electronic device in the first direction;

[0011] A second image stabilization value is determined based on the second maximum displacement. The second image stabilization value is used to reflect the image stabilization effect of the optical image stabilization system in the second direction.

[0012] Based on the first stabilization value and the second stabilization value, determine whether the stabilization effect meets the stabilization requirements;

[0013] Wherein, the first direction and the second direction are perpendicular.

[0014] In some embodiments of this disclosure, determining whether the image stabilization effect meets the image stabilization requirements based on the first image stabilization value and the second image stabilization value includes:

[0015] If the first stabilization value is greater than or equal to the first preset stabilization value and the second stabilization value is greater than or equal to the second preset stabilization value, it is determined that the stabilization effect meets the stabilization requirements.

[0016] If the first stabilization value is less than the first preset stabilization value and / or the second stabilization value is less than the second preset stabilization value, it is determined that the stabilization effect does not meet the stabilization requirements.

[0017] In some embodiments of this disclosure, determining whether the image stabilization effect of the electronic device meets the image stabilization requirements based on each of the target positions includes:

[0018] If the total number of images in the preview stream is greater than or equal to a preset number, the stabilization effect is determined to meet the stabilization requirements based on each target position.

[0019] In some embodiments of this disclosure, determining the target position of the subject in each frame of the preview stream includes:

[0020] Each frame of the preview stream is cropped.

[0021] Perform grayscale processing on each frame of the cropped image;

[0022] Determine the target position of the photographed object in each frame of the image after grayscale processing.

[0023] In some embodiments of this disclosure, determining the target position of the subject in each frame of the preview stream includes:

[0024] If the vibration time of the electronic device is greater than or equal to a preset time, the target position of the photographed object in each frame of the preview stream is determined.

[0025] In some embodiments of this disclosure, the preview stream is acquired by a preview control module other than the processor, the target position is determined by an algorithm calling module other than the processor, and whether the image stabilization effect meets the image stabilization requirements is determined by a verification result output module other than the processor; and / or, the subject is a two-dimensional graphic set on a picture card, and the target position is the center position of the two-dimensional graphic.

[0026] In some embodiments of this disclosure, the image stabilization testing method further includes:

[0027] If the image stabilization effect is insufficient, repeat the following steps until the image stabilization effect meets the requirements:

[0028] Adjust the gain value of the gyroscope in the optical image stabilization system of the electronic device.

[0029] In some embodiments of this disclosure, the gain value includes a first gain value and a second gain value, wherein the first gain value is related to the stabilization effect of the optical image stabilization system in a first direction, and the second gain value is related to the stabilization effect of the optical image stabilization system in a second direction; adjusting the gain value of the gyroscope of the optical image stabilization system in the electronic device includes:

[0030] If the first image stabilization value is less than the first preset image stabilization value, the first gain value is adjusted. The first image stabilization value is used to reflect the image stabilization effect of the optical image stabilization system in the first direction.

[0031] If the second stabilization value is less than the second preset stabilization value, the second gain value is adjusted. The second stabilization value is used to reflect the stabilization effect of the optical image stabilization system in the second direction.

[0032] According to a second aspect of the present disclosure, a stabilization testing apparatus is provided, the stabilization testing apparatus comprising:

[0033] A preview control module is configured to acquire a preview stream collected by the electronic device when the electronic device is under vibration.

[0034] An algorithm invocation module is configured to determine the target position of the object being photographed in each frame of the preview stream;

[0035] The verification result output module is configured to determine whether the anti-shake effect of the electronic device meets the anti-shake requirements based on each of the target positions.

[0036] According to a third aspect of the present disclosure, a testing apparatus is provided, the testing apparatus comprising:

[0037] processor;

[0038] Memory used to store the processor's executable instructions;

[0039] The processor is configured to perform the anti-shake test method as described above.

[0040] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, wherein when instructions in the storage medium are executed by a processor of a terminal, the terminal is enabled to perform the anti-shake testing method as described above.

[0041] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:

[0042] While the electronic device is vibrating, the preview stream captured by the device is acquired to obtain each frame of the preview stream. The target position of the subject in each frame is determined to ascertain the changes in the target position caused by vibration. Based on each target position, it is determined whether the image stabilization effect of the electronic device meets the stabilization requirements. By verifying the image stabilization effect of the electronic device based on the target position of the subject in each frame, the storage and transmission of each frame are eliminated, reducing the time required for image stabilization effect verification and thus improving the efficiency of image stabilization testing.

[0043] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0044] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0045] Figure 1-1 is a schematic diagram of an image captured by an electronic device during a shake stabilization test;

[0046] Figure 1-2 is a schematic diagram of images captured by another electronic device during the image stabilization test;

[0047] Figure 1-3 is a schematic diagram of images captured by another electronic device during the image stabilization test;

[0048] Figure 2 is a flowchart illustrating a stabilization testing method according to an exemplary embodiment;

[0049] Figure 3 is a flowchart illustrating a stabilization test method according to another exemplary embodiment;

[0050] Figure 4 is a flowchart illustrating a stabilization test method according to another exemplary embodiment;

[0051] Figure 5 is a schematic diagram of a system architecture according to an exemplary embodiment;

[0052] Figure 6-1 is a schematic diagram of a card according to an exemplary embodiment;

[0053] Figure 6-2 is a schematic diagram illustrating the target position of the photographed object in each frame of an image according to an exemplary embodiment;

[0054] Figure 6-3 is a schematic diagram illustrating the displacement of a target position according to an exemplary embodiment;

[0055] Figure 7 is a schematic diagram of the image stabilization value curve of an optical image stabilization system according to an exemplary embodiment;

[0056] Figure 8 is a flowchart illustrating a stabilization test method according to another exemplary embodiment;

[0057] Figure 9 is a block diagram of a stabilization testing apparatus according to an exemplary embodiment;

[0058] Figure 10 is a block diagram of an electronic device according to an exemplary embodiment.

[0059] In the picture:

[0060] 100 - Preview control module; 200 - Algorithm call module; 300 - Verification result output module; 400 - Electronic equipment; 402 - Processing component; 404 - Memory; 406 - Power supply component; 408 - Multimedia component; 410 - Audio component; 412 - Input / output interface; 414 - Sensor component; 416 - Communication component; 420 - Processor. Detailed Implementation

[0061] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims. It should also be understood that the term “and / or” as used in this disclosure refers to and includes any or all possible combinations of one or more of the associated listed items.

[0062] With the development of electronic devices, optical image stabilization (OIS) systems have been incorporated to prevent image blurring when the device shakes. An OIS system includes a Hall sensor, gyroscope, motor, driver chip, and control chip. When the electronic device shakes, the gyroscope detects the shaking data. The Hall sensor detects the current position of the lens. The control chip determines the angular velocity of the electronic device based on the shaking data and, based on the angular velocity and current position, determines the target position for the lens. Upon receiving the target position from the control chip, the driver chip controls the motor to move the lens. Because different OIS systems vary in their manufacturing and assembly processes, the image stabilization performance of the electronic device needs to be tested before it leaves the factory.

[0063] In related technologies, a method for testing image stabilization is provided, as shown in Figures 1-1 to 1-3. The electronic device under test is placed on a vibrating device. The exposure time of the electronic device is set to be greater than the vibration period of the vibrating device. With the vibrating stage on and off, the image stabilization value of the optical image stabilization system is determined based on the maximum distance of pixel movement (shaded area) in the acquired image. The image stabilization value reflects the image stabilization effect of the optical image stabilization system. Figure 1-1 shows an image acquired with the optical image stabilization system and vibrating stage off; Figure 1-2 shows an image acquired with the optical image stabilization system off and the vibrating stage on; and Figure 1-3 shows an image acquired with the optical image stabilization system and vibrating stage on. This method can verify the image stabilization effect of the electronic device using images acquired by the device. However, because the electronic device needs to store and transmit the image after acquisition, which consumes time, the efficiency of the image stabilization test is low. Furthermore, since only images are acquired under three different conditions, the motion process of the optical image stabilization system cannot be reflected, resulting in poor reliability of the image stabilization test.

[0064] To address the aforementioned technical issues, this disclosure provides a method for testing image stabilization. This method determines whether the image stabilization effect meets the requirements by analyzing the target position of the subject in each frame of the preview stream acquired by the electronic device. This eliminates the need for image storage and transmission, reducing the time required for image stabilization verification by more than half, thereby improving the efficiency of image stabilization testing. Furthermore, since each frame in the preview stream is continuous, it reflects the motion process of the optical image stabilization system when the electronic device vibrates, thus improving the reliability of the image stabilization test.

[0065] This disclosure provides a method for testing image stabilization, as shown in Figure 2. The method includes:

[0066] S100. Acquire the preview stream collected by the electronic device while the electronic device is vibrating.

[0067] S200, Determine the target position of the subject in each frame of the preview stream.

[0068] S300: Determine whether the image stabilization effect of the electronic device meets the image stabilization requirements based on the target positions.

[0069] In this embodiment, during the image stabilization test of the electronic device, the device needs to be vibrating while continuously photographing the subject to verify the stabilization effect. While the electronic device is vibrating, the preview stream captured by the device is acquired, even before each frame is stored. The target position of the subject in each frame is determined to ascertain the changes in that position caused by vibration. Since the target position reflects the degree to which the optical image stabilization system counteracts vibration, the stabilization effect of the electronic device is determined based on each target position to determine whether it meets the stabilization requirements. By verifying the stabilization effect of the electronic device based on the target position of the subject in each frame, the need to store and transmit each frame eliminates the need for storing and transmitting each frame, reducing the time required for verification and thus improving the efficiency of the image stabilization test. Furthermore, since multiple consecutive frames can reflect the motion process of the optical image stabilization system, it is easier to locate the problem when the system malfunctions, thereby improving the reliability of the image stabilization test.

[0070] For example, an electronic device may be placed on a vibration device, and the electronic device is in a vibrating state when the vibration device is turned on. The vibration device may be, for example, a vibration table.

[0071] For example, in step S100, obtaining the preview stream captured by the electronic device can be achieved by calling a preset function to obtain the preview stream captured by the camera of the electronic device. The preview stream includes real-time video data. The frame rate of the preview stream is greater than or equal to a preset frame rate. The preset frame rate can range from 30 frames to 240 frames. The preset frame rate can be 60 frames, 90 frames, 120 frames, etc. A higher frame rate in the preview stream results in higher efficiency for image stabilization verification.

[0072] In one embodiment, as shown in FIG3, the target position of the subject in each frame of the preview stream in step S200 can be determined in the following manner:

[0073] S210. Crop each frame of the preview stream.

[0074] S220. Perform grayscale processing on each frame of the cropped image.

[0075] S230. Determine the target position of the photographed object in each frame of the image after grayscale processing.

[0076] In this embodiment, each frame of the image is cropped to remove portions other than the subject, thus enabling target location determination. Grayscale processing of the cropped frames eliminates color interference, further facilitating target location determination. The target location of the subject within each grayscale-processed frame is then determined to verify the image stabilization effect. By cropping and grayscale processing each frame, the image size is reduced, improving the efficiency of image stabilization testing.

[0077] For example, in step S230, determining the target position of the subject in each frame of the image after grayscale processing can be achieved by performing calculations on each frame of the image after grayscale processing using a preset algorithm to obtain the target position of the subject.

[0078] In one embodiment, the target position of the subject in each frame of the preview stream in step S200 can also be determined in the following way:

[0079] If the vibration time of the electronic device is greater than or equal to a preset time, determine the target position of the object being photographed in each frame of the preview stream.

[0080] In this embodiment, since the vibration device is in an unstable operating state after startup, it needs to run for a certain period of time to reach a stable operating state. When the vibration time is greater than or equal to a preset time, the vibration device reaches a stable operating state, and the target position of the subject in each frame is determined based on the preview stream. By determining the target position of the subject in each frame after the vibration device has stabilized, deviations in the target position caused by interference from the vibration device are avoided, thereby improving the reliability of the image stabilization test.

[0081] For example, the preset time is related to the type of vibrating equipment. The preset time can range from 1s to 60s. The preset time can be 10s, 20s, 30s, etc.

[0082] For example, before determining the target position of the subject in each frame of the preview stream in step S200, the image stabilization test method further includes:

[0083] Determine the image format for each frame of the preview stream.

[0084] The target position of the subject in each frame of the preview stream in step S200 can also be determined in the following way:

[0085] With the image format set to a preset format, determine the target position of the subject in each frame of the preview stream.

[0086] The default format can be YUV.

[0087] In one embodiment, as shown in FIG4, the determination of whether the image stabilization effect of the electronic device meets the image stabilization requirements based on each target position in step S300 can be determined in the following way:

[0088] S310. Based on the positions of each target, determine the first maximum displacement of the photographed object in the first direction and the second maximum displacement in the second direction.

[0089] S320. Based on the first maximum displacement, determine the first image stabilization (SR) value, which reflects the image stabilization effect of the optical image stabilization system in the electronic device in the first direction.

[0090] S330. Determine the second image stabilization value based on the second maximum displacement. The second image stabilization value is used to reflect the image stabilization effect of the optical image stabilization system in the second direction.

[0091] S340. Determine whether the image stabilization effect meets the image stabilization requirements based on the first and second image stabilization values.

[0092] The first direction and the second direction are perpendicular.

[0093] In this embodiment, based on the target positions, a first maximum displacement in a first direction and a second maximum displacement in a second direction are determined to determine the degree of vibration cancellation by the optical image stabilization system in the first and second directions. A first stabilization value is determined based on the first maximum displacement to reflect the stabilization effect of the optical image stabilization system in the first direction. A second stabilization value is determined based on the second maximum displacement to reflect the stabilization effect of the optical image stabilization system in the second direction. Based on the first and second stabilization values, it is determined whether the stabilization effect meets the stabilization requirements in the first and second directions. By determining the first and second stabilization values ​​to determine whether the stabilization effect meets the requirements, the stabilization effect can be verified from a planar perspective, thereby improving the reliability of the stabilization test.

[0094] For example, the first direction can be horizontal and the second direction can be vertical.

[0095] For example, in step S320, determining the first image stabilization value based on the first maximum displacement can be achieved by substituting the first maximum displacement into a preset formula. Similarly, in step S330, determining the second image stabilization value based on the second maximum displacement can be achieved by substituting the second maximum displacement into a preset formula.

[0096] In one embodiment, the determination of whether the image stabilization effect meets the image stabilization requirements based on the first image stabilization value and the second image stabilization value in step S340 is made in the following way:

[0097] If the first stabilization value is greater than or equal to the first preset stabilization value and the second stabilization value is greater than or equal to the second preset stabilization value, the stabilization effect is determined to meet the stabilization requirements.

[0098] If the first stabilization value is less than the first preset stabilization value and / or the second stabilization value is less than the second preset stabilization value, it is determined that the stabilization effect does not meet the stabilization requirements.

[0099] In this embodiment, when the first stabilization value is greater than or equal to the first preset stabilization value and the second stabilization value is greater than or equal to the second preset stabilization value, the optical image stabilization system has good stabilization performance in both the first and second directions, and the stabilization performance is determined to meet the stabilization requirements. When the first stabilization value is less than the first preset stabilization value and / or the second stabilization value is less than the second preset stabilization value, the optical image stabilization system has poor stabilization performance in both the first and / or second directions, and the stabilization performance is determined to not meet the stabilization requirements. By determining whether the stabilization performance meets the requirements based on the first and second stabilization values, the stabilization performance of the electronic device can be verified from a planar perspective, thereby improving the reliability of the stabilization test.

[0100] For example, the range of the first preset image stabilization value and the second preset image stabilization value can be 20 to 25. The values ​​of the first preset image stabilization value and the second preset image stabilization value can be 21, 22, 23, etc. Alternatively, the first preset image stabilization value can also be the maximum value that the first image stabilization value can achieve, and the second preset image stabilization value can also be the maximum value that the second image stabilization value can achieve.

[0101] In one embodiment, the determination in step S300 of whether the image stabilization effect of the electronic device meets the image stabilization requirements based on each target position can also be determined in the following way:

[0102] If the total number of images in the preview stream is greater than or equal to the preset number, determine whether the image stabilization effect meets the image stabilization requirements based on each target position.

[0103] In this embodiment, a large number of images reliably reflects the maximum displacement of the subject. When the total number of images is greater than or equal to a preset number, the stabilization effect is determined based on each target position to ensure it meets the requirements. By verifying the stabilization effect when the number of images reaches a certain level, deviations in the verification of the stabilization effect due to a small number of target positions are avoided, thereby improving the reliability of the stabilization test.

[0104] For example, the preset number can range from 60 to 120. The preset number can also be 75, 90, 105, etc. Alternatively, the preset number can be determined based on the frame rate when the electronic device captures the preview stream.

[0105] In one embodiment, as shown in Figure 5, the preview stream is acquired by a preview control module outside the processor, the target position is determined by an algorithm calling module outside the processor, and whether the image stabilization effect meets the image stabilization requirements is determined by a verification result output module outside the processor. The number of processors can be multiple and varied, for example, it may include a first processor, a second processor, a third processor, etc.

[0106] In this embodiment, by using a preview control module, algorithm calling module, and verification result output module other than the processor to verify the anti-shake effect when the algorithm is moved up, the problem of adaptation difficulties caused by processor limitations in the anti-shake test method can be avoided, thereby improving the universality of anti-shake test.

[0107] In one embodiment, the object being photographed is a two-dimensional graphic set on a graphic card, and the target position is the center position of the two-dimensional graphic.

[0108] In this embodiment, by taking a picture of the two-dimensional graphic on the fixed image card, it is easy to determine whether the image stabilization effect meets the image stabilization requirements based on the center position of the two-dimensional graphic, thereby reducing the complexity of the image stabilization test.

[0109] For example, as shown in Figures 6-1 to 6-3, the two-dimensional graphic is a circle, and the target position is the center of the circle. When the electronic device is vibrating, the center position of the circle in each frame of the preview stream shifts. Based on the first maximum displacement D1 of the circle in the horizontal direction and the second maximum displacement D2 in the vertical direction, it is determined whether the image stabilization effect meets the image stabilization requirements.

[0110] It is understandable that two-dimensional graphics can be not only circles, but also squares, rectangles, triangles, etc.

[0111] In one embodiment, the image stabilization testing method further includes:

[0112] If the image stabilization effect is insufficient, repeat the following steps until the image stabilization effect meets the requirements:

[0113] Adjust the gain value of the gyroscope in the optical image stabilization system of the electronic device.

[0114] In this embodiment, when the image stabilization effect does not meet the requirements, the electronic device cannot stably acquire images, necessitating image stabilization calibration of the optical image stabilization system. Since the gain value of the gyroscope in the optical image stabilization system affects the stabilization value, the gyroscope gain value is adjusted, and the stabilization effect is verified. By repeatedly adjusting the gyroscope gain value and verifying the stabilization effect, the stabilization value of the optical image stabilization system can be brought to the expected level to meet the stabilization requirements, thereby improving the reliability of the stabilization test. Simultaneously, the time required for stabilization effect verification is reduced, decreasing the time required for image stabilization calibration by more than six times, thus improving the efficiency of the stabilization test. Furthermore, online calibration can be performed to enhance the effectiveness of the stabilization calibration.

[0115] In one embodiment, the gain value includes a first gain value and a second gain value. The first gain value is related to the stabilization effect of the optical image stabilization system in a first direction, and the second gain value is related to the stabilization effect of the optical image stabilization system in a second direction. The gain value of the gyroscope in the optical image stabilization system of the electronic device in the above steps is determined in the following way:

[0116] If the first stabilization value is less than the first preset stabilization value, the first gain value is adjusted. The first stabilization value is used to reflect the stabilization effect of the optical image stabilization system in the first direction.

[0117] If the second stabilization value is less than the second preset stabilization value, the second gain value is adjusted. The second stabilization value is used to reflect the stabilization effect of the optical image stabilization system in the second direction.

[0118] In this embodiment, when the first stabilization value is less than the first preset stabilization value, the stabilization effect of the optical image stabilization system in the horizontal direction cannot meet the stabilization requirements. The first gain value is then adjusted to change the first stabilization value. Similarly, when the second stabilization value is less than the second preset stabilization value, the stabilization effect of the optical image stabilization system in the vertical direction cannot meet the stabilization requirements. The second gain value is then adjusted to change the second stabilization value. By adjusting the corresponding gain value when the stabilization value does not meet expectations, the stabilization value can be changed to achieve the required stabilization effect, thereby improving the reliability of the stabilization test.

[0119] For example, as shown in Figure 7, the first stabilization value and the second stabilization value show a trend of first increasing and then decreasing as the first gain value and the second gain value increase. Here, the horizontal axis represents the gain value, the vertical axis represents the stabilization value, curve S1 is the curve showing the change of the first stabilization value, and curve S2 is the curve showing the change of the second stabilization value. In the above steps, adjusting the first gain value can be done by gradually increasing the first gain value from small to large by a preset step size. When the first stabilization value changes from increasing to decreasing, the adjustment of the first gain value is stopped, and the gain value corresponding to the largest first stabilization value during the adjustment process is taken as the first gain value. Alternatively, if the first stabilization value is greater than or equal to the first preset stabilization value, the first gain value remains unchanged. Similarly, in the above steps, adjusting the second gain value can be done by gradually increasing the second gain value from small to large by a preset step size. When the second stabilization value changes from increasing to decreasing, the adjustment of the second gain value is stopped, and the gain value corresponding to the largest second stabilization value during the adjustment process is taken as the second gain value. Alternatively, if the second stabilization value is greater than or equal to the second preset stabilization value, the second gain value remains unchanged.

[0120] This disclosure provides a method for testing image stabilization, as shown in Figure 8. The method includes:

[0121] S400: If the first stabilization value is less than the first preset stabilization value and / or the second stabilization value is less than the second preset stabilization value, determine the first gain value and the second gain value of the gyroscope in the optical image stabilization system.

[0122] S410, If the first image stabilization value is less than the first preset image stabilization value, adjust the first gain value.

[0123] S420: If the second image stabilization value is less than the second preset image stabilization value, adjust the second gain value.

[0124] S430. Acquire the preview stream collected by the electronic device while the electronic device is vibrating.

[0125] S440, Determine the vibration time of the electronic device and the image format of each frame of the preview stream.

[0126] S450. If the vibration time is greater than or equal to the preset time and the image format is the preset format, perform cropping processing on each frame of the image.

[0127] S460. Perform grayscale processing on each frame of the cropped image.

[0128] S470. Determine the center position of the circle in each frame of the image after grayscale processing.

[0129] S480. When the number of images is greater than or equal to the preset number, determine the first maximum displacement of the circle in the horizontal direction and the second maximum displacement in the vertical direction according to the position of each circle's center.

[0130] S490. Determine the first anti-shake value based on the first maximum displacement.

[0131] S500: Determine the second anti-shake value based on the second maximum displacement.

[0132] S510, if the first stabilization value is greater than or equal to the first preset stabilization value and the second stabilization value is greater than or equal to the second preset stabilization value, determine that the stabilization effect meets the stabilization requirements.

[0133] S520, if the first stabilization value is less than the first preset stabilization value and / or the second stabilization value is less than the second preset stabilization value, it is determined that the stabilization effect does not meet the stabilization requirements, and the process returns to step S400.

[0134] In this embodiment, when the first stabilization value is less than the first preset stabilization value and / or the second stabilization value is less than the second preset stabilization value, the stabilization effect of the electronic device cannot meet the stabilization requirements. Therefore, the first gain value and the second gain value of the gyroscope in the optical image stabilization system are determined. When the first stabilization value is less than the first preset stabilization value, the first gain value prevents the first stabilization value from reaching the first preset stabilization value, and the first gain value is adjusted. When the second stabilization value is less than the second preset stabilization value, the second gain value prevents the second stabilization value from reaching the second preset stabilization value, and the second gain value is adjusted. After adjusting the first gain value and / or the second gain value, it is necessary to verify whether the adjusted gain value can make the corresponding stabilization value meet the requirements. When the electronic device is in a vibration state, the preview stream collected by the electronic device is acquired, even when each frame of image is not stored. The vibration time of the electronic device and the image format of each frame of image contained in the preview stream are determined to determine whether the vibrating device is operating stably and whether the image format is a processable format. When the vibration time is greater than or equal to a preset time and the image format is a preset format, and the vibration device operates stably with the image format being processable, each frame of image is cropped to eliminate parts of the image other than the subject. Each cropped frame of image is then processed into grayscale to eliminate color interference. The center position of the circle in each grayscale-processed frame of image is determined to determine the offset of the center position at different times. When the number of images is greater than or equal to a preset number, based on the center positions of each circle, a first maximum displacement in the horizontal direction and a second maximum displacement in the vertical direction are determined. Based on the first maximum displacement, a first stabilization value is determined to determine the stabilization effect in the horizontal direction. Based on the second maximum displacement, a second stabilization value is determined to determine the stabilization effect in the vertical direction. When the first stabilization value is greater than or equal to a first preset stabilization value and the second stabilization value is greater than or equal to a second preset stabilization value, the optical image stabilization system has good stabilization effects in both the horizontal and vertical directions, and the stabilization effect is deemed to meet the stabilization requirements. If the first stabilization value is less than the first preset stabilization value and / or the second stabilization value is less than the second preset stabilization value, the optical image stabilization system has poor stabilization performance in the horizontal and / or vertical directions, and the stabilization performance is determined to be unsatisfactory. By verifying the stabilization performance of the electronic device based on the center position of a circle in each frame of the image, the need to store and transmit each frame of the image is eliminated, reducing the time required for stabilization performance verification and thus improving the efficiency of stabilization testing. Simultaneously, since consecutive multi-frame images can reflect the motion process of the optical image stabilization system, it is easier to locate the problem when the optical image stabilization system malfunctions, thereby improving the reliability of stabilization testing.

[0135] In one exemplary embodiment, a stabilization testing apparatus is provided for implementing the method described above. Referring to FIG9, the stabilization testing apparatus may include a preview control module 100, an algorithm invocation module 200, and a verification result output module 300, wherein, during the implementation of the method described above,

[0136] The preview control module 100 is configured to acquire a preview stream collected by the electronic device when the electronic device is under vibration.

[0137] Algorithm calling module 200 is configured to determine the target position of the subject in each frame of the preview stream.

[0138] The verification result output module 300 is configured to determine whether the anti-shake effect of the electronic device meets the anti-shake requirements based on each target position.

[0139] In one exemplary embodiment, a stabilization testing apparatus is provided, wherein an algorithm invocation module 200 is configured to:

[0140] Each frame of the preview stream is cropped.

[0141] Each frame of the cropped image is processed into grayscale.

[0142] Determine the target position of the photographed object in each frame of the image after grayscale processing.

[0143] In one exemplary embodiment, a stabilization testing apparatus is provided, wherein an algorithm invocation module 200 is configured to:

[0144] If the vibration time of the electronic device is greater than or equal to a preset time, determine the target position of the object being photographed in each frame of the preview stream.

[0145] In one exemplary embodiment, a stabilization testing apparatus is provided, wherein a verification result output module 300 is configured to:

[0146] Based on the positions of each target, determine the first maximum displacement of the photographed object in the first direction and the second maximum displacement in the second direction.

[0147] The first anti-shake value is determined based on the first maximum displacement.

[0148] The second anti-shake value is determined based on the second maximum displacement.

[0149] Based on the first and second stabilization values, determine whether the stabilization effect meets the stabilization requirements.

[0150] The first direction and the second direction are perpendicular.

[0151] In one exemplary embodiment, a stabilization testing apparatus is provided, wherein a verification result output module 300 is configured to:

[0152] If the first stabilization value is greater than or equal to the first preset stabilization value and the second stabilization value is greater than or equal to the second preset stabilization value, the stabilization effect is determined to meet the stabilization requirements.

[0153] If the first stabilization value is less than the first preset stabilization value and / or the second stabilization value is less than the second preset stabilization value, it is determined that the stabilization effect does not meet the stabilization requirements.

[0154] In one exemplary embodiment, a stabilization testing apparatus is provided, wherein a verification result output module 300 is configured to:

[0155] If the total number of images in the preview stream is greater than or equal to the preset number, determine whether the image stabilization effect meets the image stabilization requirements based on each target position.

[0156] In one exemplary embodiment, a stabilization testing apparatus is provided, wherein a verification result output module 300 is configured to:

[0157] If the image stabilization effect is insufficient, repeat the following steps until the image stabilization effect meets the requirements:

[0158] Adjust the gain value of the gyroscope in the optical image stabilization system of the electronic device.

[0159] In one exemplary embodiment, a stabilization testing apparatus is provided, wherein a verification result output module 300 is configured to:

[0160] If the first stabilization value is less than the first preset stabilization value, adjust the first gain value.

[0161] If the second stabilization value is less than the second preset stabilization value, adjust the second gain value.

[0162] In one exemplary embodiment, a test apparatus is provided, comprising a processor and a memory for storing processor-executable instructions. The processor is configured to perform the anti-jitter test method as described above.

[0163] In one exemplary embodiment, an electronic device is provided, such as a mobile phone, a laptop computer, a tablet computer, and a wearable device.

[0164] Referring to Figure 10, the electronic device 400 may include one or more of the following components: a processing component 402, a memory 404, a power supply component 406, a multimedia component 408, an audio component 410, an input / output (I / O) interface 412, a sensor component 414, and a communication component 416.

[0165] Processing component 402 typically controls the overall operation of electronic device 400, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 402 may include one or more processors 420 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 402 may include one or more modules to facilitate interaction between processing component 402 and other components. For example, processing component 402 may include a multimedia module to facilitate interaction between multimedia component 408 and processing component 402.

[0166] Memory 404 is configured to store various types of data to support the operation of electronic device 400. Examples of this data include instructions for any application or method operating on electronic device 400, contact data, phonebook data, messages, pictures, videos, etc. Memory 404 can be implemented by any type of volatile or non-volatile storage terminal or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0167] Power supply component 406 provides power to various components of electronic device 400. Power supply component 406 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 400.

[0168] Multimedia component 408 includes a screen that provides an output interface between electronic device 400 and user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 408 includes a front-facing camera module and / or a rear-facing camera module. When electronic device 400 is in an operating mode, such as shooting mode or video mode, the front-facing camera module and / or rear-facing camera module may receive external multimedia data. Each front-facing camera module and rear-facing camera module may be a fixed optical lens system or have focal length and optical zoom capabilities.

[0169] Audio component 410 is configured to output and / or input audio signals. For example, audio component 410 includes a microphone (MIC) configured to receive external audio signals when electronic device 400 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 404 or transmitted via communication component 416. In some embodiments, audio component 410 also includes a speaker for outputting audio signals.

[0170] I / O interface 412 provides an interface between processing component 402 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.

[0171] Sensor assembly 414 includes one or more sensors for providing state assessments of various aspects of electronic device 400. For example, sensor assembly 414 may detect the on / off state of electronic device 400, the relative positioning of components such as the display and keypad of electronic device 400, changes in position of electronic device 400 or a component of electronic device 400, the presence or absence of user contact with electronic device 400, orientation or acceleration / deceleration of electronic device 400, and temperature changes of electronic device 400. Sensor assembly 414 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 414 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 414 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.

[0172] Communication component 416 is configured to facilitate wired or wireless communication between electronic device 400 and other terminals. Electronic device 400 can access wireless networks based on communication standards, such as WiFi, 2G, 3G, 4G, 5G, or combinations thereof. In one exemplary embodiment, communication component 416 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 416 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0173] In an exemplary embodiment, the electronic device 400 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing terminals (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods shown in the above embodiments or combinations thereof.

[0174] In one exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 404 including instructions, which can be executed by a processor 420 of an electronic device 400 to perform the methods shown in the embodiments or combinations thereof. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage terminal, etc. When the instructions in the storage medium are executed by the processor of the terminal, the terminal is able to perform the methods shown in the embodiments or combinations thereof.

[0175] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.

[0176] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this disclosure. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0177] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this disclosure, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0178] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0179] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A method for testing image stabilization, characterized in that, The image stabilization test method includes: acquiring a preview stream collected by the electronic device while the electronic device is vibrating; determining the target position of the subject in each frame of the preview stream; and determining whether the image stabilization effect of the electronic device meets the image stabilization requirements based on the target positions.

2. The image stabilization testing method according to claim 1, characterized in that, The step of determining whether the image stabilization effect of the electronic device meets the image stabilization requirements based on each of the target positions includes: determining a first maximum displacement of the subject in a first direction and a second maximum displacement in a second direction based on each of the target positions; determining a first image stabilization value based on the first maximum displacement, the first image stabilization value being used to reflect the image stabilization effect of the optical image stabilization system in the electronic device in the first direction; determining a second image stabilization value based on the second maximum displacement, the second image stabilization value being used to reflect the image stabilization effect of the optical image stabilization system in the second direction; and determining whether the image stabilization effect meets the image stabilization requirements based on the first image stabilization value and the second image stabilization value; wherein the first direction and the second direction are perpendicular.

3. The image stabilization testing method according to claim 2, characterized in that, The step of determining whether the stabilization effect meets the stabilization requirements based on the first stabilization value and the second stabilization value includes: determining that the stabilization effect meets the stabilization requirements when the first stabilization value is greater than or equal to a first preset stabilization value and the second stabilization value is greater than or equal to a second preset stabilization value; and determining that the stabilization effect does not meet the stabilization requirements when the first stabilization value is less than the first preset stabilization value and / or the second stabilization value is less than the second preset stabilization value.

4. The image stabilization testing method according to claim 1, characterized in that, The step of determining whether the image stabilization effect of the electronic device meets the image stabilization requirements based on each of the target positions includes: when the total number of images in the preview stream is greater than or equal to a preset number, determining whether the image stabilization effect meets the image stabilization requirements based on each of the target positions.

5. The image stabilization testing method according to claim 1, characterized in that, Determining the target position of the subject in each frame of the preview stream includes: cropping each frame of the preview stream; performing grayscale processing on each cropped frame; and determining the target position of the subject in each grayscale processed frame.

6. The image stabilization testing method according to claim 1, characterized in that, Determining the target position of the subject in each frame of the preview stream includes: determining the target position of the subject in each frame of the preview stream when the vibration time of the electronic device is greater than or equal to a preset time.

7. The image stabilization testing method according to claim 1, characterized in that, The preview stream is acquired by a preview control module outside the processor, the target position is determined by an algorithm calling module outside the processor, and whether the image stabilization effect meets the image stabilization requirements is determined by a verification result output module outside the processor; and / or, the subject is a two-dimensional graphic set on a picture card, and the target position is the center position of the two-dimensional graphic.

8. The image stabilization testing method according to any one of claims 1 to 7, characterized in that, The image stabilization test method further includes: if the image stabilization effect does not meet the image stabilization requirements, repeatedly performing the following steps until the image stabilization effect meets the image stabilization requirements: adjusting the gain value of the gyroscope of the optical image stabilization system in the electronic device.

9. The image stabilization testing method according to claim 8, characterized in that, The gain value includes a first gain value and a second gain value. The first gain value is related to the image stabilization effect of the optical image stabilization system in a first direction, and the second gain value is related to the image stabilization effect of the optical image stabilization system in a second direction. The adjustment of the gain value of the gyroscope in the optical image stabilization system of the electronic device includes: adjusting the first gain value when the first stabilization value is less than the first preset stabilization value, wherein the first stabilization value is used to reflect the stabilization effect of the optical image stabilization system in the first direction; If the second stabilization value is less than the second preset stabilization value, the second gain value is adjusted. The second stabilization value is used to reflect the stabilization effect of the optical image stabilization system in the second direction.

10. A shake-proof testing device, characterized in that, The image stabilization testing device includes: a preview control module configured to acquire a preview stream collected by the electronic device when the electronic device is in a vibrating state; an algorithm calling module configured to determine the target position of the subject in each frame of the preview stream; and a verification result output module configured to determine whether the image stabilization effect of the electronic device meets the image stabilization requirements based on each target position.

11. A testing device, characterized in that, The testing device includes: a processor; a memory for storing executable instructions of the processor; wherein the processor is configured to perform the image stabilization testing method as described in any one of claims 1 to 9.

12. A non-transitory computer-readable storage medium, characterized in that, When the instructions in the storage medium are executed by the processor of the terminal, the terminal is able to perform the anti-shake test method as described in any one of claims 1 to 9.