Shooting anti-shake method and related equipment
By acquiring the camera's shaking signal and exposure time in the electronic device's working mode, dividing the frequency band and adapting the image stabilization strategy, the problem of image blurring under different scenarios is solved, achieving more efficient shooting stability and clarity.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HONOR DEVICE CO LTD
- Filing Date
- 2024-10-30
- Publication Date
- 2026-05-01
AI Technical Summary
Existing single-shot image stabilization modes are difficult to achieve optimal results in different shooting scenarios, resulting in images that are prone to shaky and blurry.
By acquiring the camera shake signal and exposure time of the electronic device in the current camera working mode, the distribution data of the shake signal in different frequency bands is determined, and corresponding image stabilization strategies are adapted based on this data, including a combination of optical image stabilization and electronic image stabilization, and differentiated processing is performed for different shooting scenarios.
It improves camera shooting stability and image clarity, adapts to different shooting needs, reduces blur due to camera shake, and enhances image shooting results.
Smart Images

Figure CN121967883A_ABST
Abstract
Description
A method for image stabilization and related equipment Technical Field
[0001] This application relates to the field of image capture, and more particularly to a method and related equipment for image stabilization. Background Technology
[0002] Electronic devices such as mobile phones and cameras have image capture functions. During the shooting process, image stabilization is required to ensure image quality. The image stabilization requirements vary in different shooting scenarios, and pre-configured image stabilization modes may not achieve optimal results in different shooting scenarios, leading to problems such as blurry images. Summary of the Invention
[0003] This application provides a display method and related device to solve the problem that a single shooting stabilization mode is difficult to achieve better results in different shooting scenarios, resulting in blurry images.
[0004] Firstly, this application provides a method for image stabilization, including:
[0005] Acquire the camera shake signal and exposure time of the electronic device in the current camera working mode; determine at least one target frequency band for the distribution of the camera shake signal and shake distribution data of the camera shake signal in different target frequency bands; determine and execute the target image stabilization strategy based on the shake distribution data and exposure time.
[0006] Electronic devices are pre-configured with multiple camera operating modes, which can be switched between. The exposure time within the same camera operating mode is adjustable, and different exposure times will be used for different shooting needs.
[0007] The captured jitter signal will have corresponding jitter components in different frequency bands. By decomposing the captured jitter signal and comparing the jitter frequency of the captured jitter signal with the frequency band threshold, we can obtain at least one target frequency band and the jitter components distributed in each target frequency band.
[0008] This image stabilization method, based on the camera's current operating mode, identifies shooting exposure data and camera shake distribution data at different frequency bands, and adapts appropriate image stabilization strategies. This allows for targeted and differentiated shake processing for different camera shake needs, intelligently adjusting the image stabilization strategy to help improve camera shooting stability and image clarity, providing better image stabilization effects and more flexible image stabilization response methods.
[0009] In conjunction with the first aspect, in one possible implementation, corresponding frequency band thresholds can be pre-calibrated for different camera operating modes to limit the jitter frequency range corresponding to different frequency bands, thereby dividing the frequency bands corresponding to each camera operating mode.
[0010] Based on this, the pre-calibrated target frequency band threshold corresponding to the current camera working mode is obtained, and then based on the target frequency band threshold, at least one target frequency band of the shooting shake signal distribution and the shake distribution data of the shooting shake signal under different target frequency bands are determined.
[0011] In conjunction with the first aspect, in one possible implementation, the jitter distribution data can be jitter amplitude, jitter energy value, etc. When determining at least one target frequency band for the distribution of the captured jitter signal and the jitter distribution data of the captured jitter signal under different target frequency bands based on a target frequency band threshold, it can be done as follows:
[0012] The jitter amplitude of the captured jitter signal in each target frequency band is used as jitter distribution data; and / or, based on the frequency distribution data of the captured jitter signal in each target frequency band, the jitter energy value of the captured jitter signal in each target frequency band is calculated as jitter distribution data.
[0013] This is to facilitate the measurement of the intensity of jitter components in a specific frequency band, so as to carry out subsequent effective image stabilization processing.
[0014] In conjunction with the first aspect, one possible implementation involves determining and executing a target image stabilization strategy based on shake distribution data and exposure duration, including:
[0015] Obtain the target shake measurement threshold and target exposure time threshold in the target frequency band under the current camera working mode; wherein, different camera working modes have exposure time thresholds and shake measurement thresholds in each frequency band defined by pre-calibrated frequency band thresholds; based on the relationship between shake distribution data and target shake measurement thresholds and the relationship between exposure time and target exposure time thresholds, determine and execute target image stabilization strategy.
[0016] In this way, by combining the relationship between the jitter distribution data in a specific frequency band and the jitter measurement threshold, as well as the relationship between the exposure time and the duration threshold, a jitter processing strategy that matches the specific jitter processing requirements of different camera working modes is adapted. The jitter stabilization strategy is determined for the shooting jitter stabilization requirements of different shooting modes, so as to meet the different jitter stabilization requirements of the camera function under different usage conditions, improve the accuracy of shooting jitter stabilization and the responsiveness of image shooting, and improve the problem of blurry shooting.
[0017] In conjunction with the first aspect, in one possible implementation, a target image stabilization strategy is determined and executed based on the relationship between the jitter distribution data and the target jitter measurement threshold, and the relationship between the exposure duration and the target exposure duration threshold, including:
[0018] If the exposure time is less than the exposure time threshold, and the jitter distribution data in the first target frequency band is greater than the target jitter measurement threshold, and the jitter distribution data in the second target frequency band is greater than the target jitter measurement threshold, then the target image stabilization strategy is determined to perform image stabilization processing on the shooting jitter signal of the second target frequency band, and not to perform image stabilization processing on the shooting jitter signal of the first target frequency band.
[0019] The frequency value of the second target frequency band is greater than the frequency value of the first target frequency band.
[0020] This implementation process corresponds to the case where the exposure time is not long exposure in each of the different camera working modes in the embodiments. It only performs image stabilization on the mid and high frequencies, so as to achieve positive and effective processing of mid and high frequency shaking in each camera working mode and avoid blurry shooting.
[0021] In conjunction with the first aspect, in one possible implementation, a target image stabilization strategy is determined and executed based on the relationship between the jitter distribution data and the target jitter measurement threshold, and the relationship between the exposure duration and the target exposure duration threshold, including:
[0022] If the exposure time exceeds the exposure time threshold, and the current camera working mode is professional mode, and the shake distribution data in the first target frequency band is greater than the target shake measurement threshold, and the shake distribution data in the second target frequency band is greater than the target shake measurement threshold, then the target image stabilization strategy is determined to perform image stabilization processing on the shooting shake signal of the second target frequency band, and not to perform image stabilization processing on the shooting shake signal of the first target frequency band.
[0023] The frequency value of the second target frequency band is greater than the frequency value of the first target frequency band.
[0024] This implementation process corresponds to the case in the embodiment where the camera's working mode is professional mode and the exposure time is long exposure. It only performs image stabilization on mid-to-high frequencies, achieving targeted processing of mid-to-high frequency shaking when the camera's working mode is professional mode, thus avoiding blurry images.
[0025] In conjunction with the first aspect, in one possible implementation, a target image stabilization strategy is determined and executed based on the relationship between the jitter distribution data and the target jitter measurement threshold, and the relationship between the exposure duration and the target exposure duration threshold, including:
[0026] If the exposure time exceeds the exposure time threshold, and the current camera working mode is professional mode, and the jitter distribution data in the first target frequency band is greater than the target jitter measurement threshold, and the jitter distribution data in the second target frequency band is less than the target jitter measurement threshold, then the target stabilization strategy is determined to be not to perform stabilization processing on the shooting jitter signal.
[0027] The frequency value of the second target frequency band is greater than the frequency value of the first target frequency band.
[0028] This implementation process corresponds to the case in the embodiment where the camera is in professional mode with a long exposure time and insufficient jitter intensity of mid-to-high frequency components, but sufficient jitter intensity of low frequency components. It is the same as the processing method in the case where there are no high frequency components and only low frequency components. No image stabilization is applied to the low frequency components. This achieves targeted processing for special shooting needs in professional mode, ensuring the image shooting effect in professional mode.
[0029] In conjunction with the first aspect, in one possible implementation, a target image stabilization strategy is determined and executed based on the relationship between the jitter distribution data and the target jitter measurement threshold, and the relationship between the exposure duration and the target exposure duration threshold, including:
[0030] If the exposure time exceeds the exposure time threshold, and the current camera working mode is night mode, post-capture frame mode, preview mode, or pre-capture frame mode, and the jitter distribution data in the first target frequency band is greater than the target jitter measurement threshold, and the jitter distribution data in the second target frequency band is greater than the target jitter measurement threshold, then the target stabilization strategy is determined to perform stabilization processing on the shooting jitter signal in the second target frequency band and on the shooting jitter signal in the first target frequency band.
[0031] The frequency value of the second target frequency band is greater than the frequency value of the first target frequency band.
[0032] This implementation process corresponds to the case in the embodiment where the camera working mode is night scene mode, shooting frame output mode, preview mode, or shooting frame output mode with a long exposure time. It performs image stabilization on both low and mid-to-high frequencies, achieving full-band image stabilization processing for long exposure conditions in some camera working modes. It also performs comprehensive image stabilization processing to address the sensitivity to minute shakes under long exposure conditions, ensuring image shooting quality.
[0033] In conjunction with the first aspect, in one possible implementation, a target image stabilization strategy is determined and executed based on the relationship between the jitter distribution data and the target jitter measurement threshold, and the relationship between the exposure duration and the target exposure duration threshold, including:
[0034] If the exposure time is greater than the exposure time threshold, and the current camera working mode is night mode or shooting frame output mode, and the jitter distribution data in the first target frequency band is greater than the target jitter measurement threshold, and the jitter distribution data in the second target frequency band is less than the target jitter measurement threshold, then the target image stabilization strategy is determined to perform image stabilization processing on the shooting jitter signal of the first target frequency band.
[0035] The frequency value of the second target frequency band is greater than the frequency value of the first target frequency band.
[0036] This implementation process corresponds to the scenario in the embodiment where the camera's working mode is night scene mode, the exposure time is long exposure in the shooting frame output mode, and the shaking intensity of the mid-to-high frequency components is insufficient while the shaking intensity of the low frequency components is sufficient. It is the same as the processing method in the case where there are no high frequency components and only low frequency components. It still performs image stabilization on the low frequency, thereby achieving image stabilization processing for long exposure conditions in some camera working modes. It performs comprehensive image stabilization processing for the sensitivity of small shakes under long exposure conditions to ensure image shooting effect.
[0037] In conjunction with the first aspect, in one possible implementation, a target image stabilization strategy is determined and executed based on the relationship between the jitter distribution data and the target jitter measurement threshold, and the relationship between the exposure duration and the target exposure duration threshold, including:
[0038] If the exposure time is greater than the exposure time threshold, and the current camera working mode is the shooting forward frame mode or preview mode, and the jitter distribution data in the first target frequency band is greater than the target jitter measurement threshold, and the jitter distribution data in the second target frequency band is less than the target jitter measurement threshold, then the target image stabilization strategy is determined to perform image stabilization processing on the shooting jitter signal of the first target frequency band.
[0039] The frequency value of the second target frequency band is greater than the frequency value of the first target frequency band.
[0040] This implementation process corresponds to the case in the embodiment where the camera is in the shooting pre-frame mode or preview mode with a long exposure time, and the shaking intensity of the mid-to-high frequency components is insufficient while the shaking intensity of the low frequency components is sufficient. It is the same as the processing method in the case where there are no high frequency components and only low frequency components. The low frequency is still stabilized, and the sensitivity to small shaking under long exposure conditions is fully stabilized to ensure the image shooting effect.
[0041] In conjunction with the first aspect, in one possible implementation, image stabilization processing is performed on the image shake signal of the first target frequency band, including:
[0042] Shake compensation is performed on the lens or image sensor during the inter-frame exposure gap of the image frame. After shake compensation, the lens or image sensor is moved to the target position, which is the optical center position or the position on the opposite side with the optical center as the center of symmetry.
[0043] This process corresponds to the reset center mode or reverse reset mode proposed in the embodiments. It implements shake processing by inter-frame centering or additional reverse movement to achieve image stabilization for long exposure conditions in special shooting modes and shooting situations, thereby improving the image shooting effect.
[0044] In conjunction with the first aspect, one possible implementation method for image stabilization also includes:
[0045] Based on the feature points in the current image frame, the feature points in the previous image frame, and the movement parameters used to move the lens or image sensor to the target position during the inter-frame exposure gap between the current and previous image frames, the homography matrix required for electronic image stabilization is calculated.
[0046] Based on the homography matrix, the image data of the current image frame is transformed to the same spatial state as the previous image frame to obtain the jitter-compensated current image frame for preview display.
[0047] This process, corresponding to the implementation in the embodiment of combining OIS and EIS to compensate for preview jitter caused by centering and additional reverse movement, can improve the display smoothness between consecutive image frames.
[0048] In conjunction with the first aspect, one possible implementation, after determining and executing the target image stabilization strategy based on shake distribution data and exposure duration, also includes:
[0049] Acquire multiple frames of images captured by the electronic device in the current camera working mode, wherein the electronic device performs corresponding image stabilization processing based on the target image stabilization strategy for each frame captured;
[0050] The target image is generated by fusing multiple frames of images.
[0051] This process corresponds to the implementation process in the embodiment, which involves performing multi-frame exposure and frame output in the current camera working mode to obtain multi-frame image data, combining image fusion algorithms and other post-processing algorithms to synthesize the multi-frame images, forming a final image as the captured image, and further ensuring that the final captured image has clear content.
[0052] Secondly, this application provides a camera stabilization device, comprising:
[0053] The acquisition module is used to acquire the camera shake signal and exposure time of the electronic device in the current camera working mode;
[0054] The determination module is used to determine at least one target frequency band for the distribution of captured jitter signals and jitter distribution data of captured jitter signals in different target frequency bands;
[0055] The image stabilization module is used to determine and execute a target image stabilization strategy based on shake distribution data and exposure time.
[0056] Thirdly, this application provides an electronic device, including a display screen, a memory, a processor, and a computer program stored in the memory and executable on the processor; when the processor executes the computer program, it implements the method described in the first aspect and any possible implementation thereof.
[0057] Fourthly, embodiments of this application provide a chip system applied to an electronic device. The chip system includes one or more processors, which are configured to invoke computer instructions to cause the electronic device to perform the methods described in the first aspect and any possible implementation thereof.
[0058] Fifthly, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in the first aspect and any possible implementation thereof.
[0059] In a sixth aspect, this application provides a computer program product containing instructions that, when the computer program product is run on an electronic device, cause the electronic device to perform the method described in the first aspect and any possible implementation thereof.
[0060] Understandably, the image stabilization device provided in the second aspect, the electronic device provided in the third aspect, the chip system provided in the fourth aspect, the computer-readable storage medium provided in the fifth aspect, and the computer program product provided in the sixth aspect are all used to execute the method provided in this application. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods, and will not be repeated here. Attached Figure Description
[0061] Figure 1 is a schematic diagram of user operation and interface display in the camera application provided in an embodiment of this application;
[0062] Figure 2 is a schematic diagram of inter-frame centering processing provided in an embodiment of this application;
[0063] Figure 3 is a flowchart illustrating the image stabilization method provided in an embodiment of this application;
[0064] Figure 4 is a schematic diagram of a camera stabilization device according to an embodiment of this application;
[0065] Figure 5 is a schematic diagram of the hardware structure of an electronic device according to an embodiment of this application;
[0066] Figure 6 is a layered architecture diagram of an image capturing module applicable to an embodiment of this application. Detailed Implementation
[0067] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B; "and / or" in the text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.
[0068] It should be understood that the terms "first," "second," etc., in the specification, claims, and drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.
[0069] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application can be combined with other embodiments.
[0070] Electronic devices with image capture capabilities can have different camera operating modes. When the camera switches between different operating modes, it enters the working state corresponding to that mode.
[0071] The electronic devices may include terminal devices, user equipment (UE), and servers, etc. Terminal devices or user equipment may include mobile phones, tablets, wearable devices, in-vehicle devices, augmented reality (AR) / virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), etc. All of these electronic devices support multi-window display functionality. This application does not limit this aspect.
[0072] Taking a mobile phone as an example, as shown in Figure 1, different camera working modes can be set in the camera application. For example, the preview mode entered after clicking the camera application icon in Figure 1(a), the default shooting mode (Default_Mode), professional mode (Professional_Mode), and night mode (Night_Mode) shown in Figure 1(b).
[0073] Or, in some cases, functional modes can be categorized based on different image capture processes. For example, there are pre-capture frame mode and post-capture frame mode, which are based on the different times when the camera captures frames.
[0074] Professional mode is a mode that offers highly customizable shooting parameters. In professional mode, users typically allow manual adjustment of various shooting parameters, such as ISO, shutter speed (exposure time), and white balance, to customize the camera's shooting scheme and achieve more refined shooting results. Users may have specific image capture needs in this mode, and the camera's sensitivity to camera shake may vary.
[0075] Night mode is a feature specifically designed for shooting images at night or in low-light conditions. Night mode typically increases the exposure time to ensure enough light enters the camera, contributing to clear, bright photos in dim environments. This mode captures more light and detail by increasing exposure time, raising ISO sensitivity, and applying image processing algorithms. In night mode, because of the low ambient light, the camera needs more time to capture enough light to form a sharp image; even slight camera shake can cause blur, significantly increasing the camera's sensitivity to camera movement.
[0076] Preview mode is typically used to view the image captured by the camera lens in real time. In preview mode, users can view the shooting scene through the camera's display screen or viewfinder. Preview mode not only helps users compose shots and capture the best shooting moment, but it can also serve as a preparation stage before shooting, ensuring that shooting parameters are set correctly.
[0077] The default shooting mode is the most basic and commonly used camera mode. This mode usually automatically adjusts parameters such as ISO, shutter speed, and aperture to adapt to different shooting scenarios and lighting conditions. While not as flexible and precise as the professional mode, the default shooting mode is suitable for everyday shooting and recording life's moments.
[0078] The pre-capture frame mode is a mode where the camera has already captured and stored the most recent few frames of image data before the shutter is pressed. In this mode, when the shutter is pressed, the camera selects the frame closest to the shutter moment from these captured and stored frames for post-processing (such as encoding and saving), thereby shortening the time from pressing the shutter to saving the image. In some cases, it can achieve a zero shutter lag effect, or even a negative shutter lag effect. This mode can be combined with the aforementioned Preview mode, Professional mode, Night mode, and Default shooting mode.
[0079] Post-capture frame mode is a mode where the camera only begins capturing image data and performing post-processing after the shutter is pressed, achieving a non-zero shutter delay effect. This mode can be combined with the aforementioned professional mode, night mode, and default shooting mode.
[0080] In this embodiment, the corresponding camera working mode is selected for image capture according to different shooting scenarios.
[0081] During image capture, the camera can have different exposure status information. Exposure status information mainly refers to the exposure time (Exposure_Time_Info) set for each frame when multiple frames of images are captured and output by the electronic device. This exposure time setting can be determined based on automatic exposure statistics and a pre-set exposure parameter table.
[0082] Exposure time can be categorized into long exposure and short exposure based on its duration. The distinction between long and short exposure can be based on a set exposure duration threshold.
[0083] Long exposure means that the camera shutter is open for a longer period of time, allowing more light to enter the camera sensor. This is usually used in low-light environments and is often used to shoot night scenes, light trails, and other scenes that require long exposure.
[0084] In long exposure conditions, the camera uses a slower shutter speed to capture more light and dynamic effects. Even slight camera movement (shake) can cause image blur during long exposures, making image stabilization crucial.
[0085] Under non-long exposure conditions, the camera exposure time is shorter, and the sensitivity to camera shake is relatively low.
[0086] The aforementioned exposure duration threshold can be set using empirical values or industry-standard values.
[0087] Alternatively, the exposure time threshold is a setting configured in association with different camera operating modes, and this exposure time threshold changes accordingly depending on the different camera operating modes.
[0088] By combining the standard for measuring exposure duration with different camera working modes, the exposure duration thresholds set for different camera working modes can be the same or different depending on the actual shooting scene and needs. This enables the differentiation of different exposure status information in different camera working modes using different classification standards, and accurately processing shooting shake signals to adapt to the exposure conditions of the current shooting scene.
[0089] Mobile phone photography typically involves handheld shooting, tripod shooting, or image stabilization using a gimbal. Shaking can be caused by hand movement or external environmental factors, such as slight, rapid hand movements or environmental disturbances (like wind). The camera's built-in sensors can detect and analyze the shaking that occurs during image capture. These built-in sensors include, for example, gyroscopes.
[0090] To adapt appropriate image stabilization strategies to different shooting shaky conditions, multiple shaky frequency bands can be divided according to the frequency of the shakiness, with each band corresponding to a shakiness frequency range. For example, it can be divided into three frequency bands: low frequency, mid frequency, and high frequency; or into two ranges: low frequency and mid-high frequency; or into other numbers of frequency bands.
[0091] Different jitter frequency ranges have their own upper and lower limits.
[0092] Optionally, the upper and lower limits of different jitter frequency ranges can be set as empirical values or industry-standard values.
[0093] For example, in some alternative embodiments, it can be known from the shooting shake model of a person holding a mobile phone that camera shooting shake is usually a combination of various frequency bands, with the shake frequency range being around 0.1Hz to 8Hz, where 0.1Hz-0.3Hz is the low frequency range, 0.3Hz-2Hz is the mid frequency range, and above 2Hz up to 8Hz is the high frequency range.
[0094] Alternatively, in some embodiments, frequency band thresholds can be associated with different camera operating modes to form upper and lower limit values that define each jitter frequency range.
[0095] By combining frequency band division with different camera working modes, the frequency band thresholds set for different camera working modes can be the same or different depending on the actual shooting scene and needs. This allows for the division of a more suitable shake frequency range for the current shooting scene under different camera working modes, so as to carry out targeted processing of shooting shake frequency under different working modes.
[0096] To prevent blurry images caused by camera shake during shooting, camera stabilization technology is introduced.
[0097] Camera image stabilization technology is mainly divided into two categories: optical image stabilization (OIS) and electronic image stabilization (EIS).
[0098] OIS (Optical Image Stabilization) technology uses a small, movable device (such as a compensating lens group) mounted on the lens or image sensor to adjust the optical axis position in real time, thereby counteracting camera shake. When camera shake occurs, a built-in gyroscope or accelerometer quickly detects the direction and magnitude of the shake and transmits this data to the processor. The processor calculates the amount of displacement that needs to be compensated based on the received data and then drives the compensating lens group to move accordingly to maintain image stability.
[0099] For mid- and high-frequency camera shake, optical image stabilization systems can quickly respond and adjust the position of compensating lens groups to counteract these rapid and minute movements. Through precise mechanical adjustments and advanced sensor technology, optical image stabilization systems can maintain image sharpness and stability during shooting.
[0100] EIS technology primarily compensates for image jitter through software algorithms. By analyzing the motion differences between consecutive frames, it calculates the motion vector between each frame and adjusts each frame by translation, rotation, or scaling when rendering videos or photos to achieve a stable image.
[0101] For mid- and high-frequency jitter, the electronic image stabilization system calculates the amount of displacement that needs to be compensated by comparing the image differences between consecutive frames. Then, it makes corresponding adjustments to each frame, such as translation or rotation, to eliminate the image blur caused by jitter.
[0102] Alternatively, a hybrid image stabilization technique combining OIS and EIS can be used. This combines optical image stabilization and electronic image stabilization, achieving better image stabilization by comprehensively utilizing physical and software compensation methods. For example, OIS is responsible for compensating for large-amplitude shakes (including low-frequency shakes), while EIS is used for fine-tuning and compensating for small-amplitude shakes (especially high-frequency shakes) that OIS cannot handle. Hybrid image stabilization can simultaneously utilize the advantages of optical and electronic image stabilization to provide more comprehensive compensation for mid- and high-frequency shakes.
[0103] Different frequency bands, such as low-frequency, mid-frequency, and high-frequency shaking, represent different external shaking conditions. Targeted image stabilization measures are needed for different shooting shaking conditions.
[0104] Since different frequency bands of shaking during image capture represent different external shaking conditions, and different exposure conditions and different camera working modes have different sensitivities to camera shaking, appropriate strategies can be selected for different shooting shaking situations to achieve adaptive adaptation of the image stabilization strategy. By implementing image stabilization processing through different degrees of shaking perception and image stabilization compensation, better preview and image capture results can be achieved.
[0105] Therefore, in order to solve the problem that images are easily blurred in different shooting scenarios when using a single shooting stabilization mode, this embodiment of the application combines the camera working mode, shooting shake signal and exposure time. Under the current camera working mode of the electronic device, the exposure time and the shake distribution data of the sensed shooting shake signal in different frequency bands are combined to adaptively determine the stabilization strategy that matches the current shooting scenario, so as to meet the image shooting stabilization needs in different shooting scenarios and reduce image blur.
[0106] In the optional implementation process, firstly, the full-band information of mobile phone shooting shake, Gyro_Info, is obtained by combining sensors such as gyroscopes; then, information such as exposure time during camera preview and shooting process is obtained by combining modules such as automatic exposure; and finally, information such as camera working mode is obtained by combining camera working status.
[0107] Based on this, the information of the entire frequency band is separated according to the frequency bands divided above, to determine which frequency bands the shooting jitter signal is distributed in and the jitter distribution data in these frequency bands.
[0108] When separating the captured jitter data, optionally, the gyroscope's full-frequency information can be separated according to a specified filter design. This is achieved by dividing the recorded gyroscope full-frequency information (Gyro_Info) into frequencies using filters, such as low-pass and high-pass filters to obtain low-frequency and high-frequency information respectively, and then removing this information to obtain mid-frequency information. Alternatively, a frequency domain processing method can be used to convert Gyro_Info from the spatial domain to the frequency domain, obtaining the frequency information Gyro_Info_Frequency_Domain. Then, the frequency signal is distinguished using frequency band thresholds for low, mid, and high frequencies to obtain jitter signal distribution data for low, mid, and high frequencies, as shown below:
[0109] Gyroscope low-frequency signal: Gyro_Low_Frequency_Info=
[0110] Gyro_Info_Frequency_Domain(Low_Frequency_Th1:Low_Frequency_Th2);
[0111] Gyroscope intermediate frequency signal: Gyro_Mid_Frequency_Info=
[0112] Gyro_Info_Frequency_Domain(Mid_Frequency_Th1:Mid_Frequency_Th2);
[0113] Gyroscope high-frequency signal: Gyro_High_Frequency_Info=
[0114] Gyro_Info_Frequency_Domain(High_Frequency_Th1:High_Frequency_Th2).
[0115] Among them, Low_Frequency_Th1 and Low_Frequency_Th2 are the upper and lower limits of the low frequency band; Mid_Frequency_Th1 and Mid_Frequency_Th2 are the upper and lower limits of the mid frequency band; and High_Frequency_Th1 and High_Frequency_Th2 are the upper and lower limits of the high frequency band.
[0116] After obtaining the shake distribution data, for shake distribution data falling into a specific frequency band, the exposure time and the current camera working mode can be combined to adaptively determine a shake stabilization strategy that matches the current shooting scene.
[0117] In some embodiments, a specific frequency band may be all the divided frequency bands or a portion of them.
[0118] In some implementation processes, the captured shaky signal will generate shaky components in different frequency bands. These shaky components can have different characteristics in the corresponding frequency bands, such as shaky frequency, shaky amplitude, and shaky energy value. These shaky components and their characteristics can form shaky signal distribution data in different frequency bands.
[0119] The jitter frequency data distributed in a specific frequency band can be used as jitter distribution data, or the corresponding jitter intensity characterization data can be determined based on the jitter frequency data in a specific frequency band as jitter distribution data in that specific frequency band.
[0120] The jitter intensity characterization data can be selected as jitter amplitude and jitter energy value.
[0121] In other words, jitter distribution data can be jitter components distributed in different frequency bands of the captured jitter signal, or characteristic data such as the jitter amplitude or jitter energy value of the distributed jitter components, or a combination of these data.
[0122] When developing an adaptive anti-shake strategy based on jitter distribution data, anti-shake processing can be applied directly to jitter data in a specific frequency band, or the jitter distribution data in a specific frequency band can be compared with a measurement threshold in that specific frequency band. For example, if the jitter distribution data is greater than the measurement threshold, it is determined that the jitter intensity of the jitter distribution data is strong, and anti-shake processing is required for the corresponding jitter. An adaptive anti-shake strategy can then be developed based on the comparison results.
[0123] When performing anti-shake processing on jitter distribution data in a specific frequency band, further differentiated processing can be applied to the jitter distribution data in that specific frequency band. When there are multiple specific frequency bands, anti-shake processing can be directly applied to the jitter in some of these frequency bands to compensate for all jitter in these frequency bands. For other frequency bands, targeted compensation can be applied to the jitter components that meet the conditions in these frequency bands. For example, the jitter distribution data in these frequency bands can be compared with the corresponding threshold. If the jitter distribution data is greater than the threshold, the jitter components in these specific frequency bands are considered to meet the conditions.
[0124] For example, when a specific frequency band is a mid-to-high frequency band, it is necessary to compensate for all jitter data distributed in those frequency bands. When a specific frequency band is a low frequency band, some low-frequency jitter can be compensated. In this case, a jitter measurement threshold can be set for the low-frequency band. If the jitter distribution data is greater than the jitter measurement threshold, it is considered that the jitter data in the frequency band can be compensated. If it is less than the threshold, no compensation is required.
[0125] When the jitter distribution data is a jitter amplitude value or jitter energy value, which measures the intensity of jitter, the measurement threshold is the corresponding intensity measurement threshold, such as the jitter amplitude threshold or the jitter energy threshold.
[0126] On the one hand, the amplitude information of the jitter components distributed in a specific frequency band is obtained, and the specific frequency band and jitter amplitude threshold that the stabilization needs to perceive in the current scene and camera working mode are obtained in combination with the pre-calibration parameters. The amplitude information of the jitter components is compared with the jitter amplitude threshold, and the appropriate stabilization strategy is determined in a coordinated manner.
[0127] On the other hand, it can obtain the jitter energy value of jitter components within a specific frequency band, and combine it with pre-calibration parameters to obtain the specific frequency band and jitter energy threshold that the stabilization needs to perceive in the current scene and camera working mode. The energy information of the jitter components is compared with the jitter energy threshold to collaboratively determine the appropriate stabilization strategy.
[0128] In one optional implementation, the energy of the jitter components in different frequency bands can be calculated using power spectrum analysis or other methods. Taking a frequency band divided into low-frequency, mid-frequency, and high-frequency bands as an example, the power spectrum calculation method is as follows:
[0129] Calculate the power spectrum P[k] of the frequency domain signal of camera shake. This P[k] is usually the squared modulus of X[k], i.e., P[k] = |X[k]|. 2 ;
[0130] Where X[k] are Gyro_Low_Frequency_Info, Gyro_Mid_Frequency_Info, and Gyro_High_Frequency_Info respectively in the aforementioned process, and k is the gyroscope sampling frequency.
[0131] Calculate the jitter energy within a frequency range: Summate the power spectrum within the specified frequency range to obtain the energy for that range. Assuming the frequency range is [k1, k2], the energy E is:
[0132]
[0133] Where K is the frequency index.
[0134] For the jitter components obtained after frequency division of the captured jitter signal, the sum of the squares of the signal magnitudes of the jitter components is the jitter energy value within the corresponding frequency band:
[0135] Low-frequency energy E_Low_Frenqency
[0136] =∑(|Gyro_Low_Frequency_Info(Low_Frequency_Th1:Low_Frequency_Th2)|)2;
[0137] Mid-frequency energy E_Mid_Frenqency
[0138] =∑(|Gyro_Mid_Frequency_Info(Mid_Frequency_Th1:Mid_Frequency_Th2)|)2;
[0139] High-frequency energy E_High_Frenqency
[0140] =∑(|Gyro_High_Frequency_Info(High_Frequency_Th1:High_Frequency_Th2)|)2.
[0141] When stabilizing shake, the stabilization strategy can be set to form a corresponding stabilization mode.
[0142] When adapting and switching image stabilization strategies to changes in camera working mode, exposure time, and shooting shake data, the corresponding image stabilization strategy can be directly invoked.
[0143] Optionally, the image stabilization mode can be configured to include:
[0144] Normal mode, Long Exposure mode, Panning mode, Disable OIS mode, Reset Center mode, Reverve Reset mode, etc.
[0145] In some optional implementations, the shake handling in different image stabilization modes can specifically be:
[0146] The image stabilization mode is the normal mode, which does not compensate for low-frequency jitter, but only for mid-to-high-frequency jitter.
[0147] In practice, taking OIS as an example, the OIS signal processing unit includes a high-pass filter to remove the low-frequency components of the shooting shake signal, compensating only for mid- and high-frequency shake, and not for low-frequency shake. This image stabilization mode can ensure good shooting responsiveness.
[0148] The image stabilization mode is a long exposure mode. During the shake compensation process, it performs full-band image stabilization processing on the shake components in the defined frequency range. That is, while compensating for the distributed mid-to-high frequency shake, it also compensates for the distributed low-frequency shake.
[0149] Optionally, the OIS signal processing unit may not include a high-pass filter, thus preserving low-frequency signals and compensating for low-frequency jitter during the jitter compensation process. This image stabilization mode offers better image stabilization capabilities under long exposure conditions.
[0150] The image stabilization mode is either panning or disabled, suitable for scenarios where the user moves the phone to shoot, in which only low-frequency shaking occurs.
[0151] In pan mode, the camera moves with the moving subject to maintain its sharpness in the frame while the background blurs due to relative motion, creating a dynamic effect. This mode is suitable for shooting fast-moving objects, such as race cars or athletes in motion. In pan mode, the OIS system allows the camera to move slightly horizontally (i.e., in the pan direction) while compensating for shake in other directions, such as vertical stabilization. This is typically used when shooting moving objects where the photographer wants to preserve the horizontal trajectory of the object while avoiding vertical blur. This allows for capturing dynamic subjects and blurred backgrounds even with long exposures, creating dynamic images and producing images with a motion blur effect.
[0152] In practice, the image stabilization is disabled in the "disable image stabilization" mode, which means the image stabilization is turned off directly. In the panning mode, low-frequency shake is not processed. In both modes, compensation for low-frequency shake is avoided to prevent affecting the user's actual camera movements.
[0153] The image stabilization mode is either a reset center mode or a reverse reset mode, employing image stabilization with inter-frame centering and image stabilization with additional reverse shift. This image stabilization mode is optionally available in preview mode or shooting in front-out frame mode.
[0154] One type of image stabilization with frame centering involves moving the camera lens or sensor to the optical center position during the inter-frame exposure interval. As shown in Figure 2, the centering process is triggered by the OIS system and needs to be performed during the exposure time interval of two consecutive frames (e.g., frame1 and frame2 in Figure 2). This method can be used in image stabilization scenarios requiring compensation for low-frequency jitter.
[0155] The image stabilization method with additional reverse movement has the same time logic as the inter-frame centering method. The difference is that, based on inter-frame centering, the camera lens or sensor is moved from its current position to the other side of the optical center as the center of symmetry to enhance the image stabilization range based on the reverse movement. It is specifically for scenarios with strong shaking and where the shaking is expected to exceed the travel distance, in order to improve the image stabilization travel distance.
[0156] The image stabilization mode is either Reset Center Mode or Reverse Reset Mode, which enables on-demand centering stabilization processing between frames captured in the image, or enhanced stabilization range processing with additional reverse movement.
[0157] Alternatively, OIS can be combined with EIS to compensate for preview jitter caused by centering and additional reverse movement.
[0158] In some alternative implementations, assuming the spatial pose of the current frame is A, the spatial pose of the next frame is B due to centering or additional reverse motion processing under OIS mode during inter-frame processing. This jitter compensation occurs during image capture.
[0159] To maintain the smoothness of the next frame's display between the two frames after exposure and capture, additional jitter compensation based on EIS is required between poses A and B. This jitter compensation occurs during the image display processing.
[0160] The compensation information comes from the OIS_InterFrame_Move_Info information of inter-frame centering or additional reverse motion compensation. Specifically, OIS_InterFrame_Move_Info is the movement data of the camera or object between two consecutive frames, including parameters such as translation and rotation, which are used to describe the changes from one frame to the next.
[0161] The homography matrix of the preview electronic image stabilization is calculated as follows:
[0162] Preview_EIS_Homography_Matrix=Calc_Homo(Prevous_Frame_Feature_Pt, Current_Frame_Feature_Pt, OIS_InterFrame_Move_Info);
[0163] Among them, Calc_Homo is used to calculate the homography matrix, Previous_Frame_Feature_Pt is the feature point of the previous frame in two consecutive images, and Current_Frame_Feature_Pt is the feature point of the current frame in two consecutive images.
[0164] Preview EIS compensation is performed by combining Preview_EIS_Homography_Matrix. The calculated homography matrix is used to transform the coordinate positions of points in the current frame image to simulate an image without jitter. The transformed image is then displayed to the user as a preview image, resulting in a smooth preview stream under OIS back-centering and reverse compensation conditions.
[0165] The following describes how to determine the appropriate image stabilization strategy for shooting shake signals (shake distribution data) under different camera working modes and exposure conditions during camera use.
[0166] In the examples below, the different camera working modes are Preview Mode, Professional Mode, Night Mode, Default Shooting Mode with Front Frame Fusion (referred to as Default Shooting (Front Frame) Mode), and Default Shooting Mode with Back Frame Fusion (referred to as Default Shooting (Back Frame) Mode).
[0167] The jitter frequency is divided into two frequency bands: low frequency and mid-high frequency. The mid-high frequency band can also be a single band that includes both the mid-frequency and high-frequency bands. Optionally, the jitter frequency in the mid-high frequency band is >0.3Hz, and the jitter frequency in the low frequency band is ≤0.3Hz.
[0168] Exposure conditions are divided into two types: long exposure and short exposure. Optionally, long exposure is defined as an exposure time > 250ms, while short exposure is defined as the opposite.
[0169] The strategy comparison table is shown below:
[0170]
[0171]
[0172] As shown in Figure 1(a), when a user clicks the camera app icon on their phone, the camera app enters the camera preview interface shown in Figure 1(b). The camera is in preview mode, and the shooting shake signal is separated to obtain its distribution in the low-frequency band and the mid-to-high-frequency band.
[0173] In preview mode, if the exposure state is long exposure, the anti-shake strategy is matched to the jitter data distributed in specific frequency bands such as mid-high frequency band and low frequency band, and the jitter in the mid-high frequency band and low frequency band is processed. The anti-shake mode corresponds to the long exposure mode in the aforementioned embodiment.
[0174] The upper and lower limits of the low-frequency band can be set according to requirements. Unlike other modes, the upper and lower limits of the low-frequency band can be set to a shorter range to achieve jitter compensation for a portion of the low-frequency band.
[0175] In preview mode, if the exposure state is long exposure and there are no mid-to-high frequency components, only low frequency components, then the matched image stabilization strategy is to still stabilize the low frequency components. Specifically, it can be an inter-frame centering or additional reverse movement image stabilization method. The image stabilization mode can correspond to the reset center mode or reverse reset mode in the aforementioned embodiments.
[0176] Alternatively, the implementation methods described in the foregoing embodiments can be combined to compensate for the preview jitter caused by centering and additional reverse movement, and preview stability can be achieved by relying on the collaborative method of combining OIS and EIS.
[0177] In preview mode, if the exposure state is not long exposure, for the jitter data distributed in the specific frequency band of mid-high frequency band, the matching anti-shake strategy is to only perform anti-shake on mid-high frequency. The anti-shake mode can correspond to the normal mode in the aforementioned embodiment.
[0178] As shown in Figure 1(b), a default shooting mode is configured in the camera application. When the user directly clicks the shooting button, the camera working mode switches to this default shooting mode to capture images.
[0179] In the default photo mode, you can configure whether to shoot in front-frame mode or in back-frame mode.
[0180] When the default shooting mode (front-out frame) is in use, the shooting shake signal is separated to obtain its distribution in the low-frequency band and the mid-to-high-frequency band.
[0181] In this mode, the jitter handling strategy is the same as in the preview mode, so it will not be repeated here.
[0182] When the default shooting mode (back frame output) is in use, the shooting shake signal is separated to obtain its distribution in the low frequency band and the mid-to-high frequency band.
[0183] In the default shooting mode (post frame), if the exposure state is long exposure, the anti-shake strategy is matched to the shake data distributed in specific frequency bands such as mid-high frequency band and low frequency band. The anti-shake mode corresponds to the long exposure mode in the aforementioned embodiment.
[0184] In the default shooting mode (post-frame output), if the exposure is long exposure and there are no mid-to-high frequency components, only low frequency components, then the image stabilization strategy will still stabilize the low frequency components. The image stabilization mode corresponds to the long exposure mode in the aforementioned embodiment.
[0185] In the default shooting mode (post-frame output), if the exposure is not long exposure, the image stabilization strategy only applies to the mid-to-high frequency range, which is a specific frequency band for jitter data. The image stabilization mode can correspond to the normal mode in the aforementioned embodiments.
[0186] Users can also adjust and select shooting modes in the camera.
[0187] When the user selects the professional shooting mode, the camera's working mode switches to professional mode.
[0188] In professional mode, the shooting shake signal is separated to obtain its distribution in the low-frequency band and the mid-to-high-frequency band.
[0189] In professional mode, if the exposure is a long exposure, the image stabilization strategy is matched to only stabilize the mid-to-high frequency range for the jitter data distributed in this specific frequency band. The image stabilization mode can correspond to the normal mode in the aforementioned embodiments.
[0190] In professional mode, if the exposure is a long exposure and there are no mid-to-high frequency components, only low frequency components, it may be due to slow camera movement, such as smooth panning while following a moving subject. Since low-frequency jitter may not have a significant impact on image sharpness, or its impact may be desired by the photographer (such as intentionally creating motion blur), the matched image stabilization strategy is to not process low-frequency components. In this case, the camera may choose to turn off image stabilization or switch to Panning Mode. The image stabilization mode can correspond to the panning mode in the aforementioned embodiments or the disabled image stabilization mode.
[0191] In professional mode, if the exposure is not long exposure, and considering the jitter data distributed in the specific mid-to-high frequency band, the image stabilization strategy will be matched to stabilize only the mid-to-high frequencies. The image stabilization mode can correspond to the normal mode in the aforementioned embodiments.
[0192] When the user selects night mode as the shooting mode, the camera's working mode switches to night mode.
[0193] In this mode, the shake handling strategy is the same as in the default shooting mode (later frame output), so it will not be described again here.
[0194] In each of the above embodiments, the camera's working mode, exposure time, and the distribution data of the sensed shooting shake signal in a specific frequency band are combined to adaptively determine an image stabilization strategy that matches the current shooting scene, so as to meet the image shooting stabilization needs under different shooting scenes, solve the problem that a single shooting stabilization mode is prone to image blurring under different shooting scenes, and reduce image blurring.
[0195] Furthermore, in an optional embodiment of this application, the jitter component in a specific frequency band can be determined to be an object that needs jitter compensation by combining the relationship between jitter distribution data in a specific frequency band and jitter measurement threshold.
[0196] For example, it can be determined that the jitter amplitude is greater than the jitter amplitude threshold, or that the jitter energy value is greater than the energy measurement threshold. When the determination is greater than the threshold, it can be considered that the intensity of the jitter component in the current specific frequency band meets the jitter processing requirements, and the jitter in that specific frequency band needs to be compensated; otherwise, the jitter in that specific frequency band is not processed.
[0197] Taking the relationship between jitter energy value and jitter energy threshold in a specific frequency band as an example, the process of matching anti-shake strategies is described:
[0198] Optionally, the magnitude of the mid-to-high frequency jitter energy is calculated as the sum of the mid-frequency jitter energy and the high-frequency jitter energy.
[0199] When the camera is in Professional mode, if the low-frequency shake energy is greater than the low-frequency energy threshold, and the sum of the mid-frequency and high-frequency shake energy is greater than the mid-high-frequency energy threshold, and the exposure time is less than the exposure duration threshold (i.e., not a long exposure), then the matched image stabilization mode is Normal mode. Otherwise, if the low-frequency shake energy is greater than the low-frequency energy threshold, and the sum of the mid-frequency and high-frequency shake energy is greater than the mid-high-frequency energy threshold, and the exposure time is greater than the exposure duration threshold (i.e., long exposure), then the matched image stabilization mode is Normal mode. Otherwise, if the low-frequency shake energy is greater than the low-frequency energy threshold, and the sum of the mid-frequency and high-frequency shake energy is less than the mid-high-frequency energy threshold, and the exposure time is greater than the exposure duration threshold, then the matched image stabilization mode is Pan mode or image stabilization mode is disabled.
[0200] When the camera is in Night Mode, if the low-frequency shake energy is greater than the low-frequency energy threshold, and the sum of the mid-frequency and high-frequency shake energy is greater than the mid-to-high-frequency energy threshold, and the exposure time is less than the exposure time threshold, then the image stabilization mode is set to Normal Mode. Otherwise, if the low-frequency shake energy is greater than the low-frequency energy threshold, and the sum of the mid-frequency and high-frequency shake energy is greater than the mid-to-high-frequency energy threshold, and the exposure time is greater than the exposure time threshold, then the image stabilization mode is set to Long Exposure Mode. Conversely, if the low-frequency shake energy is greater than the low-frequency energy threshold, and the sum of the mid-frequency and high-frequency shake energy is less than the mid-to-high-frequency energy threshold, and the exposure time is greater than the exposure time threshold, then the image stabilization mode is set to Long Exposure Mode.
[0201] When the camera is in the default shooting mode (front-out frame), if the low-frequency jitter energy is greater than the low-frequency energy threshold, and the sum of the mid-frequency jitter energy and high-frequency jitter energy is greater than the mid-high frequency threshold, and the exposure time is less than the exposure time threshold, then the matching image stabilization mode is normal mode. Otherwise, if the low-frequency jitter energy is greater than the low-frequency energy threshold, and the sum of the mid-frequency jitter energy and high-frequency jitter energy is greater than the mid-high frequency energy threshold, and the exposure time is greater than the exposure time threshold, then the matching image stabilization mode is long exposure mode. Otherwise, if the low-frequency jitter energy is greater than the low-frequency energy threshold, and the sum of the mid-frequency jitter energy and high-frequency jitter energy is less than the mid-high frequency energy threshold, and the exposure time is greater than the exposure time threshold, then the matching image stabilization mode is reset center mode or reverse reset mode.
[0202] Optionally, if the camera is in preview mode, the processing is the same as in the default shooting mode (front-out frame). When the camera is in the default shooting mode (back-out frame), the processing is the same as in night mode.
[0203] Optionally, in other camera operating modes, the image stabilization mode is matched to the normal mode.
[0204] In other embodiments, the process of matching the anti-shake strategy based on the relationship between the jitter amplitude and the jitter amplitude threshold in a specific frequency band is the same as the process of matching the anti-shake strategy based on the relationship between the jitter energy value and the jitter energy threshold in a specific frequency band, and will not be repeated here.
[0205] The above process involves pre-calibrated frequency band thresholds and shake measurement and exposure time thresholds for each frequency band under different camera operating modes. By combining the relationship between shake distribution data and shake measurement thresholds in specific frequency bands, as well as the relationship between exposure time and exposure time thresholds, shake processing strategies are adapted to meet the specific shake processing needs of different camera operating modes. The shake stabilization strategy is determined for the shooting stabilization needs of different shooting modes, meeting the different shake stabilization needs of camera functions under different usage conditions, improving the accuracy of shooting stabilization and image capture responsiveness, and improving the problem of blurry images.
[0206] In some alternative implementations, based on the above-mentioned image stabilization mode switching and image stabilization processing, the electronic device can perform image capture processing.
[0207] The electronic device performs multi-frame exposure and frame output in the current camera working mode to obtain multi-frame image data. It combines image fusion algorithm and other post-processing algorithms to synthesize the multi-frame data and form a final image as the captured image. This completes the image stabilization and frame output process, resulting in a clear final captured image.
[0208] The following description, with reference to Figure 3, illustrates a method for image stabilization provided in an embodiment of this application. This method is executed by an electronic device with image capture capabilities. As shown in Figure 3, the image stabilization method includes steps S301-S303.
[0209] S301 acquires the camera shake signal and exposure time of the electronic device in the current camera operating mode.
[0210] The electronic device is pre-configured with camera operating modes. These modes can be multiple, as exemplified in the foregoing embodiments, and can be switched between. The exposure time within the same camera operating mode is adjustable, and will vary depending on different shooting requirements.
[0211] The shaking signal can be detected and acquired based on sensors such as gyroscopes.
[0212] S302, determine at least one target frequency band for the distribution of the captured jitter signal and jitter distribution data of the captured jitter signal under different target frequency bands.
[0213] Several frequency bands can be pre-divided based on the magnitude of the jitter frequency.
[0214] The captured jitter signal will have corresponding jitter components in different frequency bands. By decomposing the captured jitter signal and comparing the jitter frequency of the captured jitter signal with the frequency band threshold, we can obtain at least one target frequency band and the jitter components distributed in each target frequency band.
[0215] When decomposing the captured shaking signal, it can be done by performing frequency domain decomposition based on the shaking signal, thereby obtaining the shaking distribution data of the captured shaking signal in these target frequency bands.
[0216] Jitter components can have different component characteristics in the corresponding frequency bands, such as jitter frequency, jitter amplitude, and jitter energy value. These jitter components and component characteristics can form jitter distribution data of the captured jitter signal in different frequency bands.
[0217] Optionally, during jitter compensation, jitter components in a specific frequency band within the target frequency band can be directly compensated accordingly.
[0218] Optionally, during jitter compensation, compensation can be performed on jitter components whose jitter intensity exceeds a threshold within a specific frequency band of the target frequency band.
[0219] In one optional implementation, frequency bands can be defined by using fixed frequency band thresholds to define the corresponding jitter frequency ranges for different frequency bands. Based on this, the target frequency bands for capturing jitter signal distribution and the jitter distribution data within these target frequency bands are determined.
[0220] Alternatively, in an optional implementation, corresponding frequency band thresholds can be pre-calibrated for different camera operating modes to limit the jitter frequency range corresponding to different frequency bands, thereby dividing the frequency bands corresponding to each camera operating mode. Based on this, the pre-calibrated target frequency band threshold corresponding to the current camera operating mode is obtained. Based on the target frequency band threshold, at least one target frequency band for the distribution of the shooting jitter signal and jitter distribution data of the shooting jitter signal under different target frequency bands are determined.
[0221] By combining the division of frequency bands with the camera's operating mode, the shooting shake signal can be separated and processed in a way that better suits the shooting needs of the current camera's operating mode, so that appropriate shake compensation can be performed on the shake in the adapted frequency band in the future.
[0222] In some cases, jitter distribution data can be jitter amplitude, jitter energy value, etc.
[0223] Therefore, when determining the jitter distribution data of the captured jitter signal in different target frequency bands, optionally, the jitter amplitude of the captured jitter signal in each target frequency band can be used as the jitter distribution data. Alternatively, optionally, the jitter energy value of the captured jitter signal in each target frequency band can be calculated based on the frequency distribution data of the captured jitter signal in each target frequency band and used as the jitter distribution data. Or, both can be used as the jitter distribution data. This facilitates the measurement of the jitter component's intensity in a specific frequency band, enabling subsequent effective image stabilization processing.
[0224] S303 determines and executes a target image stabilization strategy based on shake distribution data and exposure duration.
[0225] Based on the exposure time in the current camera working mode, the image stabilization requirements in the current camera working mode can be determined directly, and then it can be determined whether to implement a shake processing strategy to compensate for the shake distribution data of the captured shake signal in different target frequency bands.
[0226] Alternatively, a mapping relationship can be established between different image stabilization strategies based on the shake distribution data of the captured shake signal in different frequency bands and the different combinations of exposure time under different camera operating modes. Based on this mapping relationship, after obtaining the shake distribution data of the current captured shake signal in a specific frequency band and the exposure time in the current camera operating mode, a suitable target image stabilization strategy can be determined.
[0227] This image stabilization method, based on the camera's current operating mode, identifies shooting exposure data and camera shake distribution data at different frequency bands, and adapts appropriate image stabilization strategies. This allows for targeted and differentiated shake processing for different camera shake needs, intelligently adjusting the image stabilization strategy to help improve camera shooting stability and image clarity, providing better image stabilization effects and more flexible image stabilization response methods.
[0228] Optionally, in some implementations, different camera operating modes have an exposure duration threshold and a jitter measurement threshold for each frequency band defined by a pre-calibrated frequency band threshold.
[0229] Optionally, the jitter distribution data can be jitter amplitude and / or jitter energy values; the jitter measurement threshold includes a jitter amplitude threshold and / or a jitter energy threshold.
[0230] Accordingly, based on the shake distribution data and exposure duration, the S303 determines and executes the target image stabilization strategy, including:
[0231] Obtain the target shake measurement threshold and target exposure time threshold in the target frequency band under the current camera working mode; based on the relationship between shake distribution data and target shake measurement threshold, and the relationship between exposure time and target exposure time threshold, determine and execute target image stabilization strategy.
[0232] Camera image stabilization can perform differentiated shake compensation processing for shakes of different frequencies.
[0233] In this way, by combining the relationship between the jitter distribution data in a specific frequency band and the jitter measurement threshold, as well as the relationship between the exposure time and the duration threshold, a jitter processing strategy that matches the specific jitter processing requirements of different camera working modes is adapted. The jitter stabilization strategy is determined for the shooting jitter stabilization requirements of different shooting modes, so as to meet the different jitter stabilization requirements of the camera function under different usage conditions, improve the accuracy of shooting jitter stabilization and the responsiveness of image shooting, and improve the problem of blurry shooting.
[0234] In some implementations, the above steps, based on the relationship between jitter distribution data and a target jitter measurement threshold, and the relationship between exposure time and a target exposure time threshold, determine and execute a target image stabilization strategy, including:
[0235] If the exposure time is less than the exposure time threshold, and the jitter distribution data in the first target frequency band is greater than the target jitter measurement threshold, and the jitter distribution data in the second target frequency band is greater than the target jitter measurement threshold, then the target image stabilization strategy is determined to perform image stabilization processing on the shooting jitter signal of the second target frequency band, and not to perform image stabilization processing on the shooting jitter signal of the first target frequency band.
[0236] The frequency value of the second target frequency band is greater than the frequency value of the first target frequency band.
[0237] In one implementation process, the second target frequency band involved in the above steps may be the mid-to-high frequency band in the foregoing embodiments, and the first target frequency band may be the low frequency band in the foregoing embodiments.
[0238] The image stabilization process is performed on the image shaking signal in the second target frequency band, specifically by performing image shaking compensation processing on the shaking components of the image shaking signal distributed in the second target frequency band.
[0239] The above implementation process corresponds to the case where the exposure time is not long exposure in the various camera working modes of the aforementioned embodiments. It only performs image stabilization on the mid-to-high frequency range, thereby achieving positive and effective processing of mid-to-high frequency shaking in various camera working modes and avoiding blurry images.
[0240] In some implementations, the above steps, based on the relationship between jitter distribution data and a target jitter measurement threshold, and the relationship between exposure time and a target exposure time threshold, determine and execute a target image stabilization strategy, including:
[0241] If the exposure time exceeds the exposure time threshold, and the current camera working mode is professional mode, and the shake distribution data in the first target frequency band is greater than the target shake measurement threshold, and the shake distribution data in the second target frequency band is greater than the target shake measurement threshold, then the target image stabilization strategy is determined to perform image stabilization processing on the shooting shake signal of the second target frequency band, and not to perform image stabilization processing on the shooting shake signal of the first target frequency band.
[0242] The frequency value of the second target frequency band is greater than the frequency value of the first target frequency band.
[0243] In one implementation process, the second target frequency band involved in the above steps may be the mid-to-high frequency band in the foregoing embodiments, and the first target frequency band may be the low frequency band in the foregoing embodiments.
[0244] The image stabilization process is performed on the image shaking signal in the second target frequency band, specifically by performing image shaking compensation processing on the shaking components of the image shaking signal distributed in the second target frequency band.
[0245] The above implementation process corresponds to the case in the aforementioned embodiment where the camera's working mode is professional and the exposure time is long. It only performs image stabilization on mid-to-high frequencies, achieving targeted processing of mid-to-high frequency shaking when the camera's working mode is professional, thus avoiding blurry images.
[0246] In some implementations, the above steps, based on the relationship between jitter distribution data and a target jitter measurement threshold, and the relationship between exposure time and a target exposure time threshold, determine and execute a target image stabilization strategy, including:
[0247] If the exposure time exceeds the exposure time threshold, and the current camera working mode is professional mode, and the jitter distribution data in the first target frequency band is greater than the target jitter measurement threshold, and the jitter distribution data in the second target frequency band is less than the target jitter measurement threshold, then the target stabilization strategy is determined to be not to perform stabilization processing on the shooting jitter signal.
[0248] The frequency value of the second target frequency band is greater than the frequency value of the first target frequency band.
[0249] In one implementation process, the second target frequency band involved in the above steps may be the mid-to-high frequency band in the foregoing embodiments, and the first target frequency band may be the low frequency band in the foregoing embodiments.
[0250] The above implementation process corresponds to the case in the aforementioned embodiment where the camera is in professional mode with a long exposure time and insufficient jitter intensity in the mid-to-high frequency components, but sufficient jitter intensity in the low frequency components. It is the same as the processing method in the case where there are no high frequency components and only low frequency components. No image stabilization is applied to the low frequency components. This achieves targeted processing for special shooting needs in professional mode, ensuring the image shooting effect in professional mode.
[0251] In some implementations, the above steps, based on the relationship between jitter distribution data and a target jitter measurement threshold, and the relationship between exposure time and a target exposure time threshold, determine and execute a target image stabilization strategy, including:
[0252] If the exposure time exceeds the exposure time threshold, and the current camera working mode is night mode, post-capture frame mode, or pre-capture frame mode, and the jitter distribution data in the first target frequency band is greater than the target jitter measurement threshold, and the jitter distribution data in the second target frequency band is greater than the target jitter measurement threshold, then the target stabilization strategy is determined to be to perform stabilization processing on the shooting jitter signal in the second target frequency band and on the shooting jitter signal in the first target frequency band.
[0253] The frequency value of the second target frequency band is greater than the frequency value of the first target frequency band.
[0254] In one implementation process, the second target frequency band involved in the above steps may be the mid-to-high frequency band in the foregoing embodiments, and the first target frequency band may be the low frequency band in the foregoing embodiments.
[0255] The image stabilization process is performed on the image shaking signal in the second target frequency band, specifically by performing image shaking compensation processing on the shaking components of the image shaking signal distributed in the second target frequency band.
[0256] The image stabilization process is performed on the image shaking signal in the first target frequency band, specifically by performing shake compensation processing on the shake components of the image shaking signal distributed in the first target frequency band.
[0257] The above implementation process corresponds to the situation in the aforementioned embodiments where the camera working mode is night scene mode, shooting frame output mode, preview mode, or shooting frame output mode with a long exposure time. It performs image stabilization on both low and mid-to-high frequencies, achieving full-band image stabilization processing for long exposure conditions in some camera working modes, and comprehensively processing the sensitivity to small shakes under long exposure conditions to ensure image shooting effect.
[0258] In some implementations, the above steps, based on the relationship between jitter distribution data and a target jitter measurement threshold, and the relationship between exposure time and a target exposure time threshold, determine and execute a target image stabilization strategy, including:
[0259] If the exposure time is greater than the exposure time threshold, and the current camera working mode is night mode or shooting frame output mode, and the jitter distribution data in the first target frequency band is greater than the target jitter measurement threshold, and the jitter distribution data in the second target frequency band is less than the target jitter measurement threshold, then the target image stabilization strategy is determined to perform image stabilization processing on the shooting jitter signal of the first target frequency band.
[0260] The frequency value of the second target frequency band is greater than the frequency value of the first target frequency band.
[0261] In one implementation process, the second target frequency band involved in the above steps may be the mid-to-high frequency band in the foregoing embodiments, and the first target frequency band may be the low frequency band in the foregoing embodiments.
[0262] The image stabilization process is performed on the image shaking signal in the first target frequency band, specifically by performing shake compensation processing on the shake components of the image shaking signal distributed in the first target frequency band.
[0263] The above implementation process corresponds to the situation in the aforementioned embodiment where the camera working mode is night scene mode, the exposure time is long exposure in the shooting frame output mode, and the shaking intensity of the mid-to-high frequency components is insufficient while the shaking intensity of the low frequency components is sufficient. It is the same as the processing method in the case where there are no high frequency components and only low frequency components. It still performs image stabilization on the low frequency, realizes image stabilization processing for long exposure conditions in some camera working modes, and performs comprehensive image stabilization processing for the sensitivity of small shaking under long exposure conditions to ensure image shooting effect.
[0264] In some implementations, the above steps, based on the relationship between jitter distribution data and a target jitter measurement threshold, and the relationship between exposure time and a target exposure time threshold, determine and execute a target image stabilization strategy, including:
[0265] If the exposure time is greater than the exposure time threshold, and the current camera working mode is the shooting forward frame mode or preview mode, and the jitter distribution data in the first target frequency band is greater than the target jitter measurement threshold, and the jitter distribution data in the second target frequency band is less than the target jitter measurement threshold, then the target image stabilization strategy is determined to perform image stabilization processing on the shooting jitter signal of the first target frequency band.
[0266] The frequency value of the second target frequency band is greater than the frequency value of the first target frequency band.
[0267] In one implementation process, the second target frequency band involved in the above steps may be the mid-to-high frequency band in the foregoing embodiments, and the first target frequency band may be the low frequency band in the foregoing embodiments.
[0268] The image stabilization process is performed on the image shaking signal in the first target frequency band, specifically by performing shake compensation processing on the shake components of the image shaking signal distributed in the first target frequency band.
[0269] The above implementation process corresponds to the situation in the aforementioned embodiments where the camera's working mode is the pre-shoot frame mode or the preview mode, the exposure time is long, and the shaking intensity of the mid-to-high frequency components is insufficient, while the shaking intensity of the low frequency components is sufficient. It is the same as the processing method in the case where there are no high frequency components and only low frequency components. The low frequency is still stabilized, and the sensitivity to small shaking under long exposure conditions is fully stabilized to ensure the image shooting effect.
[0270] In an optional implementation, when the camera is in the shooting pre-frame mode or preview mode with a long exposure time, and the jitter intensity of the mid-to-high frequency components is insufficient while the jitter intensity of the low frequency components is sufficient, when performing image stabilization on the low frequency components, a jitter compensation method of inter-frame centering or additional reverse shift can be selected.
[0271] The specific processing procedure is as follows: during the inter-frame exposure gap of the image frame, the lens or image sensor is shake compensated, and the shake compensated lens or image sensor is moved to the target position, which is the optical center position or the position on the opposite side with the optical center as the center of symmetry.
[0272] This process corresponds to the reset center mode or reverse reset mode proposed in the aforementioned embodiments. Shake processing is implemented by inter-frame centering or additional reverse shifting to achieve image stabilization for long exposure conditions in special shooting modes and shooting situations, thereby improving image shooting results.
[0273] In some alternative implementations, compensation can be made for preview jitter caused by centering and additional reverse movement to ensure smooth image display.
[0274] Correspondingly, the image stabilization method also includes:
[0275] Based on the feature points in the current image frame, the feature points in the previous image frame, and the movement parameters used to move the lens or image sensor to the target position during the inter-frame exposure gap between the current and previous image frames, the homography matrix required for electronic image stabilization is calculated.
[0276] Based on the homography matrix, the image data of the current image frame is transformed to the same spatial state as the previous image frame to obtain the jitter-compensated current image frame for preview display.
[0277] This process corresponds to the implementation process in the aforementioned embodiment of combining OIS and EIS to compensate for preview jitter caused by centering and additional reverse movement, which can improve the display smoothness between consecutive image frames.
[0278] In some optional implementations, after S303 determines and executes the target image stabilization strategy based on the shake distribution data and exposure duration, the method further includes:
[0279] Acquire multiple frames of images captured by the electronic device in the current camera working mode, wherein the electronic device performs corresponding image stabilization processing based on the target image stabilization strategy for each frame captured;
[0280] The target image is generated by fusing multiple frames of images.
[0281] This process corresponds to the aforementioned embodiment, in which multiple frames are exposed and output in the current camera working mode to obtain multiple frames of image data. The images are then combined with image fusion algorithms and other post-processing algorithms to synthesize the multiple frames into a final image, which is then used as the captured image. This process further ensures that a clear finished image is ultimately captured.
[0282] In the embodiments of this application, there are some similarities and differences in the shooting stabilization methods under different scenarios. The relevant descriptions of these parts can be referenced and integrated with each other, and there are no technical obstacles to implementation due to differences in scenario descriptions.
[0283] Figure 4 is a schematic diagram of a camera stabilization device according to an embodiment of this application. As shown in Figure 4, the device 4000 includes an acquisition module 4001, a determination module 4002, and a stabilization module 4003.
[0284] Among them, the acquisition module 4001 is used to acquire the shooting shake signal and exposure time of the electronic device in the current camera working mode;
[0285] The determination module 4002 is used to determine at least one target frequency band of the shooting jitter signal distribution and jitter distribution data of the shooting jitter signal under different target frequency bands;
[0286] The image stabilization module 4003 is used to determine and execute a target image stabilization strategy based on shake distribution data and exposure time.
[0287] The device 4000 can be integrated into electronic devices such as mobile phones, tablets, and smart wearable devices.
[0288] The device 4000 can be used to perform any of the above-mentioned image stabilization methods.
[0289] In one implementation, the device 4000 may further include a storage unit for storing data such as images and interface display elements. This storage unit may be integrated into any of the aforementioned units, or it may be a unit independent of all of the aforementioned units.
[0290] Figure 5 is a schematic diagram of the hardware structure of an electronic device according to an embodiment of this application. As shown in Figure 5, the electronic device 900 may include a processor 910, an external memory interface 920, an internal memory 921, a universal serial bus (USB) interface 930, a charging management module 940, a power management module 941, a battery 942, antenna 1, antenna 2, a mobile communication module 950, a wireless communication module 960, an audio module 970, a speaker 970A, a receiver 970B, a microphone 970C, a headphone jack 970D, a sensor module 980, buttons 990, a motor 991, an indicator 992, a camera 993, a display screen 994, and a subscriber identification module (SIM) card interface 995, etc. The sensor module 980 may include a pressure sensor 980A, a gyroscope sensor 980B, a barometric pressure sensor 980C, a magnetic sensor 980D, an accelerometer sensor 980E, a distance sensor 980F, a proximity light sensor 980G, a fingerprint sensor 980H, a temperature sensor 980J, a touch sensor 980K, an ambient light sensor 980L, a bone conduction sensor 980M, etc.
[0291] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 900. In other embodiments of this application, the electronic device 900 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0292] For example, the processor 910 shown in FIG5 may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.
[0293] The most indispensable function of electronic devices or terminals in people's lives is the photo-taking function. The camera module, ambient light sensor module, and image capture module in the Android system are the core modules of the function. The module can support the implementation of any function that requires image capture.
[0294] The image capture module adopts a layered architecture design, with its business applications spanning the AP (Application Processor) and BP (Baseband Processor), and the AP and BP communicate with each other. Figure 6 is a layered architecture diagram of an image capture module applicable to an embodiment of this application. In this layered architecture, the image capture module spans the Android system's application layer, application framework layer, and hardware abstraction layer, and involves the BP's driver layer, including the modem module.
[0295] The application layer is user-facing and relies on the application framework layer. It presents specific functionalities to the user by accessing the business modules of the application framework layer. The application layer can include a series of application packages.
[0296] As shown in Figure 6, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and SMS.
[0297] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.
[0298] As shown in Figure 6, the application framework layer may include a display policy management service, a power management service (PMS), and a display manager service (DMS). Of course, the application framework layer may also include an alarm manager service (AMS), a window manager service (WMS), a content provider, a view system, a phone manager, a resource manager, a notification manager, etc., and this embodiment of the application does not impose any limitations on this.
[0299] Power management services can be used to control whether the screen of an electronic device is turned on or off. For example, in some cases, power management services can control whether the first and / or second and / or third screen of an electronic device is turned on or off.
[0300] The timer management service is used to manage timers, alarms, etc.
[0301] The window management service is used to manage window applications. The window manager can obtain the screen size, determine whether there is a status bar, lock the screen, and capture the screen, etc.
[0302] Content providers store and retrieve data, making that data accessible to applications. This data can include videos, images, audio, phone calls made and received, browsing history and bookmarks, phone books, and more.
[0303] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.
[0304] A phone manager is used to provide communication functions for electronic devices. For example, it manages call status (including connection and disconnection).
[0305] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.
[0306] The notification manager allows applications to display notifications in the status bar. These notifications can be used to deliver informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of completed downloads or message alerts. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating electronic devices, and flashing indicator lights.
[0307] The system library can include multiple functional modules. For example: status monitoring service, sensor service, surface manager, media libraries, 3D graphics processing library (e.g., OpenGL ES), 2D graphics engine (e.g., SGL), etc.
[0308] Status monitoring services can be used to identify various states of a terminal (such as a mobile phone); such as the form of the terminal (including the unfolded, bent, and folded states of a terminal with a foldable screen), the user's gripping posture, and the relative position of the terminal and the user.
[0309] Sensor services are used to store and process sensor-related data. For example, they can provide output data from individual sensors or perform fusion processing on the output data from multiple sensors.
[0310] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.
[0311] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.
[0312] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0313] A 2D graphics engine is a graphics engine for 2D drawing.
[0314] The kernel layer is the layer between hardware and software. The kernel layer contains at least the display driver, camera driver, audio driver, and sensor driver.
[0315] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.
[0316] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0317] This application also provides an electronic device, which includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, wherein the processor executes the computer program to implement the steps in any of the above methods.
[0318] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps described in the various method embodiments above.
[0319] This application provides a computer program product, which includes a computer program that, when executed by a processor, can implement the steps in the various method embodiments described above.
[0320] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying computer program code to a photographic device / electronic device, a recording medium, a computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.
[0321] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0322] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0323] In the embodiments provided in this application, it should be understood that the disclosed apparatus / devices and methods can be implemented in other ways. For example, the apparatus / device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0324] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0325] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0326] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0327] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."
[0328] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0329] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0330] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A method for image stabilization, characterized in that, include: Acquire the camera shake signal and exposure time of the electronic device in the current camera working mode; Determine at least one target frequency band for the distribution of the shooting shake signal and shake distribution data of the shooting shake signal under different target frequency bands; based on the shake distribution data and the exposure time, determine and execute a target image stabilization strategy.
2. The method as described in claim 1, characterized in that, The step of determining at least one target frequency band for the distribution of the shooting shake signal and the shake distribution data of the shooting shake signal under different target frequency bands includes: obtaining a pre-calibrated target frequency band threshold corresponding to the current camera working mode; the target frequency band threshold is used to limit the shake frequency range corresponding to different frequency bands; based on the target frequency band threshold, determining at least one target frequency band for the distribution of the shooting shake signal and the shake distribution data of the shooting shake signal under different target frequency bands.
3. The method as described in claim 2, characterized in that, The step of determining at least one target frequency band for the distribution of the captured shaking signal and the shaking distribution data of the captured shaking signal under different target frequency bands based on the target frequency band threshold includes: using the shaking amplitude of the captured shaking signal under each target frequency band as the shaking distribution data; and / or, calculating the shaking energy value of the captured shaking signal under each target frequency band as the shaking distribution data based on the frequency distribution data of the captured shaking signal under each target frequency band.
4. The method as described in claim 1, characterized in that, The step of determining and executing a target image stabilization strategy based on the shake distribution data and the exposure duration includes: obtaining the target shake measurement threshold and the target exposure duration threshold of the current camera operating mode in the target frequency band; wherein, different camera operating modes have an exposure duration threshold and a shake measurement threshold in each frequency band defined by a pre-calibrated frequency band threshold; and determining and executing a target image stabilization strategy based on the relationship between the shake distribution data and the target shake measurement threshold, and the relationship between the exposure duration and the target exposure duration threshold.
5. The method as described in claim 4, characterized in that, The step of determining and executing a target image stabilization strategy based on the relationship between the jitter distribution data and the target jitter measurement threshold, and the relationship between the exposure time and the target exposure time threshold, includes: when the exposure time is less than the exposure time threshold, if the jitter distribution data in the first target frequency band is greater than the target jitter measurement threshold, and the jitter distribution data in the second target frequency band is greater than the target jitter measurement threshold, then the target image stabilization strategy is determined to be to perform image stabilization processing on the shooting jitter signal in the second target frequency band, and not to perform image stabilization processing on the shooting jitter signal in the first target frequency band; wherein, the frequency value of the second target frequency band is greater than the frequency value of the first target frequency band.
6. The method as described in claim 4, characterized in that, The step of determining and executing a target image stabilization strategy based on the relationship between the shake distribution data and the target shake measurement threshold, and the relationship between the exposure time and the target exposure time threshold, includes: when the exposure time is greater than the exposure time threshold, if the current camera working mode is professional mode, and the shake distribution data in the first target frequency band is greater than the target shake measurement threshold, and the shake distribution data in the second target frequency band is greater than the target shake measurement threshold, then the target image stabilization strategy is determined to perform image stabilization processing on the shooting shake signal of the second target frequency band, and not perform image stabilization processing on the shooting shake signal of the first target frequency band; wherein, the frequency value of the second target frequency band is greater than the frequency value of the first target frequency band.
7. The method as described in claim 4, characterized in that, The step of determining and executing a target image stabilization strategy based on the relationship between the shake distribution data and the target shake measurement threshold, and the relationship between the exposure time and the target exposure time threshold, includes: when the exposure time is greater than the exposure time threshold, if the current camera working mode is professional mode, and the shake distribution data in the first target frequency band is greater than the target shake measurement threshold, and the shake distribution data in the second target frequency band is less than the target shake measurement threshold, then the target image stabilization strategy is determined to be not to perform image stabilization processing on the captured shake signal; wherein, the frequency value of the second target frequency band is greater than the frequency value of the first target frequency band.
8. The method as described in claim 4, characterized in that, The step of determining and executing a target image stabilization strategy based on the relationship between the shake distribution data and the target shake measurement threshold, and the relationship between the exposure time and the target exposure time threshold, includes: when the exposure time is greater than the exposure time threshold, if the current camera working mode is night mode, post-capture frame mode, preview mode, or pre-capture frame mode, and the shake distribution data in the first target frequency band is greater than the target shake measurement threshold, and the shake distribution data in the second target frequency band is greater than the target shake measurement threshold, then the target image stabilization strategy is determined to be to perform image stabilization processing on the shooting shake signal of the second target frequency band and on the shooting shake signal of the first target frequency band; wherein, the frequency value of the second target frequency band is greater than the frequency value of the first target frequency band.
9. The method as described in claim 4, characterized in that, The step of determining and executing a target image stabilization strategy based on the relationship between the jitter distribution data and the target jitter measurement threshold, and the relationship between the exposure time and the target exposure time threshold, includes: when the exposure time is greater than the exposure time threshold, if the current camera working mode is night mode or post-capture frame mode, and the jitter distribution data in the first target frequency band is greater than the target jitter measurement threshold, and the jitter distribution data in the second target frequency band is less than the target jitter measurement threshold, then the target image stabilization strategy is determined to be to perform image stabilization processing on the shooting jitter signal of the first target frequency band; wherein, the frequency value of the second target frequency band is greater than the frequency value of the first target frequency band.
10. The method as described in claim 4, characterized in that, The step of determining and executing a target image stabilization strategy based on the relationship between the jitter distribution data and the target jitter measurement threshold, and the relationship between the exposure time and the target exposure time threshold, includes: when the exposure time is greater than the exposure time threshold, if the current camera operating mode is a pre-frame shooting mode or a preview mode, and the jitter distribution data in the first target frequency band is greater than the target jitter measurement threshold, and the jitter distribution data in the second target frequency band is less than the target jitter measurement threshold, then the target image stabilization strategy is determined to be to perform image stabilization processing on the shooting jitter signal of the first target frequency band; wherein, the frequency value of the second target frequency band is greater than the frequency value of the first target frequency band.
11. The method according to any one of claims 10, characterized in that, The image stabilization process for the shooting shake signal of the first target frequency band includes: performing shake compensation on the lens or image sensor during the inter-frame exposure gap of the image frame, and moving the lens or image sensor to the target position after shake compensation, wherein the target position is the optical center position or a position on the opposite side with the optical center as the center of symmetry.
12. The method as described in claim 11, characterized in that, The method further includes: calculating the homography matrix required for electronic image stabilization based on feature points in the current image frame, feature points in the previous image frame, and movement parameters for moving the lens or image sensor to the target position during the inter-frame exposure gap between the current image frame and the previous image frame; and transforming the image data of the current image frame to the same spatial state as the previous image frame based on the homography matrix to obtain the shake-compensated current image frame for preview display.
13. The method according to any one of claims 1 to 12, characterized in that, After determining and executing the target image stabilization strategy based on the shake distribution data and the exposure time, the method further includes: acquiring multiple frames of images captured by the electronic device in the current camera working mode, wherein the electronic device performs corresponding image stabilization processing based on the target image stabilization strategy for each frame captured; and fusing the multiple frames to generate the target captured image.
14. A camera stabilization device, characterized in that, include: The acquisition module is used to acquire the camera shake signal and exposure time of the electronic device in the current camera working mode; The determination module is used to determine at least one target frequency band of the shooting shake signal distribution and shake distribution data of the shooting shake signal under different target frequency bands; the image stabilization module is used to determine and execute a target image stabilization strategy based on the shake distribution data and the exposure time.
15. An electronic device comprising a display screen, a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1 to 13.
16. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 13.