Anti-shake method and device, storage medium and electronic equipment

By processing the camera module's shake data in frequency bands and compensating with a matching drive motor, the image blurring problem caused by camera shake is solved, thus improving image quality.

CN115696047BActive Publication Date: 2026-02-06GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211168297.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-23
Publication Date
2026-02-06
Estimated Expiration
2042-09-23

AI Technical Summary

Technical Problem

During camera shooting, images become blurry due to shaking, and existing technologies struggle to effectively stabilize them.

Method used

The camera module's shake data is divided into a first frequency band and a second frequency band, and compensation is achieved by a first target drive motor and a second target drive motor with frequency response matching, respectively, to realize frequency band image stabilization for the lens and image sensor.

Benefits of technology

It effectively compensates for jitter data in different frequency bands, improves the clarity of images captured by the camera, and enhances the imaging effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115696047B_ABST
    Figure CN115696047B_ABST
Patent Text Reader

Abstract

The application discloses a kind of anti-shake method, device, storage medium and electronic equipment.The method is applied to camera module, camera module includes lens, photosensitive element, first drive motor and second drive motor, first drive motor is used to drive lens movement, second drive motor is used to drive photosensitive element movement, the method includes: obtaining the jitter data of camera module, and the jitter data is divided into the first jitter data of first frequency band and the second jitter data of second frequency band;According to first jitter data, obtain first compensation data, and according to second jitter data, obtain second compensation data;From first drive motor and second drive motor, determine that the frequency response of first target drive motor matches first frequency band, and the frequency response of second target drive motor matches second frequency band;Through first target drive motor according to first compensation data, and through second target drive motor according to second compensation data drive lens and photosensitive element movement.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of electronics, and particularly relates to a method and device for anti-shake, a storage medium and an electronic device. BACKGROUND

[0002] With the continuous popularity of electronic devices, electronic devices have become indispensable social tools and entertainment tools in people's daily life, and people's requirements for electronic devices are also getting higher and higher. During the process of using a camera to take a picture, there is a problem that the image taken is blurred and unclear due to camera shaking. In order to obtain a relatively clear image, anti-shake processing is required. SUMMARY

[0003] The embodiments of the present application provide a method and device for anti-shake, a storage medium and an electronic device, which can realize anti-shake based on frequency band division of shaking data.

[0004] In a first aspect, the embodiments of the present application provide a method for anti-shake, applied to a camera module, the camera module comprising a lens, a photosensitive element, a first driving motor and a second driving motor, the first driving motor being used to drive the lens to move, the second driving motor being used to drive the photosensitive element to move, and the method comprising:

[0005] obtaining shaking data of the camera module, and dividing the shaking data into first shaking data of a first frequency band and second shaking data of a second frequency band;

[0006] obtaining first compensation data according to the first shaking data, and obtaining second compensation data according to the second shaking data;

[0007] determining a first target driving motor with a frequency response matching the first frequency band from the first driving motor and the second driving motor, and determining a second target driving motor with a frequency response matching the second frequency band from the first driving motor and the second driving motor;

[0008] driving the lens and the photosensitive element to move according to the first compensation data through the first target driving motor, and driving the lens and the photosensitive element to move according to the second compensation data through the second target driving motor.

[0009] In a second aspect, the embodiments of the present application provide a device for anti-shake, applied to a camera module, the camera module comprising a lens, a photosensitive element, a first driving motor and a second driving motor, the first driving motor being used to drive the lens to move, the second driving motor being used to drive the photosensitive element to move, and the device comprising:

[0010] a data division module, configured to obtain shaking data of the camera module, and divide the shaking data into first shaking data of a first frequency band and second shaking data of a second frequency band;

[0011] a data acquisition module configured to obtain first compensation data according to the first jitter data and second compensation data according to the second jitter data;

[0012] a motor determination module configured to determine a first target driving motor with a frequency response matching the first frequency band and a second target driving motor with a frequency response matching the second frequency band from the first driving motor and the second driving motor;

[0013] a motor driving module configured to drive the lens and the photosensitive element to move by the first target driving motor according to the first compensation data and by the second target driving motor according to the second compensation data.

[0014] In a third aspect, an embodiment of the present application provides a storage medium having a computer program stored thereon, which, when executed on a computer, causes the computer to perform the process in the anti-shake method provided by the embodiments of the present application.

[0015] In a fourth aspect, an embodiment of the present application further provides an electronic device including a memory and a processor, the processor being configured to execute the process in the anti-shake method provided by the embodiments of the present application by invoking a computer program stored in the memory.

[0016] In the embodiments of the present application, the jitter data of the camera module is acquired, and the jitter data is divided into first jitter data of a first frequency band and second jitter data of a second frequency band; first compensation data is obtained according to the first jitter data, and second compensation data is obtained according to the second jitter data; a first target driving motor with a frequency response matching the first frequency band and a second target driving motor with a frequency response matching the second frequency band are determined from the first driving motor and the second driving motor; the lens and the photosensitive element are driven to move by the first target driving motor according to the first compensation data and by the second target driving motor according to the second compensation data; thus, the jitter data of the first frequency band and the second frequency band is compensated by the first target driving motor and the second target driving motor respectively, and anti-shake based on the jitter data of the frequency bands can be achieved. BRIEF DESCRIPTION OF DRAWINGS

[0017] The technical solutions of the present application and the beneficial effects thereof will become apparent through the following detailed description of the specific embodiments of the present application in conjunction with the accompanying drawings.

[0018] Figure 1 is a structural schematic diagram of a camera module provided by an embodiment of the present application.

[0019] Figure 2 is a flowchart of an anti-shake method provided by an embodiment of the present application.

[0020] Figure 3 is a structural schematic diagram of a device for anti-shake provided by an embodiment of the present application.

[0021] Figure 4 is a structural schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0022] Reference will now be made to the drawings, wherein like numerals refer to like components throughout the several figures, which illustrate the principles of the present application by way of example in its application. The following description is based on the exemplified embodiments of the present application and should not be read as limiting other embodiments of the present application not detailed herein.

[0023] It can be understood that the execution subject of the embodiment of the present application can be an electronic device such as a smart phone or a tablet computer.

[0024] Reference will now be made to the drawings, wherein like numerals refer to like components throughout the several figures, which illustrate the principles of the present application by way of example in its application. The following description is based on the exemplified embodiments of the present application and should not be read as limiting other embodiments of the present application not detailed herein. Figure 1 Figure 1 is a structural schematic diagram of a camera module provided by an embodiment of the present application.

[0025] The camera module 10 includes a lens 110, a photosensitive element 120, a first driving motor 130, and a second driving motor 140.

[0026] The material of the lens 110 can be glass or plastic, etc. The lens 110 is mainly used to change the propagation path of light and focus the light. The lens 110 can include multiple groups of lenses, and the multiple groups of lenses correct and filter light from each other.

[0027] The photosensitive element 120 can be a CCD (Charge Coupled Device) image sensor or a CMOS (Complementary Metal Oxide Semiconductor) image sensor. The photosensitive element 120 can be arranged opposite to the lens 110 in the optical axis direction of the camera module 10, and is mainly used to receive light collected from the lens 110 and convert the optical signal into an electrical signal, so as to realize the imaging requirement of the camera module 10. The lens 110 can be arranged on the second driving motor 140, and the second driving motor 140 can drive the photosensitive element 120 to move to realize the anti-shake of the photosensitive element 120 of the camera module 10.

[0028] The photosensitive element 120 can be arranged on the second driving motor 140, and the second driving motor 140 can drive the photosensitive element 120 to move to realize the anti-shake of the photosensitive element 120 of the camera module 10.

[0029] ​The first driving motor 130 is configured to drive the lens 110 to move, so as to realize the lens 110 anti-shake of the camera module 10. The second driving motor 140 is configured to drive the photosensitive element 120 to move, so as to realize the photosensitive element 120 anti-shake of the camera module 10. The first driving motor 130 and the second driving motor 140 are mainly configured to improve the imaging effect of the camera module 10 due to the shaking of the user in the use process, so that the imaging effect of the photosensitive element 120 can meet the use requirements of the user. The camera module 10 of the embodiment of the present application can realize both the lens 110 anti-shake and the photosensitive element 120 anti-shake, that is, the camera module 10 of the embodiment of the present application has a double anti-shake function.

[0030] In the embodiment of the present application, the shaking data of the camera module 10 is divided into the first shaking data of the first frequency band and the second shaking data of the second frequency band, and the shaking compensation is performed according to the first shaking data and the second shaking data in the frequency band. Therefore, the driving modes of the first driving motor 130 and the second driving motor 140 of the embodiment of the present application need to be different to meet the requirements of different shaking frequency bands. For example, the first frequency band and the second frequency band can be a high frequency band and a low frequency band respectively, for example, the first frequency band is a high frequency band and the second frequency band is a low frequency band, so that the driving mode of the first driving motor 130 can be an electromagnetic ball mode, so that the frequency response of the first driving motor 130 matches the first frequency band, thereby meeting the shaking compensation of the first frequency band. The driving mode of the second driving motor 140 can be a suspension wire or SMA (memory alloy metal or memory alloy wire) mode, so that the frequency response of the second driving motor 140 matches the second frequency band, thereby meeting the shaking compensation of the second frequency band. In an optional embodiment, the driving mode of the first driving motor 130 can also be a suspension wire or SMA mode, so that the frequency response of the first driving motor 130 matches the second frequency band, thereby meeting the shaking compensation of the second frequency band, and the driving mode of the second driving motor 140 can also be an electromagnetic ball mode, so that the frequency response of the second driving motor 140 matches the first frequency band, thereby meeting the shaking compensation of the first frequency band. The first frequency band is a frequency band below a preset frequency, and the second frequency band is a frequency band above the preset frequency. The preset frequency band can be set according to the actual situation, which is not limited here. For example, the preset frequency can be 6Hz, then the first frequency band can be a frequency band composed of frequencies less than or equal to 6Hz, and the second frequency band can be a frequency band composed of frequencies greater than 6Hz.

[0031] The closed-loop control parameters (PID parameters) of the first driving motor 130 and the second driving motor 140 also need to be different, and need to be debugged for the first frequency band and the second frequency band respectively. The specific selection is determined according to the frequency response characteristics of the first driving motor 130 and the second driving motor 140. For example, assuming that the frequency response of the first driving motor 130 matches the high frequency band, and the frequency response of the second driving motor 140 matches the low frequency band, the PID parameter debugging of the first driving motor 130 is mainly for the high frequency band, and the gain value (gai value) under the high frequency band is as high as possible, and the PID parameter debugging of the first driving motor 130 is mainly for the low frequency band, and the gain value (gai value) under the low frequency band is as high as possible.

[0032] Please refer to Figure 2 , Figure 2 is a flowchart of the anti-shake method provided by the embodiment of the application. The anti-shake method is applied to a camera module, such as the camera module 10. The camera module, such as the camera module 10, includes a lens, such as the lens 110, a photosensitive element, such as the photosensitive element 120, a first driving motor, such as the first driving motor 130, and a second driving motor, such as the second driving motor 140. The first driving motor, such as the first driving motor 130, is used to drive the lens, such as the lens 110, to move. The second driving motor, such as the second driving motor 140, is used to drive the photosensitive element, such as the photosensitive element 120, to move. The flowchart can include the following steps:

[0033] In 101, the shaking data of the camera module is obtained, and the shaking data is divided into first shaking data of a first frequency band and second shaking data of a second frequency band.

[0034] In the process of shooting an image by the camera module, if the camera module shakes or moves, the clarity of the imaging will be affected, and the collected image will be blurred. The shaking data of the camera module can be obtained by an angular motion detection module that detects angular velocity, such as a gyroscope. The gyroscope can detect whether the camera module shakes, and collect angular acceleration data of the camera module when the camera module shakes. The angular acceleration data can be used as the shaking data of the camera module. In other embodiments, the shaking data of the camera module can also be obtained by a detection module that detects acceleration, such as an accelerometer. Of course, the shaking data of the camera module can also be obtained by other detection modules, as long as the shaking data of the camera module can be detected. The embodiments of the application are not limited in this regard.

[0035] After obtaining the shaking data of the camera module, the shaking data can be divided into first shaking data of a first frequency band and second shaking data of a second frequency band according to the frequency domain information of the shaking data, so that the shaking compensation is performed in different frequency bands according to the first shaking data and the second shaking data respectively. The frequency domain information includes frequency information.

[0036] For example, it is assumed that the angular acceleration data of the camera module is collected every preset time interval within the exposure time of the camera module when taking a picture by the gyroscope, and a plurality of angular acceleration data is obtained. The frequency domain information of each angular acceleration data can be obtained. According to the frequency domain information of each angular acceleration data, the angular acceleration data with a frequency belonging to the first frequency band and the angular acceleration data with a frequency belonging to the second frequency band are determined, so as to divide the plurality of angular acceleration data into the angular acceleration data of the first frequency band and the angular acceleration data of the second frequency band.

[0037] In 102, first compensation data is obtained according to the first jitter data, and second compensation data is obtained according to the second jitter data.

[0038] In this embodiment, after the first jitter data and the second jitter data are obtained, the first compensation data is obtained according to the first jitter data, and the second compensation data is obtained according to the second jitter data.

[0039] In 103, a first target driving motor with a frequency response matching the first frequency band and a second target driving motor with a frequency response matching the second frequency band are determined from the first driving motor and the second driving motor.

[0040] For example, it is assumed that the first frequency band is a high frequency band, the second frequency band is a low frequency band, the frequency response of the first driving motor is a high frequency band frequency response, and the frequency response of the second driving motor is a low frequency band frequency response. The first target driving motor is determined as the first driving motor, and the second target driving motor is determined as the second driving motor.

[0041] For another example, it is assumed that the first frequency band is a low frequency band, the second frequency band is a high frequency band, the frequency response of the first driving motor is a high frequency band frequency response, and the frequency response of the second driving motor is a low frequency band frequency response. The first driving motor is determined as the second driving motor, and the second target driving motor is determined as the first driving motor.

[0042] In 104, the lens and the photosensitive element are driven to move by the first target driving motor according to the first compensation data and by the second target driving motor according to the second compensation data.

[0043] For example, it is assumed that the first target driving motor is the first driving motor, and the second target driving motor is the second driving motor. The lens can be driven to move by the first driving motor according to the first compensation data to realize lens anti-shake of the camera module. The photosensitive element can also be driven to move by the second driving motor according to the second compensation data to realize photosensitive element anti-shake of the camera module.

[0044] For another example, assuming the first target driving motor is the second driving motor and the second target driving motor is the first driving motor, the second driving motor can drive the photosensitive element to move according to the first compensation data to realize the photosensitive element anti-shake of the camera module, and the first driving motor can drive the lens to move according to the second compensation data to realize the lens anti-shake of the camera module.

[0045] It can be understood that the camera module can further include a position sensor, such as a Hall sensor, and the like, and when the shake data is acquired, the first current position value of the current position of the lens and the second current position value of the current position of the photosensitive element can be acquired by the position sensor, and the first compensation data and the second compensation data can be the first position value and the second position value respectively. Assuming the first target driving motor is the first driving motor and the second target driving motor is the second driving motor, during the process of driving the lens to move according to the first position value by the first target motor, the position sensor can be used to detect in real time whether the lens moves to the position corresponding to the first target position value determined according to the first current position value and the first position value; when the lens moves to the position corresponding to the first target position value, the driving of the lens by the first target driving motor can be stopped; during the process of driving the photosensitive element to move according to the second position value by the second target driving motor, the position sensor can be used to detect in real time whether the photosensitive element moves to the position corresponding to the second target position value determined according to the second current position value and the second position value; when the photosensitive element moves to the position corresponding to the second target position value, the driving of the photosensitive element by the second target driving motor can be stopped. The movement direction of the lens and the photosensitive element is opposite to the shake direction.

[0046] For example, taking the center of the initial position of the lens as the origin, an XY axis coordinate system is established on the plane where the lens is located, assuming the first current position value is (3, 4) and the first position value is (-1, -3), then the first target position value is (2, 1), so the first target driving motor can drive the lens to move 1 unit length in the X axis direction and 3 unit lengths in the Y axis direction, and in the moving process, the position sensor is used to detect in real time whether the lens moves to the position corresponding to the first target position value (2, 1), until the lens moves to the position corresponding to the first target position value (2, 1). Taking the center of the initial position of the photosensitive element as the origin, an XY axis coordinate system is established on the plane where the photosensitive element is located, assuming the second current position value is (4, 4) and the second position value is (-3, -3), then the second target position value is (1, 1), so the second target driving motor can drive the photosensitive element to move 3 unit lengths in the X axis direction and 3 unit lengths in the Y axis direction, and in the moving process, the position sensor is used to detect in real time whether the photosensitive element moves to the position corresponding to the second target position value (1, 1), until the photosensitive element moves to the position corresponding to the second target position value (1, 1).

[0047] In an optional embodiment, the camera module can further include a first driving chip and a second driving chip, and the electronic device can further include a processor. The processor can send the first compensation data to a first target driving chip corresponding to the first target driving motor among the first driving chip and the second driving chip, and send the second compensation data to a second target driving chip corresponding to the second target driving motor among the first driving chip and the second driving chip, so that the first target driving chip can control the first target driving motor according to the first compensation data, and the second target driving chip can control the second target driving motor to drive the lens and the photosensitive element to move according to the second compensation data. The first target driving chip is a driving chip among the first driving chip and the second driving chip that controls the first target driving motor, and the second target driving chip is a driving chip among the first driving chip and the second driving chip that controls the second target driving motor.

[0048] In an optional embodiment, the processor can also send the first jitter data to the first target driving chip corresponding to the first target driving motor among the first driving chip and the second driving chip, and send the second jitter data to the second target driving chip corresponding to the second target driving motor among the first driving chip and the second driving chip. The first target driving chip obtains the first compensation data according to the first jitter data, and the second target driving chip obtains the second compensation data according to the second jitter data, so that the first target driving chip can control the first target driving motor according to the first compensation data, and the second target driving chip can control the second target driving motor to drive the lens and the photosensitive element to move according to the second compensation data.

[0049] In this embodiment, by obtaining the jitter data of the camera module, the jitter data is divided into first jitter data of a first frequency band and second jitter data of a second frequency band. According to the first jitter data, the first compensation data is obtained, and according to the second jitter data, the second compensation data is obtained. From the first driving motor and the second driving motor, a first target driving motor with a frequency response matching the first frequency band and a second target driving motor with a frequency response matching the second frequency band are determined. The first target driving motor drives the lens and the photosensitive element to move according to the first compensation data, and the second target driving motor drives the lens and the photosensitive element to move according to the second compensation data. In this way, the jitter data of the first frequency band and the second frequency band is compensated by the first target driving motor and the second target driving motor respectively, and frequency division anti-shake based on jitter data is realized.

[0050] In an optional embodiment, dividing the jitter data into first jitter data of a first frequency band and second jitter data of a second frequency band includes:

[0051] (1) Fourier transform processing is performed on the jitter data to obtain transformed data;

[0052] (2) dividing the transformed data into first transformed data of a first frequency band and second transformed data of a second frequency band;

[0053] performing inverse Fourier transform processing on the first transformed data to obtain first jitter data of the first frequency band, and performing inverse Fourier transform processing on the second transformed data to obtain second jitter data of the second frequency band.

[0054] For example, it is assumed that the angular acceleration data of the camera module is collected every preset time interval within the exposure time of the camera module when the camera module is photographing by the gyroscope, and a plurality of angular acceleration data is obtained. The plurality of angular acceleration data can be subjected to Fourier transform processing to obtain a plurality of transformed data. The transformed data includes frequency information and amplitude information. The first transformed data in which the frequency belongs to the first frequency band and the second transformed data in which the frequency belongs to the second frequency band can be determined according to the frequency information included in the transformed data, so as to divide the transformed data into the first transformed data of the first frequency band and the second transformed data of the second frequency band. After obtaining the first transformed data and the second transformed data, inverse Fourier transform processing can be performed on the first transformed data to obtain first jitter data of the first frequency band, and inverse Fourier transform processing can also be performed on the second transformed data to obtain second jitter data of the second frequency band.

[0055] In an optional embodiment, before the Fourier transform processing is performed on the jitter data to obtain the transformed data, the method further includes:

[0056] filtering the jitter data to obtain filtered jitter data;

[0057] The Fourier transform processing is performed on the jitter data to obtain the transformed data, including:

[0058] The Fourier transform processing is performed on the filtered jitter data to obtain the transformed data.

[0059] In order to avoid the influence of noise and some obviously larger jitter on the anti-shake effect, after the jitter data is obtained, the jitter data can be filtered by a filter to obtain filtered jitter data, and then the Fourier transform processing is performed on the filtered jitter data to obtain the transformed jitter data.

[0060] It should be noted that the specific structure of the filter is not limited in the embodiment, and can be set by a person skilled in the art according to actual needs.

[0061] In an optional embodiment, the first target driving motor whose frequency response matches the first frequency band and the second target driving motor whose frequency response matches the second frequency band are determined from the first driving motor and the second driving motor, including:

[0062] (1) obtaining first driving information of the first driving motor and second driving information of the second driving motor;

[0063] (2) determining, according to the first driving information and the second driving information, the first target driving motor with the frequency response matching the first frequency band and the second target driving motor with the frequency response matching the second frequency band from the first driving motor and the second driving motor.

[0064] The first driving information can include a first driving mode. The second driving information can include a second driving mode

[0065] The driving mode of the driving motor often affects the frequency response characteristics of the driving motor, that is, the driving mode of the driving motor is different, and the frequency response of the driving motor is different. Based on this, in the embodiment, the first target driving motor with the frequency response matching the first frequency band and the second target driving motor with the frequency response matching the second frequency band can be determined from the first driving motor and the second driving motor according to the first driving mode and the second driving mode.

[0066] For example, assuming that the driving mode of the first driving motor is electromagnetic ball mode and the driving mode of the second driving motor is suspension wire mode, the frequency response characteristics of the first driving motor can be determined as high frequency band frequency response characteristics, and the frequency response characteristics of the second driving motor can be determined as low frequency band frequency response characteristics. That is, the frequency response of the first driving motor is higher and more suitable for high frequency band, and the frequency response of the first driving motor is lower and more suitable for low frequency band. Assuming that the first frequency band is high frequency band and the second frequency band is low frequency band, the first driving motor can be determined as the first target driving motor and the second driving motor can be determined as the second target driving motor.

[0067] In an optional embodiment, the first driving information includes first closed-loop control parameters and a first driving mode, and the second driving information includes second closed-loop control parameters and a second driving mode.

[0068] The first closed-loop control parameters and the second closed-loop control parameters can be debugged for high frequency band and low frequency band respectively in advance, and whether the first closed-loop control parameters are debugged according to high frequency band or low frequency band is determined according to the frequency response characteristics of the first driving motor and the second driving motor. And because the frequency response characteristics of the first driving motor and the second driving motor are affected by the driving mode of the first driving motor and the second driving motor, whether the first closed-loop control parameters are debugged according to high frequency band or low frequency band can be determined according to the first driving mode, and whether the second closed-loop control parameters are debugged according to high frequency band or low frequency band can be determined according to the second driving mode.

[0069] For example, assuming that the first driving mode is the electromagnetic ball mode and the second driving mode of the second driving motor is the suspension wire mode, the first closed-loop control parameter can be debugged for the high frequency band, and the second closed-loop control parameter can be debugged for the low frequency band.

[0070] It should be noted that the specific debugging can be debugged by a person skilled in the art based on the debugging mode provided by the related technology, and the embodiments of the present application will not be repeated.

[0071] When the first target driving motor and the second target driving motor need to be determined from the first driving motor and the second driving motor subsequently, the first target driving motor and the second target driving motor can be determined from the first driving motor and the second driving motor according to the first driving mode, the first closed-loop control parameter, the second driving mode and the second closed-loop control parameter.

[0072] For example, assuming that the first driving mode is the electromagnetic ball mode and the second driving mode of the second driving motor is the suspension wire mode, the first closed-loop control parameter is obtained by debugging for the high frequency band, the second closed-loop control parameter is obtained by debugging for the low frequency band, the first frequency band is the high frequency band, and the second frequency band is the low frequency band, it can be determined that the first driving motor is the first target driving motor and the second driving motor is the second target driving motor.

[0073] In an optional embodiment, the first compensation data is obtained according to the first jitter data, and the second compensation data is obtained according to the second jitter data, including:

[0074] The first compensation data is obtained according to the first jitter data by a preset first optical anti-shake algorithm, and the second compensation data is obtained according to the second jitter data by a preset second optical anti-shake algorithm.

[0075] In this embodiment, the first compensation data can be obtained according to the first jitter data by a preset first optical anti-shake algorithm, and the second compensation data can be obtained according to the second jitter data by a preset second optical anti-shake algorithm.

[0076] The preset first anti-shake algorithm and the preset second anti-shake algorithm can be the same or different. The preset first anti-shake algorithm and the preset second anti-shake algorithm can be any optical anti-shake algorithm provided by related technologies, and a person skilled in the art can select a corresponding optical anti-shake algorithm as the preset first anti-shake algorithm and the preset second anti-shake algorithm according to actual needs, which is not specifically limited here, as long as the requirements of obtaining the first compensation data according to the first jitter data and obtaining the second compensation data according to the second jitter data can be met. For example, taking the first jitter data as a first angular acceleration, the second jitter data as a second angular acceleration, the first jitter data as a first position value, and the second jitter data as a second position value as an example, the first angular acceleration can be integrated once by the preset first anti-shake algorithm to obtain a first angular velocity, and the first angular acceleration can be integrated twice to obtain a first angle, and then the first position value, such as a first Hall value, can be calculated according to the gyroscope gain, the position sensor bias such as the Hall bias, and the effective focal length and other parameters. The second angular acceleration can be integrated once by the preset second anti-shake algorithm to obtain a second angular velocity, and the second angular acceleration can be integrated twice to obtain a second angle, and then the second position value, such as a second Hall value, can be calculated according to the gyroscope gain, the position sensor bias such as the Hall bias, and the effective focal length and other parameters.

[0077] In an optional embodiment, the jitter data of the camera module is obtained, including:

[0078] When the photographing or video recording instruction is received, the jitter data of the camera module is obtained.

[0079] It can be understood that the camera module does not need to be anti-shake processed at all times, and in order to save the processing resources of the processor, the jitter data of the camera module can be obtained when the photographing instruction or the video recording instruction is received, so that the anti-shake processing is performed according to the jitter data by the anti-shake method provided in the embodiments of the present application, thereby obtaining the photograph or the video after the anti-shake processing. It can be understood that the clarity of the photograph or the video after the anti-shake processing is usually higher than that of the photograph or the video without the anti-shake processing.

[0080] In an optional embodiment, the jitter data of the camera module is obtained, including:

[0081] When in the preview interface, if the anti-shake function is in the enabled state, the jitter data of the camera module is obtained.

[0082] In this embodiment, whether to start the anti-shake function can be determined by the user. For example, after the user clicks the camera application in the electronic device, the electronic device starts the camera application and can display a preview interface through the screen. At this time, the anti-shake function can be closed by default. The preview interface can display an anti-shake control. If the user wants to start the anti-shake function, the user can touch, such as click, the anti-shake control, so as to start the anti-shake function, that is, make the anti-shake function in the starting state. When the anti-shake function is in the starting state, the shaking data of the camera module can be obtained in the preview process, so as to perform anti-shake processing according to the shaking data through the anti-shake method provided in this application embodiment, so as to obtain the preview image after anti-shake processing. When the shooting or video recording instruction is received, the corresponding preview image can be taken as the image obtained by shooting, or the corresponding preview image can be taken as one of the images obtained by video recording.

[0083] It can be understood that when the anti-shake function is in the starting state, if the user wants to close the anti-shake function, the user can touch, such as click, the anti-shake control of the preview interface, so as to close the anti-shake function, that is, make the anti-shake function in the closing state. When the anti-shake function is in the closing state, the preview images obtained in the preview process are not subjected to anti-shake processing.

[0084] Please refer to Figure 3 , Figure 3 is a structural schematic diagram of an anti-shake device provided in this application embodiment. The anti-shake device 20 is applied to a camera module, such as the camera module 10. The camera module, such as the camera module 10, includes a lens, such as the lens 110, a photosensitive element, such as the photosensitive element 120, a first driving motor, such as the first driving motor 130, and a second driving motor, such as the second driving motor 140. The first driving motor, such as the first driving motor 130, is used to drive the lens, such as the lens 110, to move. The second driving motor, such as the second driving motor 140, is used to drive the photosensitive element, such as the photosensitive element 120, to move. The anti-shake device 20 and the camera module 10 can be arranged in an electronic device. The anti-shake device 20 includes a data division module 201, a data acquisition module 202, a motor determination module 203, and a motor driving module 204.

[0085] The data division module 201 is used to obtain the shaking data of the camera module and divide the shaking data into first shaking data of a first frequency band and second shaking data of a second frequency band.

[0086] The data acquisition module 202 is used to obtain first compensation data according to the first shaking data and obtain second compensation data according to the second shaking data.

[0087] The motor determining module 203 is configured to determine a first target driving motor with a frequency response matching the first frequency band and a second target driving motor with a frequency response matching the second frequency band from the first driving motor and the second driving motor.

[0088] The motor driving module 204 is configured to drive the lens and the photosensitive element to move by the first target driving motor according to the first compensation data and by the second target driving motor according to the second compensation data.

[0089] In an optional embodiment, the data dividing module 201 can be configured to perform Fourier transform on the jitter data to obtain transformed data, divide the transformed data into first transformed data of a first frequency band and second transformed data of a second frequency band, perform inverse Fourier transform on the first transformed data to obtain first jitter data of the first frequency band, and perform inverse Fourier transform on the second transformed data to obtain second jitter data of the second frequency band.

[0090] In an optional embodiment, the data dividing module 201 can be configured to perform filtering on the jitter data to obtain filtered jitter data, and perform Fourier transform on the filtered jitter data to obtain transformed data.

[0091] In an optional embodiment, the motor determining module 203 can be configured to obtain first driving information of the first driving motor and second driving information of the second driving motor, and determine a first target driving motor with a frequency response matching the first frequency band and a second target driving motor with a frequency response matching the second frequency band from the first driving motor and the second driving motor according to the first driving information and the second driving information.

[0092] In an optional embodiment, the data obtaining module 202 can be configured to obtain first compensation data according to the first jitter data by using a preset first optical image stabilization algorithm, and obtain second compensation data according to the second jitter data by using a preset second optical image stabilization algorithm.

[0093] In an optional embodiment, the data dividing module 201 can be configured to obtain jitter data of the camera module when a photographing or video recording instruction is received.

[0094] In an optional embodiment, the data dividing module 201 can be configured to obtain jitter data of the camera module when a preview interface is displayed, and a touch operation on an anti-shake control is received.

[0095] The embodiment of the present application provides a computer readable storage medium, which stores a computer program, and when the computer program is executed on a computer, the computer is caused to execute the anti-shake method provided by the embodiment.

[0096] The embodiment of the present application also provides an electronic device, which comprises a memory and a processor, and the processor is used for executing the anti-shake method provided by the embodiment by calling the computer program stored in the memory.

[0097] For example, the electronic device can be a mobile terminal such as a tablet computer or a smart phone. Figure 4 Figure 4 The electronic device provided by the embodiment of the present application is shown in a structural schematic diagram.

[0098] The electronic device 100 can comprise a processor 30, a memory 40 and the like. Those skilled in the art can understand that the electronic device structure shown in the embodiment of the present application does not constitute a limitation on the electronic device, and the electronic device can comprise more or fewer components than those shown in the figure, or some components can be combined, or different components can be arranged, for example, the electronic device 100 can also comprise a screen. Figure 4

[0099] The processor 30 is the control center of the electronic device, and connects each part of the electronic device by using various interfaces and lines, and executes various functions of the electronic device and processes data by running or executing the application program stored in the memory 40 and calling the data stored in the memory 40, thereby performing overall monitoring on the electronic device.

[0100] The memory 40 can be used for storing application programs and data. The application programs stored in the memory 40 comprise executable codes. The application programs can constitute various function modules. The processor 30 executes various function applications and data processing by running the application programs stored in the memory 40.

[0101] In the embodiment, the processor 30 in the electronic device loads the executable code corresponding to the process of one or more application programs into the memory 40 according to the following instructions, and executes the application programs stored in the memory 40 by the processor 30, thereby realizing the anti-shake method described in any embodiment of the present application.

[0102] In the above embodiment, the description of each embodiment has its own focus, and the part not described in detail in an embodiment can be referred to the detailed description of the anti-shake method above, which will not be described here again.

[0103] The anti-shake device provided by the embodiment of the present application belongs to the same concept as the anti-shake method in the above embodiment, and any method provided in the anti-shake method embodiment can be run on the anti-shake device, and the specific implementation process is described in the anti-shake method embodiment, which will not be described here again.​​

[0104] It should be noted that, for the anti-shake method of the embodiments of the present application, a person skilled in the art can understand that all or part of the processes of implementing the anti-shake method of the embodiments of the present application can be completed by a computer program controlling related hardware. The computer program can be stored in a computer-readable storage medium, such as a memory, and executed by at least one processor. In the execution process, the processes such as the embodiments of the anti-shake method can be included. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), and the like.

[0105] It can be understood that, in the specific embodiments of the present application, user information such as application usage behavior data, logs, and related data are involved. When the above embodiments of the present application are applied to specific products or technologies, user permission or consent is required, and the collection, use, and processing of related data need to comply with relevant national and regional laws, regulations, and standards.

[0106] For the anti-shake device of the embodiments of the present application, each functional module can be integrated in one processing chip, or each module can exist physically independently, or two or more modules can be integrated in one module. The integrated module can be realized in the form of hardware or in the form of a software functional module. If the integrated module is realized in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium, such as a read-only memory, a disk or an optical disk, and the like.

[0107] The anti-shake method, device, storage medium, and electronic equipment provided by the embodiments of the present application are described in detail above. The principles and implementation manners of the present application are described by applying specific examples in this paper. The above description of the embodiments is only used to help understand the method of the present application and its core idea; at the same time, for those skilled in the art, according to the idea of the present application, the specific implementation manner and application range will be changed; in summary, the content of the specification should not be understood as a limitation of the present application.

Claims

1. A stabilization method applied to a camera module, characterized in that, The camera module includes a lens, a photosensitive element, a first driving motor and a second driving motor, the first driving motor is used for driving the lens to move, the second driving motor is used for driving the photosensitive element to move, and the method comprises: obtaining the camera module's jitter data, and dividing the jitter data into first jitter data of a first frequency band and second jitter data of a second frequency band; According to the first jitter data, the first compensation data is obtained, and according to the second jitter data, the second compensation data is obtained; From the first driving motor and the second driving motor, the first target driving motor with the frequency response matching the first frequency band is determined, and the second target driving motor with the frequency response matching the second frequency band is determined; The first target driving motor is driven according to the first compensation data, and the second target driving motor is driven according to the second compensation data.

2. The method of claim 1, wherein, The jitter data is divided into first jitter data of a first frequency band and second jitter data of a second frequency band, comprising: the jitter data is processed by Fourier transform to obtain transformed data; The transformed data is divided into first transformed data of a first frequency band and second transformed data of a second frequency band; The first transformed data is processed by inverse Fourier transform to obtain the first jitter data of the first frequency band, and the second transformed data is processed by inverse Fourier transform to obtain the second jitter data of the second frequency band.

3. The method of claim 2, wherein, Before the jitter data is processed by Fourier transform to obtain transformed data, it further comprises: the jitter data is filtered to obtain filtered jitter data; The jitter data is processed by Fourier transform to obtain transformed data, comprising: the filtered jitter data is processed by Fourier transform to obtain transformed data.

4. The method of claim 1, wherein, From the first driving motor and the second driving motor, the first target driving motor with the frequency response matching the first frequency band is determined, and the second target driving motor with the frequency response matching the second frequency band is determined, comprising: obtaining the first driving information of the first driving motor and the second driving information of the second driving motor; According to the first driving information and the second driving information, the first target driving motor with the frequency response matching the first frequency band is determined from the first driving motor and the second driving motor, and the second target driving motor with the frequency response matching the second frequency band is determined.

5. The method of claim 1, wherein, According to the first jitter data, the first compensation data is obtained, and according to the second jitter data, the second compensation data is obtained, comprising: According to the first jitter data, the first compensation data is obtained by a preset first optical anti-shake algorithm, and according to the second jitter data, the second compensation data is obtained by a preset second optical anti-shake algorithm.

6. The de-jitter method according to any one of claims 1 to 5, characterized in that, The jitter data of the camera module is obtained, comprising: When receiving a photographing or video recording instruction, the jitter data of the camera module is obtained.

7. The de-jitter method according to any one of claims 1 to 5, characterized in that, The jitter data of the camera module is obtained, comprising: When in the preview interface, if the anti-shake function is in the on state, the jitter data of the camera module is obtained.

8. An anti-shake device applied to a camera module, characterized in that, The camera module comprises a lens, a photosensitive element, a first driving motor and a second driving motor, the first driving motor is used for driving the lens to move, the second driving motor is used for driving the photosensitive element to move, and the device comprises: a data division module, used for obtaining jitter data of the camera module and dividing the jitter data into first jitter data of a first frequency band and second jitter data of a second frequency band; a data acquisition module, used for obtaining first compensation data according to the first jitter data and second compensation data according to the second jitter data; a motor determination module, used for determining a first target driving motor with a frequency response matching the first frequency band and a second target driving motor with a frequency response matching the second frequency band from the first driving motor and the second driving motor; a motor driving module, used for driving the lens and the photosensitive element to move through the first target driving motor according to the first compensation data and through the second target driving motor according to the second compensation data.

9. A storage medium, characterized by The storage medium has a computer program stored therein, and when the computer program runs on a computer, the computer is caused to execute the anti-shake method in any one of claims 1 to 7.

10. An electronic device, comprising: The electronic device comprises a processor and a memory, the memory has a computer program stored therein, and the processor is used for executing the anti-shake method in any one of claims 1 to 7 by calling the computer program stored in the memory. The electronic device comprises a processor and a memory, the memory has a computer program stored therein, and the processor is used for executing the anti-shake method in any one of claims 1 to 7 by calling the computer program stored in the memory.

Citation Information

Patent Citations

  • Camera and control method of the same

    CN102694979A

  • Mechanical anti-shake processing method and device

    CN105578146A