Shooting methods, equipment and storage media

By dynamically adjusting the enabling objects and compensation amounts of the first and second optical image stabilization control modules during zooming, the problem of poor image stabilization effect in zoom shooting is solved, achieving a more stable and clearer zoom shooting effect.

CN123123724APending Publication Date: 2026-11-17HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510622101.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-14
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

In zoom shooting scenarios, the image stabilization effect of electronic devices is not good, especially when switching from the main camera module to the telephoto camera module. Existing image stabilization strategies result in image stuttering and poor image stabilization effect.

Method used

The first and second optical image stabilization control modules work together to dynamically adjust the enabled objects of the image stabilization control modules. Through gradual adjustment of multiple compensation amounts, the image stuttering caused by switching of image stabilization control modules is reduced, thereby improving the image stabilization effect.

Benefits of technology

By dynamically adjusting the optical image stabilization control module, the stability and clarity of zoom shots are improved, image stuttering is reduced, and the image stabilization effect is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123123724A_ABST
    Figure CN123123724A_ABST
Patent Text Reader

Abstract

This application provides a shooting method, device, and storage medium, relating to the field of terminal technology. The method includes: in response to opening a camera, an electronic device activates a main camera module, and the electronic device performs image stabilization control on the main camera module through a first optical image stabilization control module; in response to increasing the zoom ratio to a first zoom ratio, the electronic device activates a telephoto camera module, and the electronic device performs image stabilization control on the telephoto camera module through a first optical image stabilization control module and a second optical image stabilization control module; after increasing the zoom ratio to a second zoom ratio, the first optical image stabilization control module maintains image stabilization control on the telephoto camera module, while the second optical image stabilization control module stops image stabilization control on the telephoto camera module; the second zoom ratio is greater than the first zoom ratio. In this way, the electronic device can dynamically adjust the enabled objects of the optical image stabilization control modules, thereby improving the image stabilization effect of zoomed-out images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of terminal technology, and in particular to shooting methods, devices and storage media. Background Technology

[0002] When users take photos or videos using electronic devices, shaking is inevitable due to factors such as hand-held operation. This may affect the final image quality, causing the photos or videos to fail to achieve the desired effect.

[0003] Currently, electronic devices are equipped with optical image stabilization (OIS) and electronic image stabilization (EIS) technologies. Optical image stabilization compensates for camera shake by physically moving lenses or sensors, while electronic image stabilization uses software algorithms to process, crop, and correct the image to achieve stabilization. Electronic devices can set appropriate stabilization strategies based on the shooting scene; these strategies may include, for example, using OIS technology, or a combination of OIS and EIS technologies.

[0004] However, in shooting scenarios where the zoom level is adjusted, such as from 1x to 6x, the electronic device switches the camera modules, for example, from the main camera module to the telephoto camera module. During the zoom process, the electronic device uses the image stabilization strategy corresponding to this scenario to control the image stabilization of each camera module, but the image stabilization effect is not good. Summary of the Invention

[0005] This application provides a shooting method, device, and storage medium, which are applied in the field of terminal technology and can improve the image stabilization effect of zoom shooting.

[0006] In a first aspect, embodiments of this application propose a shooting method. The method includes: in response to opening a camera, an electronic device activates a main camera module, and the electronic device performs image stabilization control on the main camera module through a first optical image stabilization control module; in response to increasing the zoom ratio to a first zoom ratio, the electronic device activates a telephoto camera module, and the electronic device performs image stabilization control on the telephoto camera module through a first optical image stabilization control module and a second optical image stabilization control module; after increasing the zoom ratio to a second zoom ratio, the first optical image stabilization control module maintains image stabilization control on the telephoto camera module, and the second optical image stabilization control module stops image stabilization control on the telephoto camera module; the second zoom ratio is greater than the first zoom ratio.

[0007] In this way, by enabling the first optical image stabilization control module to the main camera module when the zoom ratio is less than the first zoom ratio, enabling both the first and second optical image stabilization control modules to the telephoto camera module when the zoom ratio is between the first and second zoom ratios, and enabling the first optical image stabilization control module to the telephoto camera module when the zoom ratio is greater than the second zoom ratio, the electronic device can dynamically adjust the enabled target of the optical image stabilization control module based on the user's zoom operation. Compared with a single image stabilization strategy, this can improve the image stabilization effect of zoom shooting.

[0008] In one possible implementation, the electronic device performs image stabilization control on the telephoto camera module through a first optical image stabilization control module and a second optical image stabilization control module, including: the electronic device obtaining a first compensation amount for the telephoto camera module from the first optical image stabilization control module and a second compensation amount for the telephoto camera module from the second optical image stabilization control module; the electronic device determining a third compensation amount for the telephoto camera module based on the first compensation amount and the second compensation amount; and the electronic device performing image stabilization control on the telephoto camera module based on the third compensation amount.

[0009] In this way, by simultaneously enabling the first and second optical image stabilization control modules to the telephoto camera module, and determining the third compensation amount for the telephoto camera module through the first and second compensation amounts, compared to determining the compensation amount through the second optical image stabilization control module, directly switching to determining the compensation amount through the first optical image stabilization control module can effectively reduce the image stuttering caused by switching the image stabilization control modules.

[0010] In one possible implementation, as the zoom ratio increases from the first zoom ratio to the second zoom ratio, the ratio of the first compensation amount to the third compensation amount gradually increases, while the ratio of the second compensation amount to the third compensation amount gradually decreases; when the zoom ratio reaches the second zoom ratio, the third compensation amount equals the first compensation amount.

[0011] In this way, by gradually increasing the ratio of the first compensation amount to the third compensation amount and gradually decreasing the ratio of the second compensation amount to the third compensation amount during the zoom process, this gradual adjustment allows the telephoto camera to smoothly transition from relying on the second optical image stabilization control module to relying on the first optical image stabilization control module to determine the compensation amount during zooming, which can effectively reduce the image stuttering caused by switching image stabilization control modules.

[0012] In one possible implementation, when the zoom ratio is between the first zoom ratio and the second zoom ratio, the electronic device performs image stabilization control on the main camera module through the first optical image stabilization control module and the second optical image stabilization control module.

[0013] In this way, by simultaneously enabling the first optical image stabilization control module and the second optical image stabilization control module to the main camera module, preparation can be made for determining the compensation amount for the main camera module based on the compensation amount determined by the first optical image stabilization control module and the compensation amount determined by the second optical image stabilization control module.

[0014] In one possible implementation, the electronic device performs image stabilization control on the main camera module through a first optical image stabilization control module and a second optical image stabilization control module, including: the electronic device obtaining a fourth compensation amount for the main camera module from the first optical image stabilization control module and a fifth compensation amount for the main camera module from the second optical image stabilization control module; the electronic device determining a sixth compensation amount for the main camera module based on the fourth and fifth compensation amounts; and the electronic device performing image stabilization control on the main camera module based on the sixth compensation amount.

[0015] In this way, by simultaneously enabling the first and second optical image stabilization control modules to the main camera module, and determining the sixth compensation amount for the main camera module through the fourth and fifth compensation amounts, compared to determining the compensation amount through the first optical image stabilization control module, directly switching to determining the compensation amount through the second optical image stabilization control module can effectively reduce the image stuttering caused by switching the stabilization control modules.

[0016] In one possible implementation, as the zoom ratio increases from the first zoom ratio to the second zoom ratio, the ratio of the fourth compensation amount to the sixth compensation amount gradually decreases, while the ratio of the fifth compensation amount to the sixth compensation amount gradually increases; when the zoom ratio reaches the second zoom ratio, the sixth compensation amount equals the fifth compensation amount.

[0017] In this way, by gradually decreasing the ratio of the fourth compensation amount to the sixth compensation amount and gradually increasing the ratio of the fifth compensation amount to the sixth compensation amount during the zoom process, this gradual adjustment allows the main camera to smoothly transition from relying on the first optical image stabilization control module to rely on the second optical image stabilization control module to determine the compensation amount during zooming, which can effectively reduce the image stuttering caused by switching image stabilization control modules.

[0018] In one possible implementation, if the zoom ratio is greater than the second zoom ratio, the main camera module remains on, and the electronic device performs image stabilization control on the main camera module through the second optical image stabilization control module.

[0019] In this way, when the zoom level is greater than the second zoom level, the main camera module remains active, and the second optical image stabilization control module controls the image stabilization of the main camera module. This allows the image captured by the main camera module to be displayed on the camera interface when necessary (e.g., zoomed to 10x), for example, the image captured by the main camera module can be displayed in a "picture-in-picture" display box.

[0020] In one possible implementation, the electronic device determines the current shooting scene based on data collected by the sensors and zoom operations; the sensors include at least one of a gyroscope sensor, an accelerometer sensor, a position sensor, and an ambient light sensor; the electronic device obtains a stabilization strategy corresponding to the shooting scene from a preset stabilization strategy library; the electronic device controls at least one of the first optical image stabilization control module and the second optical image stabilization control module to be activated according to the stabilization strategy corresponding to the shooting scene.

[0021] In this way, by determining the shooting scene through other sensors and then determining the image stabilization strategy based on the shooting scene, the shooting method proposed in this application embodiment can be used not only for zoom scenes, but also for photo preview, video preview, video recording, portrait mode preview, multi-lens recording, and shooting the supermoon, etc.

[0022] In one possible implementation, the electronic device controls at least one of the first optical image stabilization (OIS) control module and the second OIS control module to activate based on the image stabilization strategy corresponding to the shooting scene. This includes: if the shooting scene is video recording, the electronic device controls the first OIS control module to perform image stabilization on the main camera module and controls the second OIS control module to perform image stabilization on the telephoto camera module; or, if the shooting scene is high-magnification zoom shooting, the electronic device controls the first OIS control module to perform image stabilization on the telephoto camera module and controls the second OIS control module to perform image stabilization on the main camera module; or, if the shooting scene is motion tracking, the electronic device controls the second OIS control module to perform image stabilization on both the main camera module and the telephoto camera module; or, if the shooting scene is long exposure shooting, the electronic device controls the first OIS control module to perform image stabilization on the main camera module.

[0023] This allows electronic devices to stabilize wide-angle shots in video recording scenarios; to better compensate for high-frequency shaking in motion tracking scenarios; to better compensate for long exposures in low-light night scenes; and to better suppress minor shakes from telephoto camera modules in high-magnification zoom scenarios.

[0024] In one possible implementation, the compensation range of the first optical image stabilization control module is greater than that of the second optical image stabilization control module.

[0025] This allows the first optical image stabilization control module with higher image stabilization accuracy to be enabled on camera modules that require higher image stabilization accuracy, thereby improving the image stabilization effect of zoom shots compared to a solution that uses a single image stabilization strategy.

[0026] In a second aspect, embodiments of this application provide an electronic device, including a processor and a memory, wherein the memory is used to store code instructions and the processor is used to execute the code instructions to perform the methods described in the first aspect or any possible implementation thereof.

[0027] Thirdly, embodiments of this application provide a computer-readable storage medium storing a computer program or instructions that, when executed on a computer, cause the computer to perform the methods described in the first aspect or any possible implementation thereof.

[0028] Fourthly, embodiments of this application provide a computer program product including a computer program, which, when run on a computer, causes the computer to perform the methods described in the first aspect or any possible implementation of the first aspect.

[0029] Fifthly, this application provides a chip or chip system including at least one processor and a communication interface. The communication interface and the at least one processor are interconnected via a circuit. The at least one processor is used to run computer programs or instructions to perform the methods described in the first aspect or any possible implementation thereof. The communication interface in the chip can be an input / output interface, pins, or circuits, etc.

[0030] In one possible implementation, the chip or chip system described above in this application further includes at least one memory storing instructions. The memory can be an internal storage unit of the chip, such as a register or cache, or it can be a storage unit of the chip itself (e.g., read-only memory, random access memory, etc.).

[0031] It should be understood that the second to fifth aspects of this application correspond to the technical solutions of the first aspect of this application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation are similar, and will not be repeated here. Attached Figure Description

[0032] Figure 1 A schematic flowchart illustrating a shooting method provided in an embodiment of this application;

[0033] Figure 2 A timing diagram for zoom shooting provided in an embodiment of this application;

[0034] Figure 3A flowchart illustrating another shooting method provided in an embodiment of this application;

[0035] Figure 4 A timing diagram for another zoom shooting method provided in an embodiment of this application;

[0036] Figure 5 A schematic diagram of the software structure of an electronic device provided in an embodiment of this application;

[0037] Figure 6 A schematic diagram illustrating a shooting method provided in an embodiment of this application;

[0038] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0039] To facilitate a clear description of the technical solutions in the embodiments of this application, some terms and technologies involved in the embodiments of this application will be briefly introduced below:

[0040] 1. Optical image stabilization technology

[0041] When an electronic device shakes, the lens and image sensor will shift, and the image on the image sensor will shift during the exposure time of the photo, resulting in a blurry or ghosted image.

[0042] Optical image stabilization (OIS) technology is used to detect the movement of the lens or body of an electronic device when the device shakes. By acquiring sensor parameters through sensors such as gyroscopes and accelerometers, the compensation amount is determined based on the sensor parameters. Then, based on the compensation amount, the lens and / or image sensor move in the opposite direction within a certain range to compensate for the displacement caused by the shake, reduce image shift, and ensure that light is always accurately projected onto the image sensor. This reduces the possibility of blurring and ghosting in the image caused by the shake, thus making the image clear and stable.

[0043] Among them, the compensation amount is used to indicate the amount of displacement that the lens and / or image sensor need to move; the gyroscope sensor is used to indicate the angular velocity of the electronic device, that is, the rotational speed of the electronic device about each axis in three-dimensional space; the accelerometer sensor is used to indicate the linear acceleration of the electronic device, that is, the linear acceleration of the electronic device along each axis in three-dimensional space.

[0044] 2. Electronic image stabilization technology

[0045] When an electronic device shakes, the lens and image sensor will shift, and the image on the image sensor will shift during the exposure time of the photo, resulting in a blurry or ghosted image.

[0046] Electronic image stabilization (EIS) technology can be used to process image data captured by an image sensor when an electronic device shakes. For example, EIS can compensate for and adjust subsequently acquired images by cropping, stretching, or rotating the image, thereby reducing the possibility of blurring and ghosting in the image caused by shaking, and thus making the image clear and stable.

[0047] 3. Focal length and zoom ratio

[0048] Focal length, also known as focal range, refers to the distance from the optical center of a lens to the imaging sensor (or image sensor), and can be measured in millimeters (mm). Focal length directly affects the field of view. For example, a 70mm focal length is considered medium telephoto, while 200mm and above are considered super telephoto.

[0049] Optical zoom ratio refers to the percentage change in focal length achieved by a lens through physical means (e.g., lens movement or switching cameras). For example, when switching from a wide-angle camera (e.g., a focal length of 24mm) to a telephoto camera (e.g., a focal length of 72mm), the zoom ratio is 3x (72 / 24).

[0050] Digital zoom ratio refers to the linear magnification factor of the final image size relative to the original photosensitive area size after the original image has been cropped and interpolated based on image processing algorithms.

[0051] It should be noted that the zoom ratio displayed on the mobile phone's camera interface may be an optical zoom ratio, such as 3x, or a digital zoom ratio, such as 3.5x, 8x, etc. In this embodiment, both optical zoom ratio and digital zoom ratio are collectively referred to as zoom ratio.

[0052] 4. Other terms

[0053] In the embodiments of this application, terms such as "first" and "second" are used to distinguish identical or similar items with substantially the same function and purpose. For example, "first chip" and "second chip" are used only to distinguish different chips and do not limit their order of execution. Those skilled in the art will understand that terms such as "first" and "second" do not limit the quantity or execution order, and that "first" and "second" do not necessarily imply that they are different.

[0054] It should be noted that, in the embodiments of this application, the terms "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design scheme described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0055] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, a--c, bc, or abc, where a, b, and c can be single or multiple.

[0056] 5. Electronic equipment

[0057] The electronic devices in this application embodiment may include handheld devices with shooting functions, vehicle-mounted devices, etc. For example, some electronic devices include: mobile phones, tablets, PDAs, laptops, mobile internet devices (MIDs), virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, cellular phones, cordless phones, session initiation protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants (PDAs), handheld devices with wireless communication capabilities, computing devices or other processing devices connected to wireless modems, in-vehicle devices, terminal devices in 5G networks, or future evolution of public land mobile communication networks. Terminal devices in a network (PLMN), etc., are not limited to this in the embodiments of this application.

[0058] By way of example and not limitation, in this embodiment, the electronic device can also be a wearable device. Wearable devices, also known as wearable smart devices, are a general term for devices that utilize wearable technology to intelligently design and develop everyday wearables, such as glasses, gloves, watches, clothing, and shoes. Wearable devices are portable devices that are worn directly on the body or integrated into the user's clothing or accessories. Wearable devices are not merely hardware devices, but also achieve powerful functions through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include those that are feature-rich, large in size, and can achieve complete or partial functions without relying on a smartphone, such as smartwatches or smart glasses, as well as those that focus on a specific type of application function and require the use of other devices such as smartphones, such as various smart bracelets and smart jewelry for vital sign monitoring.

[0059] Furthermore, in this embodiment of the application, the electronic device can also be a terminal device in the Internet of Things (IoT) system. IoT is an important part of the future development of information technology. Its main technical feature is to connect objects to the network through communication technology, thereby realizing an intelligent network of human-machine interconnection and object-to-object interconnection.

[0060] The electronic devices in the embodiments of this application may also be referred to as: terminal equipment, user equipment (UE), mobile station (MS), mobile terminal (MT), access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication equipment, user agent, or user device, etc.

[0061] In this embodiment, the electronic device or various network devices include a hardware layer, an operating system layer running on top of the hardware layer, and an application layer running on top of the operating system layer. The hardware layer includes hardware such as a central processing unit (CPU), a memory management unit (MMU), and memory (also called main memory). The operating system can be any one or more computer operating systems that implement business processing through processes, such as Linux, Unix, Android, iOS, or Windows. The application layer includes applications such as browsers, address books, word processing software, and instant messaging software.

[0062] In zoom shooting scenarios, the different camera modules within an electronic device have varying requirements for image stabilization performance. For example, the main camera module needs to handle the wide-range shaking during wide-angle shooting, while the telephoto camera module needs to handle the subtle shaking during high-magnification zoom. During zooming, if the electronic device uses a fixed image stabilization strategy to control the image stabilization of each camera module, the image quality of the captured or previewed footage will be poor. Therefore, improving image stabilization performance in zoom shooting scenarios is a pressing issue that needs to be addressed.

[0063] To address this issue, this application provides a stabilization control method for electronic devices with shooting capabilities. The electronic device is equipped with a first optical image stabilization (OIS) control module and a second OIS control module. Each OIS control module is configured with an stabilization algorithm. The stabilization algorithm determines the compensation amount for the camera module based on sensor parameters (e.g., data collected by sensors such as gyroscopes and accelerometers) and camera parameters (e.g., focal length and lens position of the lens group in the main camera module or telephoto camera module). Compared to the second OIS control module, the first OIS control module has a higher precision stabilization algorithm and a larger compensation range (also called compensation angle). When the electronic device uses the first OIS control module for camera module stabilization control, the stabilization effect is better, resulting in clearer captured or previewed images. The compensation angle indicates the ability of the optical image stabilization technology to correct lens or image sensor displacement. The compensation angle is the range of angles within which the optical image stabilization technology can adjust the lens or image sensor in the opposite direction when the electronic device shakes. The larger the compensation angle, the stronger the optical image stabilization technology is at adjusting to counteract shake, thereby reducing the possibility of blurry or ghosting images from electronic devices.

[0064] Based on the aforementioned electronic device, during zooming, the electronic device dynamically controls the first optical image stabilization (OIS) control module and the second OIS control module to work together, enabling the first OIS control module, which has higher stabilization accuracy, to be used on the camera module that requires higher stabilization accuracy. For example, during the zoom range from 1x to 3.5x, the electronic device enables the first OIS control module on the main camera module and displays the image captured by the main camera module; during the zoom range from 3.5x to 5x, the electronic device simultaneously enables both the first and second OIS control modules on the telephoto camera module and the main camera module, and displays the image captured by the main camera module; during the zoom range of 5x and above, the electronic device enables the first OIS control module on the telephoto camera module and displays the image captured by the telephoto camera module.

[0065] In the above method, the electronic device dynamically adjusts the enabled objects of the optical image stabilization control module based on the user's zoom operation, which can improve the image stabilization effect of zoom shooting compared to a single image stabilization strategy.

[0066] In this embodiment, the first optical image stabilization control module can also be described as a sensorhub optical image stabilization (SOIS) control module, and the second optical image stabilization control module can also be described as a traditional optical image stabilization control module. The algorithms of the traditional optical image stabilization control module and the SOIS algorithm are different. Compared to the traditional optical image stabilization control module, SOIS can provide higher stabilization accuracy; that is, the optical image stabilization control effect achieved by SOIS is better. For example, SOIS can achieve a compensation angle of ±1.5°, while the traditional optical image stabilization control module can achieve a compensation angle of ±0.8°.

[0067] For example, Figure 1 This is a flowchart illustrating a shooting method provided in an embodiment of this application. It should be understood that... Figure 1 Let's take an electronic device as an example to illustrate this. Figure 1 As shown, the method includes:

[0068] S101, In response to the operation of opening the camera application, the processor controls the startup of the main camera module and enables the first optical image stabilization control module to control the optical image stabilization of the main camera module.

[0069] In some implementations, the electronic device can activate the main camera after the user opens the camera app, and the zoom level of the electronic device is 1x.

[0070] In some implementations, the processor enables the first optical image stabilization control module to control the optical image stabilization of the main camera module, instructing the electronic device to perform image stabilization control on the main camera module through the first optical image stabilization control module. In some implementations, the first optical image stabilization control module can control the movement of the lens of the main camera of the electronic device to compensate for the displacement or angular deviation caused by lens shake; in other implementations, the first optical image stabilization control module can control the movement of the image sensor of the main camera of the electronic device to compensate for the displacement or angular deviation of the image sensor caused by shake; in still other implementations, the first optical image stabilization control module can control the movement of both the lens and the image sensor of the main camera of the electronic device to compensate for the displacement or angular deviation of the lens and the image sensor caused by shake.

[0071] In some implementations, the first optical image stabilization control module can acquire sensor parameters and relevant parameters of the main camera module. Based on these parameters and a pre-configured first optical image stabilization algorithm, it determines the compensation amount for the lens and / or image sensor in the main camera module. The first optical image stabilization control module can then send this compensation amount to the main camera driver, thereby achieving image stabilization control of the main camera module. The relevant parameters of the main camera module may include parameters such as the focal length and lens position of the lens assembly within the main camera module.

[0072] S102, The main camera module captures images and sends them to the display screen.

[0073] The image acquisition by the main camera module specifically refers to the image captured by the image sensor of the main camera module. In some implementations, after the image sensor of the main camera module acquires an image, it can send the image to an image signal processor (ISP). The ISP can process the image, which may include noise reduction, image sharpening, or white balance correction. Subsequently, the ISP can send the processed image to the display screen.

[0074] The description of the image signal processor can be found in the subsequent embodiments, and will not be repeated here.

[0075] S103, In response to the operation of increasing the zoom ratio to the first zoom ratio, the processor controls the start of the telephoto camera module and enables the first optical image stabilization control module and the second optical image stabilization control module to control the optical image stabilization of the telephoto camera module.

[0076] In some implementations, the first zoom ratio can be greater than 1x, for example, 3.5x.

[0077] In some implementations, the processor enables the first and second optical image stabilization control modules to control the optical image stabilization of the telephoto camera module, indicating that the electronic device can perform image stabilization control on the telephoto camera module through the first and second optical image stabilization control modules.

[0078] In some implementations, when the zoom ratio is between the first and second zoom ratios, the electronic device can simultaneously perform optical image stabilization control on the telephoto camera using both a first and a second optical image stabilization control module. For example, the electronic device can determine a first compensation amount for the telephoto camera module using the first optical image stabilization control module, and can also determine a second compensation amount using the second optical image stabilization control module. Based on the first and second compensation amounts, the electronic device can determine a third compensation amount for the telephoto camera module, and subsequently, the electronic device can perform image stabilization control on the telephoto camera module based on the third compensation amount.

[0079] In the process of increasing the zoom ratio from the first zoom ratio to the second zoom ratio, the ratio of the first compensation amount to the third compensation amount gradually increases, while the ratio of the second compensation amount to the third compensation amount gradually decreases; when the zoom ratio reaches the second zoom ratio, the third compensation amount is equal to the first compensation amount.

[0080] S104, image acquisition using a telephoto camera module.

[0081] The image capture by the telephoto camera module specifically refers to the image captured by the image sensor within the telephoto camera module. It should be noted that images captured by the telephoto camera module are not displayed before the zoom level reaches its second maximum zoom level.

[0082] S105, The processor enables the second optical image stabilization control module to control the optical image stabilization of the main camera module.

[0083] In some implementations, the processor enables the second optical image stabilization control module to control the optical image stabilization of the main camera module, which can instruct the electronic device to perform image stabilization control on the main camera module through the first and second optical image stabilization control modules.

[0084] In some implementations, when the zoom ratio is between the first and second zoom ratios, the electronic device can simultaneously perform optical image stabilization control on the main camera through both the first and second optical image stabilization control modules. For example, the electronic device can obtain a fourth compensation amount for the main camera module from the first optical image stabilization control module, and can also obtain a fifth compensation amount for the main camera module from the second optical image stabilization control module. Based on the fourth and fifth compensation amounts, the electronic device can determine a sixth compensation amount for the main camera module, and then perform image stabilization control on the main camera module based on the sixth compensation amount.

[0085] Specifically, as the zoom ratio increases from the first zoom ratio to the second zoom ratio, the ratio of the fourth compensation amount to the sixth compensation amount gradually decreases, while the ratio of the fifth compensation amount to the sixth compensation amount gradually increases; when the zoom ratio reaches the second zoom ratio, the sixth compensation amount equals the fifth compensation amount.

[0086] It should be noted that the timing of S103 and S105 is not limited in the embodiments of this application, and they can be executed simultaneously or sequentially.

[0087] S106 The main camera module continuously captures images and sends them to the display screen.

[0088] In some implementations, after the image sensor of the main camera module acquires an image, it can send the image to an image signal processor (ISP). The ISP can then crop the image and send the cropped image to the display screen.

[0089] Optionally, the ISP can also perform other processing on the cropped image, such as noise reduction, image sharpening, or white balance correction.

[0090] S107. In response to the operation of adjusting from the first zoom level to the second zoom level, the processor controls the main camera module to be turned off, and controls the first optical image stabilization control module and the second optical image stabilization control module to stop optical image stabilization control of the main camera module.

[0091] The second zoom ratio is greater than the first zoom ratio; for example, the second zoom ratio is 5x.

[0092] In some implementations, when the processor detects that the user has adjusted the zoom level from the first zoom level to the second zoom level, the main camera does not participate in shooting. Therefore, the processor controls the main camera module to shut down and controls the first and second optical image stabilization control modules to stop optical image stabilization control of the main camera module.

[0093] S108, The main camera module stops capturing images.

[0094] The main camera module stopping image acquisition specifically means that the image sensor of the main camera module stops acquiring images, that is, the main camera module stops transmitting data.

[0095] It should be noted that steps S107 and S108 are optional. In some embodiments, in response to the operation of adjusting from the first zoom level to the second zoom level, the main camera module can remain on to continuously capture images, and the processor can control the activation of the second optical image stabilization control module to perform optical image stabilization control on the main camera module so that when necessary (e.g., zooming to 10x), the image captured by the main camera module can be displayed on the camera interface, for example, the image captured by the main camera module can be displayed in a "picture-in-picture" display box.

[0096] S109: The processor controls the first optical image stabilization control module to continue optical image stabilization control of the telephoto camera module, and controls the second optical image stabilization control module to stop optical image stabilization control of the telephoto camera module.

[0097] When the zoom ratio is greater than or equal to the second zoom ratio, optical image stabilization control of the telephoto camera module can be performed solely through the first optical image stabilization control module. In other words, after the processor receives an operation from the user to increase the zoom ratio to the second zoom ratio, the first optical image stabilization control module maintains image stabilization control over the telephoto camera module, while the second optical image stabilization control module ceases image stabilization control over the telephoto camera module.

[0098] In some implementations, the first optical image stabilization control module acquires sensor parameters and relevant parameters of the telephoto camera module. Based on the sensor parameters, the relevant parameters of the telephoto camera module, and the first optical image stabilization algorithm pre-configured in the first optical image stabilization control module, it determines the compensation amount for the lens group and / or image sensor in the telephoto camera module. The first optical image stabilization control module can send this compensation amount to the telephoto camera driver to achieve image stabilization control of the telephoto camera module.

[0099] It should be noted that the timing of S107 and S109 is not limited in the embodiments of this application, and they can be executed simultaneously or sequentially.

[0100] The S110 telephoto camera module continuously captures images and sends them to the display screen.

[0101] In some implementations, after the image sensor of the telephoto camera module acquires an image, it can send the image to the ISP (Image Signal Processor). The ISP can then process the image, such as performing noise reduction, image sharpening, or white balance correction. Subsequently, the ISP sends the processed image to the display screen.

[0102] In this embodiment, the electronic device dynamically controls the first optical image stabilization (OIS) control module and the second OIS control module to work together, enabling the first OIS control module, which has higher stabilization accuracy, to be used on the camera module that requires higher stabilization accuracy. For example, when the zoom ratio is from 1x to the first zoom ratio, the electronic device enables the first OIS control module to the main camera module and displays the image captured by the main camera module; when the zoom ratio is from the first zoom ratio to the second zoom ratio, the electronic device simultaneously enables both the first and second OIS control modules to the telephoto camera module and the main camera module, and displays the image captured by the main camera module; when the zoom ratio is from the second zoom ratio or higher, the electronic device enables the first OIS control module to the telephoto camera module and displays the image captured by the telephoto camera module. Based on this, the electronic device dynamically adjusts the enabled objects of the optical image stabilization control module according to the user's zoom operation. Compared with the solution of using a single image stabilization strategy, it can improve the image stabilization effect of zoom shooting and make the preview image after shooting clearer.

[0103] exist Figure 1 Based on the embodiments, the zoom process may include the following three stages: pre-switching stage, compensation transition stage, and stabilization stage.

[0104] During the pre-switching phase, the processor can start (or initialize) the second optical image stabilization control module in advance.

[0105] During the compensation transition phase, the processor enables both the first and second optical image stabilization control modules to simultaneously perform optical image stabilization control on the telephoto camera. As the zoom ratio increases, the proportion of compensation determined by the second optical image stabilization control module gradually decreases, while the proportion determined by the first optical image stabilization control module gradually increases. Alternatively, during the compensation transition phase, the processor can also enable both the first and second optical image stabilization control modules to simultaneously perform optical image stabilization control on the main camera. Again, as the zoom ratio increases, the proportion of compensation determined by the second optical image stabilization control module gradually increases, while the proportion determined by the first optical image stabilization control module gradually decreases.

[0106] During the stabilization phase, optical image stabilization control for the telephoto camera is performed solely through the first optical image stabilization control module.

[0107] Next, combined Figure 2 These three stages will be explained, for example. Figure 2 A timing diagram for zoom shooting provided in an embodiment of this application, referring to... Figure 2At time T1, the camera application of the electronic device is opened, and the zoom ratio is 1x by default. At time T2, the zoom ratio is 3.5x. At time T3, the zoom ratio is 5x. At time T4, the zoom ratio is between 1x and 3.5x, for example, 3x.

[0108] In some implementations, if the electronic device detects an increase in zoom ratio at time T4 compared to time T1, and the zoom ratio at time T2 is 3.5x, then the electronic device activates the second optical image stabilization control module at time T4. In other words, the period from time T4 to time T2 is a pre-switching phase.

[0109] The preheating of the second optical image stabilization control module may include: initializing and configuring the algorithm of the second optical image stabilization control module; presetting appropriate image stabilization parameters, such as image stabilization intensity and compensation angle range, according to the shooting scene requirements at the zoom level that will soon be switched to 3.5x; and checking whether the data transmission link between the second optical image stabilization control module and other related components (such as the telephoto camera module and the main camera module) is unobstructed to ensure that data and instructions can be transmitted normally in the future.

[0110] In some implementations, between time T2 and time T3 (the compensation transition phase), the electronic device can perform optical image stabilization control on the telephoto camera through both the first and second optical image stabilization control modules. That is, the electronic device can jointly determine the compensation amount for the telephoto camera using both the compensation amount determined by the first and second optical image stabilization control modules. For example, during the compensation transition phase, the proportion of the compensation amount determined by the first optical image stabilization control module gradually increases, while the proportion of the compensation amount determined by the second optical image stabilization control module gradually decreases. Finally, at time T3, the electronic device performs optical image stabilization control on the telephoto camera solely through the first optical image stabilization control module.

[0111] In some implementations, between time T2 and time T3 (the compensation transition phase), the electronic device can perform optical image stabilization control on the main camera through both the first and second optical image stabilization control modules. That is, the electronic device can jointly determine the compensation amount for the main camera using both the compensation amount determined by the first and second optical image stabilization control modules. For example, during the compensation transition phase, the proportion of the compensation amount determined by the first optical image stabilization control module gradually decreases, while the proportion of the compensation amount determined by the second optical image stabilization control module gradually increases. Ultimately, at time T3, the electronic device performs optical image stabilization control on the main camera solely through the second optical image stabilization control module.

[0112] For example, at time T2, the compensation amount of the telephoto camera determined by the first optical image stabilization control module is S1, and the compensation amount of the telephoto camera determined by the second optical image stabilization control module is S2. Therefore, at time T2, the compensation amount of the telephoto camera can be S2. The compensation amount of the main camera determined by the first optical image stabilization control module is M1, and the compensation amount of the main camera determined by the second optical image stabilization control module is M2. Therefore, at time T2, the compensation amount of the main camera can be M1.

[0113] For example, at a moment close to time T2 during the compensation transition phase, if the compensation amount for the telephoto camera determined by the first optical image stabilization control module is S1 and the compensation amount for the telephoto camera determined by the second optical image stabilization control module is S2, then at that moment, the compensation amount for the telephoto camera can be (0.9×S2+0.1×S1); if the compensation amount for the main camera determined by the first optical image stabilization control module is M1 and the compensation amount for the main camera determined by the second optical image stabilization control module is M2, then at that moment, the compensation amount for the main camera can be (0.9×M1+0.1×M2).

[0114] For example, at a moment close to time T3 during the compensation transition phase, if the compensation amount for the telephoto camera determined by the first optical image stabilization control module is S1 and the compensation amount for the telephoto camera determined by the second optical image stabilization control module is S2, then at that moment, the compensation amount for the telephoto camera can be (0.9×S1+0.1×S2); if the compensation amount for the main camera determined by the first optical image stabilization control module is M1 and the compensation amount for the main camera determined by the second optical image stabilization control module is M2, then at that moment, the compensation amount for the main camera can be (0.1×M1+0.9×M2).

[0115] For example, at time T3, the compensation amount of the telephoto camera determined by the first optical image stabilization control module is S1, and the compensation amount of the telephoto camera determined by the second optical image stabilization control module is S2. Then, at time T2, the compensation amount of the telephoto camera can be S1; the compensation amount of the main camera determined by the first optical image stabilization control module is M1, and the compensation amount of the main camera determined by the second optical image stabilization control module is M2. Then, at time T3, the compensation amount of the main camera can be M2.

[0116] In some implementations, at times greater than T3 (the stabilization phase), the electronic device can perform optical image stabilization control on the telephoto camera through the first optical image stabilization control module. In other words, the electronic device can determine the compensation amount for the telephoto camera solely based on the compensation amount determined by the first optical image stabilization control module.

[0117] In this embodiment of the application, during the pre-switching phase, the electronic device can start the second optical image stabilization control module in advance, which allows the electronic device to complete the initialization preparation work in advance. This enables the second optical image stabilization control module to respond quickly and seamlessly enter the working state when the zoom ratio of the electronic device is 3.5x, avoiding untimely image stabilization control due to startup delay, thereby reducing the possibility of obvious shaking or blurring of the image during the zoom ratio from 1x to 3.5x.

[0118] In this embodiment, during the compensation transition phase, optical image stabilization control is simultaneously applied to both the telephoto camera and the main camera via a first optical image stabilization control module and a second optical image stabilization control module. The proportion of compensation amounts for each module is adjusted to achieve a smooth transition between different stabilization precision levels. In the telephoto camera's stabilization control, as the zoom ratio increases, the proportion of compensation determined by the first optical image stabilization control module gradually increases, while the proportion determined by the second optical image stabilization control module gradually decreases. This gradual adjustment allows the telephoto camera to smoothly transition from relying on the second optical image stabilization control module to relying on the first optical image stabilization control module during zooming, effectively reducing image stuttering caused by switching stabilization control modules. In the image stabilization control of the main camera, as the zoom ratio increases, the proportion of compensation determined by the first optical image stabilization control module gradually decreases, while the proportion of compensation determined by the second optical image stabilization control module gradually increases. This gradual adjustment allows the main camera to smoothly transition from relying on the first optical image stabilization control module to relying on the second optical image stabilization control module to determine the compensation during zooming, effectively reducing image stuttering caused by switching image stabilization control modules.

[0119] In some possible implementations, if the zoom ratio of the electronic device is greater than the second zoom ratio, the zoom ratio of the electronic device can be increased or decreased. Next, we will combine... Figure 3 A shooting method is described for situations where the zoom level of the electronic device is greater than a second zoom level, and the zoom level of the electronic device is increased or decreased. For example, Figure 3 This is a flowchart illustrating another shooting method provided in an embodiment of this application. It should be understood that... Figure 3 Let's take an electronic device as an example to illustrate this. Figure 3 As shown, the method includes:

[0120] S301, the telephoto camera module is in the startup state, and the processor enables the first optical image stabilization control module to perform optical image stabilization control on the telephoto camera module, while the main camera module is in the shutdown state.

[0121] The telephoto camera module being in the "on" state means that the image sensor of the telephoto camera module is capturing images, or in other words, the telephoto camera module is starting up. The main camera module being in the "off" state means that the image sensor of the main camera module is not running.

[0122] In some implementations, referring to S107-S110, when the zoom ratio of the electronic device is greater than or equal to the second zoom ratio, the telephoto camera module can be in the activated state, while the main camera module can be in the deactivated state. Therefore, the processor can enable the first optical image stabilization control module to perform optical image stabilization control on the telephoto camera module.

[0123] S302: The telephoto camera module captures images and sends them to the display screen.

[0124] In some implementations, the specific implementation of S302 can refer to S110, which will not be elaborated here.

[0125] S303, in response to the operation of reducing the zoom ratio to the third zoom ratio, the processor controls the activation of the main camera module and enables the first optical image stabilization control module and the second optical image stabilization control module to perform optical image stabilization control on the main camera module.

[0126] For example, the third zoom ratio is a zoom ratio greater than the second zoom ratio, such as 6.5x.

[0127] In some implementations, when the processor detects that the user has reduced the zoom level to a third zoom level, it indicates that the main camera has started working. Therefore, the processor can control the activation of the main camera module, and the processor can enable the second optical image stabilization control module and the first optical image stabilization control module with higher algorithm accuracy to simultaneously perform optical image stabilization control on the main camera module.

[0128] S304, the main camera module captures images.

[0129] The images captured by the main camera module specifically refer to the images captured by the image sensor within the main camera module. It should be noted that images captured by the main camera module are not displayed before the zoom level reaches its second maximum zoom level.

[0130] S305 The processor enables the second optical image stabilization control module to perform optical image stabilization control on the telephoto camera module.

[0131] During the zoom range from the third zoom level to the second zoom level, the first optical image stabilization control module and the second optical image stabilization control module can simultaneously perform optical image stabilization control on the telephoto camera.

[0132] It should be noted that the timing of S303 and S305 is not limited in the embodiments of this application, and they can be executed simultaneously or sequentially.

[0133] The S306 telephoto camera module continuously captures images and sends them to the display screen.

[0134] In some implementations, the specific implementation of S306 can refer to S110, which will not be elaborated here.

[0135] S307, In response to the operation of adjusting from the third zoom ratio to below the second zoom ratio, the processor controls the telephoto camera module to be turned off, and controls the first optical image stabilization control module and the second optical image stabilization control module to stop optical image stabilization control of the telephoto camera module.

[0136] In some implementations, when the processor detects that the user has adjusted the zoom ratio from the third zoom ratio to below the second zoom ratio, the telephoto camera may not operate. Therefore, the processor can control the telephoto camera module to shut down, and the processor can control the first and second optical image stabilization control modules to stop optical image stabilization control of the telephoto camera module.

[0137] S308, the telephoto camera module has stopped capturing images.

[0138] The term "telephoto camera module stops acquiring images" specifically refers to the image sensor of the telephoto camera module stopping acquiring images, i.e., the telephoto camera module stops transmitting data.

[0139] S309: The processor controls the first optical image stabilization control module to continue optical image stabilization control of the main camera module, and controls the second optical image stabilization control module to stop optical image stabilization control of the main camera module.

[0140] When the zoom ratio is less than or equal to the second zoom ratio, optical image stabilization control of the main camera module can be performed solely through the first optical image stabilization control module.

[0141] The S310's main camera module continuously captures images and sends them to the display screen.

[0142] In some implementations, the specific implementation of S310 can refer to S102 or S106, which will not be elaborated here.

[0143] It should be noted that the timing of S307 and S309 is not limited in the embodiments of this application, and they can be executed simultaneously or sequentially.

[0144] In this embodiment, the electronic device dynamically controls the first optical image stabilization (OIS) control module and the second OIS control module to work together, enabling the first OIS control module, which has higher stabilization accuracy, to be used on the camera module that requires higher stabilization accuracy. For example, when the zoom ratio is adjusted from greater than the third zoom ratio to the third zoom ratio, the electronic device enables the first OIS control module on the telephoto camera module and displays the image captured by the telephoto camera module; when the zoom ratio is adjusted from the third zoom ratio to the second zoom ratio, the electronic device enables both the first and second OIS control modules on the telephoto camera module and the main camera module, and displays the image captured by the telephoto camera module; when the zoom ratio is adjusted to the second zoom ratio or lower, the electronic device enables the first OIS control module on the main camera module and displays the image captured by the main camera module. Based on this, the electronic device dynamically adjusts the enabled objects of the optical image stabilization control module according to the user's zoom operation. Compared with the solution of using a single image stabilization strategy, it can improve the image stabilization effect of zoom shooting and make the preview image after shooting clearer.

[0145] exist Figure 3 Based on the implementation examples, a pre-switching phase, a compensation transition phase, and a stabilization phase can also be set.

[0146] During the pre-switching phase, the processor can start (or initialize) the second optical image stabilization control module in advance.

[0147] During the compensation transition phase, the processor enables both the first and second optical image stabilization control modules to simultaneously perform optical image stabilization control on the telephoto camera. As the zoom ratio decreases, the proportion of compensation determined by the second optical image stabilization control module gradually increases, while the proportion determined by the first optical image stabilization control module gradually decreases. Alternatively, during the compensation transition phase, the processor can also enable both the first and second optical image stabilization control modules to simultaneously perform optical image stabilization control on the main camera. Again, as the zoom ratio decreases, the proportion of compensation determined by the second optical image stabilization control module gradually decreases, while the proportion determined by the first optical image stabilization control module gradually increases.

[0148] During the stabilization phase, optical image stabilization control of the main camera is performed solely through the first optical image stabilization control module.

[0149] Next, combined Figure 4 These three stages will be explained, for example. Figure 4 A timing diagram for another zoom shooting embodiment provided in this application, referring to... Figure 4The zoom ratio is 10x at time T5, 6.5x at time T6, 5x at time T7, and between 10x and 6.5x at time T8, for example, 7x.

[0150] In some implementations, if the electronic device detects that its zoom ratio at time T8 is lower than that at time T5, and its zoom ratio at time T6 is 6.5x, then the electronic device will activate the second optical image stabilization control module at time T8. In other words, the period from time T8 to time T6 is a pre-switching phase.

[0151] The preheating of the second optical image stabilization control module may include: initializing and configuring the algorithm of the second optical image stabilization control module; presetting appropriate image stabilization parameters, such as image stabilization intensity and compensation angle range, according to the shooting scene requirements at the zoom level that will soon be switched to 6.5x; and checking whether the data transmission link between the second optical image stabilization control module and other related components (such as the telephoto camera module and the main camera module) is unobstructed to ensure that data and instructions can be transmitted normally in the future.

[0152] In some implementations, between time T6 and time T7 (the compensation transition phase), the electronic device can perform optical image stabilization control on the telephoto camera through both the first and second optical image stabilization control modules. That is, the electronic device can jointly determine the compensation amount for the telephoto camera using both the compensation amount determined by the first and second optical image stabilization control modules. For example, during the compensation transition phase, the proportion of the compensation amount determined by the first optical image stabilization control module gradually decreases, while the proportion of the compensation amount determined by the second optical image stabilization control module gradually increases. Finally, at time T7, the electronic device performs optical image stabilization control on the telephoto camera solely through the second optical image stabilization control module.

[0153] In some implementations, between time T6 and time T7 (the compensation transition phase), the electronic device can perform optical image stabilization control on the main camera through both the first and second optical image stabilization control modules. That is, the electronic device can jointly determine the compensation amount for the main camera using both the compensation amount determined by the first and second optical image stabilization control modules. For example, during the compensation transition phase, the proportion of the compensation amount determined by the first optical image stabilization control module gradually increases, while the proportion of the compensation amount determined by the second optical image stabilization control module gradually decreases. Finally, at time T7, the electronic device performs optical image stabilization control on the main camera solely through the first optical image stabilization control module.

[0154] In some implementations, during times greater than T7 (the stabilization phase), the electronic device can perform optical image stabilization control on the main camera through the first optical image stabilization control module. In other words, the electronic device can determine the compensation amount for the main camera solely based on the compensation amount determined by the first optical image stabilization control module.

[0155] In this embodiment of the application, during the pre-switching phase, the electronic device can start the second optical image stabilization control module in advance, which allows the electronic device to complete the initialization preparation work in advance. This enables the second optical image stabilization control module to respond quickly and seamlessly enter the working state when the zoom ratio of the electronic device is 6.5x, avoiding untimely image stabilization control due to startup delay, thereby reducing the possibility of obvious shaking or blurring of the image during the zoom ratio from 10x to 6.5x.

[0156] In this embodiment, during the compensation transition phase, optical image stabilization control is simultaneously applied to both the telephoto camera and the main camera via a first optical image stabilization control module and a second optical image stabilization control module. The proportion of compensation amounts for each module is adjusted to achieve a smooth transition between different stabilization precision levels. In the telephoto camera's stabilization control, as the zoom ratio decreases, the proportion of compensation determined by the first optical image stabilization control module gradually decreases, while the proportion determined by the second optical image stabilization control module gradually increases. This gradual adjustment allows the telephoto camera to smoothly transition from relying on the first optical image stabilization control module to the second during zooming, effectively reducing image stuttering caused by switching stabilization control modules. In the image stabilization control of the main camera, as the zoom ratio decreases, the proportion of compensation determined by the first optical image stabilization control module gradually increases, while the proportion of compensation determined by the second optical image stabilization control module gradually decreases. This gradual adjustment allows the main camera to smoothly transition from relying on the second optical image stabilization control module to relying on the first optical image stabilization control module to determine the compensation during zooming, effectively reducing image stuttering caused by switching image stabilization control modules.

[0157] The shooting method provided in this application can be implemented using an electronic device. To facilitate understanding of the shooting method provided in this application, the software structure of the electronic device provided in this application is described below.

[0158] The software system of an electronic device can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application uses a layered architecture as an example to illustrate the software structure of an electronic device.

[0159] Figure 5This is a schematic diagram of the software structure of an electronic device provided in an embodiment of this application. The layered architecture divides the software system of the electronic device into several layers, each with a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, refer to... Figure 5 Electronic devices may include: applications, application framework, hardware abstraction layer (HAL), kernel, and hardware layer.

[0160] The application layer can include a series of application packages. Application packages can include applications such as camera and gallery.

[0161] 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.

[0162] In this embodiment, the application framework layer includes a camera management module. The camera management module provides an interface to the application layer's applications. After receiving a zoom operation from the camera application, the camera management module can send the zoom operation to the dynamic scheduling module of the HAL layer through the camera HAL, so that the dynamic scheduling module can respond based on the zoom operation. The user's operation may include zoom magnification, etc.

[0163] In some embodiments, the application framework layer may also include, for example, an activity manager, a window manager, etc., and this application embodiment does not impose any limitations on this.

[0164] The HAL layer is a wrapper around Linux kernel drivers, providing an interface to the upper layers and shielding them from the implementation details of the lower-level hardware. In this embodiment, the HAL layer may include a dynamic scheduling module, a first optical image stabilization control module, a second optical image stabilization control module, and a post-processing module for optical image stabilization.

[0165] In this embodiment, the dynamic scheduling module can send a main camera start command or a main camera stop command to the main camera driver based on the zoom operation received from the camera HAL, so that the main camera driver can turn the main camera module on or off according to the command. The dynamic scheduling module can also send a telephoto camera start command or a telephoto camera stop command to the telephoto camera driver based on the zoom operation received from the camera HAL, so that the telephoto camera driver can turn the telephoto camera module on or off according to the command. The dynamic scheduling module can also send commands to the first optical image stabilization control module and / or the second optical image stabilization control module based on the zoom operation received from the camera HAL, to instruct the first optical image stabilization control module and / or the second optical image stabilization control module to perform image stabilization control on which camera module.

[0166] In this embodiment, the first optical image stabilization control module can determine the compensation amount of the camera module based on the first optical image stabilization algorithm, the received sensor parameters, and the relevant parameters of the camera module. The second optical image stabilization control module can determine the compensation amount of the camera module based on the second optical image stabilization algorithm, the received sensor parameters, and the relevant parameters of the camera module.

[0167] In this embodiment, the post-processing module for optical image stabilization can receive a compensation amount 1 sent by the first optical image stabilization control module and a compensation amount 2 sent by the second optical image stabilization control module when the first optical image stabilization control module and the second optical image stabilization control module simultaneously perform optical image stabilization control on a camera module. The post-processing module for optical image stabilization can determine the final compensation amount 3 for the camera module based on the compensation amount 1 sent by the first optical image stabilization control module and the compensation amount 2 sent by the second optical image stabilization control module.

[0168] In some embodiments, the HAL layer may further include a camera HAL, a camera algorithm library, etc. The camera algorithm library may include EIS-related algorithms.

[0169] The kernel layer is the layer between hardware and software. In this embodiment, the kernel layer may include the main camera driver and the telephoto camera driver.

[0170] In this embodiment, the main camera driver can receive a start command or a stop command sent by the dynamic scheduling module to control the main camera module to be turned on or off; the telephoto camera driver can receive a start command or a stop command sent by the dynamic scheduling module to control the telephoto camera module to be turned on or off.

[0171] In some embodiments, the kernel layer may also include graphics processor drivers and digital signal processor drivers, etc.

[0172] The hardware layer may include hardware such as an inertial measurement unit (IMU), a main camera module, a telephoto camera module, a digital signal processor, and a graphics signal processor.

[0173] In this embodiment, the inertial measurement unit (IMU) may include a gyroscope sensor and an accelerometer sensor, etc. The IMU can acquire sensor parameters of the electronic device through the gyroscope sensor and accelerometer sensor, and send the sensor parameters of the electronic device to the first optical image stabilization control module and the second optical image stabilization control module. Specifically, the IMU can acquire the angular velocity of the electronic device through the gyroscope sensor, and the IMU can acquire the linear acceleration of the electronic device through the accelerometer sensor.

[0174] In this embodiment, the main camera module can receive compensation amounts sent by the first optical image stabilization control module, the second optical image stabilization control module, or the optical image stabilization post-processing module. The main camera module can move the lens or sensor in the main camera module according to the compensation amount to reduce the impact of electronic device shake.

[0175] In this embodiment, the telephoto camera module can receive compensation amounts sent by the first optical image stabilization control module, the second optical image stabilization control module, or the post-processing module of optical image stabilization. The telephoto camera module can move the lens or sensor in the telephoto camera module according to the compensation amount to reduce the impact of electronic device shake.

[0176] It should be understood that in some embodiments, layers that perform the same function may be called by other names, or layers that can perform the functions of multiple layers may be considered as one layer, or layers that can perform the functions of multiple layers may be divided into multiple layers. This application does not impose such limitations.

[0177] It should be noted that the embodiments of this application are only illustrated using the Android operating system as an example. In other operating systems (such as Windows operating system, iOS operating system, etc.), as long as the functions implemented by each functional module are similar to those in the embodiments of this application, the solution of this application can also be implemented.

[0178] In the shooting method provided in the embodiments of this application, during the compensation transition phase, the first optical image stabilization control module and the second optical image stabilization control module can simultaneously perform optical image stabilization control on the telephoto camera module, and the first optical image stabilization control module and the second optical image stabilization control module can also simultaneously perform optical image stabilization control on the main camera module.

[0179] Next, combined Figure 6The method for capturing images during the compensation stage according to embodiments of this application will be described. For example, Figure 6 This is a schematic diagram illustrating a shooting method provided in an embodiment of this application. Figure 6 (a) describes how the first and second optical image stabilization control modules can simultaneously perform optical image stabilization control on the telephoto camera module. Figure 6 (b) explains that the first and second optical image stabilization control modules can also simultaneously perform optical image stabilization control on the main camera module.

[0180] Reference Figure 6 In (a), when the first optical image stabilization control module receives the sensor parameters sent by the inertial measurement unit, the first optical image stabilization control module can determine the optical image stabilization compensation amount 1 for the telephoto camera module based on the sensor parameters and the relevant parameters of the telephoto camera module sent by the camera HAL; when the second optical image stabilization control module receives the sensor parameters sent by the inertial measurement unit, the second optical image stabilization control module can determine the optical image stabilization compensation amount 2 for the telephoto camera module based on the sensor parameters and the parameters of the telephoto camera module sent by the camera HAL; the electronic device can send the optical image stabilization compensation amount 1 and the optical image stabilization compensation amount 2 for the telephoto camera module to the optical image stabilization post-processing module; the optical image stabilization post-processing module determines the optical image stabilization compensation amount 3 for the telephoto camera module based on the optical image stabilization compensation amount 1 and the optical image stabilization compensation amount 2 for the telephoto camera module.

[0181] In some implementations, the post-processing module for optical image stabilization determines the optical image stabilization compensation amount 3 for the telephoto camera module. This may include gradually increasing the proportion of the optical image stabilization compensation amount 1 for the telephoto camera module while gradually decreasing the proportion of the optical image stabilization compensation amount 2 for the telephoto camera module. For example, refer to... Figure 2 Examples are not detailed here.

[0182] Reference Figure 6(b) When the first optical image stabilization control module receives the sensor parameters sent by the inertial measurement unit, the first optical image stabilization control module can determine the optical image stabilization compensation amount 1 for the main camera module based on the sensor parameters and the relevant parameters of the main camera module sent by the camera HAL; when the second optical image stabilization control module receives the sensor parameters sent by the inertial measurement unit, the second optical image stabilization control module can determine the optical image stabilization compensation amount 2 for the main camera module based on the sensor parameters and the parameters of the main camera module sent by the camera HAL; the electronic device can send the optical image stabilization compensation amount 1 and the optical image stabilization compensation amount 2 for the main camera module to the optical image stabilization post-processing module; the optical image stabilization post-processing module determines the optical image stabilization compensation amount 3 for the main camera module based on the optical image stabilization compensation amount 1 and the optical image stabilization compensation amount 2 for the main camera module.

[0183] In some implementations, the post-processing module for optical image stabilization determines the optical image stabilization compensation amount 3 for the main camera module. This may include gradually increasing the proportion of the optical image stabilization compensation amount 1 for the main camera module while gradually decreasing the proportion of the optical image stabilization compensation amount 2 for the main camera module. For example, refer to... Figure 4 Examples are not detailed here.

[0184] It should be noted that the shooting method provided in this application embodiment is applicable to scenarios where the zoom ratio changes. It should be understood that the following shooting scenarios may all involve changes in the zoom ratio: photo preview, video preview, video recording, portrait mode preview, multi-lens recording, and shooting the supermoon, etc.

[0185] In some embodiments, the dynamic scheduling module of the electronic device can first determine the current shooting scene based on at least one of the user-triggered shooting operation (e.g., zoom operation) and data collected by various sensors (e.g., gyroscope sensor, accelerometer sensor, position sensor, ambient light sensor, etc.). Then, the dynamic scheduling module can obtain a stabilization strategy corresponding to the shooting scene from a preset stabilization strategy library. The dynamic scheduling module can then control the activation of the first optical image stabilization control module and / or the second optical image stabilization control module according to the stabilization strategy corresponding to the shooting scene. For example, Table 1 shows the preset stabilization strategy library.

[0186] Table 1

[0187]

[0188] The shooting method provided in this application can be implemented using an electronic device. To facilitate understanding of the shooting method provided in this application, the hardware structure of the electronic device provided in this application is described below.

[0189] For example, Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface, etc.

[0190] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device. In other embodiments of this application, the electronic device 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 include hardware, software, or a combination of software and hardware.

[0191] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors, controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.

[0192] The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.

[0193] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the aforementioned memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0194] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a SIM card interface, and / or a USB interface, etc.

[0195] It is understood that the interface connection relationships between the modules illustrated in the embodiments of the present invention are merely illustrative and do not constitute a limitation on the structure of the electronic device. In other embodiments of this application, the electronic device may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.

[0196] Internal memory 121 can be used to store executable program code, including instructions. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function, etc. The data storage area may store data created during the use of the electronic device, etc. Furthermore, internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc. Processor 110 executes various functional applications and data processing of the electronic device by running instructions stored in internal memory 121 and / or instructions stored in memory disposed within the processor.

[0197] It should be noted that the module names involved in the embodiments of this application can all be defined as other names, as long as they can achieve the function of each module, and no specific restrictions are placed on the module names.

[0198] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the embodiments of this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.

[0199] The foregoing primarily describes the solutions provided by the embodiments of this application from a methodological perspective. To achieve the aforementioned functions, it includes corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, based on the method steps of the examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware 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.

[0200] The shooting method provided in this application can be applied to electronic devices with shooting functions. Electronic devices include terminal devices, and the specific device form of the terminal device can be referred to the above-mentioned descriptions, which will not be repeated here.

[0201] This application provides an electronic device, which includes a processor and a memory; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, causing the electronic device to perform the above-described method.

[0202] This application provides a chip. The chip includes a processor, which is used to call a computer program in memory to execute the technical solutions in the above embodiments. Its implementation principle and technical effects are similar to those in the related embodiments described above, and will not be repeated here.

[0203] This application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, it implements the methods described above. The methods described in the above embodiments can be implemented wholly or partially by software, hardware, firmware, or any combination thereof. If implemented in software, the functionality can be stored as one or more instructions or code on or transmitted over the computer-readable medium. The computer-readable medium can include computer storage media and communication media, and can also include any medium that can transfer a computer program from one place to another. The storage medium can be any target medium accessible by a computer.

[0204] In one possible implementation, a computer-readable medium may include random access memory (RAM), read-only memory (ROM), compact discread-only memory (CD-ROM) or other optical disc storage, magnetic disk storage or other magnetic storage devices, or any other medium intended to carry or store the required program code in the form of instructions or data structures, and accessible by a computer. Furthermore, any connection is appropriately referred to as a computer-readable medium. For example, if software is transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, then coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. As used herein, disks and optical discs include optical discs, laser discs, optical discs, digital versatile discs (DVDs), floppy disks, and Blu-ray discs, where disks typically reproduce data magnetically, while optical discs optically reproduce data using lasers. Combinations of the above should also be included within the scope of computer-readable media.

[0205] This application provides a computer program product, which includes a computer program that, when run, causes a computer to perform the above-described method.

[0206] This application describes embodiments of methods, apparatus (systems), and computer program products according to embodiments of this application with reference to flowchart illustrations and / or block diagrams. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, special-purpose computer, embedded processor, or other programmable device to produce a machine, such that the instructions, which execute via the processing unit of the computer or other programmable data processing device, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0207] The above specific embodiments further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made on the basis of the technical solution of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for stabilizing image control, characterized in that, include: In response to the operation of opening the camera, the electronic device activates the main camera module, and the electronic device performs image stabilization control on the main camera module through the first optical image stabilization control module; In response to the operation of increasing the zoom ratio to the first zoom ratio, the electronic device activates the telephoto camera module, and the electronic device performs image stabilization control on the telephoto camera module through the first optical image stabilization control module and the second optical image stabilization control module; After increasing the zoom ratio to the second zoom ratio, the first optical image stabilization control module maintains image stabilization control over the telephoto camera module, while the second optical image stabilization control module stops image stabilization control over the telephoto camera module; the second zoom ratio is greater than the first zoom ratio.

2. The method according to claim 1, characterized in that, The electronic device performs image stabilization control on the telephoto camera module through the first optical image stabilization control module and the second optical image stabilization control module, including: The electronic device obtains a first compensation amount for the telephoto camera module from the first optical image stabilization control module and a second compensation amount for the telephoto camera module from the second optical image stabilization control module. The electronic device determines a third compensation amount for the telephoto camera module based on the first compensation amount and the second compensation amount; The electronic device performs image stabilization control on the telephoto camera module based on the third compensation amount.

3. The method according to claim 2, characterized in that, As the zoom ratio increases from the first zoom ratio to the second zoom ratio, the ratio of the first compensation amount to the third compensation amount gradually increases, while the ratio of the second compensation amount to the third compensation amount gradually decreases. When the zoom ratio is adjusted to the second zoom ratio, the third compensation amount is equal to the first compensation amount.

4. The method according to any one of claims 1 to 3, characterized in that, The method further includes: when the zoom ratio is between the first zoom ratio and the second zoom ratio, the electronic device performs image stabilization control on the main camera module through the first optical image stabilization control module and the second optical image stabilization control module.

5. The method according to claim 4, characterized in that, The electronic device performs image stabilization control on the main camera module through the first optical image stabilization control module and the second optical image stabilization control module, including: The electronic device obtains a fourth compensation amount for the main camera module from the first optical image stabilization control module and a fifth compensation amount for the main camera module from the second optical image stabilization control module; The electronic device determines a sixth compensation amount for the main camera module based on the fourth compensation amount and the fifth compensation amount; The electronic device performs image stabilization control on the main camera module according to the sixth compensation amount.

6. The method according to claim 5, characterized in that, As the zoom ratio increases from the first zoom ratio to the second zoom ratio, the ratio of the fourth compensation amount to the sixth compensation amount gradually decreases, while the ratio of the fifth compensation amount to the sixth compensation amount gradually increases. When the zoom ratio is adjusted to the second zoom ratio, the sixth compensation amount is equal to the fifth compensation amount.

7. The method according to any one of claims 1 to 6, characterized in that, The method further includes: If the zoom ratio is greater than the second zoom ratio, the main camera module remains on, and the electronic device performs image stabilization control on the main camera module through the second optical image stabilization control module.

8. The method according to any one of claims 1 to 7, characterized in that, The method further includes: The electronic device determines the current shooting scene based on data collected by the sensors and zoom operations; the sensors include at least one of a gyroscope sensor, an accelerometer sensor, a position sensor, and an ambient light sensor. The electronic device obtains the image stabilization strategy corresponding to the shooting scene from a preset image stabilization strategy library; The electronic device controls at least one of the first optical image stabilization control module and the second optical image stabilization control module to be activated according to the image stabilization strategy corresponding to the shooting scene.

9. The method according to claim 8, characterized in that, The electronic device controls at least one of the first optical image stabilization control module and the second optical image stabilization control module to be activated according to the image stabilization strategy corresponding to the shooting scene, including: If the shooting scenario is video recording, the electronic device controls the first optical image stabilization control module to perform image stabilization control on the main camera module, and controls the second optical image stabilization control module to perform image stabilization control on the telephoto camera module; or... If the shooting scenario involves high-magnification zoom shooting, the electronic device controls the first optical image stabilization control module to perform image stabilization control on the telephoto camera module, and controls the second optical image stabilization control module to perform image stabilization control on the main camera module; or... If the shooting scenario is a motion-tracking shot, the electronic device controls the second optical image stabilization control module to perform image stabilization control on the main camera module and the telephoto camera module; or... If the shooting scenario is a long exposure shooting, the electronic device controls the first optical image stabilization control module to perform image stabilization control on the main camera module.

10. The method according to any one of claims 1 to 9, characterized in that, The compensation range of the first optical image stabilization control module is greater than that of the second optical image stabilization control module.

11. An electronic device, characterized in that, include: Processor and memory; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the electronic device to perform the method as described in any one of claims 1-10.

12. 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-10.

13. A chip system, characterized in that, It includes at least one processor and a communication interface, the communication interface and the at least one processor being interconnected via a line, the at least one processor being configured to run a computer program or instructions to perform the method as described in any one of claims 1-10.

14. A computer program product, characterized in that, Includes a computer program that, when run, causes a computer to perform the method as described in any one of claims 1-10.