Exposure mode switching method and related equipment

By detecting flickering in electronic devices and switching to low photosensitive mode, the flickering problem in high photosensitive mode under AC lighting is solved, improving the shooting experience.

CN116193269BActive Publication Date: 2025-08-29HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111682804.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2021-11-26
Filing Date
2021-12-31
Publication Date
2025-08-29
Estimated Expiration
2041-12-31

AI Technical Summary

Technical Problem

In an alternating current lighting environment, electronic devices are prone to flickering when shooting in high-photosensitive mode, resulting in inconsistent brightness of adjacent frames and affecting user experience.

Method used

When an electronic device acquires an image frame in dual-photosensitive mode, it determines whether there is flickering by analyzing the brightness changes, and switches to the low photosensitive mode when the ambient brightness is higher than the threshold to extend the exposure time and reduce the brightness changes of images in adjacent frames.

Benefits of technology

By switching exposure mode, the degree of brightness flickering in image is reduced, and the user's shooting and preview experience is improved, especially in AC lighting environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116193269B_ABST
    Figure CN116193269B_ABST
Patent Text Reader

Abstract

The present application provides an exposure mode switching method and related equipment. According to the method, the electronic device can set the default exposure mode to the dual-light-sensing mode. If the electronic device detects the presence of a flickering phenomenon, it determines whether the ambient brightness is greater than a first ambient brightness threshold. If the ambient brightness is greater than the first ambient brightness threshold, the electronic device can switch to a low-light-sensing mode for exposure. It is understandable that the electronic device can continue to perform flicker detection. If the flickering phenomenon no longer occurs, or if the flickering phenomenon occurs but the ambient brightness is less than the second ambient brightness threshold, the electronic device can switch to the dual-light-sensing mode for exposure. Through the above method, the brightness of the image displayed by the electronic device is consistent, the flickering phenomenon is avoided, and the user's shooting experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of photography, and in particular to an exposure mode switching method and related equipment. Background Art

[0002] Indoor AC lighting can cause flicker. For example, the frequency of domestic AC power is 50Hz, which means it refreshes 100 times per second. In this case, if the exposure time is an integer multiple of 1 / 100s (using the 1 / 50s example above), the number of flickers during each exposure is roughly the same, and the brightness of each frame is similar. Generally speaking, ordinary sensors usually expose in high-sensitivity mode. Compared to low-sensitivity mode, the shutter speed in high-sensitivity mode is faster under the same light source. In other words, the exposure time in high-sensitivity mode is shorter. This means that when indoor light is strong and AC lighting is present, the exposure time is likely to be less than 1 / 100s. The number of flickers during each exposure varies, and the brightness of two adjacent frames is inconsistent, which causes flicker.

[0003] Therefore, how to avoid the flicker phenomenon is an urgent problem to be solved. Summary of the Invention

[0004] The present application provides an exposure mode switching method and related equipment. According to the exposure mode switching method, after the electronic device opens the camera application, it can acquire images in the dual-light-sensitivity mode. If flickering occurs and the current ambient brightness is greater than a first threshold, the electronic device can switch to the low-light-sensitivity mode to acquire the image. It can be understood that under the same ambient brightness, the exposure time corresponding to the low-light-sensitivity mode is longer than the exposure time corresponding to the dual-light-sensitivity mode, which can avoid flickering and improve the user experience when previewing photos or videos.

[0005] In a first aspect, the present application provides an exposure mode switching method. According to the method, in response to a first operation, the electronic device can turn on a camera application. The electronic device can acquire N frames of images in a dual-sensitivity mode. If the electronic device determines that a flicker phenomenon exists based on the brightness of the N frames of images, and the current ambient brightness is greater than a first threshold, the electronic device can switch to a low-sensitivity mode and acquire M frames of images in the low-sensitivity mode. It can be understood that the brightness changes of adjacent frame images in the M-frame image are smaller than the brightness changes of adjacent frame images in the N-frame image. It can be understood that the flicker phenomenon is a phenomenon in which the brightness of adjacent frame images displayed by the electronic device shows a light and dark change. Wherein, N is an integer not less than 2, and M is an integer not less than 2.

[0006] In the solution provided in the present application, if a flickering phenomenon occurs when the electronic device acquires an image in the dual-sensitivity mode, that is, the brightness of adjacent image frames acquired by the electronic device in the dual-sensitivity mode shows light and dark changes, and the current ambient brightness is greater than the first threshold, the electronic device can switch from the dual-sensitivity mode to the low-sensitivity mode. After switching to the low-sensitivity mode, the brightness and darkness changes of the adjacent image frames acquired by the electronic device become smaller. It can be understood that there are differences in the exposure tables corresponding to the low-sensitivity mode and the dual-sensitivity mode. Under the same ambient brightness conditions, the exposure time in the low-sensitivity mode is longer than the exposure time in the dual-sensitivity mode. In this way, the brightness and darkness changes of adjacent frame images acquired by the electronic device will become smaller, that is, the brightness difference of the image displayed on the display screen of the electronic device will become smaller, and the degree of flickering in the preview screen displayed by the electronic device will be reduced, which can improve the user experience when previewing or recording.

[0007] In some embodiments of the present application, the electronic device may be in a photo preview state or a video preview state during the process of acquiring N frames of images and M frames of images. The video preview state includes a preview state before starting video recording and a preview state after starting video recording.

[0008] In some embodiments of the present application, the first operation may be a user operation that triggers the opening of a camera application, for example, clicking a camera application icon.

[0009] In some embodiments of the present application, the N frames of images may include the following image A and image B. In this case, the current ambient brightness refers to the ambient brightness when image A is acquired.

[0010] In some embodiments of the present application, the M frames of images may include image D and image E described below.

[0011] In some embodiments of the present application, the first threshold is a first ambient brightness threshold.

[0012] It should be noted that the electronic device in this application may be the electronic device 100 mentioned below.

[0013] In conjunction with the first aspect, in one possible implementation of the first aspect, the electronic device may include a camera. It is understood that the camera may include an image sensor. The image sensor may be a dual-conversion-gain (DCG) sensor. The DCG sensor may include a first sensor and a second sensor. The conversion gain (CG) of the first sensor is greater than the CG of the second sensor. A specific implementation of the electronic device acquiring N frames of images in a dual-sensitivity mode may include: the electronic device's image sensor operates in the dual-sensitivity mode; in the dual-sensitivity mode, the electronic device determines a first exposure parameter using an exposure table corresponding to the dual-sensitivity mode; and based on the first exposure parameter, acquires a first image using the first sensor and a second image using the second sensor; and obtains a third image based on the first and second images. The first exposure parameter may include a first exposure time and a first sensitivity. The third image is a high dynamic range (HDR) image. The third image is one of the N frames of images. The electronic device switching to a low-sensitivity mode and acquiring M frames of images in the low-sensitivity mode may be implemented as follows: the electronic device controls the camera's image sensor to switch from the dual-sensitivity mode to the low-sensitivity mode. In the low-sensitivity mode, the electronic device determines a second exposure parameter using the exposure table corresponding to the low-sensitivity mode; and acquires M frames of images using the second sensor based on the second exposure parameter. The second exposure mode includes a second exposure time and a second sensitivity.

[0014] In the solution provided in the present application, each frame of image acquired by the electronic device in the dual-sensitivity mode is an image obtained by fusing the images acquired by the first sensor and the second sensor. In order to obtain an image with appropriate brightness, the corresponding exposure time is often reduced when the ambient brightness is brighter. It can be understood that in a high-brightness (ambient brightness is brighter) scene, the exposure time adopted by the electronic device in the dual-sensitivity mode is relatively short, which is likely to be shorter than the flicker cycle of the artificial light source, thereby causing a flicker phenomenon. That is, the brightness and darkness of adjacent frames of image vary greatly. This flicker phenomenon greatly affects the user's shooting experience. In the present application, when there is a flicker phenomenon and the ambient brightness is bright, the electronic device can switch to a low-sensitivity mode, and the exposure time of the electronic device to acquire the image will become longer, thereby being greater than the flicker cycle of the artificial light source, so that the brightness and darkness of the acquired adjacent image frames vary less, reducing the impact of the brightness and darkness changes of the image on the user's shooting experience.

[0015] In some embodiments of the present application, the exposure parameters of the electronic device in the dual-sensitivity mode can be understood as the exposure parameters in the exposure table corresponding to the high-sensitivity mode.

[0016] It can be understood that the sensitivity mentioned here refers to ISO.

[0017] In some embodiments of the present application, the first image may be a1, the second image may be a2, and the third image may be image A.

[0018] It is understandable that compared with ordinary images, High-Dynamic Range (HDR) images can provide more dynamic range and image details, and are generally used in TV display products and photo and video shooting and production.

[0019] It is understandable that the relevant descriptions about DCG and CG can be found below and will not be elaborated here.

[0020] In conjunction with the first aspect, in a possible implementation of the first aspect, the image sensor of the electronic device operates in a dual-light-sensing mode, specifically including: after the electronic device opens a camera application, in response to a second operation, the electronic device displays a video preview interface, and the image sensor of the electronic device operates in the dual-light-sensing mode by default. The video preview interface is a preview interface before recording is started or a preview interface after recording is started.

[0021] In the solution provided in this application, after the electronic device enters the video preview interface, its image sensor defaults to dual-sensitivity mode. It is understood that images captured by the electronic device in dual-sensitivity mode have a higher dynamic range and contain more image details. In other words, the electronic device can obtain better quality images in dual-sensitivity mode.

[0022] In some embodiments of the present application, the second operation can be used to trigger the electronic device to display a video preview interface. For example, clicking a video capture mode control. The video capture mode control triggers the electronic device to display a preview interface before starting video recording. Another example is clicking a start video control. The video control triggers the electronic device to display a preview interface after starting video recording.

[0023] In combination with the first aspect, in a possible implementation manner of the first aspect, a brightness difference between every two frames of the M frames of image is less than a second threshold.

[0024] In some embodiments of the present application, after the electronic device switches to low-light-sensitivity mode, the brightness difference between each two frames of the M frames is less than a second threshold. In this case, the brightness variation of the M frames is minimal, and flicker can be considered absent. In other words, after switching to low-light-sensitivity mode, the brightness of the images captured by the electronic device is more consistent, significantly improving the user's shooting experience.

[0025] It is understandable that the second threshold can be set according to actual needs, and this application does not impose any restrictions on this.

[0026] In conjunction with the first aspect, in a possible implementation of the first aspect, after acquiring M frames of images in the low-sensitivity mode, the exposure mode switching method may further include: if the electronic device determines based on the brightness of the P frame that flicker does not exist, or if the current ambient brightness is less than a third threshold, the electronic device may control the image sensor to switch from the low-sensitivity mode to the dual-sensitivity mode. The P frame includes part or all of the M frame.

[0027] In the embodiments provided herein, after an electronic device acquires M frames of images in a low-light-sensitivity mode, if it detects that flicker no longer exists, or that the current ambient brightness is low, the electronic device can switch to a dual-light-sensitivity mode. The quality of the image acquired in the dual-light-sensitivity mode is higher. When the electronic device determines that the current ambient brightness is low enough to no longer cause flicker, or that flicker does not exist, it can switch to the dual-light-sensitivity mode to ensure that higher-quality images are acquired while minimizing flicker.

[0028] In some embodiments of the present application, the P frame image may include part of the images in the M frame image, but does not include the images in the N frame image.

[0029] In some embodiments of the present application, a P-frame image may include an M-frame image.

[0030] In some embodiments of the present application, the P-frame image may include a portion of the images in the N-frame image and a portion or all of the images in the M-frame image.

[0031] It is understandable that the third threshold can be set according to actual needs, and this application does not impose any restrictions on this.

[0032] In some embodiments of the present application, the third threshold may be the second ambient brightness threshold.

[0033] In conjunction with the first aspect, in a possible implementation of the first aspect, after the electronic device controls the image sensor to switch from the low-sensitivity mode to the dual-sensitivity mode, the electronic device may determine a third exposure parameter using an exposure table corresponding to the dual-sensitivity mode, acquire images using the first sensor and the second sensor respectively based on the third exposure parameter, and obtain a preview image based on the images acquired by the first sensor and the second sensor. The third exposure mode includes a third exposure time and a third sensitivity.

[0034] In the embodiments provided herein, in dual-sensor mode, the image captured by the electronic device is a fusion of images obtained by sensing with different conversion gains. Therefore, in dual-sensor mode, the image captured by the electronic device can contain more details in both highlights and shadows. In this way, the electronic device can ensure that higher-quality images are captured while minimizing flicker, thereby improving the user's shooting experience.

[0035] In combination with the first aspect, in a possible implementation of the first aspect, after the electronic device acquires N frames of images in a dual-light-sensing mode, the electronic device may determine the brightness difference between each two adjacent frames of images in the N frames of images to obtain a first brightness difference set. The electronic device may determine the number of images in the N frames of images whose brightness is greater than a fourth threshold. The electronic device may determine whether the images in the N frames of images whose brightness is greater than the fourth threshold are continuous image frames. The electronic device determines the presence of a flicker phenomenon based on the brightness of the N frames of images, which may specifically include: the proportion of elements in the first brightness difference set that are greater than the fifth threshold is greater than the first proportion, the number of images in the N frames of images that are greater than the fourth threshold is greater than 1, and not all images in the N frames of images that are greater than the fourth threshold are continuous image frames.

[0036] In combination with the first aspect, in a possible implementation of the first aspect, after the electronic device acquires N frames of images in a dual-light-sensing mode, the electronic device may filter out images with brightness greater than a fourth threshold from the N frames of images to obtain a first image set. The electronic device may determine the brightness difference between the images in the first image set and adjacent images to obtain a second brightness difference set. The electronic device may determine whether the images in the N frames of images with brightness greater than the fourth threshold are continuous image frames. The electronic device may determine the presence of a flicker phenomenon based on the brightness of the N frames of images, specifically including: the proportion of elements in the second brightness difference set that are greater than the fifth threshold is greater than the first proportion, the number of images in the N frames of images that are greater than the fourth threshold is greater than 1, and not all images in the N frames of images that are greater than the fourth threshold are continuous image frames.

[0037] In some embodiments of the present application, the fourth threshold is the third preset threshold described below.

[0038] In some embodiments of the present application, the fifth threshold is the second preset threshold described below.

[0039] It is understandable that the fourth threshold, the fifth threshold and the first ratio can be set according to actual needs, and this application does not impose any restrictions on this.

[0040] In conjunction with the first aspect, in one possible implementation of the first aspect, the electronic device determines the presence of flicker based on the brightness of N frames of images. Specifically, the electronic device may analyze brightness changes in the N frames of images using an RGB sensor, and determine the presence of flicker based on the analysis results. The analysis results indicate that the brightness of the N frames of images exhibits regular variations in brightness.

[0041] It is understood that the RGB sensor can determine the brightness difference of the image based on the intensity of the reflected light measured when capturing the image, thereby determining whether there is flicker. It is understood that when the brightness difference between adjacent image frames is large, the RGB sensor can determine the presence of flicker.

[0042] In the second aspect, the present application provides an electronic device. The electronic device may include a display screen, a camera, a memory, and one or more processors. One or more processors may be coupled to the camera and the memory. The memory may be used to store computer program code. The processor may be used to: in response to a first operation, start a camera application; acquire N frames of images in a dual-sensitivity mode; if it is determined based on the brightness of the N frames of images that a flickering phenomenon exists, and the current ambient brightness is greater than a first threshold, switch to a low-sensitivity mode, and acquire M frames of images in the low-sensitivity mode. It can be understood that the brightness changes of adjacent frame images in the M frame images are smaller than the brightness changes of adjacent frame images in the N frame images. The flicker phenomenon is a phenomenon in which the brightness of adjacent frame images displayed by an electronic device presents a light and dark change. In addition, N is an integer not less than 2, and M is an integer not less than 2.

[0043] In conjunction with the second aspect, in one possible implementation of the second aspect, the camera may include an image sensor. The image sensor may be a dual-conversion-gain (DCG) sensor. The DCG sensor may include a first sensor and a second sensor. The conversion gain (CG) of the first sensor is greater than the conversion gain (CG) of the second sensor.

[0044] The processor, when used to acquire N frames of images in a dual-sensitivity mode, is specifically configured to: operate the image sensor in the dual-sensitivity mode; in the dual-sensitivity mode, determine a first exposure parameter using an exposure table corresponding to the dual-sensitivity mode; acquire a first image using the first sensor and a second image using the second sensor based on the first exposure parameter; and obtain a third image based on the first and second images. The first exposure parameter may include a first exposure time and a first sensitivity. The third image is a high dynamic range (HDR) image. The third image is one of the N frames of images. The processor, when used to switch to a low-sensitivity mode and acquire M frames of images in the low-sensitivity mode, is specifically configured to: control the camera's image sensor to switch from the dual-sensitivity mode to the low-sensitivity mode; in the low-sensitivity mode, determine a second exposure parameter using an exposure table corresponding to the low-sensitivity mode; and acquire M frames of images using the second sensor based on the second exposure parameter. The second exposure mode includes a second exposure time and a second sensitivity.

[0045] In conjunction with the second aspect, in one possible implementation of the second aspect, the display screen may be configured to: after the camera application is launched, in response to a second operation, display a video preview interface. In this case, the image sensor included in the camera operates in dual-light sensing mode by default. The video preview interface is a preview interface before or after the video is launched.

[0046] In combination with the second aspect, in a possible implementation manner of the second aspect, a brightness difference between every two frames of image in the M frames of image is less than a second threshold.

[0047] In conjunction with the second aspect, in a possible implementation of the second aspect, after acquiring M frames of images in the low-sensitivity mode, the processor may be further configured to: if it is determined based on the brightness of the P frame that no flickering occurs, or if the current ambient brightness is less than a third threshold, control the image sensor to switch from the low-sensitivity mode to the dual-sensitivity mode. The P frame includes part or all of the M frame.

[0048] In conjunction with the second aspect, in one possible implementation of the second aspect, after the processor is configured to control the image sensor to switch from the low-sensitivity mode to the dual-sensitivity mode, the processor may further be configured to: determine a third exposure parameter using an exposure table corresponding to the dual-sensitivity mode, acquire images using the first sensor and the second sensor based on the third exposure parameter, and obtain a preview image based on the images acquired by the first sensor and the second sensor. The third exposure mode includes a third exposure time and a third sensitivity.

[0049] In conjunction with the second aspect, in a possible implementation of the second aspect, after the processor is used to acquire N frames of images in a dual-light-sensing mode, it can also be used to: determine the brightness difference between each two adjacent frames of images in the N frames of images to obtain a first brightness difference set. The processor can also be used to: determine the number of images in the N frames of images whose brightness is greater than a fourth threshold. The processor can also be used to: determine whether the images in the N frames of images whose brightness is greater than the fourth threshold are continuous image frames. If the proportion of elements in the first brightness difference set that are greater than the fifth threshold is greater than the first proportion, the number of images in the N frames of images that are greater than the fourth threshold is greater than 1, and not all of the images in the N frames of images that are greater than the fourth threshold are continuous image frames, the processor can determine that flickering exists.

[0050] In combination with the second aspect, in a possible implementation of the second aspect, after the processor is used to acquire N frames of images in a dual-sensitivity mode, it can also be used to: filter out images with brightness greater than a fourth threshold from the N frames of images to obtain a first image set. The processor can also be used to: determine the brightness difference between an image in the first image set and an adjacent image to obtain a second brightness difference set. The processor can also be used to: determine whether the images in the N frames of images with brightness greater than the fourth threshold are continuous image frames. If the proportion of elements in the second brightness difference set that are greater than the fifth threshold is greater than the first proportion, the number of images in the N frames of images that are greater than the fourth threshold is greater than 1, and not all of the images in the N frames of images that are greater than the fourth threshold are continuous image frames, the processor can determine that flickering exists.

[0051] In conjunction with the second aspect, in one possible implementation of the second aspect, the processor, when determining the presence of flicker based on the brightness of N frames of images, is specifically configured to: analyze brightness changes in the N frames of images based on an RGB sensor, and determine the presence of flicker based on the analysis results. The analysis results indicate that the brightness of the N frames of images exhibits regular variations in brightness.

[0052] In a third aspect, the present application provides a computer storage medium comprising computer instructions, which, when executed on an electronic device, can enable the electronic device to execute any possible implementation of the first aspect.

[0053] In a fourth aspect, an embodiment of the present application provides a chip, which is applied to an electronic device. The chip may include one or more processors, which are used to call computer instructions to enable the electronic device to execute any possible implementation method of the above-mentioned first aspect.

[0054] In a fifth aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on an electronic device, enables the electronic device to execute any possible implementation of the first aspect described above.

[0055] It is understandable that the electronic device provided in the second aspect, the computer storage medium provided in the third aspect, the chip provided in the fourth aspect, and the computer program product provided in the fifth aspect are all used to execute any possible implementation of the first aspect. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects of any possible implementation of the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Figure 1A-1B The waveform diagram of the alternating current provided in the embodiment of the present application;

[0057] Figure 2AA waveform diagram of an optical signal provided in an embodiment of the present application;

[0058] Figure 2B A waveform diagram of another optical signal provided in an embodiment of the present application;

[0059] Figure 3A A waveform diagram of an optical signal provided in an embodiment of the present application;

[0060] Figure 3B A waveform diagram of another optical signal provided in an embodiment of the present application;

[0061] Figure 4 A schematic diagram of a shooting scene with artificial light provided in an embodiment of the present application;

[0062] Figure 5 A schematic diagram of the hardware structure of an electronic device 100 provided in an embodiment of the present application;

[0063] Figure 6 A schematic diagram of the software structure of an electronic device 100 provided in an embodiment of the present application;

[0064] Figures 7A-7E A set of user interface schematic diagrams provided for embodiments of the present application;

[0065] Figure 8 A flowchart of an exposure mode switching method provided in an embodiment of the present application;

[0066] Figure 9 A flowchart of another exposure mode switching method provided in an embodiment of the present application;

[0067] Figure 10 This is a schematic diagram of partial software and hardware collaboration of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0068] The following will be combined with the accompanying drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in the text is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.

[0069] It should be understood that the terms "first," "second," and the like in the specification, claims, and drawings of this application are used to distinguish between different objects, rather than to describe a particular order. Furthermore, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements, but may optionally include steps or elements not listed, or may optionally include other steps or elements inherent to the process, method, product, or apparatus.

[0070] References to "embodiments" in this application mean that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described in this application may be combined with other embodiments.

[0071] This application relates to the field of photography. To facilitate understanding of the method provided by this application, some terms in the field of photography are introduced below.

[0072] 1. Flicker

[0073] When artificial light is present in the scene being filmed, the captured image may flicker. That is, the preview image on electronic devices such as cameras and mobile phones and the captured video may flicker over time.

[0074] The causes of the flicker phenomenon are described below.

[0075] The electricity used in daily life is generally alternating current with a sinusoidal waveform. Figure 1A The waveform diagram of the alternating current with a frequency of 60 Hz is exemplarily shown. Figure 1B The waveform diagram of the alternating current with a power frequency of 50 Hz is exemplarily shown.

[0076] When an artificial light source is connected to alternating current (AC), it converts electrical signals into optical signals. Since the electrical signal is a periodic signal with a certain frequency, the resulting optical signal is also a periodic signal with a certain frequency. This phenomenon can be understood as the light emitted by the artificial light source exhibiting a certain frequency and periodicity that changes over time, which is known as stroboscopic light.

[0077] Understandably, flicker is caused by the design of the power supply and the inherent characteristics of the artificial light source. Therefore, there's no such thing as truly flicker-free lighting. For many lighting fixtures, their operating current inevitably fluctuates with input voltage, directly leading to fluctuations in light output and flicker.

[0078] However, the light energy emitted by artificial light sources has no directionality, so the waveform of the light signal is no longer a sine waveform, but an envelope with a frequency of 100Hz or 120Hz. Figure 2A As shown in , when the artificial light source is connected to 60Hz AC, the waveform of the light signal converted by the artificial light source is a periodically changing envelope with a frequency of 120Hz. Figure 2B As shown in FIG, when the artificial light source is connected to 50 Hz alternating current, the waveform of the optical signal converted by the artificial light source is a periodically changing envelope with a frequency of 100 Hz.

[0079] It can be seen that the flicker frequency of an artificial light source is typically twice the frequency of the AC power connected to the artificial light source. The present embodiment of the application does not limit the flicker frequency of the artificial light source. For example, if the frequency of the AC power connected to the artificial light source is other than 50 Hz or 60 Hz, the flicker frequency of the artificial light source can be other than 100 Hz or 120 Hz.

[0080] It can be understood that in the schematic diagram of the light signal converted by the artificial light source, the area enclosed by the envelope and the x-axis during a period of time (the definite integral of the function corresponding to the envelope during this period) is the light energy emitted by the artificial light source during this period, that is, the light energy received by the sensor during this period. It can be understood that the more light energy the sensor receives, the brighter the exposed image.

[0081] It is understood that the sensor mentioned in this application refers to an image sensor. The image sensor can be in the form of a semiconductor chip, including but not limited to a charge coupled device (CCD) and a complementary metal oxide semiconductor (CMO).

[0082] If the sensor exposure starts at T1 and ends at T2 when capturing the i-th frame, the amount of light energy received by the sensor during the period T1-T2 affects the brightness of the final displayed image. It can be understood that the more light energy the sensor receives during the period T1-T2, the brighter the final image. The less light energy the sensor receives during the period T1-T2, the darker the final image.

[0083] For ease of explanation, the flicker period of the artificial light source is recorded as T. The exposure time of one frame of image is recorded as t, that is, T2-T1=t. In other words, the time required for the sensor to expose one frame of image is t.

[0084] The following description is made by taking an example of an artificial light source connected to 50 Hz alternating current in a shooting environment.

[0085] When an artificial light source is connected to a 50Hz alternating current, the waveform of the light signal converted by the artificial light source is a periodically changing envelope with a frequency of 100Hz. The flicker period of the artificial light source is: T = 1 / 100s.

[0086] Depend on Figure 3A As we can see, t = 2T = 1 / 50s. When capturing the i-th frame, the light energy received by the sensor is: S1 + S2. When capturing the i+1-th frame, the light energy received by the sensor is: S3 + S4. It can be understood that S1 = S2 = S3 = S4. S1, S2, S3, and S4 can all represent the light energy received by the sensor during time T.

[0087] We can obtain: S3 + S4 = S1 + S2. In other words, the light energy received by the sensor when exposing the i-th frame is the same as the light energy received when exposing the i+1-th frame. In other words, the brightness of the i-th frame and the i+1-th frame displayed are consistent.

[0088] Depend on Figure 3B It can be seen that t1 + t2 = t < T, which means that the sensor's exposure time is less than the flicker period of the artificial light source. When the sensor exposes the i-th frame, the light energy received by the sensor is: S5 + S6. Here, S5 represents the light energy received by the sensor during time t1, and S6 represents the light energy received by the sensor during time t2.

[0089] Depend on Figure 3B It can be seen that t3 + t4 = t < T. When the sensor exposes the i+1th frame image, the light energy received by the sensor is: S7 + S8. Among them, S7 can represent the light energy received by the sensor during time t3, and S8 can represent the light energy received by the sensor during time t4.

[0090] It can be understood that t1 = t4 and t2 = t3. Therefore, S5 = S8, and S7 < S6. Clearly, S7 + S8 < S5 + S6. Therefore, the sensor receives more light energy when exposing the i-th frame than when exposing the i+1-th frame. In other words, the brightness of the final displayed i-th and i+1-th frames is different. The i-th frame is brighter than the i+1-th frame.

[0091] Based on the above example, since the light signal converted from the artificial light source is a periodic signal, at any starting time point, when T2-T1=M*T (M is a positive integer) and M is the same, the light energy received by the sensor during the time period T1-T2 is the same, and the brightness of the two adjacent frames of the image ultimately displayed is the same. However, at any starting time point, when T2-T1=M*T (M is not a positive integer) and M is the same, the light energy received by the sensor during the time period T1-T2 is not necessarily the same, and the brightness of the two adjacent frames of the image ultimately displayed is not necessarily the same. This is the phenomenon of flicker.

[0092] In summary, if the exposure time is an integer multiple of the artificial light source flicker cycle, the brightness of two adjacent frames of images displayed by the electronic device will be consistent. If the exposure time is not an integer multiple of the artificial light source flicker cycle, the brightness of two adjacent frames of images displayed by the electronic device will be inconsistent.

[0093] 2. ISO, Full-Well Capacity (FWC)

[0094] In the film era, ISO sensitivity was an internationally standardized measure of the speed of film used in traditional cameras. This sensitivity was determined by the film purchased, and the value was fixed, a property of the film itself. Digital cameras and mobile phone cameras, on the other hand, use electronic image sensors (CCDs) or COMS to detect the intensity of incoming light. To unify the measurement units with the film used in traditional cameras, the ISO sensitivity concept was introduced. Therefore, the ISO value of a digital camera also reflects its speed. A higher ISO number indicates greater sensitivity to light, while a lower ISO number indicates less sensitivity.

[0095] Taking CMOS as an example, the working principle of CMOS is as follows: (1) Photons enter the photodiode, and the photodiode absorbs the energy of the photons and is excited to generate electrons; (2) The electrons are output to the potential well; (3) An analog voltage signal is generated at both ends of the potential well; (4) The analog voltage signal is amplified using a programmable gain amplifier to obtain an amplified voltage signal; (5) The amplified voltage signal is converted from analog to digital.

[0096] The amplification factor of the analog voltage signal in step (4) is the conversion gain (CG), and the amplification factor during the analog-to-digital conversion in step (5) can be understood as ISO. Typically, the allowable voltage swing in a pixel is determined during sensor design and remains fixed thereafter.

[0097] Full well capacity refers to the total number of electrons that a single pixel's potential well can accommodate. When full well capacity is reached, an overexposed image will result. A larger full well capacity means a greater number of electrons can be accommodated in a single pixel's potential well, making overexposition less likely.

[0098] As mentioned above, after the sensor is designed, the voltage swing is fixed. Therefore, ISO can have a significant impact on the sensor's full well capacity. Specifically, assuming the pixel's allowable voltage swing is Vmax, Vmax = CG*ISO*V, where V represents the voltage generated across the potential well. With Vmax and CG fixed, the larger ISO is, the smaller the analog voltage V allowed across the potential well. In other words, the number of electrons that the potential well can accommodate, Q = C*V, and the smaller the full well capacity. C represents the capacitance of the potential well, and under normal circumstances, C is constant.

[0099] In other words, the full well capacity will be affected by ISO. The smaller the ISO, the larger the full well capacity, and the larger the ISO, the smaller the full well capacity.

[0100] 3. Exposure

[0101] Exposure is a crucial aspect of photography, determining how much light the sensor captures when capturing an image. In other words, exposure determines the brightness (brightness or darkness) of an image. During the exposure process, exposure time (shutter speed), aperture size, and ISO (International Standards Organization) sensitivity specifically affect image brightness. These three factors influencing exposure are collectively referred to as exposure parameters.

[0102] Exposure time, also known as shutter speed, can be expressed in seconds (s). Shorter exposure times result in darker images. Longer exposure times result in brighter images. Aperture, the aperture in a lens, controls the size of the hole that allows light to enter the camera. It's denoted by F. The number following F is inversely proportional to the aperture size. A larger aperture increases the aperture, allowing more light to enter, resulting in brighter images. Conversely, a smaller aperture reduces the amount of light entering, resulting in lower image brightness.

[0103] It is understandable that the aperture size in electronic devices such as mobile phones is fixed. Therefore, electronic devices can change the brightness of the exposed image by adjusting the exposure time and ISO.

[0104] 4. Dynamic range (DR)

[0105] The dynamic range is defined as the ratio between the full well capacity and the background noise, where the background noise refers to the noise generated by the readout circuit. Taking CMOS as an example, the background noise is determined by the amplifier inside the pixel, and the amplifier can be the amplifier in steps (4) and (5) as described above. The background noise can be estimated differently according to different readout circuits. It can be estimated according to the thermal noise formula or the 1 / f noise formula. Any contact surface of the output circuit will have conductivity fluctuations. For example, the contact surfaces of conductor-conductor, conductor-semiconductor, semiconductor-semiconductor, etc. will have conductivity fluctuations. The conductivity fluctuations of the contact surface in the amplifier circuit will lead to 1 / f noise. At low frequencies, 1 / f noise is the main component of the background noise, while at high frequencies, 1 / f noise will be reduced to a level smaller than thermal noise, so that thermal noise becomes the main component of the background noise. Thermal noise is white noise, which is a type of random noise.

[0106] Therefore, for the same CMOS image sensor, the background noise is related to the readout circuit. Since the readout circuit in a designed image sensor is fixed, the dynamic range is related to the full well capacity. The larger the full well capacity, the larger the dynamic range.

[0107] 5. Conversion gain

[0108] When taking actual photos, the larger the dynamic range, the larger the range of brightest and darkest colors that the captured image can contain.

[0109] In real-world photography, the ambient lighting of the scene often changes, and the image sensor may need to capture both very bright and very dark scenes. To capture images of bright scenes, the image sensor's full well capacity is as large as possible. To better capture details in dark scenes, the image sensor is expected to have a higher sensitivity. In other words, image sensors are generally expected to have both a larger full well capacity and higher sensitivity. However, as shown above, the higher the sensitivity, the smaller the full well capacity, and the lower the dynamic range.

[0110] For example, in bright light scenes, image sensors require a larger full-well capacity. This is because a larger full-well capacity allows the sensor to accommodate a greater number of electrons, preventing information loss due to digital overflow caused by excessive multiplication when adjusting the gain. This translates to less overexposure during capture. However, a larger full-well capacity results in lower sensitivity, and in dimly lit scenes, images captured lack detail in dark areas. In low-light scenes, image sensors require even higher sensitivity—in other words, greater light sensitivity. However, higher sensitivity limits the full-well capacity. In other words, as sensitivity increases, the full-well capacity decreases, making overexposure more likely in bright light. Furthermore, since dynamic range = full-well capacity / noise floor, a reduced full-well capacity also reduces dynamic range.

[0111] In the related art, the above problems are solved by introducing different conversion gains. In an image sensor with dual conversion gain (DCG) capability, one pixel has two potential wells, and the two potential wells correspond to different full well capacities and different conversion gains (CG). The large full well capacity corresponds to low conversion gain (LCG) and low sensitivity, and the small full well capacity corresponds to high conversion gain (HCG) and high sensitivity. In this way, the sensor can use two potential wells (two sensitivities) and two conversion gains in the same scene to acquire two images in one exposure: an image in high-sensitivity mode and an image in low-sensitivity mode. The electronic device then synthesizes the two acquired images into one image, which is high dynamic range imaging (HDR) technology.

[0112] Among them, the image in the high-sensitivity mode refers to the image obtained through a potential well with high sensitivity and small full well capacity, and the image in the low-sensitivity mode refers to the image obtained through a potential well with low sensitivity and large full well capacity.

[0113] However, to better capture dark details in an image, image sensors typically expose in only one light sensitivity mode. Typically, image sensors are exposed in a high-sensitivity mode, where the full well capacity of the potential well is smaller. Under the same light source, the shutter speed in high-sensitivity mode is faster than in low-sensitivity mode, meaning the exposure time is shorter.

[0114] It is understandable that if the shooting scene is a bright light scene, the exposure time is likely to be shorter than the flicker period of the artificial light source. If there is artificial light in the shooting scene, the flicker phenomenon mentioned above is likely to occur, affecting the video shooting effect. Figure 4 As shown, there are chandeliers and table lamps in the shooting scene, and the ambient brightness is too bright, so flickering may occur during shooting.

[0115] This application provides an exposure mode switching method and related devices. According to this method, in bright light scenes, if the electronic device detects flicker, it can use low-sensitivity mode for exposure. In other scenes, the electronic device can use dual-sensitivity mode for exposure.

[0116] It will be understood that the exposure modes mentioned in this application include but are not limited to dual-sensitivity mode, high-sensitivity mode and low-sensitivity mode.

[0117] The following is a brief introduction to the dual-sensitivity mode.

[0118] As the name suggests, dual-sensitivity mode corresponds to two conversion gain modes—low and high. The principle behind dual-sensitivity mode is to achieve different gains through high and low full-well capacities, thereby achieving different exposure effects. In other words, the sensor has two conversion gains—low and high. Low conversion gain corresponds to a large full-well capacity, resulting in a high noise floor; high conversion gain corresponds to a small full-well capacity, resulting in a low noise floor.

[0119] With dual-sensing mode, the sensor can use two conversion gains for the same scene, capturing separate images. The electronics then combine these two conversion gain images into a single image. As you can see, the resulting image exhibits rich highlights and minimal noise in dark areas.

[0120] The following describes the device involved in the embodiments of the present application.

[0121] Figure 5 A schematic diagram of the hardware structure of an electronic device 100 provided in an embodiment of the present application.

[0122] The electronic device 100 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 speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a Subscriber Identification Module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0123] It should be understood that the structure illustrated in the embodiments of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0124] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors.

[0125] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0126] In the embodiment provided in the present application, the electronic device 100 may execute the exposure mode switching method through the processor 110 .

[0127] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.

[0128] In some embodiments, the processor 110 may include one or more interfaces. The USB interface 130 is an interface that complies with USB standards and specifications, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type-C interface, or the like. The USB interface 130 can be used to connect a charger to charge the electronic device 100, or to transfer data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio. This interface can also be used to connect to other electronic devices 100, such as AR devices.

[0129] The charging management module 140 is configured to receive charging input from a charger. While charging the battery 142 , the charging management module 140 can also provide power to the electronic device 100 through the power management module 141 .

[0130] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to provide power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, and the wireless communication module 160.

[0131] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0132] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.

[0133] The mobile communication module 150 can provide wireless communication solutions, including 2G / 3G / 4G / 5G, for the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low-noise amplifier (LNA), and the like. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modem processor for demodulation. The mobile communication module 150 can also amplify the signals modulated by the modem processor and convert them into electromagnetic waves for radiation via the antenna 1.

[0134] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium- or high-frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs sound signals through an audio device (including but not limited to the speaker 170A, the receiver 170B, etc.) or displays images or videos through the display screen 194.

[0135] The wireless communication module 160 can provide wireless communication solutions including Wireless Local Area Networks (WLAN) (such as Wireless Fidelity (Wi-Fi) network), Bluetooth (BT), Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), Infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0136] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150 , and antenna 2 is coupled to wireless communication module 160 , so that electronic device 100 can communicate with the network and other devices through wireless communication technology.

[0137] Electronic device 100 implements display functionality through a GPU, display screen 194, and an application processor. A GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.

[0138] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), organic light-emitting diode (OLED), active-matrix organic light-emitting diode or active-matrix organic light-emitting diode (AMOLED), flexible light-emitting diode (FLED), Mini LED, Micro LED, Micro-OLED, quantum dot light-emitting diode (QLED), etc. In some embodiments, electronic device 100 may include one or N display screens 194, where N is a positive integer greater than 1.

[0139] The electronic device 100 can implement the acquisition function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.

[0140] The ISP processes data fed back by camera 193. For example, when taking a photo, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, which is then passed to the ISP for processing and converted into a visible image or video. The ISP can also perform algorithmic optimization on image noise, brightness, and skin tone. It can also optimize parameters such as exposure and color temperature of the captured scene. In some embodiments, the ISP can be located within camera 193.

[0141] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal oxide semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then passed to the ISP for conversion into a digital image or video signal. The ISP outputs the digital image or video signal to the DSP for processing. The DSP converts the digital image or video signal into an image or video signal in a standard format such as RGB or YUV.

[0142] In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1. For example, in some embodiments, the electronic device 100 may use the N cameras 193 to acquire images with multiple exposure coefficients. Then, in video post-processing, the electronic device 100 may synthesize an HDR image based on the images with multiple exposure coefficients using HDR technology.

[0143] The digital signal processor is used to process digital signals. In addition to processing digital images or video signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0144] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. This allows electronic device 100 to play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, and MPEG4.

[0145] The NPU is a neural network (NN) computing processor that rapidly processes input information and continuously self-learns by drawing on the structure of biological neural networks, such as the transmission patterns between neurons in the human brain. The NPU enables intelligent cognitive applications in electronic device 100, such as image recognition, face recognition, speech recognition, and text comprehension.

[0146] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 via the external memory interface 120 to implement data storage functions. For example, files such as music and videos can be stored on the external memory card.

[0147] The internal memory 121 can be used to store computer executable program code, which includes instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image and video playback function, etc.). The data storage area can store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.).

[0148] The electronic device 100 can implement audio functions such as music playback and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0149] The audio module 170 is used to convert digital audio information into analog audio signals for output, and is also used to convert analog audio input into digital audio signals.

[0150] The speaker 170A, also called a "horn", is used to convert audio electrical signals into sound signals.

[0151] The receiver 170B, also called a "handset", is used to convert audio electrical signals into sound signals.

[0152] The microphone 170C, also called a "microphone" or "speaker", is used to convert sound signals into electrical signals. The electronic device 100 may be provided with at least one microphone 170C.

[0153] The headphone jack 170D is used to connect a wired headphone.

[0154] The sensor module 180 may include one or more sensors, which may be of the same type or of different types. Figure 5 The sensor module 180 shown is only an exemplary division method. There may be other division methods, which are not limited in this application.

[0155] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180A can be located on display screen 194. When a touch operation is applied to display screen 194, electronic device 100 detects the intensity of the touch operation using pressure sensor 180A. Electronic device 100 can also calculate the location of the touch based on the detection signal from pressure sensor 180A. In some embodiments, touch operations applied to the same touch location but with different intensities can correspond to different operation instructions.

[0156] The gyro sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyro sensor 180B. The gyro sensor 180B can also be used for image stabilization.

[0157] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude using the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.

[0158] The magnetic sensor 180D includes a Hall sensor, and the electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip leather case.

[0159] Accelerometer 180E can detect the magnitude of acceleration of electronic device 100 in all directions (generally three axes). When electronic device 100 is stationary, it can detect the magnitude and direction of gravity. It can also be used to identify the posture of electronic device 100, enabling applications such as switching between landscape and portrait modes and pedometers.

[0160] The distance sensor 180F is used to measure distance. The electronic device 100 can measure distance using infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure distance to achieve fast focusing.

[0161] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light outward through the light emitting diode. The electronic device 100 uses the photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100.

[0162] Ambient light sensor 180L is used to sense ambient light brightness. Electronic device 100 can adaptively adjust the brightness of display screen 194 based on the perceived ambient light. Ambient light sensor 180L can also be used to automatically adjust white balance when taking photos. Ambient light sensor 180L can also work with proximity light sensor 180G to detect whether electronic device 100 is in a pocket to prevent accidental touches.

[0163] In some embodiments of the present application, the ambient light sensor 180L in the electronic device 100 can be used to obtain the ambient brightness and transmit it to a corresponding processing module (eg, the processor 110 , etc.).

[0164] The fingerprint sensor 180H is used to obtain fingerprints.

[0165] The temperature sensor 180J is used to detect temperature.

[0166] The touch sensor 180K is also called a "touch panel." The touch sensor 180K can be disposed on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen." The touch sensor 180K is used to detect touch operations applied thereto or in the vicinity thereof. The touch sensor can transmit the detected touch operations to the application processor to determine the type of touch event. Visual output related to the touch operations can be provided via the display screen 194. In other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device 100, in a location different from that of the display screen 194.

[0167] The bone conduction sensor 180M can acquire vibration signals.

[0168] The buttons 190 include a power button, a volume button, and the like. The buttons 190 may be mechanical buttons or touch buttons. The electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100.

[0169] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

[0170] The indicator 192 may be an indicator light, which may be used to indicate the charging status, power level changes, messages, missed calls, notifications, etc.

[0171] The SIM card interface 195 is used to connect a SIM card. A SIM card can be connected to and disconnected from the electronic device 100 by inserting or removing it from the SIM card interface 195. The electronic device 100 may support one or N SIM card interfaces, where N is a positive integer greater than 1. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 100 uses an eSIM, or embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.

[0172] Figure 6 A software structure block diagram of an electronic device 100 provided in an embodiment of the present application.

[0173] A layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other via software interfaces. In some embodiments, the system is divided from top to bottom into the application layer, application framework layer, runtime and system libraries, hardware abstraction layer (HAL), and kernel layer.

[0174] The application layer can include a series of application packages.

[0175] like Figure 6 As shown, the application package may include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications (also referred to as applications).

[0176] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.

[0177] like Figure 6 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.

[0178] The window manager is used to manage window programs. The window manager can obtain the display size, determine whether there is a status bar, lock the screen, take screenshots, etc.

[0179] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0180] The view system includes visual controls, such as those for displaying text and images. The view system is used to build applications. A display interface can consist of one or more views. For example, a display interface containing a text notification icon might include a view for displaying text and a view for displaying images.

[0181] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including answering, hanging up, etc.).

[0182] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0183] The Notification Manager allows applications to display notifications in the status bar. These messages can be displayed briefly and then disappear automatically, without requiring user interaction. For example, the Notification Manager can be used to notify users of completed downloads, message reminders, and so on. The Notification Manager can also display notifications in the top status bar of the system as icons or scrolling text, such as notifications from background applications, or as dialog interfaces on the screen. Examples include text messages in the status bar, beeps, vibrations on electronic devices, and flashing indicator lights.

[0184] The runtime includes the core library and the virtual machine. The runtime is responsible for the scheduling and management of the system.

[0185] The core library consists of two parts: one part is the function that the programming language (for example, iava language) needs to call, and the other part is the core library of the system.

[0186] The application layer and application framework layer run in a virtual machine. The virtual machine executes application layer and application framework layer programming files (for example, Java files) as binary files. The virtual machine performs functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.

[0187] The system library can include multiple functional modules, such as the surface manager, media libraries, 3D graphics processing library (such as OpenGL ES), and 2D graphics engine (such as SGL).

[0188] The surface manager is used to manage the display subsystem and provide the fusion of two-dimensional (2D) and three-dimensional (3D) layers for multiple applications.

[0189] The media library supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0190] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0191] A 2D graphics engine is a drawing engine for 2D drawings.

[0192] The Hardware Abstraction Layer (HAL) is an interface layer between the operating system kernel and upper-layer software, and its purpose is to abstract the hardware.

[0193] The hardware abstraction layer may be provided with an automatic exposure (AE) system. In some embodiments of the present application, the AE system may include an automatic exposure control (AEC) algorithm module and an AEC statistics module. The AEC algorithm module may be used to automatically adjust exposure parameters. The AEC statistics module is used to analyze the grayscale distribution in the captured image using a histogram. The AEC statistics module may transmit the histogram to the AEC algorithm module so that the AEC algorithm module can adjust the exposure parameters.

[0194] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, sensor driver, and virtual card driver.

[0195] The following describes the workflow of the software and hardware of the electronic device 100 in conjunction with capturing a photo scene.

[0196] When the touch sensor 180K receives a touch operation, the corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes the touch operation into a raw input event (including touch coordinates, touch operation timestamp, and other information). The raw input event is stored in the kernel layer. The application framework layer obtains the raw input event from the kernel layer and identifies the control corresponding to the input event. For example, if the touch operation is a touch single-click operation and the control corresponding to the single-click operation is the control of the camera application icon, the camera application calls the interface of the application framework layer to start the camera application, and then starts the camera driver by calling the kernel layer to capture a still image or video through the camera 193.

[0197] The following introduces some shooting scenes provided by this application.

[0198] It is understood that the term "user interface" in the specification, claims, and drawings of this application refers to the media interface for interaction and information exchange between an application or operating system and a user, which realizes the conversion between the internal form of information and the form acceptable to the user. The commonly used form of user interface is the graphical user interface (GUI), which refers to a user interface related to computer operations displayed in a graphical manner. It can be an interface element such as an icon, window, or control displayed on the display screen of an electronic device, where the control can include visual interface elements such as icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets.

[0199] 1. Enter the photo preview ( Figures 7A to 7C )

[0200] Figure 7AAn exemplary user interface 710 on the electronic device 100 for displaying applications installed on the electronic device 100 is exemplarily shown.

[0201] User interface 710 displays a page with application icons, which may include multiple application icons (e.g., a weather application icon, a calendar application icon, an album application icon, a note application icon, an email application icon, an application store application icon, a settings application icon, etc.). A page indicator may also be displayed below the multiple application icons to indicate the positional relationship between the currently displayed page and other pages. Below the page indicator are multiple application icons (e.g., a camera application icon 711, a browser application icon, a message application icon, and a dial application icon). The application icons remain displayed when the page is switched.

[0202] It is understood that the camera application icon 711 is an icon of a camera application. The camera application icon 711 can be used to trigger the launch of the camera application. The camera application is an image capture application on electronic devices such as smartphones and tablets. This application does not limit the name of the application.

[0203] It should be noted that Figure 7A The user interface 710 shown is only an example provided by the present application and should not be considered as limiting the present application. In other words, the user interface 710 can display more or less content, and the present application does not limit this.

[0204] The electronic device 100 may detect a user operation (such as a touch / click operation) on the camera application icon 711, and in response to the operation, the electronic device 100 may display Figure 7B The shooting interface 720 shown. The shooting interface 720 can be the user interface of the default shooting mode of the camera application, and the user can preview the image and complete the shooting on this interface. That is, the user can open the shooting interface 720 of the camera application by clicking the camera application icon 711.

[0205] It is understandable that the user operations mentioned in this application may include but are not limited to touch, click, voice control, gestures and other operations, and this application does not limit this.

[0206] like Figure 7B As shown, the shooting interface 720 may include a parameter adjustment area 721, a preview area 722, a camera mode option 723, an album shortcut control 724, a shutter control 725, and a camera flip control 726.

[0207] The preview area 722 may be used to display a preview image. The preview image is an image captured in real time by the camera of the electronic device 100. The electronic device may refresh the display content in the preview area 722 in real time so that the user can preview the image currently captured by the camera.

[0208] One or more shooting mode options may be displayed in the camera mode option 723. These one or more shooting mode options may include: a night scene mode option, a smart portrait mode option, a photo mode option, a video mode option, and more options. It is understood that these one or more shooting mode options may be displayed as text information on the interface, such as "Night Scene", "Smart Portrait", "Photo", "Video", "More", or as icons or other forms of interactive elements (IEs), which are not limited in this application.

[0209] The album shortcut control 724 can be used to open the album application. In response to a user operation (such as a touch / click operation) acting on the album shortcut control 724, the electronic device 100 can open the album application.

[0210] The shutter control 725 can be used to monitor user operations that trigger taking photos. The electronic device 100 can detect user operations on the shutter control 725. In response to the operations, the electronic device 100 can save the preview image in the preview area 722 as a picture in the album application. In addition, the electronic device 100 can also display thumbnails of the saved images in the album shortcut control 724. In other words, the user can trigger taking photos by operating the shutter control 725. It is understood that the shutter control 725 can be a button or other form of control, and this application does not limit this.

[0211] The camera flip control 726 can be used to monitor user operations that trigger camera flipping. The electronic device 100 can detect user operations acting on the camera flip control 726, such as touch operations, and in response to the operations, the electronic device 100 can flip the camera used for shooting, such as switching the rear camera to the front camera, or switching the front camera to the rear camera.

[0212] The shooting interface 400 may also include more or fewer controls, which is not limited in the embodiment of the present application.

[0213] Understandable, Figure 7B The preview area 722 included in the user interface 720 shown may display Image 1. The brightness of Image 1 is Brightness 1. In some embodiments of the present application, Brightness 1 may represent the average brightness of Image 1.

[0214] The electronic device 100 can also display Figure 7CUser interface 730 is shown. The controls included in user interface 730 are basically the same as the controls included in user interface 720. The difference between user interface 730 and user interface 720 is that image 2 is displayed in preview area 722 of user interface 730, while image 1 is displayed in preview area 722 of user interface 720. It should be noted that image 2 and image 1 are two adjacent frames of images obtained by exposure of the sensor of electronic device 100. Among them, the time when the sensor acquires image 1 is earlier than the time when image 2 is acquired. That is to say, when the sensor of electronic device 100 is exposed, image 1 is acquired first, and then image 2 is acquired. In addition, the brightness of image 2 is brightness 2. In some embodiments of the present application, brightness 2 may represent the average brightness of image 2.

[0215] It should be noted that the difference between brightness 1 and brightness 2 is greater than a pre-set threshold. In other words, the brightness difference between image 1 and image 2 is large, which results in flickering.

[0216] 2. Switch the exposure mode to avoid flickering during the subsequent image preview ( Figure 7D to Figure 7E )

[0217] The exposure mode adopted by the electronic device 100 when acquiring image 2 is the dual-sensitivity mode. After acquiring image 2, the electronic device 100 can determine whether a flicker phenomenon occurs based on the average brightness of image 1 and image 2. As mentioned above, the brightness difference between image 1 and image 2 is large, and the electronic device 100 determines that a flicker phenomenon occurs. Next, the electronic device 100 can compare the ambient brightness and the first ambient brightness threshold. The electronic device 100 can determine that the ambient brightness is greater than the first ambient brightness threshold, and switch the exposure mode to the low-sensitivity mode, and acquire image 3, and display it on the screen as shown. Figure 7D On the user interface 740 shown.

[0218] like Figure 7D As shown, image 3 is displayed in preview area 722 of user interface 740. The brightness of image 3 is brightness 3. It can be understood that image 3 and image 2 are two adjacent frames. The brightness difference between image 3 and image 2 is large. In other words, the difference between brightness 2 and brightness 3 is greater than a pre-set threshold.

[0219] It should be noted that the electronic device 100 performs similar steps as above after acquiring image 3. Specifically, the electronic device 100 can determine that a flickering phenomenon has occurred and determine that the ambient brightness is not less than the second ambient threshold. Therefore, the electronic device 100 continues to adopt the low-sensitivity mode for exposure and acquires image 4, which is finally displayed on the screen. Figure 7E On the user interface 750 shown.

[0220] like Figure 7EAs shown, image 4 is displayed in preview area 722 of user interface 750. The brightness of image 4 is brightness 4. It can be understood that image 4 and image 3 are two adjacent frames. The brightness difference between image 4 and image 3 is small. The difference between brightness 4 and brightness 3 is not greater than a pre-set threshold.

[0221] It is understood that after acquiring image 4, the electronic device 100 can determine that no flickering occurs based on the brightness of images 3 and 4. The electronic device 100 can switch the exposure mode to the dual-light-sensing mode to acquire the image and display it on the preview area 722.

[0222] It is understood that the above-mentioned photo preview scene is only an example provided by this application and should not be regarded as a limitation of this application. When the electronic device 100 is in scenes such as video preview, video recording, and time-lapse photography, the flicker phenomenon can be avoided by the above-mentioned method. Of course, the interface display in different scenes may be different. Figures 7A-7E The user interface shown is for reference only and should not be considered as a limitation of this application.

[0223] The following describes an exposure mode switching method provided by this application.

[0224] Please refer to Figure 8 , Figure 8 This is a flow chart of an exposure mode switching method provided in an embodiment of the present application. It can be understood that Figure 8 The steps of the exposure mode switching method shown may include but are not limited to the following steps:

[0225] S801: The electronic device 100 performs exposure in a dual-photosensitive mode to obtain image A.

[0226] It can be understood that in the dual-sensitivity mode, the sensor of the electronic device 100 can use two conversion gains and acquire images separately. That is, the sensor of the electronic device 100 can acquire images exposed in the high-sensitivity mode and images exposed in the low-sensitivity mode respectively. The electronic device 100 can also fuse the images acquired in the above two modes to obtain the final displayed image. In the dual-sensitivity mode, it can also be understood that the electronic device 100 includes sensors with two conversion gains. Among them, the sensor with a larger conversion gain corresponds to the high-sensitivity mode, and the sensor with a smaller conversion gain corresponds to the low-sensitivity mode.

[0227] Specifically, the electronic device 100 can determine the ambient brightness through a light metering system and determine the exposure time and ISO corresponding to the dual-sensitivity mode under the ambient brightness. The electronic device 100 can perform exposure according to the determined exposure time and ISO, and obtain image a1 and image a2. Among them, image a1 is an image obtained by exposure in the high-sensitivity mode under the ambient brightness. Image a2 is an image obtained by exposure in the low-sensitivity mode under the ambient brightness. It is understood that the electronic device 100 can fuse image a1 and image a2 to obtain image A.

[0228] In some embodiments of the present application, electronic device 100 displays image A on the display screen, but does not display image a1 or image a2. It is understood that image A may be a RAW image. A RAW image is the raw data converted from a light source signal captured by a CMOS or CCD image sensor into a digital signal, also known as a raw image file.

[0229] In some embodiments of the present application, the camera of the electronic device 100 may be equipped with a light metering system. It is understood that the light metering system can be used to measure the brightness of light reflected from the subject, i.e., reflective light metering. The light metering system may include a light metering element. The light metering method of the light metering system is generally categorized into two types, external light metering and internal light metering, depending on the placement of the light metering element. In external light metering, the light path of the light metering element and the lens are independent. This light metering method is widely used in head-on lens-shutter cameras and offers sufficient sensitivity and accuracy. Single-lens reflex cameras generally do not use this light metering method. Internal light metering measures light through the lens, i.e., TTL light metering. TTL stands for "Through the Lens," which literally means through the lens. Many single-lens reflex cameras use this light metering method. If the electronic device 100 uses TTL light metering, TTL light metering can be automatically activated upon detecting a user action on the shutter control. At this time, the incident light is refracted by the lens and reflector of the electronic device 100 and enters the built-in light metering sensor, thereby obtaining the ambient brightness.

[0230] It is understood that Table 1 is an example provided in an embodiment of the present application. Table 1 is an exposure table for dual-sensitivity mode and low-sensitivity mode. Lum, ET, and ISO in Table 1 represent ambient brightness, exposure time, and sensitivity, respectively. It is understood that the unit of ambient brightness is lux (Lux, legal symbol 1x). The unit of Lum is Lux. The unit of ET is s. The sensitivity represented by ISO adopts the ISO standard.

[0231] Table 1

[0232]

[0233] It is understood that in the Lum column in Table 1, the range 0 to 10 includes the endpoint 0 but does not include the endpoint 10. Similarly, 10 to 20 includes the endpoint 10 but does not include 200. It is understood that the specific details of the endpoints included in other ranges are similar to those in the above ranges and are not further described here.

[0234] It should be noted that the exposure time and ISO corresponding to the dual-sensitivity mode and the low-sensitivity mode under different ambient brightness can be obtained by exposure calibration by technicians. In some embodiments of the present application, technicians can calibrate the electronic device 100 in the dual-sensitivity mode, and then set the exposure time and ISO corresponding to different ambient brightness in the low-sensitivity mode based on the relationship between the photosensitivity properties of the dual-sensitivity mode and the low-sensitivity mode. Similarly, technicians can also calibrate the electronic device 100 in the low-sensitivity mode, and then set the exposure time and ISO corresponding to different ambient brightness in the dual-sensitivity mode based on the relationship between the photosensitivity properties of the dual-sensitivity mode and the low-sensitivity mode. Of course, technicians can calibrate the electronic device 100 in the dual-sensitivity mode and the low-sensitivity mode.

[0235] For example, technicians calibrate the electronic device 100 before it leaves the factory: when the exposure parameters of the electronic device 100 are 1 / 50s (exposure time) and ISO 100, the ambient brightness that the electronic device 100 can normally expose when using these exposure parameters is L1 lux; when the exposure parameters of the electronic device 100 are 1 / 50s (exposure time) and ISO 200, the ambient brightness that the electronic device 100 can normally expose when using these exposure parameters is L2 lux. The electronic device 100 can record the ambient brightness and corresponding exposure parameters during calibration. It is understandable that an 18-degree gray card can be used when calibrating the electronic device 100.

[0236] It is understood that the relationship between the photosensitivity properties of the dual-light-sensing mode and the low-light-sensing mode mentioned here means that the photosensitivity of the electronic device 100 in the dual-light-sensing mode is four times that of the low-light-sensing mode. In some embodiments of the present application, under the same ambient brightness, the exposure time of the electronic device 100 in the low-light-sensing mode can be four times the exposure time corresponding to the dual-light-sensing mode, and the ISO in the two modes is the same.

[0237] It should be noted that the exposure time and ISO corresponding to the dual-sensitivity mode and low-sensitivity mode under different ambient brightness can be stored in a configuration file, which can be called.

[0238] In addition, the influence of artificial light sources can be considered during calibration. In some embodiments of the present application, artificial light sources of multiple frequencies can be considered during calibration.

[0239] According to the above process, the electronic device can measure the reflected light of the object to determine the ambient light brightness, then query the table to determine the corresponding exposure parameters, and perform exposure in the dual-sensitivity mode according to the exposure parameters to obtain image A.

[0240] In some embodiments of the present application, electronic device 100 may replace overexposed pixels in image a1 with pixels at corresponding locations in image a2. It is understood that the replacement mentioned herein may involve replacing some or all pixel characteristics. Pixel characteristics may include brightness, for example. In other words, electronic device 100 may replace the brightness of the overexposed pixels in image a1 with the brightness of the pixels at corresponding locations in image a2.

[0241] Of course, there are many other specific ways for the electronic device 100 to fuse image a1 and image a2. For example, principal component analysis, differential evolution algorithm, genetic algorithm, particle swarm algorithm, ant colony algorithm, neural network method, wavelet transform method, etc. This application does not limit the specific method for fusing image a1 and image a2.

[0242] In some embodiments of the present application, the electronic device 100 may determine overexposed pixels in the image a1 by calculating the brightness of each pixel. For example, the electronic device 100 may calculate the average brightness of the image a1 and determine that pixels whose brightness difference from the average brightness is greater than a first preset threshold are overexposed pixels.

[0243] It is understood that images a1 and a2 are Raw images. The calculation method of the average brightness of Raw images will not be described in detail here.

[0244] It is understandable that the first preset threshold can be set according to actual needs, and this application does not impose any restrictions on this.

[0245] In some embodiments of the present application, the dual-photosensitive mode is the default exposure mode of the electronic device 100. That is, when the sensor of the electronic device is started, it is exposed in the dual-photosensitive mode by default.

[0246] In some embodiments of the present application, the high-sensitivity mode is the default exposure mode of the electronic device 100. That is, when the sensor of the electronic device is started, it is exposed in the high-sensitivity mode by default.

[0247] S802: The electronic device 100 determines whether there is a flicker phenomenon based on image A and image B. Image B is the previous frame of image A.

[0248] Specifically, the electronic device 100 can determine whether a flicker phenomenon exists based on the brightness of image A and the brightness of image B. If a flicker phenomenon exists, the electronic device 100 continues to execute step S803, otherwise, the electronic device 100 executes step S805. It can be understood that image A and image B are two adjacent frames of images acquired by the electronic device 100, and the acquisition time of image B is earlier than the acquisition time of image A. It can be understood that image B can be a RAW image. In some embodiments of the present application, the electronic device 100 can determine the average brightness of image A and the average brightness of image B respectively, and calculate the difference between the average brightness of image A and image B. If the difference in the average brightness is greater than the second preset threshold value, the electronic device 100 determines that a flicker phenomenon exists. It can be understood that the method for calculating the average brightness of image A and image B can be referred to above and will not be repeated here.

[0249] It is understandable that the second preset threshold can be set according to actual needs, and this application does not impose any restrictions on this.

[0250] In some embodiments of the present application, the electronic device 100 may also use an RGB sensor to determine whether flickering occurs. It is understood that an RGB sensor is a type of color sensor. A color sensor, also known as a color sensor, is generally used to detect color. One measurement mode of an RGB sensor uses the intensity of reflected light from the three primary colors of red, green, and blue to achieve detection. In other words, the RGB sensor can measure the intensity of reflected light in the shooting environment. Based on the intensity of reflected light measured during image capture, the RGB sensor can determine image brightness differences and thus determine whether flickering occurs.

[0251] In some embodiments of the present application, the electronic device 100 may also determine whether flickering occurs based on a larger number of images (more than two frames). It is understood that flickering occurs if N consecutive frames of images acquired by the electronic device 100 exhibit regular changes in brightness and darkness. It is understood that N is an integer greater than 2.

[0252] Several exemplary methods provided in the embodiments of this application are introduced below.

[0253] Method 1:

[0254] The electronic device 100 can acquire N consecutive image frames and calculate the brightness of each of the N frames. The electronic device 100 can also calculate the brightness difference between each two adjacent frames in the N frames. It is understood that the brightness difference between each two adjacent frames mentioned here is the brightness difference between the image with higher brightness and the image with lower brightness. In other words, the brightness difference mentioned here is a non-negative number.

[0255] In addition, the electronic device 100 may also determine the number of images in the N frames whose brightness is greater than a third preset threshold, and record the number as u. The electronic device 100 may also determine whether the images whose brightness is greater than the third preset threshold are all continuous image frames acquired by the electronic device 100.

[0256] If the ratio of the brightness difference between each two adjacent frames of the N frames of images that is greater than the second preset threshold is greater than the first ratio, u is an integer greater than 1, and not all images in the N frames of images with brightness greater than the third preset threshold are continuous image frames, the electronic device 100 can determine that a flicker phenomenon exists.

[0257] For example, the electronic device 100 may calculate the brightness of five consecutively acquired image frames. These five image frames are ordered by acquisition time as follows: Image P1, Image P2, Image P3, Image P4, and Image P5. The average brightness values ​​of Image P1, Image P2, Image P3, Image P4, and Image P5 are 145, 200, 150, 185, and 145, respectively. The electronic device 100 may calculate the brightness difference between each two adjacent image frames in these five image frames. The brightness difference between Image P1 and Image P2 is 55. The brightness difference between Image P2 and Image P3 is 50. The brightness difference between Image P3 and Image P4 is 35. The brightness difference between Image P4 and Image P5 is 40. The electronic device 100 may compare these brightness differences with a second preset threshold of 40. The electronic device 100 may determine that four brightness differences are greater than the second preset threshold, accounting for 90%. This percentage is greater than the first percentage of 75%. Electronic device 100 can also determine that the number of images in these five frames whose brightness is greater than the third preset threshold 150 is two, i.e., u = 2. The images whose brightness is greater than the third preset threshold are images P2 and P4, and these two frames are not consecutive. Based on the above, electronic device 100 can determine that flickering occurs.

[0258] In some embodiments of the present application, similar to method one, the electronic device 100 may further determine the number of images in the N frames of images whose brightness is less than a fourth preset threshold, and record this number as v. If the ratio of the brightness difference between two adjacent frames of images in the N frames of images that is greater than the second preset threshold is greater than the first ratio, v is an integer greater than 1, and not all of the images in the N frames of images whose brightness is less than the fourth preset threshold are consecutive image frames, the electronic device 100 may determine that flickering exists.

[0259] For example, the electronic device 100 may calculate the brightness of five consecutively acquired image frames. These five image frames are ordered by acquisition time as follows: Image P1, Image P2, Image P3, Image P4, and Image P5. The average brightness values ​​of Image P1, Image P2, Image P3, Image P4, and Image P5 are 145, 200, 150, 185, and 145, respectively. The electronic device 100 may calculate the brightness difference between each two adjacent image frames in these five image frames. The brightness difference between Image P1 and Image P2 is 55. The brightness difference between Image P2 and Image P3 is 50. The brightness difference between Image P3 and Image P4 is 35. The brightness difference between Image P4 and Image P5 is 40. The electronic device 100 may compare these brightness differences with a second preset threshold of 40. The electronic device 100 may determine that four brightness differences are greater than the second preset threshold, accounting for 90%. This percentage is greater than the first percentage of 75%. Electronic device 100 can also determine that the number of images in these five frames whose brightness is less than the fourth preset threshold 155 is three, i.e., u = 3. The images whose brightness is less than the fourth preset threshold are images P1, P3, and P5, and these three frames are not all consecutive. Based on the above, electronic device 100 can determine that flickering occurs.

[0260] Method 2:

[0261] The electronic device 100 may acquire N consecutive image frames and calculate the brightness of each of the N frames. The electronic device 100 may filter out images with brightness greater than a third preset threshold from the N frames and calculate the brightness difference between these images and their adjacent image frames. The electronic device 100 may also determine whether these images with brightness greater than the third preset threshold are all consecutive image frames acquired by the electronic device 100.

[0262] If the ratio of the brightness difference between the image with brightness greater than the third preset threshold and its adjacent image frame in the N frames is greater than the second preset threshold is greater than the first ratio, and the images with brightness greater than the third preset threshold in the N frames are not all continuous image frames, the electronic device 100 can determine that a flicker phenomenon exists.

[0263] For example, electronic device 100 may calculate the brightness of five consecutively acquired image frames. These five image frames are ordered by acquisition time as follows: Image P1, Image P2, Image P3, Image P4, and Image P5. The average brightness values ​​of Image P1, Image P2, Image P3, Image P4, and Image P5 are 145, 200, 150, 185, and 145, respectively. Electronic device 100 may determine that among these five image frames, the images whose brightness exceeds a third preset threshold value 150 are Image P2 and Image P4. Image P2 and Image P4 are not consecutive image frames. Image P2's adjacent image frames are Image P1 and Image P3. The brightness difference between Image P2 and Image P1 is 55. The brightness difference between Image P2 and Image P3 is 50. The adjacent image frames of Image P4 are Image P3 and Image P5. The brightness difference between Image P4 and Image P3 is 30. The brightness difference between Image P4 and Image P5 is 40. Among these brightness differences, the brightness differences greater than the second threshold value 40 are 55 and 50. The proportion of these two brightness differences is 50%, which is greater than the first proportion of 40%. Based on the above situation, the electronic device 100 can determine that the flicker phenomenon exists.

[0264] In some embodiments of the present application, similar to method 2, the electronic device 100 may filter out images with brightness less than a fourth preset threshold value from the N frames of images, and calculate the brightness difference between these images and the adjacent image frames of these images. The electronic device 100 may also determine whether these images with brightness less than the fourth preset threshold value are all continuous image frames acquired by the electronic device 100. If the ratio of the brightness difference between the adjacent image frames of the images with brightness less than the fourth preset threshold value and these images in the N frames of images is greater than the first ratio, and not all images in the N frames of images with brightness less than the fourth preset threshold value are continuous image frames, the electronic device 100 may determine that a flicker phenomenon exists.

[0265] For example, the electronic device 100 may calculate the brightness of five consecutively acquired image frames. These five image frames are ordered by acquisition time as follows: Image P1, Image P2, Image P3, Image P4, and Image P5. The average brightness values ​​of Images P1, Image P2, Image P3, Image P4, and Image P5 are 145, 200, 150, 185, and 145, respectively. The electronic device 100 may determine that among these five image frames, the images whose brightness is less than a fourth preset threshold value 155 are Images P1, Image P3, and Image P5. Images P1, Image P3, and Image P5 are not consecutive image frames. Image P1's adjacent image frame is Image P2. The brightness difference between Image P2 and Image P1 is 55. Image P3's adjacent image frames are Images P2 and Image P4. The brightness difference between Image P2 and Image P3 is 50. The brightness difference between Image P4 and Image P3 is 30. Image P5's adjacent image frame is Image P4. The brightness difference between image P4 and image P5 is 40. Among these brightness differences, the brightness differences greater than the second threshold value 40 are 55 and 50. These two brightness differences account for 50%, which is greater than the first proportion of 40%. Based on the above, the electronic device 100 can determine that flickering occurs.

[0266] It is understandable that the third preset threshold and the fourth preset threshold can be set according to actual needs, and this application does not impose any restrictions on this.

[0267] S803: The electronic device 100 determines whether the current ambient brightness is greater than a first ambient brightness threshold.

[0268] It is understandable that the electronic device 100 can determine whether the current ambient brightness is greater than the first ambient threshold. In other words, the above ambient brightness refers to the current ambient brightness.

[0269] In some embodiments of the present application, the electronic device 100 may use the ambient brightness when acquiring image A as the current ambient brightness, and compare the current ambient brightness with the first ambient brightness threshold.

[0270] The ambient light brightness measured by the light metering system is usually the brightness of the light reflected by the object being photographed, which may deviate from the actual ambient light brightness. Therefore, in the embodiment of the present application, the current ambient light brightness can be estimated based on the captured image and exposure parameters.

[0271] In some embodiments of the present application, the electronic device 100 may also estimate the ambient brightness using a lighting value (lv). In this case, the electronic device 100 may temporarily capture a frame of image (or may use an already captured image A), calculate a brightness value based on the image, and then estimate the ambient brightness based on the brightness value.

[0272] The specific calculation formula of lv is:

[0273] Among them, Q represents the aperture value, avg Luma represents the average brightness of the Raw image obtained by the electronic device 100; Exposure Time represents the exposure time when the electronic device 100 obtains the Raw image, and the unit is second (s); ISO represents the sensitivity when the electronic device 100 obtains the Raw image; C is a constant, and the specific value is 100 / 46.

[0274] As you can understand, the aperture value represents the size of the aperture. F-stop (F) = lens focal length / lens effective aperture diameter. Aperture is expressed as an f-number, denoted as f / . The complete aperture value series is as follows: f / 1.0, f / 1.4, f / 2.0, f / 2.8, f / 4.0, f / 5.6, f / 8.0, f / 11, f / 16, f / 22, f / 32, f / 44, and f / 64. The aperture controls the amount of light that enters the lens. For a constant shutter speed, smaller numbers after F indicate a larger aperture, allowing more light in, resulting in a brighter image, a narrower focal plane, and a more blurred background. Larger numbers after F indicate a smaller aperture, allowing less light in, a darker image, a wider focal plane, and sharper backgrounds in the foreground and background.

[0275] In some embodiments of the present application, the electronic device 100 includes an AE system. The AE system can adjust exposure parameters based on the ambient brightness of the shooting environment. After the electronic device 100 acquires image A, the AE system can readjust the exposure parameters and re-determine the ambient brightness.

[0276] However, in some cases, the AE system does not adjust the exposure parameters after acquiring Image A. In this case, it can be assumed that the ambient brightness in the shooting environment has not changed significantly, and the electronic device 100 can use the ambient brightness at the time of acquiring Image A as the current ambient brightness. In this case, the electronic device 100 can use the ambient brightness determined by the light metering sensor before acquiring Image A to compare it with the first ambient brightness threshold. The electronic device 100 can also estimate the ambient brightness at the time of acquiring Image A using the brightness value and compare the estimated ambient brightness with the first ambient brightness threshold. It is understood that the calculation method of the brightness value can be referred to above and will not be further described here. It is understood that the parameters used by the electronic device 100 to estimate the ambient brightness at the time of acquiring Image A using lv may include: the aperture value, ISO value, and exposure time at the time of acquiring Image A, as well as the average brightness of Image A. It should be noted that the ISO value and exposure time at the time of acquiring Image A can be directly read from the sensor (e.g., a CMOS image sensor), or these parameters can be stored in a designated memory address when the electronic device 100 acquires Image A, and the electronic device 100 can access these parameters by accessing the designated memory address.

[0277] Specifically, if flickering occurs, the electronic device 100 may compare the current ambient brightness with a first ambient brightness threshold to determine whether the current ambient brightness is greater than the first ambient brightness threshold. If the current ambient brightness is greater than the first ambient brightness threshold, the electronic device 100 executes step S804; otherwise, the electronic device 100 executes step S805.

[0278] It is understood that the first ambient brightness threshold can be set according to actual needs, and this application does not limit this. For example, the first ambient brightness threshold can be 300 Lux.

[0279] In some embodiments of the present application, the electronic device 100 may determine whether the exposure time corresponding to the high-sensitivity mode under the current shooting environment is less than a time threshold. If the exposure time is less than the first time threshold, the electronic device 100 executes step S804; otherwise, the electronic device 100 executes step S805.

[0280] It is understandable that the time threshold can be determined according to the flickering cycle of the artificial light source in the shooting environment. For example, if the cycle of the artificial light source in the shooting environment is 1 / 100 s, the time threshold is 1 / 100 s.

[0281] S804: The electronic device 100 switches to the low-light-sensitivity mode and acquires image C. Image C is the next frame of image A.

[0282] Specifically, if the current ambient brightness is greater than the first ambient brightness threshold, the electronic device 100 can switch the exposure mode to the low-sensitivity mode and acquire image C in the low-sensitivity mode. It can be understood that image C and image A are two adjacent frames of images obtained by the sensor of the electronic device 100, and the acquisition time of image A is earlier than the acquisition time of image C. In other words, image C is the next frame of image A.

[0283] In some embodiments of the present application, Image C and Image A are not adjacent image frames. Since switching exposure modes and the corresponding processing require a certain amount of time, even though the electronic device 100 can determine that the exposure mode needs to be switched based on Images A and B, the electronic device 100 may not have had time to switch exposure modes when capturing images after Image A. In other words, the several frames after Image A may still have been acquired using the dual-sensing mode.

[0284] S805: The electronic device 100 performs exposure in the dual-photosensitive mode to obtain image C.

[0285] Specifically, if there is no flicker phenomenon, or, in the case of flicker phenomenon, the ambient brightness is not greater than the first ambient brightness threshold, the electronic device 100 can continue to expose in the dual-sensitivity mode and obtain the next frame image of image A, that is, image C.

[0286] It can be understood that image B, image A, and image C may be three consecutive frames of images displayed on the display screen of the electronic device 100 .

[0287] In some embodiments of the present application, regardless of whether the electronic device 100 uses the dual-light-sensing mode for exposure or the low-light-sensing mode for exposure, the electronic device 100 can continuously detect flicker and determine which exposure mode to use based on the flicker and ambient brightness. It is understood that the electronic device 100 can switch the exposure mode using a method similar to steps S802-S804.

[0288] Another exposure mode switching method provided by this application is introduced below.

[0289] Please refer to Figure 9 , Figure 9 This is a flow chart of another exposure mode switching method provided in an embodiment of the present application. It can be understood that Figure 9 The steps of the exposure mode switching method shown may include but are not limited to the following steps:

[0290] S901: The electronic device 100 performs exposure in a low-sensitivity mode to obtain an image D.

[0291] It is understood that the electronic device 100 can determine the ambient brightness and determine the exposure time and ISO corresponding to the low-light-sensitivity mode under the ambient brightness. The electronic device 100 can perform exposure according to the exposure time and ISO and obtain image D.

[0292] It can be understood that the image D can be a RAW image.

[0293] In some embodiments of the present application, the image D and Figure 8 The image C shown may be the same image.

[0294] S902: The electronic device 100 determines whether there is a flicker phenomenon based on image D and image E. Image E is the previous frame of image D.

[0295] Specifically, electronic device 100 can determine whether flickering occurs based on images D and E. If flickering occurs, electronic device 100 proceeds to step S903; otherwise, electronic device 100 proceeds to step S905. It is understood that images D and E are two adjacent frames of images captured by electronic device 100, and that image E was captured earlier than image D. It is understood that image E can be a RAW image.

[0296] It is understandable that the specific method for the electronic device 100 to determine whether the flicker phenomenon exists can be referred to step S802, which will not be repeated here.

[0297] In some embodiments of the present application, the electronic device 100 may also determine whether there is a flicker phenomenon based on a larger number of images (more than two frames). The specific implementation method can refer to step S802 and will not be repeated here.

[0298] S903: The electronic device 100 determines whether the current ambient brightness is less than the second ambient brightness threshold. Specifically, if flickering occurs, the electronic device 100 may compare the current ambient brightness with the second ambient brightness threshold. That is, it is determined whether the ambient brightness is less than the second ambient brightness threshold. If the current ambient brightness is less than the second ambient brightness threshold, the electronic device 100 executes step S905; otherwise, the electronic device 100 executes step S904. It is understood that the description of ambient brightness can be referred to step S803 and will not be repeated here.

[0299] In some embodiments of the present application, the ambient brightness may be the ambient brightness corresponding to the exposure parameters adopted when acquiring image D mentioned in step S901. That is, the electronic device 100 may use the ambient brightness corresponding to the exposure parameters adopted when acquiring image D as the current ambient brightness, and compare it with the second ambient brightness threshold. In this case, the electronic device 100 may take the ambient brightness determined by the light metering sensor before acquiring image D to compare with the second ambient brightness threshold. The electronic device 100 may also estimate the ambient brightness when acquiring image D through lv, and compare the estimated ambient brightness with the second ambient brightness threshold. It is understandable that the calculation method of lv can refer to step S803 and will not be repeated here.

[0300] In some embodiments of the present application, the current ambient brightness may be the ambient brightness re-determined after acquiring the image D. In this case, the electronic device 100 may re-determine the ambient brightness using the light metering sensor after acquiring the image D.

[0301] It is understood that the second ambient brightness threshold can be set according to actual needs, and this application does not limit this. For example, the second ambient brightness threshold can be 250 Lux.

[0302] In some embodiments of the present application, the second ambient brightness threshold is smaller than the first ambient brightness threshold.

[0303] S904: The electronic device 100 performs exposure in a low-sensitivity mode to obtain an image F. Image F is the next frame of image D.

[0304] Specifically, if there is no flicker, or if flicker is present and the ambient brightness is not less than the second ambient brightness threshold, the electronic device 100 may continue to perform exposure in the dual-light-sensing mode and acquire image F. It is understood that image F and image D are two adjacent frames of images obtained by exposure of the sensor of the electronic device 100, and that image D was acquired earlier than image F. In other words, image F is the next frame of image D.

[0305] S905: The electronic device 100 switches to the dual-light-sensing mode and acquires image F.

[0306] Specifically, if the ambient brightness is less than the first ambient threshold, the electronic device 100 can switch the exposure mode to the dual-sensitivity mode and obtain the next frame image of image D, that is, image F, in the dual-sensitivity mode.

[0307] It is understood that this application does not limit the order in which the electronic device 100 executes steps S902 and S903. In some embodiments of this application, the electronic device 100 may determine whether flickering occurs based on image D and image E, and whether the ambient brightness is less than a second ambient brightness threshold. If flickering does not occur or the ambient brightness is less than the second ambient brightness threshold, the electronic device 100 switches to the dual-sensing mode for exposure and acquires image F.

[0308] In some embodiments of the present application, the electronic device 100 may be combined with Figure 8 and Figure 9 The exposure mode is switched using the method shown.

[0309] For example, when the sensor of the electronic device 100 is activated, it defaults to exposure in dual-light-sensing mode. At this time, the electronic device 100 can determine that the ambient brightness is 700 Lux through the light metering sensor. The electronic device 100 can look up the exposure time and ISO corresponding to the dual-light-sensing mode when the ambient brightness is 700 Lux in the exposure table. According to Table 1, the exposure time corresponding to the dual-light-sensing mode is 1 / 400s and the ISO is 100. Based on these exposure parameters, the electronic device 100 can respectively acquire images a1 and a2 using sensors with different conversion gains. That is, image a1 in high-light-sensing mode and image a2 in low-light-sensing mode are acquired. The electronic device 100 can fuse images a1 and a2 to obtain image A. The electronic device 100 can compare the difference in average brightness between image A and the previous frame of image A (i.e., image B), and based on this difference, determine that the brightness difference between images A and B is large, thereby determining the presence of flicker. In addition, the electronic device 100 can acquire the current ambient brightness and compare it with the first ambient brightness threshold. The electronic device 100 determines that the current ambient brightness is greater than the first ambient brightness threshold, switches the exposure mode to the low-sensitivity mode, and acquires image C in the low-sensitivity mode.

[0310] The electronic device 100 can continuously detect flicker. After a period of time, the electronic device 100 determines that there is a significant difference in brightness between image D and the previous frame of image D (i.e., image E), thereby determining that flicker exists. The electronic device 100 can determine that the current ambient brightness is less than a second ambient brightness threshold and switch the exposure mode to the dual-light-sensing mode, acquiring image F in the dual-light-sensing mode.

[0311] It should be noted that the data throughput rate of the electronic device 100 remains unchanged in the dual-sensitivity mode and the low-sensitivity mode, and the byte depth format of the data remains unchanged, so that the ISP can complete the switching without restarting the preview stream and video stream.

[0312] In some embodiments of the present application, the electronic device 100 may use active disturbance rejection control (ADRC) technology to adjust the dynamic range so that the dynamic range before and after the exposure mode switching is as close as possible.

[0313] From the perspective of electronic equipment hardware and software collaboration, Figure 10 The specific implementation of the above embodiment is described.

[0314] like Figure 10As shown in the figure, a camera is used to capture images. When the reflected light from the subject passes through the lens, it is refracted by the lens and converges on the image sensor. The image sensor converts the light signal into an analog electrical signal. This analog electrical signal is bypassed from the sensor front-end (SFE) and then output through a digital-to-analog converter. It can be understood that the output of the digital-to-analog sensor is the original digital image captured by the camera, namely the RAW image.

[0315] The Image Signal Processor (ISP) processes the RAW image from the camera and generates the image to be displayed, which is then sent to the display screen for display. The ISP includes an image processor front-end, an AE system, an image processor back-end, and an I / O control interface.

[0316] Among them, the image processor front end includes a global tone mapping (GTM) module. The image processor back end includes a local tone mapping (LTM) module. The GTM module and the LTM module are used to brighten the dark parts of the image, except that the former acts globally and the latter acts locally. The flicker recognition module is used to identify flicker phenomena. The exposure mode control module is used to switch the exposure mode (for example, dual-sensitivity mode and low-sensitivity mode). The AE system is used to adjust the exposure parameters. The display screen is used to receive the image to be displayed sent by the ISP, and can also monitor various user operations on the display screen through the UI.

[0317] The following is a detailed introduction Figure 8 The illustrated embodiments and Figure 9 Specific implementation of the illustrated embodiment:

[0318] The camera can send the RAW image to the image processor front end in the ISP. The GTM module in the image processor front end can brighten the dark parts of the RAW image and send the processed image to the flicker recognition module. The flicker recognition module can determine whether there is flicker based on the image and the previously received image, and send the judgment result to the exposure mode control module. The exposure mode control module can determine whether to switch the exposure mode based on the relationship between the ambient brightness and the first ambient brightness threshold / the second ambient brightness threshold. In addition, the image processor front end can also send the processed image to the AE system and adjust the exposure parameters through the AEC statistics module and the AEC algorithm module.

[0319] It's important to note that after RAW images are processed in the image processor front-end, they can also be processed in the image processor back-end. For example, the LTM module in the image processor back-end can brighten local dark areas of the image. Another example is the gamma correction module in the image processor back-end, which can process the image brightness to compensate for brightness drops caused by the display.

[0320] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for switching exposure modes, characterized in that: The method is applied to an electronic device, the electronic device including a camera, the camera including an image sensor, the image sensor being a dual conversion gain DCG sensor, the DCG sensor including a first sensor and a second sensor, the conversion gain CG of the first sensor being greater than the CG of the second sensor; the method comprising: In response to the first operation, the electronic device starts a camera application; The image sensor of the electronic device operates in a dual-photosensitive mode. In the dual-photosensitive mode, the electronic device acquires N frames of images through the first sensor and the second sensor based on an exposure meter corresponding to the dual-photosensitive mode; N is an integer not less than 2; If the electronic device determines that flickering exists based on the brightness of the N frames of image and the current ambient brightness is greater than a first threshold, the electronic device controls the image sensor of the camera to switch from the dual-light-sensitivity mode to a low-light-sensitivity mode; in the low-light-sensitivity mode, the electronic device acquires M frames of image through the second sensor based on an exposure table corresponding to the low-light-sensitivity mode; M is an integer not less than 2; and a brightness variation between adjacent frames of image in the M frames of image is less than a brightness variation between adjacent frames of image in the N frames of image; The flickering phenomenon is a phenomenon in which the brightness of adjacent frame images displayed by the electronic device shows light and dark changes; under the same ambient brightness conditions, the exposure time in the exposure table corresponding to the low-sensitivity mode is greater than the exposure time in the exposure table corresponding to the dual-sensitivity mode.

2. The method according to claim 1, wherein In the dual-sensing mode, the electronic device acquires N frames of images through the first sensor and the second sensor based on an exposure table corresponding to the dual-sensing mode, specifically including: The electronic device determines first exposure parameters using an exposure table corresponding to the dual-sensitivity mode, acquires a first image using the first sensor and a second image using the second sensor based on the first exposure parameters, and obtains a third image based on the first image and the second image; the first exposure parameters include a first exposure time and a first sensitivity; the third image is a high dynamic range (HDR) image; and the third image is one of the N frames of images; The electronic device acquires M frames of images through the second sensor based on the exposure table corresponding to the low-sensitivity mode, specifically including: The electronic device determines second exposure parameters according to an exposure table corresponding to the low-sensitivity mode, and acquires the M frames of images through the second sensor according to the second exposure parameters; the second exposure parameters include a second exposure time and a second sensitivity.

3. The method according to claim 2, characterized in that The image sensor of the electronic device operates in a dual-photosensing mode, specifically including: After the electronic device turns on the camera application, in response to the second operation, the electronic device displays a video preview interface, and the image sensor of the electronic device operates in the dual-sensitivity mode by default; the video preview interface is a preview interface before turning on the video or a preview interface after turning on the video.

4. The method according to claim 1, wherein The brightness difference between every two frames of the M frames of image is less than a second threshold.

5. The method according to any one of claims 2 to 4, characterized in that After acquiring M frames of images in the low-sensitivity mode, the method further includes: If the electronic device determines that the flickering phenomenon does not exist based on the brightness of the P frame image, or the current ambient brightness is less than the third threshold, the electronic device controls the image sensor to switch from the low-sensitivity mode to the dual-sensitivity mode; the P frame image includes part or all of the image in the M frame image.

6. The method according to claim 5, wherein After the electronic device controls the image sensor to switch from the low-sensitivity mode to the dual-sensitivity mode, the method further includes: the electronic device determines a third exposure parameter through an exposure table corresponding to the dual-sensitivity mode, and acquires images through the first sensor and the second sensor respectively according to the third exposure parameter, and obtains a preview image based on the images acquired through the first sensor and the second sensor; the third exposure parameter includes a third exposure time and a third sensitivity.

7. The method according to any one of claims 1 to 4 and 6, characterized in that After the electronic device acquires N frames of images in the dual-light-sensing mode, the method further includes: The electronic device determines the brightness difference between every two adjacent frames of the N frames of image to obtain a first brightness difference set; The electronic device determines, in the N frames of images, the number of images with brightness greater than a fourth threshold; The electronic device determines whether images with brightness greater than a fourth threshold value among the N frames of images are continuous image frames; The electronic device determines the presence of a flicker phenomenon based on the brightness of the N frames of images, specifically including: the proportion of elements in the first brightness difference set that are greater than the fifth threshold is greater than the first proportion, the number of images in the N frames of images that have brightness greater than the fourth threshold is greater than 1, and not all images in the N frames of images that have brightness greater than the fourth threshold are continuous image frames.

8. The method according to any one of claims 1 to 4 and 6, characterized in that After the electronic device acquires N frames of images in the dual-light-sensing mode, the method further includes: The electronic device selects images having brightness greater than a fourth threshold from the N frames of images to obtain a first image set; The electronic device determines, by the user, a brightness difference between an image in the first image set and an adjacent image, to obtain a second brightness difference set; The electronic device determines whether images with brightness greater than a fourth threshold value among the N frames of images are continuous image frames; The electronic device determines the presence of a flicker phenomenon based on the brightness of the N frames of image, specifically including: the proportion of elements in the second brightness difference set that are greater than the fifth threshold is greater than the first proportion, the number of images in the N frames of image with brightness greater than the fourth threshold is greater than 1, and not all images in the N frames of image with brightness greater than the fourth threshold are continuous image frames.

9. The method according to any one of claims 1 to 4 and 6, characterized in that The electronic device determines, according to the brightness of the N frames of image, that a flicker phenomenon exists, specifically comprising: The electronic device analyzes brightness changes of the N frames of images based on an RGB sensor, and determines the presence of the flicker phenomenon based on the analysis result; the analysis result is used to indicate that the brightness of the N frames of images presents regular light and dark changes.

10. An electronic device comprising a display screen, a camera, a memory, and one or more processors, characterized in that: The one or more processors are coupled to the camera and the memory, and the memory is used to store computer program code; the processor is used to call the computer program code so that the electronic device executes the method according to any one of claims 1 to 9.

11. A computer-readable storage medium, characterized in that include: Computer instructions; when the computer instructions are executed on an electronic device, the electronic device executes the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Method and system for elimination scintillation, and mobile terminal

    CN105007429A

  • Photographing method, electronic equipment and storage medium

    CN112738414A