Video shooting method and electronic device

The dual conversion gain sensor automatically switches the photosensitive mode in the camera, solving the problem of insufficient dynamic range, achieving effective imaging of video frames, and improving the shooting effect.

CN117692783BActive Publication Date: 2024-08-30HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310601145.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-25
Publication Date
2024-08-30
Estimated Expiration
2043-05-25

AI Technical Summary

Technical Problem

When existing cameras shoot videos, insufficient dynamic range causes high dynamic range (HDR) problems, and they cannot effectively capture the shadow and bright area content in the video frame.

Method used

It uses dual conversion gain sensors, including low conversion gain and high conversion gain sensors, to automatically switch the photosensitive mode according to the ambient brightness, and improves the dynamic range by synthesizing multiple frames of images output by the image sensor to solve the problems of noise layering and overexposure.

Benefits of technology

It improves the dynamic range of electronic equipment during video shooting, ensures the imaging effect of video frames, avoids noise layering in low-brightness scenes and overexposure of high-brightness scenes, and improves the video shooting effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117692783B
    Figure CN117692783B
Patent Text Reader

Abstract

The present application provides a video shooting method and an electronic device. The electronic device can switch different working modes of the image sensor based on different ambient brightness. For example, when the ambient brightness is less than a first illuminance value, the electronic device controls the image sensor to work in a low-brightness high-dynamic mode. When the ambient brightness is between a first illuminance value and a second illuminance value, the electronic device controls the image sensor to work in a medium-brightness high-dynamic mode. When the ambient brightness is greater than or equal to the second illuminance value, the electronic device controls the image sensor to work in a high-brightness high-dynamic mode. Through this method, on the one hand, the dynamic range of the electronic device during video shooting can be improved. On the other hand, the video shooting effect can be improved through different working modes of the image sensor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing, and in particular to a video shooting method and electronic equipment. Background Art

[0002] The dynamic range of a camera sensor is the ability of the sensor to simultaneously reflect the highlights and shadows in an image. The dynamic range of a camera sensor is limited. When the dynamic range of the video scene is greater than the dynamic range of the sensor, a high dynamic range (HDR) problem will occur, that is, the shadow area and bright area of ​​the image in the video frame cannot be recognized. How to solve the HDR problem that occurs when electronic devices shoot videos requires further research. Summary of the invention

[0003] The embodiments of the present application provide a video shooting method and an electronic device, which improve the dynamic range of the electronic device during video shooting and improve the video shooting effect.

[0004] In a first aspect, the present application provides a video shooting method, wherein an electronic device includes a camera module, the camera module includes an image sensor and a dual conversion gain sensor, the dual conversion gain sensor includes a first sensor and a second sensor, the conversion gain of the first sensor is less than the conversion gain of the second sensor, and the method includes: the electronic device displays a shooting interface, the shooting interface is used to display an image shot by the camera; when the ambient brightness is less than a first illuminance value, the electronic device processes a first original image output by the image sensor into a first image according to a first sensitivity through the second sensor, and processes the first original image into a second image according to a second sensitivity through the second sensor, and the first sensitivity is less than the second sensitivity; the electronic device synthesizes the first image and the second image into a third image, and displays the third image on the shooting interface; when the ambient brightness is between the first illuminance value and the second illuminance value, the electronic device processes the second original image output by the image sensor into a fourth image according to a third sensitivity through the first sensor, and processes the second original image into a fifth image according to a fourth sensitivity through the second sensor, the third sensitivity is less than the fourth sensitivity, and the fourth sensitivity is less than the second sensitivity; the electronic device synthesizes the fourth image and the fifth image into a sixth image, and displays the sixth image on the shooting interface.

[0005] The dual conversion gain sensor may be located inside the image sensor, or may be independent of the image sensor.

[0006] The first sensor may be referred to as a low conversion gain sensor and the second sensor may be referred to as a high conversion gain sensor.

[0007] Among them, the shooting interface can be a photo shooting preview interface, a video shooting preview interface, or a video shooting interface.

[0008] The first illumination value and the second illumination value may be a specific value or may refer to a range.

[0009] Through this method, on the one hand, the dynamic range of the electronic device during video shooting can be improved. On the other hand, the electronic device can automatically switch different shooting modes based on the ambient brightness. Specifically, in low-brightness scenes, the signal-to-noise ratio of the first sensor is low, and the signal-to-noise ratio of the second sensor is relatively high. The second sensor is used to output two frames of images to synthesize a video frame, and there will be no noise stratification problem, and the imaging effect of the video frame is also good. In medium-brightness scenes, the signal-to-noise ratio of the first sensor is comparable to that of the second sensor, and the signal-to-noise ratio of the first sensor and the signal-to-noise ratio of the second sensor are also relatively high. The first sensor and the second sensor output two frames of images to synthesize a video frame, and the imaging effect of the video frame is also relatively good.

[0010] In combination with the first aspect, in a possible implementation, the method also includes: when the ambient brightness is greater than or equal to the second illuminance value, the electronic device controls the image sensor to output the third original image with the first exposure time, and controls the image sensor to output the fourth original image with the second exposure time; the electronic device processes the third original image into a seventh image according to the third sensitivity through the first sensor, and processes the third original image into an eighth image according to the fourth sensitivity through the second sensor; the electronic device processes the fourth original image into a ninth image based on a merging method; the electronic device synthesizes the seventh image, the eighth image and the ninth image into a tenth image, and displays the tenth image on the shooting interface.

[0011] In this way, in a bright scene, a long exposure frame image (the seventh image and the eighth image) and a short exposure frame image (the ninth image) are output, and the seventh image, the eighth image and the ninth image are fused to obtain a frame image, namely the tenth image. This can solve the problem of overexposed images in bright scenes when the full well capacity of a single pixel overflows. The overexposed image can be restored through the tenth image.

[0012] In combination with the first aspect, in a possible implementation, the shooting interface also includes a recording end button; the method also includes: the electronic device receives a first operation of the user on the recording end button; in response to the first operation, the electronic device saves a first video, the first video includes the third image and the sixth image, or the first video includes the third image, the sixth image and the tenth image.

[0013] In this way, the method can be applied to video shooting scenes, and videos can be shot based on the method.

[0014] In combination with the first aspect, in a possible implementation, the shooting interface further includes a video recording start button.

[0015] In this way, the method can be applied to video shooting preview scenarios. In the video shooting preview interface, the electronic device first works in the ground dynamic mode. When it is determined that the dynamic range of the environment is greater than the dynamic range of the image sensor, the electronic device can switch to a high dynamic mode, such as a low-brightness high dynamic mode or a medium-brightness high dynamic mode or a high-brightness high dynamic mode. Then, after the electronic device enters the video shooting interface, the electronic device can directly shoot and save the video in a low-brightness high dynamic mode, a medium-brightness high dynamic mode, or a high-brightness high dynamic mode.

[0016] In combination with the first aspect, in a possible implementation manner, the method further includes: when the ambient brightness is between the first illuminance value and the second illuminance value, the brighter the ambient brightness is, the smaller the sensitivity of the first sensor and the sensitivity of the second sensor are.

[0017] In this way, in a low-light scene, as the environment becomes brighter, the sensitivity of the second sensor for obtaining the first image and the sensitivity of the second sensor for obtaining the second image can be gradually reduced. As the environment becomes darker, the sensitivity of the second sensor for obtaining the first image and the sensitivity of the second sensor for obtaining the second image can be gradually increased. In this way, the video frames captured by the electronic device also gradually become brighter or darker, which can improve the video shooting effect.

[0018] In combination with the first aspect, in a possible implementation manner, the method further includes: when the ambient brightness is between the first illuminance value and the second illuminance value, the brighter the ambient brightness is, the smaller the sensitivity of the first sensor and the sensitivity of the second sensor are.

[0019] In this way, in a medium-bright scene, as the environment becomes brighter, the sensitivity of the first sensor and the sensitivity of the second sensor can be gradually reduced. As the environment becomes darker, the sensitivity of the first sensor and the sensitivity of the second sensor can be gradually increased. In this way, the video frames captured by the electronic device also gradually become brighter or darker, which can improve the video shooting effect.

[0020] In combination with the first aspect, in a possible implementation manner, exposure durations of the first sensor and the second sensor are both the first exposure duration.

[0021] In this way, during the mode switching process, the exposure time of the first sensor and the second sensor remains unchanged, and only the sensitivity is changed, thereby avoiding flickering between two adjacent video frames and affecting the visual effect.

[0022] In combination with the first aspect, in a possible implementation manner, a ratio between a sensitivity of the second sensor for obtaining the first image and a sensitivity of the second sensor for obtaining the second image remains unchanged.

[0023] In this way, in a low-light scene, as the ambient brightness becomes brighter or darker, the sensitivity of the second sensor that obtains the first image and the sensitivity of the second sensor that obtains the second image increase or decrease proportionally, avoiding differences in dynamic range.

[0024] In combination with the first aspect, in a possible implementation manner, the ratio between the sensitivity of the first sensor and the sensitivity of the second sensor remains unchanged.

[0025] In this way, in a medium-brightness scene, as the ambient brightness becomes brighter or darker, the sensitivity of the first sensor and the second sensor increases or decreases proportionally, thereby avoiding differences in dynamic range.

[0026] In combination with the first aspect, in a possible implementation, it also includes: when the ambient brightness is greater than or equal to the second illumination value, the brighter the ambient brightness is, the longer the first exposure time remains unchanged and the shorter the second exposure time is.

[0027] In this way, in a bright scene, as the environment becomes brighter, the exposure time for obtaining the ninth image can be gradually reduced. As the environment becomes darker, the exposure time for obtaining the ninth image can be gradually increased. In this way, the video frames captured by the electronic device also gradually become brighter or darker, which can improve the video shooting effect.

[0028] In combination with the first aspect, in a possible implementation manner, the method further includes: when the ambient brightness is equal to the second illumination value, the first exposure duration is equal to the second exposure duration.

[0029] In combination with the first aspect, in a possible implementation, the method includes: the electronic device adjusts the sensitivity of the first sensor by adjusting the analog gain and / or digital gain of the first sensor; the electronic device adjusts the sensitivity of the second sensor by adjusting the analog gain and / or digital gain of the second sensor.

[0030] In combination with the first aspect, in a possible implementation, the first sensor also includes a first capacitor, and the electronic device adjusts the sensitivity of the first sensor by adjusting the analog gain and / or digital gain of the first sensor, specifically including: when the first capacitor is a LOFIC capacitor, the electronic device adjusts the sensitivity of the first sensor by adjusting the digital gain of the first sensor; when the first capacitor is not a LOFIC capacitor, the electronic device adjusts the sensitivity of the first sensor by adjusting the analog gain and / or digital gain of the first sensor.

[0031] In a second aspect, an embodiment of the present application provides an electronic device, comprising: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the electronic device to execute a method as in the first aspect or any one of the implementations of the first aspect.

[0032] In a third aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when the computer program product is run on an electronic device, enables the electronic device to execute a method as in the first aspect or any one of the implementations of the first aspect.

[0033] In a fourth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes a method as in the first aspect or any one of the implementations of the first aspect.

[0034] For the description of the beneficial effects in the second to fourth aspects, we can refer to the description of the beneficial effects in the first aspect, and this application will not repeat them here. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1A-1E A set of UI diagrams provided for this application;

[0036] Figure 2 A schematic diagram of the imaging principle of a DCG image provided in this application;

[0037] Figure 3 A schematic diagram of the dynamic range of a DCG image provided in this application;

[0038] Figure 4 The signal-to-noise ratio of an image obtained by an LCG channel and an HCG channel provided in this application at different illumination values;

[0039] Figure 5A-5C Another set of UI diagrams provided for this application;

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

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

[0042] Figure 8A-8C A set of schematic diagrams for entering the video preview interface provided by this application;

[0043] Fig.8D A schematic diagram of starting video recording provided by this application;

[0044] Figure 8E-8F A schematic diagram of a group of recorded video frames output based on a low-brightness high-dynamic mode provided in an embodiment of the present application;

[0045] Figure 8G-Figure 8H A schematic diagram of a group of recorded video frames output based on a medium-brightness high dynamic mode provided in an embodiment of the present application;

[0046] Figure 8I A schematic diagram of outputting recorded video frames based on a highlight high dynamic mode provided in an embodiment of the present application;

[0047] Fig. 9 A flowchart of a method for an electronic device 100 to display a preview video frame and a recorded video frame provided in an embodiment of the present application;

[0048] Fig.10 A schematic diagram of an image sensor switching between different working modes provided in an embodiment of the present application;

[0049] Fig.11 A schematic diagram of software and hardware collaboration of an electronic device 100 provided in an embodiment of the present application;

[0050] Fig.12 A flowchart of a video shooting method provided in this application. DETAILED DESCRIPTION

[0051] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. Mentioning "embodiment" in this article means that the specific features, structures or characteristics described in conjunction with the embodiments may be included in at least one embodiment of the present embodiment application. The appearance of this phrase in various positions in the specification is not necessarily the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It can be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0052] The terms "first", "second", "third", etc. in the specification and claims of the present application and the drawings are used to distinguish different objects rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a series of steps or units are included, or optionally, steps or units not listed are included, or optionally, other steps or units inherent to these processes, methods, products or devices are included.

[0053] Only the part relevant to the present application but not all content is shown in the accompanying drawings.Before discussing exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processing or methods described as flow charts.Although flow charts describe various operations (or steps) as sequential processing, many operations therein can be implemented in parallel, concurrently or simultaneously.In addition, the order of various operations can be rearranged.Described processing can be terminated when its operation is completed, but can also have additional steps not included in the accompanying drawings.Described processing can correspond to method, function, procedure, subroutine, subprogram etc.

[0054] As used in this specification, the terms "component", "module", "system", "unit", etc. are used to represent computer-related entities, hardware, firmware, a combination of hardware and software, software, or software in execution. For example, a unit can be, but is not limited to, a process running on a processor, a processor, an object, an executable file, an execution thread, a program, and / or distributed between two or more computers. In addition, these units can be executed from various computer-readable media having various data structures stored thereon. Units can communicate through local and / or remote processes, for example, based on signals having one or more data packets (e.g., data from a second unit interacting with another unit in a local system, a distributed system, and / or a network. For example, the Internet interacts with other systems via signals).

[0055] First, the terms involved in this application are explained.

[0056] (1) Ambient brightness and brightness scene

[0057] Ambient brightness refers to the intensity of light (or illumination) captured by the image sensor after the reflected light of the object is irradiated by light. Based on the difference in light intensity, the ambient brightness can be divided into different brightness scenes, which may include but are not limited to high brightness scenes, medium brightness scenes, and low brightness scenes.

[0058] The image sensor mentioned in the present application may be in the form of a semiconductor chip, including but not limited to a charge coupled device (CCD) and a complementary metal-oxide-semiconductor.

[0059] Exemplarily, different brightness scenes may correspond to different brightness ranges. For example, the brightness range corresponding to the high-brightness scene may be greater than 2000 lux, the brightness range corresponding to the medium-brightness scene may be 2000 lux-200 lux, and the brightness range corresponding to the low-brightness scene may be 200 lux-0 lux.

[0060] It can be understood that the brightness scenes described in the embodiments of the present application may not be limited to the above three; and the brightness ranges corresponding to the three brightness scenes are only used as an example, and the values ​​of the brightness ranges corresponding to different brightness scenes may also be other values, which is not limited in the embodiments of the present application.

[0061] (2) ISO

[0062] In the film era, ISO sensitivity is an internationally unified indicator for measuring the speed of film used in traditional cameras. The sensitivity is determined by the film purchased, and the value is fixed, which is a property of the film itself. Digital cameras and mobile phone cameras use electronic image sensors CCD or COMS to sense the intensity of incident light. In order to unify the measurement unit with the film used in traditional cameras, the concept of ISO sensitivity was introduced. Therefore, the ISO of digital cameras also reflects their speed. The larger the ISO number, the more sensitive it is to light, and the smaller the ISO number, the less sensitive it is to light.

[0063] 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 input into the analog circuit, and the amplified voltage signal is further amplified based on the analog gain (AG) in the analog circuit; (6) The further amplified voltage signal is converted into analog-to-digital; (7) The digital signal is input into the digital circuit, and the digital signal is amplified based on the digital gain (DG) in the digital circuit.

[0064] The amplification factor of the analog voltage signal in step (4) is the conversion gain (CG), and the CG in step (4), the AG in step (5), and the DG in step (7) can be understood as ISO. In some embodiments, CG*AG*DG=ISO. CG is fixed. The size of ISO can be changed by adjusting AG and / or DG.

[0065] Typically, the voltage swing allowed in a pixel is determined when the sensor is designed, and the voltage swing is then fixed.

[0066] (3) Dynamic range (DR)

[0067] Image sensors have a dynamic range, which refers to the ability of an image sensor to perceive the darkest and brightest illumination values ​​in a shooting scene, that is, the ability to reflect the brightness value of an image. In most scenarios, the larger the dynamic range of an image sensor, the wider the range of light intensity that the image sensor can perceive, and the richer the image details in the image captured by the camera. The dynamic range that an image sensor can perceive is limited, and is generally determined by the full well capacity (FWC).

[0068] The full well capacity refers to the total number of electrons that the potential well of a single pixel can accommodate. When photons hit the surface of the image sensor, the absorbed photons are converted into electrons, and these charges are stored in the potential well of the pixel. The maximum capacity of the potential well that can hold charges is the full well capacity, which can also be called the maximum well capacity. When the full well capacity is reached, an overexposed image will be produced. The larger the full well capacity of the image sensor, the more total electrons that the potential well of a single pixel can hold, and the less likely it is to be overexposed.

[0069] After the sensor is designed, the voltage swing is fixed, and ISO can have a significant impact on the full well capacity of the sensor. Specifically, assuming that the voltage swing allowed by the pixel is Vmax, Vmax = CG*ISO*V, where V represents the voltage generated across the potential well. When Vmax and CG are fixed, the larger the ISO, the smaller the analog voltage V allowed to be generated across the potential well, that is, the smaller the number of electrons Q = C*V that the potential well can accommodate, and the smaller the full well capacity. Among them, C represents the capacitance of the potential well, and usually, C is constant.

[0070] 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. The full well capacity of a single pixel can be adjusted by adjusting the ISO.

[0071] In some embodiments, the dynamic range may be obtained based on the darkest illumination value and the brightest illumination value in the captured scene sensed by the image sensor.

[0072] For example, the expression of dynamic range can be: DR = 20log10 (bright / dark); where DR refers to dynamic range, bright can refer to the brightest illumination value perceived by the image sensor, and dark can refer to the darkest illumination value perceived by the image sensor. Through this expression, a corresponding relationship between the dynamic range of the environment and the illumination intensity of the environment can be established.

[0073] (4) High Dynamic Range (HDR)

[0074] A high dynamic range (HDR) scene may refer to a scene where the dynamic range of the sensor is smaller than the dynamic range of the scene being shot, and the image captured cannot accurately present the content of the scene that exceeds the brightness value range of the sensor. For example, when the ambient brightness exceeds the maximum dynamic range value of the image sensor, the captured image lacks bright area content. When the ambient brightness is less than the minimum dynamic range value of the image sensor, the captured image lacks dark area details and the imaging effect is poor.

[0075] Generally, the dynamic range of nature exceeds 100dB, while the dynamic range of high-end sensors can reach 78dB, and the dynamic range of consumer-grade sensors is about 60dB. When shooting, if the dynamic range of the sensor is smaller than the dynamic range of the shooting scene, a dynamic range overflow problem will occur, and the camera imaging will lose dark area details or bright area content.

[0076] For example, the dynamic range of an image sensor is 20dB to 78dB, while the dynamic range of the environment is between 1dB and 100dB. The dynamic range of the environment is greater than the dynamic range of the image sensor, and the captured image lacks dark area details and bright area content, resulting in poor imaging results.

[0077] For example, Figure 1A This is a natural scene image observed by human eyes provided in an embodiment of the present application, and the brightness value range of the scene is 1dB to 100dB. Among them, the brightness value range of the first area 1011 is 1dB to 15dB, and the brightness value range of the second area 1012 is 80 to 100dB.

[0078] The dynamic range of the sensor is 20dB to 78dB. Since the dynamic range of the scene exceeds the dynamic range of the sensor, when the scene is photographed, the captured image cannot accurately present the content of the scene that exceeds the brightness value range of the sensor. Figure 1B Yes Figure 1A The effect picture obtained by taking pictures of natural scenes in Figure 1AThe brightness value range of the first area 1011 is 1dB to 15dB, which belongs to the shadow area, and the brightness value range of the second area 1012 is 80dB to 100dB, which belongs to the bright area. Since the brightness value ranges of these two areas exceed the brightness value range of the sensor, Figure 1B HDR problems occurred in Figure 1B In the image, the first area looks black as a whole, and the objects in the area cannot be distinguished. The second area looks white as a whole, and the blue sky and white clouds cannot be distinguished.

[0079] (5) Dual conversion gain (DCG)

[0080] An image sensor with DCG capability has two potential wells per pixel. The two potential wells correspond to different full well capacities and different conversion gains. A large full well capacity corresponds to low conversion gain (LCG) and low sensitivity, and a small full well capacity corresponds to high conversion gain (HCG) and high sensitivity. In this way, the image sensor can use two potential wells (two sensitivities) and two conversion gains in the same scene to obtain two images in one exposure: an image in high sensitivity mode and an image in low sensitivity mode. The acquisition time of the image in high sensitivity mode and the image in low sensitivity mode are the same, and the exposure time of the image in high sensitivity mode and the image in low sensitivity mode are also the same. Then, the electronic device synthesizes the image in high sensitivity mode and the image in low sensitivity mode into one image to obtain a DCG image. Among them, the image in high sensitivity mode is intended to restore the details in the dark area, and the image in low sensitivity mode is intended to suppress the overexposed area and restore the content in the bright area. In this way, the minimum dynamic range value that the image sensor can perceive can be reduced by HCG, and the maximum dynamic range value that the image sensor can perceive can be increased by LCG, thereby increasing the dynamic range of the image sensor.

[0081] For example, for an ordinary image sensor, the perceptible dynamic range is between 20 dB and 78 dB, while for an image sensor with DCG capability, the perceptible dynamic range can reach between 1 dB and 100 dB.

[0082] For example, if the dynamic range of the environment is between 10dB and 80dB, and the dynamic range of the image sensor with DCG capability is also between 1dB and 100dB, then the image sensor with DCG capability can obtain the dark area details and bright area content of the captured image, and the imaging effect is better.

[0083] When the dynamic range of the image sensor is smaller than the dynamic range of the environment, the dynamic range of the image sensor can be improved through the DCG solution. Specifically, the image in low-sensitivity mode can be output through LCG, and the image in high-sensitivity mode can be output through HCG. The image in low-sensitivity mode can be used to suppress overexposed areas and restore bright area content, and the image in high-sensitivity mode can be used to restore dark area details.

[0084] For example, Figure 1C The image sensor outputs the image in low-sensitivity mode. Figure 1C It can be found that objects in the dark area of ​​the image (eg, the first area 1011 ) are relatively clear, while objects in the bright area of ​​the image cannot be displayed clearly (eg, the blue sky and white clouds in the second area 1012 cannot be distinguished).

[0085] For example, Figure 1D The image in high-sensitivity mode output by the image sensor. Figure 1D It can be found that the content in the dark area of ​​the image cannot be displayed clearly (for example, a black area is displayed in the first area 1011, and the objects in the area cannot be distinguished), while the content can be clearly displayed in the bright area of ​​the image (for example, the blue sky and white clouds in the first area 3012 can be clearly distinguished).

[0086] Will Figure 1C The low-light mode image shown and Figure 1D The image synthesis in the high-sensitivity mode shown in the figure can be obtained Figure 1E The DCG image shown. Figure 1E It can be seen that the contents of the dark light area and the bright light area in the DCG image are clearly displayed (for example, the objects in the first area 1011 and the blue sky and white clouds in the second area 1012 are clearly displayed).

[0087] Figure 2 The imaging principle of DCG image is shown.

[0088] like Figure 2 As shown, binning is an image readout mode. When an electronic device is shooting an image, the light reflected by the target object is collected by the camera so that the reflected light is transmitted to the image sensor. The image sensor includes multiple photosensitive elements, and the charge collected by each photosensitive element is a pixel. The charges induced in adjacent pixels are added together, read out in a one-pixel mode, and a binning operation is performed on the pixel information. Specifically, binning can merge n×n pixels into one pixel. For example, binning can be to combine adjacent 2×2 pixels into one pixel, that is, the pixel information of adjacent 2×2 pixels is presented in the form of one pixel. Exemplary, as Figure 2 As shown in the figure, when the image is a 4×4 pixel, binning can combine adjacent 2×2 pixels into one pixel, so that the image sensor can combine the 4×4 image into a 2×2 image, and use the 2×2 image as the binning image obtained by the image sensor, which is a frame of image. Outputting images through the pixel merging mode can increase the photosensitive area of ​​the pixel to improve the sensitivity of dark areas to light sensing.

[0089] When the image sensor supports DCG capability, the image sensor can output images in a DCG manner to enhance the dynamic range of the image and improve the imaging effect of the image.

[0090] like Figure 2 As shown, after the image sensor synthesizes adjacent n×n pixels into one pixel, before outputting an image based on the synthesized pixels, the image sensor can further use two conversion gains, for example, based on the HCG channel and the LCG channel to obtain output image data under two conversion gains, for example, the synthesized pixels can be input into the LCG channel to synthesize an image in a low-sensitivity mode, and the synthesized pixels can be input into the HCG channel to synthesize an image in a high-sensitivity mode. Specifically, the image sensor outputs an LCG image after the synthesized pixels are subjected to LCG circuit, analog amplification, analog-to-digital conversion, and digital amplification. The image sensor outputs an HCG image after the synthesized pixels are subjected to HCG circuit, analog amplification, analog-to-digital conversion, and digital amplification. The image sensor then fuses the LCG image and the HCG image to obtain a fused DCG image, and outputs the DCG image. It should be noted that the ISO in the LCG channel and the HCG channel are different, and the corresponding LCG image and HCG image have different dynamic ranges.

[0091] like Figure 3 As shown, the dynamic range of the HCG image can be 10dB-50dB, the dynamic range of the LCG image can be 20dB-100dB, and the dynamic range of the synthesized DCG image can be 10dB-100dB. In this way, the dynamic range of the image sensor imaging is improved.

[0092] (6) Signal-to-noise ratio

[0093] An important criterion for measuring the quality of an image is the signal-to-noise ratio (SNR). The SNR of images obtained through the LCG pathway and the HCG pathway have the following characteristics.

[0094] Figure 4 The corresponding signal-to-noise ratios of the images obtained by the LCG and HCG pathways at different illumination values ​​are shown. Figure 4It can be seen that in the low illumination value scene (also called low brightness scene), the signal-to-noise ratio of the HCG image output by the HCG channel is higher and the image is clearer. In the low illumination value scene (also called low brightness scene), the signal-to-noise ratio of the LCG image output by the LCG channel is significantly attenuated and the image is blurred.

[0095] Then, in a low-light scene, if the HCG image and the LCG image are merged to obtain a DCG image, although the dynamic range of the imaging is improved, obvious noise stratification will appear in the fused part of the HCG image and the LCG image.

[0096] For example, Figure 5A Figure 2 shows the LCG image output by the LCG path in a low-light scene. Figure 5A and Figure 1C By comparison, it can be seen that in low-light scenes, the signal-to-noise ratio of the LCG image output by the LCG channel is reduced and the image is blurred.

[0097] Figure 5B The HCG image output by the HCG channel in a low-light scene is shown. Figure 5B It can be seen that in low-light scenes, the HCG image output by the HCG pathway is clearer than the LCG image output by the LCG pathway.

[0098] Will Figure 5A The LCG images shown and Figure 5B By synthesizing the HCG image shown in Figure 5C The DCG image shown. Figure 5C It can be seen that the blue sky and white clouds in the second area 1012 of the DCG image are clearly displayed, because the blue sky and white clouds in the second area 1012 are synthesized from the HCG image. However, the object image in the first area 1011 is synthesized from the LCG image, and the signal-to-noise ratio of the LCG image is quite different from that of the HCG image. Figure 5C The clarity of the object image in the first area 1011 and the images in other areas are inconsistent, and noise stratification occurs.

[0099] Therefore, the HCG image obtained through the HCG pathway is more suitable for application in low-light scenes.

[0100] Based on the above introduction, in the video shooting scene, when the dynamic range of the image sensor is smaller than the dynamic range of the environment, the dynamic range of the image sensor can be improved through the DCG capability, thereby improving the dynamic range of the video frame. However, the DCG solution has the following disadvantages in scenes that are too dark or too bright.

[0101] In low-light scenes (such as night scene mode), the light intensity is weak, and the illuminance value that the image sensor can perceive is also relatively low. If two image frames are output through the LCG path and the HCG path respectively to synthesize the DCG image, the DCG image is used as the video frame obtained in the low-light scene. Figure 4 , Figure 5A and Figure 5C It can be seen from the embodiments that in low-light scenes, the synthesized images of the HCG image output by the HCG path and the LCG image output by the LCG path will have obvious noise stratification, resulting in poor imaging effect.

[0102] In bright scenes (such as outdoor scenes), the light intensity is strong, the image sensor can perceive high illumination values, and the full well capacity of a single pixel is limited. When the environment is too bright, the full well capacity of a single pixel overflows, resulting in an overexposed image. At this time, the imaging effect is not good.

[0103] Therefore, the DCG solution cannot solve the problem of poor imaging in scenes with different brightness.

[0104] Based on this, in order to solve the problem of poor imaging effect in video recording, the present application provides a video shooting method, which can improve the video shooting effect in scenes with different brightness.

[0105] The video recording may include a preview state before the video recording starts and a preview state after the video recording starts.

[0106] Image sensors can monitor ambient brightness and ambient dynamic range in real time.

[0107] When the environment dynamic range is smaller than the dynamic range of the image sensor, the image sensor can operate in a low dynamic mode and output video frames in a binning manner.

[0108] When the environment dynamic range is greater than the dynamic range of the image sensor, the image sensor can be switched from the low dynamic mode to the high dynamic mode. In the high dynamic mode, the dynamic range of the image sensor can be increased so that the dynamic range of the image sensor in the high dynamic mode is greater than the environment dynamic range.

[0109] After the image sensor switches to high dynamic mode, the image sensor can judge the ambient brightness and determine the working mode of the image sensor based on the ambient brightness. The working mode of the image sensor in high dynamic mode is different in different ambient brightness ranges. In this way, the imaging effect of the image sensor in high dynamic mode can be improved to avoid noise separation in low-brightness scenes or overexposed images in high-brightness scenes. For the various working modes of the image sensor in high dynamic mode and how to switch the various working modes of the image sensor in high dynamic mode, please refer to the detailed description below.

[0110] The following embodiments of the present application will take how the image sensor switches the working mode in the preview state after starting the video recording as an example to illustrate.

[0111] Next, the hardware structure of the electronic device 100 is introduced.

[0112] The electronic device 100 may be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) or virtual reality (VR) device, etc. The embodiment of the present application does not impose any special restrictions on the specific type of the electronic device 100.

[0113] See also Figure 6 , Figure 6 1 is a schematic diagram of the hardware structure of an electronic device 100 provided in an embodiment of the present application. 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.

[0114] It is to be understood that the structure illustrated in the embodiment 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 in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0115] 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 processor (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), etc. Different processing units may be independent devices or integrated into one or more processors.

[0116] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

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

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

[0119] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0120] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.

[0121] 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, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0122] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0123] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0124] The internal memory 121 can be used to store computer executable program codes, which include 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 may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0125] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be disposed on the display screen 194 .

[0126] 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 be used for anti-shake shooting. The gyro sensor 180B can also be used for navigation and somatosensory game scenes.

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

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

[0129] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in all directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the terminal device and is applied to applications such as horizontal and vertical screen switching and pedometers.

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

[0131] 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 so as to automatically turn off the screen to save power. The proximity light sensor 180G may also be used for automatic unlocking and locking of the screen in the leather case mode and the pocket mode.

[0132] The ambient light sensor 180L is used to sense the ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.

[0133] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.

[0134] The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy.

[0135] The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be set on the display screen 194, and 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 acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.

[0136] The bone conduction sensor 180M can obtain a vibration signal. In some embodiments, the bone conduction sensor 180M can obtain a vibration signal of a vibrating bone block of a human vocal part.

[0137] In the embodiment of the present application, the software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device 100.

[0138] like Figure 7 As shown, the electronic device may include: an application layer, an application framework, a hardware abstraction layer (HAL) layer and a kernel layer. Among them:

[0139] The application layer can include a series of application packages. Figure 7 As shown in the figure, the application package may include camera application, gallery, calendar, map, music, short message, call and other applications. The application framework layer provides application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions. Figure 7 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.

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

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

[0142] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.

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

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

[0145] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.

[0146] The hardware abstraction layer may include multiple functional modules, such as a perception module, an image processor, etc.

[0147] Among them, the perception module is used to determine the dynamic range and ambient brightness of the environment based on the video frames collected by the image sensor. And the working mode of the image sensor is determined based on the dynamic range and ambient brightness of the environment to achieve dynamic switching of the working mode of the image sensor. For example, if the perception module determines that the dynamic range of the environment is greater than the dynamic range of the image sensor for m consecutive frames, then the perception module can determine that the image sensor needs to be switched to the high dynamic mode. The perception module then determines the working mode of the image sensor in the high dynamic mode based on the perceived ambient brightness. The working mode of the image sensor in the high dynamic mode is different in different ambient brightness ranges.

[0148] The image processor is used to perform pre-processing and post-processing on the video frames to obtain preview video frames and recorded video frames.

[0149] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, etc.

[0150] The camera driver is used to trigger the camera to turn on when receiving a trigger command sent by a camera application located in the application layer.

[0151] The hardware layer mainly includes components in the display screen and camera module, such as the camera, which may include a lens, a lens, and an image sensor. The above components are used to start working under the control of the corresponding driver in the kernel layer. For example, the camera can be turned on and collect images under the control of the camera driver. The image sensor in the camera can also switch the working mode of the image sensor in the camera under the control of the camera driver in the kernel layer.

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

[0153] 1. Enter the video preview interface ( Figure 8A to Figure 8C ).

[0154] Fig. 8AAn exemplary user interface 710 on the electronic device 100 for displaying applications installed on the electronic device 100 is exemplarily shown.

[0155] The user interface 710 displays a page with application icons, which may include multiple application icons (e.g., weather application icon, calendar application icon, photo album application icon, note application icon, email application icon, application store application icon, setting 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. There are multiple application icons (e.g., camera application icon 711, browser application icon, information application icon, dial application icon) below the page indicator. The application icons remain displayed when the page is switched.

[0156] It is understandable that the camera application icon 711 is an icon of a camera application. The camera application icon 711 can be used to trigger the start of the camera application. The camera application is an image shooting application on electronic devices such as smart phones and tablets, and this application does not limit the name of the application.

[0157] It should be noted that Fig. 8A The user interface 710 shown is only an example provided by the present application and should not be regarded as a limitation of the present application. In other words, the user interface 710 can display more or less content, and the present application does not limit this.

[0158] 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 a Figure 8B The shooting interface 720 shown. The shooting interface 720 may be a user interface of the default shooting mode of the camera application, on which the user can preview the image and complete the shooting. That is, the user can open the shooting interface 720 of the camera application by clicking the camera application icon 711.

[0159] It can be understood that the user operations mentioned in this application may include but are not limited to touch, click, voice control, gesture and other operations, and this application does not limit this.

[0160] like Figure 8B As shown, the shooting interface 720 may include a mode bar 721 , a shooting control 722 , a preview window 723 , a review control 724 , a camera flip control 725 , and a quick function area 726 .

[0161] The mode bar 721 may include multiple shooting mode options, such as "night scene", "portrait", "photo", "video recording", etc. Different shooting modes can provide users with shooting services with different effects. Users can select any shooting mode from multiple shooting modes for shooting according to different needs. For example, "photo recording" can be the default shooting mode for taking photos. "Video recording" is used to record videos. The "night scene" mode is suitable for shooting scenes with dim light, such as at night. The "portrait" mode is suitable for shooting scenes where the subject is a person. The electronic device 100 can also provide more shooting modes, such as "large aperture", "movie", "professional", etc., which are not listed one by one here.

[0162] The shooting control 722 is used to trigger taking a photo. The electronic device 100 can detect whether there is a user operation on the shooting control 722, such as a click operation. When the user operation on the shooting control 722 is detected, the electronic device 100 can generate a shooting instruction. The electronic device 100 can obtain the image reported by the camera at the corresponding timestamp according to the shooting instruction, and then save it as a photo.

[0163] The preview window 723 can be used to display the image reported by the camera in real time. In different shooting modes, the electronic device 100 can process the image reported by the camera to improve the display effect of the image. For example, in the "portrait" mode, the electronic device 100 can blur the background in the image reported by the camera to highlight the portrait. Here, the preview window 723 can display the image processed by the image processing algorithm corresponding to the different shooting modes in real time, so that the user can perceive the shooting effects corresponding to the different shooting modes in real time.

[0164] The review control 724 can be used to browse thumbnails of the photos / videos that have been taken. When a user operation acting on the review control 724 is detected, the electronic device 100 can also display the best photo corresponding to the thumbnail.

[0165] The camera flip control 725 can be used to monitor the user operation that triggers the flipping of the camera. The electronic device 100 can detect the user operation acting on the camera flip control 725, such as a touch operation, and in response to the operation, 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.

[0166] The quick function area 726 may include a control 726A for the protagonist recording mode, an AI scene recognition control 726B, a flash control 726C, a color mode control 726D, a setting control 726E, and the like. The control 726A for the protagonist recording mode can be used to trigger the electronic device 100 to identify the protagonist character among multiple characters in the preview screen when it is turned on. The AI ​​scene recognition control 726B can be used to trigger the electronic device 100 to identify the shooting scene in the preview screen when it is turned on, and the current AI scene recognition control 726B is in the off state. The flash control 726C can be used to trigger the electronic device 100 to turn on or off the flash. The color mode control 726D can be used to trigger the electronic device 100 to use a color filter to process the image collected by the camera. The setting control 726E can be used to set the shooting parameters of the electronic device 100 (for example, image size, image storage format, etc.).

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

[0168] The electronic device 100 can detect the user operation on the shooting mode option in the mode bar 721, and change the shooting mode currently used according to the user operation. The user operation is, for example, a left swipe / right swipe operation. For example, when it is detected that the mode bar 721 is dragged and slid to the left (left swipe operation) and the float stops at the "recording" option, the electronic device 100 can switch to the "recording" mode and display the video. Figure 8C The video recording interface 810 is shown. The video recording interface 810 may also be referred to as a video recording preview interface.

[0169] like Figure 8C As shown, after entering the "recording" mode, the electronic device 100 can display a preview video frame in the preview window 723, and the electronic device 100 can switch the preview interface corresponding to the original "photographing" mode to the preview interface corresponding to the "recording" mode. Specifically, the electronic device 100 can switch the original shooting control 722 of the "photographing" mode to the start recording control 812 of the "recording" mode. At the same time, the electronic device 100 can display a timestamp control 811 in the preview window 723. The timestamp control 811 is used to indicate the duration of the recorded video. Before starting to record the video, the time displayed in the timestamp control 811 is 0. After starting to record the video, the time displayed in the timestamp control 811 increases as the length of the recorded video increases.

[0170] Optionally, after the electronic device 100 enters the "recording" mode and displays the recording preview interface, the electronic device 100 may start to determine the environmental dynamic range and determine whether to enter the low dynamic mode or the high dynamic mode.

[0171] 2. If the environment dynamic range is smaller than the image sensor dynamic range, the image sensor operates in a low dynamic mode and outputs a preview video frame based on the low dynamic mode.

[0172] If the environment dynamic range is greater than the image sensor dynamic range, the image sensor operates in a high dynamic mode and outputs a preview video frame based on the high dynamic mode.

[0173] Optionally, after the electronic device 100 enters the "recording" mode and displays the video preview interface, the electronic device 100 can start to determine the dynamic range of the environment. And determine whether to enter the low dynamic mode or the high dynamic mode. In this way, if the dynamic range of the environment is greater than the dynamic range of the image sensor in the electronic device 100, before the electronic device 100 starts shooting the video, the image sensor has entered the high dynamic mode, and the image sensor can output the preview video frame based on the high dynamic mode. After the electronic device 100 starts shooting the video, the image sensor can directly output the recorded video frame based on the high dynamic mode.

[0174] After the electronic device 100 enters the “recording” mode and displays the recording preview interface, the electronic device 100 can determine the size relationship between the environment dynamic range and the image sensor dynamic range based on the preview video frame.

[0175] If the electronic device 100 determines that the dynamic range of the environment is greater than the dynamic range of the image sensor based on n consecutive preview video frames, n is a positive integer greater than or equal to 1, the electronic device 100 can switch the image sensor from the low dynamic mode to the high dynamic mode. Otherwise, the image sensor operates in the low dynamic mode. Optionally, the default operating mode of the image sensor in the electronic device 100 is the low dynamic mode.

[0176] The low dynamic mode may refer to the electronic device 100 generating video frames by binning. In the low dynamic mode, the dynamic range of the image sensor is not changed.

[0177] High dynamic mode can refer to the image sensor improving the dynamic range of the image sensor through dual-sensing mode, or through long exposure and short exposure mode. The working mode of the image sensor in high dynamic mode can be divided into low-brightness high dynamic mode, medium-brightness high dynamic mode and high-brightness high dynamic mode. For a specific explanation of high dynamic mode, please refer to the introduction below.

[0178] Before the image sensor of the electronic device 100 switches to the high dynamic mode, it is also necessary to determine which working mode in the high dynamic mode to switch to. Based on the above introduction, in low-light scenes (such as night scenes), the HCG image output through the HCG path and the LCG image output through the LCG path will have noise stratification in the synthesized image, resulting in poor imaging effect.

[0179] In high-brightness scenes (such as outdoor scenes), the full well capacity of a single pixel is also limited. When the environment is too bright, the full well capacity of a single pixel overflows, resulting in an overexposed image. In this case, the imaging effect is also poor.

[0180] Therefore, the electronic device 100 also needs to determine the ambient brightness and enter different working modes in the high dynamic mode based on the ambient brightness.

[0181] Exemplarily, if the electronic device 100 determines based on the preview video frame that the ambient dynamic range is greater than the dynamic range of the image sensor in the electronic device 100, and the ambient brightness is less than the first illuminance value, the electronic device 100 can control the image sensor to enter a low-brightness high-dynamic mode.

[0182] If the electronic device 100 determines based on the preview video frame that the ambient dynamic range is greater than the dynamic range of the image sensor in the electronic device 100, and the ambient brightness is greater than the first illuminance value and less than the second illuminance value, the electronic device 100 can control the image sensor to enter the medium-brightness high dynamic mode.

[0183] If the electronic device 100 determines based on the preview video frame that the ambient dynamic range is greater than the dynamic range of the image sensor in the electronic device 100 and the ambient brightness is greater than the second illumination value, the electronic device 100 can control the image sensor to enter the high-brightness high-dynamic mode.

[0184] For example, Fig.8D As shown, when the electronic device 100 determines that the dynamic range of the environment is greater than the dynamic range of the image sensor in the electronic device 100 and the ambient brightness is less than the first illumination value, the image sensor can output a preview video frame based on the low-brightness high-dynamic mode and display the preview video frame on Fig.8D In the preview window 723 shown.

[0185] The electronic device 100 may receive a user operation on the start video recording control 812 and start recording a video.

[0186] like Fig.8D As shown, the electronic device 100 may detect a user operation on the start video control 812. In response to the above operation, the electronic device 100 may start recording a video. Fig. 8E The electronic device 100 can switch the original start recording control 812 to an end recording control 814 .

[0187] like Fig. 8E As shown, the video recording interface 810 may further include a control 813. The control 813 may be used to receive a user's shooting operation during the video recording process, capture a photo, and save the photo.

[0188] Optionally, in other embodiments, the electronic device 100 may determine the size relationship between the environmental dynamic range and the image sensor dynamic range based on the recorded video frames after starting to shoot the video, and determine whether to switch the working mode of the image sensor. This application does not limit this.

[0189] (1) When the ambient brightness is less than the first illumination value, the image sensor operates in a low-brightness high-dynamic mode, and outputs a recorded video frame based on the low-brightness high-dynamic mode ( Figure 8E-8F ).

[0190] like Fig. 8E As shown, the image sensor in the electronic device 100 can output the recorded video frame based on the low-brightness high-dynamic mode, and display the recorded video frame on the Fig. 8E In the preview window 723 shown.

[0191] Optionally, if during the process of video recording by the electronic device 100, the ambient brightness becomes brighter or darker due to a change in the shooting position or a change in the natural environment, and the ambient brightness is still less than the first illumination value, the image sensor still works in the low-brightness high-dynamic mode, the electronic device 100 can change the sensitivity of the image sensor so that the brightness of the recorded video frame synthesized by the image sensor gradually brightens or darkens, so as to avoid sudden changes in the brightness of the recorded video frame affecting the user's visual experience.

[0192] For example, when the ambient brightness becomes dim, the electronic device 100 may increase the sensitivity of the image sensor so that the brightness of the recorded video frame synthesized by the image sensor gradually dims.

[0193] For another example, when the ambient brightness becomes brighter, the electronic device 100 may reduce the sensitivity of the image sensor so that the brightness of the recorded video frame synthesized by the image sensor gradually becomes brighter. Fig.8F As shown, when the ambient brightness becomes brighter but is less than the first illumination value, the electronic device 100 may display Fig.8F The recorded video frames are shown. Fig.8F The brightness ratio of the recorded video frame shown Fig. 8E The recorded video frame shown has high brightness.

[0194] As the recording time increases, the time displayed in the timestamp control 811 also gradually increases.

[0195] In some embodiments, if the ambient brightness becomes brighter, causing the ambient brightness to be greater than the first illuminance value but less than the second illuminance value, the electronic device 100 can control the image sensor to enter the medium-brightness high dynamic mode.

[0196] Optionally, the electronic device 100 may control the image sensor to enter the medium brightness high dynamic mode when m consecutive video frames all determine that the ambient brightness is greater than the first illuminance value and less than the second illuminance value. m is a positive integer greater than or equal to 1.

[0197] (2) When the ambient brightness is greater than the first illumination value and less than the second illumination value, the image sensor operates in the medium-brightness high-dynamic mode, and outputs a recorded video frame based on the medium-brightness high-dynamic mode ( Figure 8G-Figure 8H ).

[0198] like Figure 8G As shown, the image sensor in the electronic device 100 can output a recorded video frame based on the medium-brightness high-dynamic mode, and display the recorded video frame on the Figure 8G In the preview window 723 shown.

[0199] Optionally, if during the process of video recording by the electronic device 100, the ambient brightness becomes brighter or darker due to a change in the shooting position or a change in the natural environment, and the ambient brightness is still greater than the first illuminance value and less than the second illuminance value, and the image sensor still operates in the medium-brightness high dynamic mode, the electronic device 100 can change the sensitivity of the image sensor so that the brightness of the recorded video frame synthesized by the image sensor gradually brightens or darkens, so as to avoid sudden changes in the brightness of the recorded video frame affecting the user's visual experience.

[0200] For example, when the ambient brightness becomes dim, if the ambient brightness is less than the first illumination value, the electronic device 100 can switch the working mode of the image sensor to a low-brightness high-dynamic working mode.

[0201] For example, when the ambient brightness becomes darker, but the ambient brightness is greater than the first illuminance value and less than the second illuminance value, the electronic device 100 can increase the sensitivity of the image sensor so that the brightness of the recorded video frame synthesized by the image sensor slowly darkens.

[0202] For another example, when the ambient brightness becomes brighter, but the ambient brightness is greater than the first illuminance value and less than the second illuminance value, the electronic device 100 can reduce the sensitivity of the image sensor so that the brightness of the recorded video frame synthesized by the image sensor gradually becomes brighter. Figure 8H As shown, when the ambient brightness becomes brighter but the ambient brightness is greater than the first illuminance value and less than the second illuminance value, the electronic device 100 may display Figure 8H The recorded video frames are shown. Figure 8H The brightness ratio of the recorded video frame shown Figure 8G The recorded video frame shown has high brightness.

[0203] As the recording time increases, the time displayed in the timestamp control 811 also gradually increases.

[0204] In some embodiments, if the ambient brightness becomes brighter, causing the ambient brightness to be greater than the second illumination value, the electronic device 100 can control the image sensor to enter a high-brightness high-dynamic mode.

[0205] Optionally, when the electronic device 100 determines that the ambient brightness is greater than the second illumination value in m consecutive video frames, the electronic device 100 may control the image sensor to enter the high-brightness high-dynamic mode.

[0206] (3) When the ambient brightness is greater than the second illumination value, the image sensor operates in the high-brightness high-dynamic mode, and outputs a recorded video frame based on the high-brightness high-dynamic mode ( Figure 8I ).

[0207] The highlight high dynamic mode is different from the medium high dynamic mode or the low high dynamic mode. The difference is that the highlight high dynamic mode corresponds to a high brightness environment. In a high brightness environment, the full well capacity of the pixel is also limited and has reached the maximum value, resulting in the potential well of the pixel being unable to carry more charge, resulting in charge overflow, which will cause the image to be over-exposure. In order to restore the over-exposure image, the electronic device 100 can obtain a frame of recorded video frame through short exposure, and restore the over-exposure image through the short exposure recorded video frame.

[0208] like Figure 8I As shown, the image sensor in the electronic device 100 can output the recorded video frame based on the high-brightness high-dynamic mode, and display the recorded video frame on the Figure 8I In the preview window 723 shown.

[0209] Optionally, if during the process of video recording by the electronic device 100, the ambient brightness becomes brighter or darker due to a change in the shooting position or a change in the natural environment. When the ambient brightness is still greater than the second illumination value, and the image sensor still works in the high-brightness high-dynamic mode, the electronic device 100 can change the exposure time of the short exposure frame, so that the brightness of the recorded video frame synthesized by the image sensor gradually brightens or darkens, thereby avoiding sudden changes in the brightness of the recorded video frame affecting the user's visual experience.

[0210] For example, when the ambient brightness becomes dim, if the ambient brightness is less than the second illumination value, the electronic device 100 can switch the working mode of the image sensor to the medium-brightness high-dynamic working mode.

[0211] When the ambient brightness becomes darker, but the ambient brightness is greater than the second illumination value, the electronic device 100 can increase the exposure time of the short exposure frame so that the brightness of the recorded video frame synthesized by the image sensor gradually darkens.

[0212] For another example, when the ambient brightness becomes brighter, but the ambient brightness is greater than the second illuminance value, the electronic device 100 can reduce the exposure time of the short exposure frame so that the brightness of the recorded video frame synthesized by the image sensor gradually brightens.

[0213] As the recording time increases, the time displayed in the timestamp control 811 also gradually increases.

[0214] Optionally, the above embodiment only divides the working modes of the image sensor in the high dynamic mode into three categories, namely, low-brightness high dynamic mode, medium-brightness high dynamic mode and high-brightness high dynamic mode. In other embodiments, it is not limited to these three types of high dynamic working modes, and the working modes of the image sensor in the high dynamic mode can also be divided into more or fewer categories, which is not limited in this application.

[0215] In some embodiments, before switching the image sensor in the electronic device 100 to high dynamic, the electronic device 100 determines that the ambient brightness is greater than the second illumination value. The electronic device 100 may first switch to the medium-brightness high dynamic mode, and then gradually reduce the sensitivity of the image sensor. Afterwards, the image sensor in the electronic device 100 is switched to the high-brightness high dynamic mode. In this way, the brightness of the recorded video frame generated by the electronic device 100 gradually becomes brighter.

[0216] In some embodiments, before switching the image sensor in the electronic device 100 to the high dynamic mode, the electronic device 100 determines that the ambient brightness is greater than the second illumination value. The electronic device 100 may also directly switch the image sensor to the high brightness high dynamic mode.

[0217] From the above Figure 8D-Figure 8E It can be seen from the illustrated embodiment that as the ambient brightness changes, the electronic device 100 can dynamically switch the working mode of the image sensor, which not only improves the dynamic range of the video shot by the electronic device 100, but also the brightness of the recorded video frames in the video can change with the change of the ambient brightness, thereby improving the imaging effect of the recorded video frames.

[0218] Next, combine Fig. 9 , the specific process of how the electronic device 100 displays the preview video frame and the recorded video frame is described in detail. Fig. 9 , Fig. 9 This is a flow chart of a video shooting method provided by an embodiment of the present application. The implementation of this method can be based on the interaction and cooperation between the application layer (such as the camera application) and the hardware abstract layer (HAL) in the electronic device, wherein the application layer mainly involves the CameraUI and image storage modules in the camera application; the HAL layer mainly involves the perception module. Fig. 9As shown, the specific process of the electronic device displaying the preview video frame and the recording video frame is as follows:

[0219] A video preview interface is displayed and a preview video frame is displayed (S901-S915).

[0220] S901. Start the camera application.

[0221] The system desktop can detect the user's operation of opening the camera application, for example, the user clicks the desktop icon of "Camera". Fig. 8A As shown in the embodiment, when the system desktop detects an input operation for the camera application icon 711, the CameraUI module is started. When the camera application is started, the CameraUI module can display the above Figure 8B The camera interface 720 is shown. The camera application is an application program with a camera function in the electronic device 100. The CameraUI module can be responsible for the human-computer interaction of the camera application, such as controlling the display of the camera interface and the interface elements therein, monitoring and responding to user operations occurring in the camera interface.

[0222] S902: The CameraUI module receives a first input operation from a user.

[0223] Exemplarily, the first input may be a user operation on a shooting mode option in the mode bar 721 . For example, the first input may be a user operation of dragging the mode bar 721 to the left and causing the float to stop at the “recording” option.

[0224] S903: In response to the first input operation, the CameraUI module displays a video preview interface.

[0225] In response to the first input operation, the electronic device 100 enters the "recording" mode and displays Figure 8C The video preview interface shown. The CameraUI module can display the preview video frame in the preview window 723.

[0226] S904 : In response to the first input operation, the image sensor outputs a preview video frame based on the low dynamic mode.

[0227] After entering the "recording" mode, the electronic device 100 assumes that the image sensor outputs preview video frames in low dynamic mode. That is, in the low dynamic mode, the dynamic range of the image sensor is not adjusted, and the electronic device 100 generates preview video frames by binning.

[0228] S905. The image sensor sends the preview video frame generated in real time to the perception module.

[0229] S906: The image sensor sends the preview video frame generated in real time to the CameraUI module.

[0230] After generating the preview video frame, the image sensor sends the preview video frame to the perception module and the CameraUI module respectively.

[0231] The perception module can obtain the ambient brightness and ambient dynamic range based on the preview video frame.

[0232] The CameraUI module may display the preview video frame in the preview window 723 .

[0233] S906 may also be executed before S905, and S906 may also be executed simultaneously with S905, which is not limited in this application.

[0234] S907. The CameraUI module displays the preview video frame output in the low dynamic mode in the preview window.

[0235] After receiving the preview video frame sent by the image sensor, the CameraUI module may display the preview video frame output by the image sensor based on the low dynamic mode in the preview window 723 .

[0236] Exemplarily, the preview video frame output by the image sensor based on the low dynamic mode may be Figure 8C The preview video frame is displayed in the preview window 723.

[0237] S905 and S907 may be executed in real time / periodically / irregularly, so that the CameraUI module can refresh the preview video frame displayed in the preview window 723 .

[0238] S908. The perception module obtains the environment dynamic range and environment brightness based on the preview video frame.

[0239] S908 may also be executed before S907, and S908 may also be executed simultaneously with S907, which is not limited in this application.

[0240] S909. The perception module sends the ambient dynamic range and ambient brightness to the image sensor.

[0241] After acquiring the ambient dynamic range and ambient brightness, the perception module sends the ambient dynamic range and ambient brightness to the image sensor.

[0242] Optionally, the perception module may determine the ambient brightness based on a grayscale histogram or an average brightness value of the preview video frame.

[0243] As can be seen from the previous description, different brightness scenes can be divided based on the illuminance value of the ambient brightness. For example, low-brightness scenes, medium-brightness scenes, and high-brightness scenes. Different brightness scenes have different brightness ranges. For example, the illuminance value of a low-dark scene is less than a first illuminance value, the illuminance value of a medium-brightness scene is greater than the first illuminance value and less than a second illuminance value, and the illuminance value of a high-brightness scene is greater than the second illuminance value.

[0244] In a possible implementation, the electronic device 100 stores grayscale histograms corresponding to different brightness scenes. The grayscale histogram is used to represent the brightness distribution of pixels in an image. The brightness can be understood as the brightness of the image in YUV format.

[0245] Each brightness scene may include one or more grayscale histograms. The perception module may obtain the grayscale histogram of the preview video frame based on the preview video frame. The similarity between the grayscale histogram of the preview video frame and the grayscale histograms corresponding to different brightness scenes is calculated respectively. When the similarity is greater than a first threshold, the perception module may determine the current brightness scene. For example, if the perception module calculates that the similarity between the grayscale histogram of the preview video frame and the preset grayscale histogram in the low-brightness scene is greater than a first threshold, the perception module may determine that the current shooting scene is a low-brightness scene and determine the current ambient brightness.

[0246] In other possible implementations, the perception module can count the average illumination value of the pixels in the preview video frame respectively, and determine the ambient brightness based on the average illumination value, and then determine the brightness scene. For example, if the perception module determines that the average illumination value of the pixels in the preview video frame is less than the first illumination value, then the perception module can determine that the current shooting scene is a low-light scene, and the average illumination value of the pixels in the preview video frame is the current ambient brightness.

[0247] Not limited to the above two implementation methods, the perception module can also determine the ambient brightness in other ways, which is not limited in this application.

[0248] S906, S908 and S909 may also be executed in real time / periodically / irregularly, so that the image sensor can dynamically switch between different working modes based on the environmental dynamic range and the environmental brightness.

[0249] Optionally, S906, S908 and S909 may not be performed. The ambient brightness and ambient dynamic range may be determined by another light metering sensor. A light metering sensor may be provided in the camera of the electronic device 100. It is understandable that the light metering sensor may be used to measure the brightness of light reflected by the subject. That is, reflective light metering. The light metering sensor may include a light metering element. The incident light is refracted by the lens and reflector of the electronic device 100 and enters the built-in light metering sensor, and the light metering sensor may obtain the ambient brightness and ambient dynamic range.

[0250] S910: The image sensor needs to confirm whether the environment dynamic range is greater than the dynamic range of the image sensor.

[0251] The dynamic range of the image sensor is set at the factory. After receiving the ambient dynamic range and ambient brightness sent by the perception module, the image sensor can compare the size relationship between the ambient dynamic range and the dynamic range of the image sensor.

[0252] When the environment dynamic range is greater than the dynamic range of the image sensor, S911 is executed and the image sensor is switched to a high dynamic mode.

[0253] like Figure 8C As shown, when the dynamic range of the image sensor is smaller than the dynamic range of the environment, the image details in the preview video frame output by the image sensor based on the low dynamic mode are not clear, for example, Figure 8C The bright areas (such as blue sky and white clouds) and dark area details (objects) in the image are not clear.

[0254] When the environment dynamic range is smaller than the dynamic range of the image sensor, S914 is executed, and the image sensor still operates in the low dynamic mode.

[0255] Optionally, when the image sensor confirms that the dynamic range of the environment is greater than the dynamic range of the image sensor based on n consecutive preview video frames, n is a positive integer greater than or equal to 1, and the image sensor executes S911 again. Otherwise, the image sensor executes S914.

[0256] S911. The image sensor needs to confirm whether the ambient brightness is greater than a first illumination value.

[0257] As can be seen from the above description, in medium-brightness scenes, the signal-to-noise ratio of the HCG image output by the HCG channel and the LCG image output by the LCG channel are both relatively good. However, as the ambient brightness decreases, in low-brightness scenes (such as night scenes), the signal-to-noise ratio of the LCG image output by the LCG channel will be significantly attenuated, and the preview video frame synthesized by the HCG image output by the HCG channel and the LCG image output by the LCG channel will have obvious noise stratification, and the imaging effect is not good.

[0258] As the ambient brightness increases, the full well capacity of a single pixel is also limited in high-brightness scenes (such as outdoor scenes). When the environment is too bright, the full well capacity of a single pixel overflows, resulting in an overexposed image. The preview video frame synthesized by the HCG image output by the HCG channel and the LCG image output by the LCG channel will have an overexposed area, and the imaging effect is not good.

[0259] Then the image sensor can switch to different working modes in high dynamic mode based on different ambient brightness ranges to solve the imaging problems existing in the above-mentioned low-brightness scenes or high-brightness scenes.

[0260] Therefore, before the image sensor determines to enter the high dynamic mode, it needs to obtain the ambient brightness and switch to different high dynamic working modes based on different ambient brightness ranges.

[0261] The reason why the environment dynamic range is greater than the dynamic range of the image sensor may be that the environment is too bright, causing the environment dynamic range to be greater than the dynamic range of the image sensor, or that the environment is too dark, causing the environment dynamic range to be less than the dynamic range of the image sensor. Therefore, the image sensor also needs to confirm whether the environment brightness is greater than the first illumination value.

[0262] When the ambient brightness is less than the first illumination value, it means that the ambient dynamic range is greater than the dynamic range of the image sensor because the ambient brightness is too dark, and the image sensor can be switched to a low brightness and high dynamic working mode, that is, S912 is executed.

[0263] When the ambient brightness is greater than the first illumination value, it means that the ambient dynamic range is greater than the dynamic range of the image sensor because the ambient brightness is too bright, and the image sensor can be switched to the medium brightness high dynamic working mode, that is, S913 is executed.

[0264] Optionally, the ambient brightness is greater than the first illumination value, which may include the two cases that the ambient brightness is greater than the second illumination value and the ambient brightness is greater than the first illumination value and less than the second illumination value. That is, the ambient brightness is greater than the first illumination value, which may include the two cases of a high-brightness scene and a medium-brightness scene.

[0265] If the current brightness scene is a medium-bright scene, the image sensor can first switch to the medium-brightness high-dynamic working mode.

[0266] If the current brightness scene is a high-brightness scene, the image sensor can first switch to the medium-brightness high-dynamic working mode, and then switch to the high-brightness high-dynamic working mode, so that the brightness of the preview video frame displayed by the electronic device 100 is a gradually brightening process.

[0267] If the current brightness scene is a high-brightness scene, the image sensor can also directly switch to the high-brightness and high-dynamic working mode, which is not limited in this application.

[0268] It should be noted that S910 and S911 may also be performed by the perception module. When the perception module determines that the image sensor needs to switch from the low dynamic mode to the low brightness high dynamic mode, the perception module may send a switching notification to the image sensor, and the image sensor switches to the low brightness high dynamic mode after receiving the notification.

[0269] When the perception module determines that the image sensor needs to switch from the low dynamic mode to the medium-brightness high dynamic mode, the perception module can send a switching notification to the image sensor, and the image sensor switches to the medium-brightness high dynamic mode after receiving the switching notification.

[0270] When the perception module determines that the image sensor does not need to switch the working mode, the perception module may not send a notification to the image sensor, and the image sensor continues to work in the low dynamic mode. The perception module may also send a notification to the image sensor, and the image sensor continues to work in the low dynamic mode after receiving the switching notification.

[0271] S912: The image sensor switches from a low-dynamic mode to a low-brightness high-dynamic mode, and outputs a preview video frame based on the low-brightness high-dynamic mode.

[0272] When the environment dynamic range is greater than the dynamic range of the image sensor and the environment brightness is less than the first illumination value, the image sensor can switch to the low-brightness high-dynamic working mode. The image sensor can output a preview video frame based on the low-brightness high-dynamic mode.

[0273] Next, we will introduce how the image sensor switches from low dynamic mode to low-light high dynamic mode.

[0274] In some embodiments, in low-light scenes, the signal-to-noise ratio of the HCG image output by the HCG channel is relatively good, and two frames of HCG images can be output through the HCG channel based on different sensitivities, and the two frames of HCG images are synthesized to obtain a preview video frame in low-light high-dynamic mode.

[0275] In a low-light scene, the two frames of HCG images obtained through the HCG channel can be referred to as a first HCG image and a second HCG image. The sensitivity of the HCG channel for obtaining the first HCG image is different from the sensitivity of the HCG channel for obtaining the second HCG image. For example, the sensitivity of the HCG channel for obtaining the first HCG image is higher than the sensitivity of the HCG channel for obtaining the second HCG image. The first HCG image and the second HCG image are synthesized to obtain a preview video frame. The first HCG image can be used to obtain dark area details in the preview video frame, and the second HCG image can be used to obtain bright area content in the preview video frame.

[0276] In a possible implementation, the operating mode of the image sensor in a low-light scene can be set to an operating mode. In this implementation, in the low-light scene, the sensitivity of the HCG path for obtaining the first HCG image and the sensitivity of the HCG path for obtaining the second HCG image are fixed.

[0277] In other possible implementations, the low-light scene can also be divided into multiple brightness ranges, and the working mode of the image sensor corresponding to each brightness range is different. That is, the working mode of the image sensor in the low-light scene can be set to multiple working modes. In this implementation, in the low-light scene, the sensitivity of the HCG path for obtaining the first HCG image and the sensitivity of the HCG path for obtaining the second HCG image can change with the change of the ambient brightness. In this way, in the low-light scene, as the ambient brightness becomes darker or brighter, the image sensor can also dynamically adjust the sensitivity of the HCG path, so that the brightness of the preview video frame captured by the electronic device 100 in the low-light scene can change with the change of the ambient brightness.

[0278] Optionally, in a low-light scene, as the ambient brightness changes, the sensitivity of the HCG path for obtaining the first HCG image and the sensitivity of the HCG path for obtaining the second HCG image may change by the same amount. For example, when the environment becomes brighter, the sensitivity of the HCG path for obtaining the first HCG image and the sensitivity of the HCG path for obtaining the second HCG image decrease by the same amount. When the environment becomes darker, the sensitivity of the HCG path for obtaining the first HCG image and the sensitivity of the HCG path for obtaining the second HCG image also increase by the same amount. In this way, the ratio of the sensitivity of the HCG path for obtaining the first HCG image and the sensitivity of the HCG path for obtaining the second HCG image is the same, and the dynamic range of the two preview video frames before and after remains unchanged, ensuring that the image content of the two preview video frames before and after will not change suddenly.

[0279] Optionally, in a low-light scene, as the ambient brightness changes, the exposure duration of the HCG path for obtaining the first HCG image and the exposure duration of the HCG path for obtaining the second HCG image remain unchanged and are integer multiples of the artificial light source flicker cycle, where the artificial light source flicker cycle can be the reciprocal of twice the frequency of the AC power connected to the electronic device 100. In this way, AC flicker will not occur, that is, the picture in the preview video frame captured by the electronic device 100 flickers with time.

[0280] As can be seen from the above description, the sensitivity of the image sensor is determined by CG, AG and DG. CG is fixed, and the sensitivity of the image sensor can be adjusted by adjusting the size of AG and / or DG.

[0281] The capacitor used to carry electrons in the image sensor can be divided into LOFIC capacitors and non-LOFIC capacitors. In the case where the capacitor used to carry electrons in the image sensor is a non-LOFIC capacitor, the sensitivity of the image sensor can be adjusted by adjusting the size of AG and / or DG. In the case where the capacitor used to carry electrons in the image sensor is a LOFIC capacitor, the sensitivity of the image sensor can only be adjusted by adjusting the size of DG.

[0282] Preferably, when the capacitor carrying electrons is a non-LOFIC capacitor, the noise caused by adjusting the sensitivity of the image sensor through AG is smaller than the noise caused by adjusting the sensitivity of the image sensor through DG, and the imaging effect is good.

[0283] The following embodiments of the present application will take how to adjust AG to adjust the sensitivity of the image sensor as an example to illustrate. For the specific implementation of adjusting the sensitivity of the image sensor by adjusting DG, please refer to the specific implementation of adjusting AG to adjust the sensitivity of the image sensor, which will not be elaborated in this application.

[0284] Before AG and / or DG are adjusted, the sensitivity of the LCG pathway and the HCG pathway is preset, and the ratio of the sensitivity of the LCG pathway to the sensitivity of the HCG pathway is fixed. Exemplarily, the sensitivity of the LCG pathway may be 100*AG*DG, where the value of CG may be 100. The sensitivity of the HCG pathway may be 400*AG*DG, where the value of CG may be 400, and the sensitivity of the LCG pathway: the sensitivity of the HCG pathway = 1:4.

[0285] It should be noted that, in other embodiments, the initial AG and initial DG of the LCG pathway and the HCG pathway may be different, the initial AG and initial DG of the LCG pathway and the HCG pathway may also be other values, and the CG of the LCG pathway and the HCG pathway may also be other values, and the present application does not limit this.

[0286] Table 1

[0287]

[0288] Table 1 shows the values ​​of shooting parameters in an image sensor in a low-light scene. The shooting parameters include but are not limited to sensitivity and exposure time.

[0289] In Table 1, when the ambient brightness is less than 200 Lux, the electronic device 100 can determine that the current brightness scene is a low-brightness scene, and the image sensor can work in a low-brightness high-dynamic mode. When the image sensor works in a low-brightness high-dynamic mode, the sensitivity of the HCG path of the first HCG image obtained by the image sensor is 400*2AG*DG, and the exposure time is 10ms. The sensitivity of the HCG path of the second HCG image obtained by the image sensor is 400*32AG*DG, and the exposure time is also 10ms.

[0290] For example, when the image sensor determines that it is to switch from the low dynamic mode to the low brightness high dynamic mode, the image sensor can set the exposure time to 10ms, and set the sensitivity in the HCG path to 400*2AG*DG and 400*32AG*DG respectively, to obtain the first HCG image and the second HCG image. The first HCG image and the second HCG image are then synthesized to obtain a preview video frame obtained by the image sensor in the low brightness high dynamic mode.

[0291] In the embodiment shown in Table 1, after the image sensor enters the low-brightness high-dynamic mode, if the ambient brightness becomes darker or brighter, as long as the ambient brightness does not exceed 200 Lux, the image sensor can always obtain the preview video frame according to the shooting parameters shown in Table 1.

[0292] It should be noted that the values ​​of the image sensor shooting parameters in the low-brightness and high-dynamic mode shown in Table 1 can also be other values, and this application does not limit this.

[0293] Table 2

[0294]

[0295]

[0296] Table 2 shows the values ​​of shooting parameters in the image sensor in another low-light scene.

[0297] The embodiment shown in Table 2 divides the low-brightness scene into a plurality of different brightness ranges. The sensitivity of the HCG path for obtaining the first HCG image and the second HCG image in different brightness ranges is different.

[0298] For example, the low-brightness scene can be further divided into four brightness ranges: 200 Lux to 150 Lux brightness range, 150 Lux to 100 Lux brightness range, 100 Lux to 50 Lux brightness range, and 50 Lux to 0 Lux brightness range.

[0299] Not limited to the above four brightness ranges, the low-brightness scene can also be divided into more or fewer brightness ranges, which is not limited in this application.

[0300] When the ambient brightness is within the range of 200 Lux to 150 Lux, the exposure time can be set to 10 ms, and the sensitivity of the HCG channel can be set to 400*AG*DG to obtain the first HCG image. Then, the sensitivity of the HCG channel can be set to 400*AG*DG to obtain the second HCG image.

[0301] When the ambient brightness is within the range of 150 Lux to 100 Lux, the exposure time can be set to 10 ms, and the sensitivity of the HCG channel can be set to 400*2AG*DG to obtain the first HCG image. Then, the sensitivity of the HCG channel can be set to 400*32AG*DG to obtain the second HCG image.

[0302] When the ambient brightness is within the range of 100 Lux to 50 Lux, the exposure time can be set to 10 ms, and the sensitivity of the HCG channel can be set to 400*4AG*DG to obtain the first HCG image. Then, the sensitivity of the HCG channel can be set to 400*64AG*DG to obtain the second HCG image.

[0303] When the ambient brightness is within the range of 50 Lux to 0 Lux, the exposure time can be set to 10 ms, and the sensitivity of the HCG channel can be set to 400*8AG*DG to obtain the first HCG image. Then, the sensitivity of the HCG channel can be set to 400*128AG*DG to obtain the second HCG image.

[0304] Optionally, in a low-light scene, when the ambient brightness becomes darker or brighter, the image sensor adjusts the sensitivity of the HCG path so that the ratio of the sensitivity of the HCG path of the first HCG image to the sensitivity of the second HCG image before and after the adjustment is the same. For example, when the ambient brightness is in the brightness range of 200Lux to 150Lux, the ratio of the sensitivity of the HCG path of the first HCG image to the sensitivity of the second HCG image is 1:16. When the ambient brightness is in the brightness range of 150Lux to 100Lux, the ratio of the sensitivity of the HCG path of the first HCG image to the sensitivity of the second HCG image is also 1:16. When the ambient brightness is in the brightness range of 100Lux to 50Lux, the ratio of the sensitivity of the HCG path of the first HCG image to the sensitivity of the second HCG image is also 1:16. When the ambient brightness is within the brightness range of 50 Lux to 0 Lux, the ratio of the sensitivity of the HCG path of the first HCG image to the sensitivity of the second HCG image is also 1:16.

[0305] Optionally, in a low-light scene, as the ambient brightness changes, the exposure value of the HCG path for obtaining the first HCG image and the exposure time of the HCG path for obtaining the second HCG image are always 10ms, the AC frequency can be 50hz, and the artificial light source flickering period is 1 / 100=10ms.

[0306] Exemplarily, when the image sensor determines that it needs to switch from low dynamic mode to low brightness high dynamic mode. The image sensor needs to determine the shooting parameters of the image sensor based on the ambient brightness. Exemplarily, if the current ambient brightness is 140Lux, the image sensor can determine that the current ambient brightness is within the brightness range of 150Lux to 100Lux, the image sensor can set the exposure time to 10ms, and set the sensitivity in the HCG channel to 400*AG*DG and 400*16AG*DG, respectively, to obtain multiple preview video frames. The image sensor then sets the sensitivity in the HCG channel to 400*2AG*DG and 400*32AG*DG, respectively, to obtain multiple preview video frames. If the ambient brightness continues to be within the brightness range of 150Lux to 100Lux, the image sensor can continue to output preview video frames based on the sensitivities of 400*2AG*DG and 400*32AG*DG.

[0307] In the embodiment shown in Table 2, after the image sensor enters the low-brightness high-dynamic mode, if the ambient brightness becomes darker or brighter, the image sensor can switch different shooting parameters based on the ambient brightness in real time. For example, when the ambient brightness becomes darker, the image sensor can increase the sensitivity, and when the ambient brightness becomes brighter, the image sensor can decrease the sensitivity. This allows the brightness of the preview video frame captured by the image sensor in a low-brightness scene to change with the change of the ambient brightness.

[0308] It should be noted that the values ​​of the image sensor shooting parameters in the low-brightness and high-dynamic mode shown in Table 2 can also be other values, and this application does not limit this.

[0309] In some embodiments, the values ​​of the shooting parameters of the image sensor in the low-light scene may be stored in a configuration file, which may be called.

[0310] S913: The image sensor switches from the low dynamic mode to the medium-brightness high dynamic mode, and outputs a preview video frame based on the medium-brightness high dynamic mode.

[0311] When the environment dynamic range is greater than the dynamic range of the image sensor and the environment brightness is greater than the first illumination value, the image sensor can switch to the medium brightness high dynamic working mode. The image sensor can output a preview video frame based on the medium brightness high dynamic mode.

[0312] Next, we will introduce how the image sensor switches from low dynamic mode to medium-brightness high dynamic mode.

[0313] In a medium-bright scene, the signal-to-noise ratio of the HCG image output by the HCG channel and the LCG image output by the LCG channel are both relatively good, and the imaging effect is also relatively good. Then, the HCG image can be obtained through the HCG channel and the LCG image can be obtained through the LCG channel respectively, and then the HCG image and the LCG image are synthesized to obtain a preview video frame.

[0314] In a possible implementation, the working mode of the image sensor in a medium-brightness scene can be set to one working mode. In this implementation, in a medium-brightness scene, the sensitivity of the HCG path and the sensitivity of the LCG path are fixed.

[0315] In other possible implementations, the medium-bright scene can also be divided into multiple brightness ranges, and the working mode of the image sensor corresponding to each brightness range is different. In other words, the working mode of the image sensor in the low-bright scene can be set to multiple working modes. In this implementation, in the medium-bright scene, the sensitivity of the HCG channel and the sensitivity of the LCG channel can change with the change of the ambient brightness. In this way, in the medium-bright scene, as the ambient brightness becomes darker or brighter, the image sensor can also dynamically adjust the sensitivity of the HCG channel and the LCG channel, so that the brightness of the preview video frame captured by the electronic device 100 in the medium-bright scene can change with the change of the ambient brightness.

[0316] Similar to the principle of adjusting the sensitivity of the image sensor in S912, the present application also takes adjusting the sensitivity of the image sensor through AG as an example for explanation.

[0317] Optionally, in a medium-bright scene, as the ambient brightness changes, the sensitivity of the HCG channel and the sensitivity of the LCG channel can change by the same amount. For example, when the environment becomes brighter, the sensitivity of the HCG channel and the sensitivity of the LCG channel decrease by the same amount. When the environment becomes darker, the sensitivity of the HCG channel and the sensitivity of the LCG channel increase by the same amount. In this way, the ratio of the sensitivity of the HCG channel and the sensitivity of the LCG channel is the same, and the dynamic range of the two preview video frames before and after remains unchanged, ensuring that the image content of the two preview video frames before and after will not change suddenly.

[0318] Optionally, in a medium-bright scene, as the ambient brightness changes, the exposure duration of the HCG channel and the exposure duration of the LCG channel remain unchanged and are integer multiples of the flicker period of the artificial light source, so that AC flicker does not occur.

[0319] Table 3

[0320]

[0321] Table 3 shows the values ​​of shooting parameters in the image sensor in a medium-bright scene. The shooting parameters include but are not limited to sensitivity and exposure time.

[0322] In Table 3, when the ambient brightness is greater than 200 Lux and less than 2000 Lux, the electronic device 100 can determine that the current brightness scene is a medium brightness scene, and the image sensor can work in the medium brightness high dynamic mode. When the image sensor works in the medium brightness high dynamic mode, the sensitivity of the LCG channel of the LCG image is 100*2AG*DG, and the exposure time is 10ms. The sensitivity of the LCG channel of the HCG image is 400*8AG*DG, and the exposure time is also 10ms.

[0323] For example, when the image sensor determines that it is to switch from the low dynamic mode to the medium brightness high dynamic mode, the image sensor can set the exposure time to 10ms, and then set the sensitivity of the LCG channel to 100*2AG*DG and the sensitivity of the HCG channel to 400*8AG*DG to obtain the LCG image and the HCG image. The HCG image and the HCG image are then synthesized to obtain a preview video frame obtained by the image sensor in the medium brightness high dynamic mode.

[0324] In the embodiment shown in Table 3, after the image sensor enters the medium-brightness high dynamic mode, if the ambient brightness becomes darker or brighter, as long as the ambient brightness is greater than 200 Lux and less than 2000 Lux, the image sensor can always obtain the preview video frame according to the shooting parameters shown in Table 3.

[0325] It should be noted that the values ​​of the image sensor shooting parameters in the medium-brightness high dynamic mode shown in Table 3 can also be other values, and this application does not limit this.

[0326] Table 4

[0327]

[0328] Table 4 shows the values ​​of shooting parameters in the image sensor in another medium-brightness scene.

[0329] The embodiment shown in Table 4 divides the medium-bright scene into a plurality of different brightness ranges. The sensitivity of the LCG channel and the HCG channel in different brightness ranges is different.

[0330] For example, the medium-brightness scene can be further divided into four brightness ranges: 2000 Lux to 1400 Lux brightness range, 1400 Lux to 800 Lux brightness range, 800 Lux to 400 Lux brightness range, and 400 Lux to 200 Lux brightness range.

[0331] Not limited to the above four brightness ranges, the medium-brightness scene can also be divided into more or fewer brightness ranges, which is not limited in this application.

[0332] When the ambient brightness is within the range of 2000 Lux to 1400 Lux, the exposure time can be set to 10 ms, and the sensitivity of the LCG channel can be set to 100*AG*DG to obtain an LCG image. The sensitivity of the HCG channel can be set to 400*4AG*DG to obtain an HCG image.

[0333] When the ambient brightness is within the range of 1400 Lux to 800 Lux, the exposure time can be set to 10 ms, the sensitivity of the LCG channel can be set to 100*4AG*DG, and the LCG image can be obtained. The sensitivity of the HCG channel can be set to 400*16AG*DG, and the HCG image can be obtained.

[0334] When the ambient brightness is within the range of 800 Lux to 400 Lux, the exposure time can be set to 10 ms, and the sensitivity of the LCG channel can be set to 100*16AG*DG to obtain an LCG image. The sensitivity of the HCG channel can be set to 400*64AG*DG to obtain an HCG image.

[0335] When the ambient brightness is within the range of 400 Lux to 200 Lux, the exposure time can be set to 10 ms, and the sensitivity of the LCG channel can be set to 100*64AG*DG to obtain an LCG image. The sensitivity of the HCG channel can be set to 400*256AG*DG to obtain an HCG image.

[0336] Optionally, in a medium-bright scene, when the ambient brightness becomes darker or brighter, the image sensor adjusts the sensitivity of the LCG channel and the HCG channel so that the ratio of the sensitivity of the LCG channel to the sensitivity of the HCG channel before and after the adjustment is the same. For example, when the ambient brightness is in the brightness range of 2000Lux to 1400Lux, the ratio of the sensitivity of the LCG channel to the sensitivity of the HCG channel is 1:16. When the ambient brightness is in the brightness range of 1400Lux to 800Lux, the ratio of the sensitivity of the LCG channel to the sensitivity of the HCG channel is also 1:16. When the ambient brightness is in the brightness range of 800Lux to 400Lux, the ratio of the sensitivity of the LCG channel to the sensitivity of the HCG channel is also 1:16. When the ambient brightness is in the brightness range of 400Lux to 200Lux, the ratio of the sensitivity of the LCG channel to the sensitivity of the HCG channel is also 1:16.

[0337] Optionally, in a low-light scene, as the ambient brightness changes, the exposure value of the HCG path for obtaining the first HCG image and the exposure duration of the HCG path for obtaining the second HCG image are always 10 ms.

[0338] Exemplarily, when the image sensor determines that it is to switch from low dynamic mode to medium brightness high dynamic mode. The image sensor needs to determine the value of the image sensor's shooting parameters based on the ambient brightness. Exemplarily, if the current ambient brightness is 1500Lux, the image sensor can determine that the current ambient brightness is within the brightness range of 1400Lux to 800Lux, the image sensor can set the exposure time to 10ms, set the sensitivity of the LCG channel to 100*AG*DG and the sensitivity of the LCG channel to 400*4AG*DG, and obtain multiple preview video frames. Then set the sensitivity of the LCG channel to 100*4AG*DG and the sensitivity of the LCG channel to 400*16AG*DG to obtain multiple preview video frames. If the ambient brightness continues to be within the brightness range of 1400Lux to 800Lux, the image sensor can continue to output preview video frames based on the sensitivities of 100*4AG*DG and 400*16AG*DG.

[0339] In the embodiment shown in Table 4, after the image sensor enters the medium-brightness high dynamic mode, if the ambient brightness becomes darker or brighter, the image sensor can switch different shooting parameters based on the ambient brightness in real time. For example, when the ambient brightness becomes darker, the image sensor can increase the sensitivity, and when the ambient brightness becomes brighter, the image sensor can decrease the sensitivity. This allows the brightness of the preview video frame captured by the image sensor in a medium-brightness scene to change with the change of the ambient brightness.

[0340] It should be noted that the values ​​of the image sensor shooting parameters in the medium-brightness high dynamic mode shown in Table 4 can also be other values, and this application does not limit this.

[0341] In some embodiments, the values ​​of the shooting parameters of the image sensor in the above-mentioned medium-brightness scene may be stored in a configuration file. The configuration file may be called.

[0342] In some embodiments, it can be known from the description in S911 that determining that the environment dynamic range is greater than the first illuminance value may also include a situation where the environment brightness is greater than the second illuminance value, that is, also includes a situation of a highlight scene.

[0343] The image sensor can first be switched from the low dynamic mode to the medium brightness high dynamic mode according to the method in Table 3 or Table 4, and then switched from the medium brightness high dynamic mode to the high brightness high dynamic mode.

[0344] Next, we will introduce how the image sensor switches from medium-brightness high dynamic mode to high-brightness high dynamic mode.

[0345] In a high-brightness scene, in order to maintain the sensitivity and exposure time of the LCG channel and the DCG channel unchanged, it is also necessary to obtain a preview video frame through short exposure, and restore the over-exposure image through the short-exposure preview video frame.

[0346] Table 5

[0347]

[0348]

[0349] Table 5 shows the values ​​of the shooting parameters of the image sensor in a high-brightness scene.

[0350] The embodiment shown in Table 5 divides the highlight scene into three different brightness ranges. The exposure time of the short exposure preview video frame in different brightness ranges is different. If the ambient brightness continues to be within the brightness range of 150Lux to 100Lux, the image sensor can continue to output preview video frames based on the sensitivity of 400*2AG*DG and 400*32AG*DG.

[0351] For example, the high-brightness scene can be further divided into more than three brightness ranges: 2000 Lux to 2600 Lux, 2600 Lux to 3200 Lux, and above 3200 Lux.

[0352] Not limited to the above three brightness ranges, the highlight scene can also be divided into more or fewer brightness ranges, which is not limited in this application.

[0353] When the ambient brightness is within the range of 2000Lux to 2600Lux, first set the exposure time to 10ms and the sensitivity of the LCG channel to 100*AG*DG to obtain an LCG image. Set the sensitivity of the HCG channel to 400*4AG*DG to obtain an HCG image. Then set the exposure time to 10ms to obtain a short-exposure image frame. First, synthesize the LCG image and the HCG image into a long-exposure image frame, and then synthesize the long-exposure image frame and the short-exposure image frame into a preview video frame.

[0354] When the ambient brightness is within the range of 2600Lux to 3200Lux, first set the exposure time to 10ms and the sensitivity of the LCG channel to 100*AG*DG to obtain an LCG image. Set the sensitivity of the HCG channel to 400*4AG*DG to obtain an HCG image. Then set the exposure time to 5ms to obtain a short-exposure image frame. First, synthesize the LCG image and the HCG image into a long-exposure image frame, and then synthesize the long-exposure image frame and the short-exposure image frame into a preview video frame.

[0355] When the ambient brightness is above 3200 Lux, first set the exposure time to 10 ms and the sensitivity of the LCG channel to 100*AG*DG to obtain an LCG image. Set the sensitivity of the HCG channel to 400*4AG*DG to obtain an HCG image. Then set the exposure time to 2.5 ms to obtain a short-exposure image frame. First, synthesize the LCG image and the HCG image into a long-exposure image frame, and then synthesize the long-exposure image frame and the short-exposure image frame into a preview video frame.

[0356] In this way, in a high-brightness scene, as the brightness increases, the exposure time of the short-exposure image frame can be gradually reduced to improve the dynamic range of the preview video frame, so that the bright area content can be restored.

[0357] For example, the dynamic range of the preview video frame synthesized within the brightness range of 2600 Lux to 3200 Lux is greater than that of the preview video frame synthesized within the brightness range of 2000 Lux to 2600 Lux. The dynamic range of the preview video frame synthesized within the brightness range above 3200 Lux is greater than that of the preview video frame synthesized within the brightness range of 2600 Lux to 3200 Lux.

[0358] Exemplarily, when the image sensor determines that it needs to switch from medium-brightness high dynamic mode to medium-brightness high dynamic mode. The image sensor needs to determine the value of the image sensor's shooting parameters based on the ambient brightness. Exemplarily, if the current ambient brightness is 2800Lux, the image sensor can determine that the current ambient brightness is within the brightness range of 2600Lux to 3200Lux. The image sensor can first obtain multiple preview video frames based on the shooting parameters of the image sensor in the brightness range of 2000Lux to 2600Lux. Finally, multiple preview video frames are obtained by shooting the shooting parameters of the image sensor in the brightness range of 2600Lux to 3200Lux. If the ambient brightness continues to be within the brightness range of 2600Lux to 3200Lux, the image sensor can continue to output preview video frames based on the shooting parameters of the image sensor in the brightness range of 2600Lux to 3200Lux.

[0359] In the embodiment shown in Table 5, after the image sensor enters the high-brightness and high-dynamic mode, if the ambient brightness becomes darker or brighter, the image sensor can switch different shooting parameters based on the ambient brightness in real time. For example, when the ambient brightness becomes darker, the image sensor can increase the exposure time of the short-exposure image frame. When the ambient brightness becomes brighter, the image sensor can reduce the exposure time of the short-exposure image frame. This allows the brightness of the preview video frame captured by the image sensor in a high-brightness scene to change with the change of the ambient brightness.

[0360] S914: The image sensor outputs a preview video frame based on the low dynamic mode.

[0361] When the image sensor determines that the dynamic range of the environment is smaller than the dynamic range of the image sensor, the image sensor may operate in a low dynamic mode and output a preview video frame based on the low dynamic mode.

[0362] S915. The CameraUI module displays the preview video frame output in the low-brightness high-dynamic mode in the preview window.

[0363] For example, if the image sensor has switched to the low-brightness high-dynamic mode before starting to shoot the video, the image sensor can obtain a preview video frame based on the shooting parameters shown in Table 1 or Table 2, and send the preview video frame to the CameraUI module. The CameraUI module can display the preview video frame output in the low-brightness high-dynamic mode in the preview window.

[0364] In this way, before starting to record a video, the image sensor has already switched to the high dynamic mode. After starting to record a video, the image sensor can directly record the video based on the high dynamic mode.

[0365] The video recording interface is displayed and video recording starts (S916-S924).

[0366] S916. The CameraUI module receives a second input operation from the user.

[0367] S917 . In response to the second input operation, the image sensor outputs a recorded video frame based on a low-brightness high-dynamic mode.

[0368] The implementation method of the image sensor outputting the recording video frame based on the low-brightness high-dynamic mode is similar to the implementation method of the image sensor outputting the preview video frame based on the low-brightness high-dynamic mode. Please refer to the description in S912, and this application will not repeat it here.

[0369] S918. In response to the second input operation, the CameraUI module displays a video recording interface.

[0370] S919. The CameraUI module displays the recorded video frames output based on the low-brightness high-dynamic mode in the preview window of the video recording interface.

[0371] Exemplarily, the second input operation may be Fig.8D User operation of the start recording control 812 is shown.

[0372] In response to the second input operation, the electronic device 100 starts recording the video and displays Fig. 8E In the video recording interface shown, the CameraUI module can display the recorded video frames output based on the low-brightness high-dynamic mode in the preview window 723.

[0373] S920: The image sensor sends the recorded video frame output based on the low-brightness high-dynamic mode to the image storage module.

[0374] In response to the second operation, the image sensor sends the recorded video frame output based on the low-brightness high-dynamic mode to the image storage module, so that the image storage module can save the recorded video frame output based on the low-brightness high-dynamic mode.

[0375] S921. When the ambient brightness is greater than the first illuminance value and less than the second illuminance value, the image sensor switches from the low-brightness high-dynamic mode to the medium-brightness high-dynamic mode, and outputs a recorded video frame based on the medium-brightness high-dynamic mode.

[0376] Optionally, when the image sensor determines that the ambient brightness is greater than the first illuminance value and less than the second illuminance value for m consecutive video frames, the image sensor may switch from the low-brightness high-dynamic mode to the medium-brightness high-dynamic mode, and output the recorded video frame based on the medium-brightness high-dynamic mode. m is a positive integer greater than or equal to 1.

[0377] The implementation method of the image sensor outputting the recorded video frame based on the medium-brightness high dynamic mode is similar to the implementation method of the image sensor outputting the preview video frame based on the medium-brightness high dynamic mode. Please refer to the description in S913, and this application will not repeat it here.

[0378] S922: The image sensor outputs a recorded video frame based on the medium-brightness high dynamic mode and sends it to the image storage module.

[0379] After the image sensor enters the medium-brightness high dynamic mode, the image sensor can output recorded video frames based on the medium-brightness high dynamic mode, and send the recorded video frames output in the medium-brightness high dynamic mode to the image storage module, so that the image storage module can save the recorded video frames output based on the medium-brightness high dynamic mode.

[0380] S923. When the ambient brightness is greater than the second illumination value, the image sensor switches from the medium-brightness high-dynamic mode to the high-brightness high-dynamic mode, and outputs a recorded video frame based on the high-brightness high-dynamic mode.

[0381] Optionally, when the image sensor determines that the ambient brightness is greater than the second illumination value for m consecutive video frames, the image sensor may switch from the medium brightness high dynamic mode to the high brightness high dynamic mode, and output the recorded video frame based on the high brightness high dynamic mode. m is a positive integer greater than or equal to 1.

[0382] The implementation method of the image sensor outputting the recording video frame based on the highlight high dynamic mode is similar to the implementation method of the image sensor outputting the preview video frame based on the highlight high dynamic mode. Please refer to the description in S913, and this application will not repeat it here.

[0383] S924. The image sensor outputs the recorded video frame based on the high-brightness and high-dynamic mode and sends it to the image storage module.

[0384] After the image sensor enters the high-brightness and high-dynamic mode, the image sensor can output recorded video frames based on the high-brightness and high-dynamic mode, and send the recorded video frames output in the high-brightness and high-dynamic mode to the image storage module, so that the image storage module can save the recorded video frames output based on the high-brightness and high-dynamic mode.

[0385] In some embodiments, after S919-S920, when the image sensor detects that the ambient brightness is greater than the second illumination value, the image sensor may first execute S921-S922 and then execute S923-S924.

[0386] In other embodiments, after S919-S920, when the image sensor detects that the ambient brightness is greater than the second illumination value, the image sensor may not execute S921-S922, but directly execute S923-S924.

[0387] Optionally, S919-S924 are only an example and do not constitute a limitation. The image sensor can switch to different working modes in real time based on the monitored ambient brightness.

[0388] Fig.10 A schematic diagram showing switching of an image sensor between different working modes is shown.

[0389] like Fig.10 As shown, the working modes of the image sensor include but are not limited to low dynamic mode, low brightness high dynamic mode, medium brightness high dynamic mode and high brightness high dynamic mode.

[0390] After the electronic device 100 starts the camera application and enters the "recording" mode, the image sensor works in the low dynamic mode. The image sensor can monitor the environmental dynamic range and environmental brightness in real time to confirm whether the working mode needs to be switched.

[0391] In some embodiments, after the image sensor enters the low dynamic mode, if the image sensor detects that the ambient dynamic range is greater than the image sensor dynamic range and the ambient brightness is greater than the first illuminance value, the image sensor can switch from the low dynamic mode to the medium-brightness high dynamic mode and output video frames based on the medium-brightness high dynamic mode.

[0392] After the image sensor enters the medium-brightness high dynamic mode, the image sensor can also dynamically switch to other working modes based on the ambient brightness.

[0393] Optionally, after the image sensor enters the medium-brightness high-dynamic mode, if the image sensor detects that the dynamic range of the environment is smaller than the dynamic range of the image sensor, the image sensor can switch to the low-dynamic mode and output video frames based on the low-dynamic mode.

[0394] Optionally, after the image sensor enters the medium-brightness high dynamic mode, if the image sensor detects that the ambient dynamic range is greater than the image sensor dynamic range and the ambient brightness is less than the first illuminance value, the image sensor can switch from the medium-brightness high dynamic mode to the low-brightness high dynamic mode and output video frames based on the low-brightness high dynamic mode.

[0395] Optionally, after the image sensor enters the medium-brightness high dynamic mode, if the image sensor detects that the ambient dynamic range is greater than the image sensor dynamic range and the ambient brightness is greater than a second illuminance value, the image sensor can switch from the medium-brightness high dynamic mode to the high-brightness high dynamic mode and output video frames based on the high-brightness high dynamic mode.

[0396] In other embodiments, after the image sensor enters the low dynamic mode, if the image sensor detects that the ambient dynamic range is greater than the image sensor dynamic range and the ambient brightness is less than the first illuminance value, the image sensor can switch from the low dynamic mode to the low-brightness high dynamic mode and output video frames based on the low-brightness high dynamic mode.

[0397] After the image sensor enters the low-brightness high-dynamic mode, the image sensor can also dynamically switch to other working modes based on the ambient brightness.

[0398] Optionally, after the image sensor enters the low-brightness high-dynamic mode, if the image sensor detects that the dynamic range of the environment is smaller than the dynamic range of the image sensor, the image sensor can switch to the low-dynamic mode again and output video frames based on the low-dynamic mode.

[0399] Optionally, after the image sensor enters the low-brightness high-dynamic mode, if the image sensor detects that the ambient dynamic range is greater than the image sensor dynamic range and the ambient brightness is greater than the first illuminance value and less than the second illuminance value, the image sensor can switch from the low-brightness high-dynamic mode to the medium-brightness high-dynamic mode and output video frames based on the medium-brightness high-dynamic mode.

[0400] Optionally, after the image sensor enters the low-brightness high-dynamic mode, if the image sensor detects that the environment dynamic range is greater than the image sensor dynamic range and the environment brightness is greater than the second illumination value, in one possible implementation, the image sensor may first switch from the low-brightness high-dynamic mode to the medium-brightness high-dynamic mode, and then switch from the medium-brightness high-dynamic mode to the high-brightness high-dynamic mode. In other possible implementations, the image sensor may directly switch from the low-brightness high-dynamic mode to the high-brightness high-dynamic mode.

[0401] After the image sensor enters the high-brightness high-dynamic mode, the image sensor can also dynamically switch to other working modes based on the ambient brightness.

[0402] Optionally, if the image sensor detects that the ambient brightness is greater than the first illuminance value and less than the second illuminance value, the image sensor can switch from the high-brightness high-dynamic mode to the medium-brightness high-dynamic mode, and output video frames based on the medium-brightness high-dynamic mode.

[0403] Optionally, if the image sensor detects that the ambient brightness is less than the second illumination value, in one possible implementation, the image sensor may first switch from the high-brightness high-dynamic mode to the medium-brightness high-dynamic mode, and then switch from the medium-brightness high-dynamic mode to the low-brightness high-dynamic mode. In other possible implementations, the image sensor may directly switch from the high-brightness high-dynamic mode to the low-brightness high-dynamic mode.

[0404] End video recording and display the video preview interface, and save the recorded video (S925-S930).

[0405] S925. The CameraUI module receives a third input operation from the user.

[0406] For example, the third input operation may be an input operation (eg, single click) for the end recording control 814. In response to the user's input operation, the electronic device 100 may switch the end recording control 814 to the start recording control 812 and save the recorded video.

[0407] S926. The image storage module stores the multiple recorded video frames, and generates a first video based on the multiple recorded video frames.

[0408] In response to the third input operation, the image storage module saves the multiple recorded video frames and generates a first video based on the multiple recorded video frames. The image storage module can generate the first video based on the time sequence of the multiple recorded video frames, and the first video includes the multiple recorded video frames.

[0409] S927: In response to the third input operation, the CameraUI module displays a video preview interface.

[0410] In response to the third input operation, after stopping the video recording, the CameraUI module may display a video preview interface, and display a preview video frame in a preview window of the video preview interface.

[0411] S928: In response to the third input operation, the image sensor outputs a preview video frame based on the high-brightness and high-dynamic mode.

[0412] Exemplarily, if the image sensor operates in the highlight high dynamic mode before the CameraUI module receives the third input from the user, if the CameraUI module receives the third input from the user, the image sensor will output a preview video frame based on the highlight high dynamic mode.

[0413] S929. The image sensor sends the preview video frame output based on the highlight high dynamic mode to the CameraUI module.

[0414] S930. The CameraUI module displays the preview video frame output by the image sensor based on the high-brightness high-dynamic mode in the preview window.

[0415] Optionally, after the CameraUI module displays the preview video frame output by the image sensor based on the highlight high dynamic mode in the preview window, the electronic device 100 may execute the embodiments shown in S908-S914 to display the preview video frame in the preview window.

[0416] Next, from the perspective of electronic equipment software and hardware collaboration, combined with Fig.11 The specific implementation of this embodiment is described.

[0417] like Fig.11 As shown, the camera is used to capture images. When the reflected light of the subject passes through the lens, it is refracted on the lens and converges on the image sensor. The image sensor can convert the light signal into an analog electrical signal. The analog electrical signal is bypassed from the image sensor and the sensor front end (SFE), and then output through the 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, that is, the RAW video frame.

[0418] In the low-brightness high-dynamic mode and the medium-brightness high-dynamic mode, the image sensor can generate two video frames. In one possible implementation, the image sensor can synthesize the two video frames into one video frame. In other possible implementations, the image sensor can send the two video frames to the sensor front end, and the sensor front end synthesizes the two video frames into one video frame.

[0419] In the high-brightness and high-dynamic mode, the image sensor can generate three video frames. Two of them are long-exposure video frames, and one is a short-exposure video frame. In one possible implementation, the image sensor combines the two long-exposure video frames into one video frame, and the image sensor then sends the combined video frame to the sensor front end, and the sensor front end then combines the combined video frame and the short-exposure video frame into one video frame. In other possible implementations, the image sensor can send the two long-exposure video frames and the short-exposure video frames to the sensor front end, and the sensor front end then combines the two long-exposure video frames and the short-exposure video frames into one video frame.

[0420] The image signal processor ISP is used to process the RAW video frames from the camera and generate video frames to be displayed. The video frames to be displayed can be video frames in YUV (or understood as brightness and chrominance) format. The image signal processor then sends the video frames in YUV format to the display screen for display. The ISP may include an image processing engine (IPE), an image front-end engine (IFE), an I / O control interface, etc.

[0421] First, the process of processing the video frame at the front end of the image processor may include one or more of the following, for example: bad pixel correction processing, RAW domain noise reduction processing, black level correction processing, optical shading correction processing, automatic white balance processing, color interpolation processing, color correction processing, global tone mapping processing, or image conversion processing, etc. The video frame pre-processing process is not limited in the embodiments of the present application.

[0422] The image processor front end then sends the pre-processed video frames to the image processor back end, and the image processor back end can post-process the pre-processed video frames. On the one hand, the image processor back end can use the post-processed video frame sequence as a preview video stream or a recorded video stream. The preview video stream or the recorded video stream can be displayed on the display screen through the I / O control interface. On the other hand, the image processor back end can send the post-processed video frame sequence to the perception module, so that the perception module can obtain the environmental dynamic range and ambient brightness based on the post-processed video frame sequence. The perception module then sends the environmental dynamic range and ambient brightness to the image sensor, so that the image sensor can switch different working modes based on the environmental dynamic range and ambient brightness.

[0423] Optionally, the camera may further include a light metering sensor, which may monitor ambient brightness and ambient dynamic range.

[0424] In some embodiments, during the process of recording a video, the electronic device 100 receives an input operation (such as a single click) from a user on the control 813, and the electronic device 100 can save the recorded video frame corresponding to the moment when the user clicks the control 813 in the gallery.

[0425] The video frame post-processing may include one or more of the following, for example: image correction and adjustment processing, local tone mapping processing, and gamma correction processing. In the image correction and adjustment processing, the image processor backend can perform anti-shake processing on the current video frame. In the local tone mapping processing, the image processor backend can adjust the overall brightness of the video frame so that the picture after brightness adjustment can be closer to the brightness presented in the real world. In the gamma correction processing, the image processor backend can adjust the brightness of the video frame so that it can retain more bright and dark details, compress the contrast, and retain more color information.

[0426] When the electronic device 100 receives the user's input operation (such as a single click) for ending the video recording control 814 , the recorded video stream can be saved in the gallery.

[0427] Fig.12 A flowchart of a video shooting method provided in this application.

[0428] S1201. The electronic device displays a shooting interface, where the shooting interface is used to display images captured by a camera.

[0429] The electronic device comprises a camera module, the camera module comprises an image sensor and a dual conversion gain sensor, the dual conversion gain sensor comprises a first sensor and a second sensor, and the conversion gain of the first sensor is smaller than the conversion gain of the second sensor.

[0430] The dual conversion gain sensor may be located inside the image sensor, or may be independent of the image sensor.

[0431] The first sensor may be referred to as a low conversion gain sensor and the second sensor may be referred to as a high conversion gain sensor.

[0432] In some embodiments, the first sensor may also be referred to as an LCG pathway. The second sensor may also be referred to as an HCG pathway.

[0433] The shooting interface can be Figure 8B The shooting interface 720 is shown.

[0434] The shooting interface can also be Figure 8C The video recording interface 810 is shown.

[0435] The shooting interface can also be Fig. 8E The video recording interface 810 is shown.

[0436] S1202. When the ambient brightness is less than a first illumination value, the electronic device processes a first original image output by the image sensor into a first image according to a first sensitivity through a second sensor, and processes the first original image into a second image according to a second sensitivity through a second sensor, wherein the first sensitivity is less than the second sensitivity.

[0437] S1203: The electronic device synthesizes the first image and the second image into a third image, and displays the third image on the shooting interface.

[0438] In some embodiments, the first image may be referred to as a first HCG image.

[0439] In some embodiments, the second image may be referred to as a second HCG image.

[0440] Illustratively, the first sensitivity may be 400*2AG*DG as shown in Table 1.

[0441] Illustratively, the second sensitivity may be 400*32AG*DG as shown in Table 1.

[0442] Exemplarily, the first sensitivity may also be a plurality of sensitivities shown in Table 2 for obtaining the first HCG image.

[0443] Exemplarily, the second sensitivity may also be a plurality of those shown in Table 2 for obtaining the second HCG image.

[0444] S1204. When the ambient brightness is between the first illuminance value and the second illuminance value, the electronic device processes the second original image output by the image sensor into a fourth image according to the third sensitivity through the first sensor, and processes the second original image into a fifth image according to the fourth sensitivity through the second sensor, where the third sensitivity is smaller than the fourth sensitivity, and the fourth sensitivity is smaller than the second sensitivity.

[0445] S1205: The electronic device combines the fourth image and the fifth image into a sixth image, and displays the sixth image on the shooting interface.

[0446] The first illumination value and the second illumination value may be a specific value or may refer to a range.

[0447] For example, the first illuminance value may be 200 Lux to 0 Lux.

[0448] The second illumination value may be 2000 Lux to 200 Lux.

[0449] Here, 200 Lux may be the ambient brightness of a low-brightness scene or the ambient brightness of a medium-brightness scene, and this application does not limit this.

[0450] In some embodiments, the fourth image may be referred to as an LCG image.

[0451] In some embodiments, the fifth image may be referred to as a HCG image.

[0452] Exemplarily, the third sensitivity may be 100*2AG*DG as shown in Table 3.

[0453] Exemplarily, the fourth sensitivity may be 400*8AG*DG as shown in Table 3.

[0454] Exemplarily, the third sensitivity may also be a plurality of sensitivities for obtaining the LCG image shown in Table 4.

[0455] Exemplarily, the fourth sensitivity may also be a plurality of sensitivities for obtaining the HCG image shown in Table 4.

[0456] Through this method, on the one hand, the dynamic range of the electronic device during video shooting can be improved. On the other hand, the electronic device can automatically switch different shooting modes based on the ambient brightness. Specifically, in low-brightness scenes, the signal-to-noise ratio of the first sensor is low, and the signal-to-noise ratio of the second sensor is relatively high. The second sensor is used to output two frames of images to synthesize a video frame, and there will be no noise stratification problem, and the imaging effect of the video frame is also good. In medium-brightness scenes, the signal-to-noise ratio of the first sensor is comparable to that of the second sensor, and the signal-to-noise ratio of the first sensor and the signal-to-noise ratio of the second sensor are also relatively high. The first sensor and the second sensor output two frames of images to synthesize a video frame, and the imaging effect of the video frame is also relatively good.

[0457] In a possible implementation, the method also includes: when the ambient brightness is greater than or equal to the second illuminance value, the electronic device controls the image sensor to output the third original image with the first exposure time, and controls the image sensor to output the fourth original image with the second exposure time; the electronic device processes the third original image into a seventh image according to the third sensitivity through the first sensor, and processes the third original image into an eighth image according to the fourth sensitivity through the second sensor; the electronic device processes the fourth original image into a ninth image based on a merging method; the electronic device synthesizes the seventh image, the eighth image and the ninth image into a tenth image, and displays the tenth image on the shooting interface.

[0458] In some embodiments, the seventh image may be referred to as an LCG image.

[0459] In some embodiments, the eighth image may be referred to as a HCG image.

[0460] In some embodiments, the ninth image may be referred to as a short exposure preview video frame or a short exposure recording video frame.

[0461] In this way, in a bright scene, a long exposure frame image (the seventh image and the eighth image) and a short exposure frame image (the ninth image) are output, and the seventh image, the eighth image and the ninth image are fused to obtain a frame image, namely the tenth image. This can solve the problem of overexposed images in bright scenes when the full well capacity of a single pixel overflows. The overexposed image can be restored through the tenth image.

[0462] In one possible implementation, the shooting interface also includes a recording end button; the method also includes: the electronic device receives a first operation of the user on the recording end button; in response to the first operation, the electronic device saves a first video, the first video includes the third image and the sixth image, or the first video includes the third image, the sixth image and the tenth image.

[0463] Exemplarily, the video end button can be Fig. 8E An end recording control 814 is shown.

[0464] In this way, the method can be applied to video shooting scenes, and videos can be shot based on the method.

[0465] In a possible implementation, the shooting interface further includes a video recording start button.

[0466] Exemplarily, the video start button can be Figure 8C Start recording control 812 is shown.

[0467] In this way, the method can be applied to video shooting preview scenarios. In the video shooting preview interface, the electronic device first works in the ground dynamic mode. When it is determined that the dynamic range of the environment is greater than the dynamic range of the image sensor, the electronic device can switch to a high dynamic mode, such as a low-brightness high dynamic mode or a medium-brightness high dynamic mode or a high-brightness high dynamic mode. Then, after the electronic device enters the video shooting interface, the electronic device can directly shoot and save the video in a low-brightness high dynamic mode, a medium-brightness high dynamic mode, or a high-brightness high dynamic mode.

[0468] In a possible implementation manner, the method further includes: when the ambient brightness is between the first illuminance value and the second illuminance value, the brighter the ambient brightness is, the smaller the sensitivity of the first sensor and the sensitivity of the second sensor are.

[0469] In this way, in a low-light scene, as the environment becomes brighter, the sensitivity of the second sensor for obtaining the first image and the sensitivity of the second sensor for obtaining the second image can be gradually reduced. As the environment becomes darker, the sensitivity of the second sensor for obtaining the first image and the sensitivity of the second sensor for obtaining the second image can be gradually increased. In this way, the video frames captured by the electronic device also gradually become brighter or darker, which can improve the video shooting effect.

[0470] For details, please refer to the description in the embodiment of Table 2.

[0471] In a possible implementation manner, the method further includes: when the ambient brightness is between the first illuminance value and the second illuminance value, the brighter the ambient brightness is, the smaller the sensitivity of the first sensor and the sensitivity of the second sensor are.

[0472] In this way, in a medium-bright scene, as the environment becomes brighter, the sensitivity of the first sensor and the sensitivity of the second sensor can be gradually reduced. As the environment becomes darker, the sensitivity of the first sensor and the sensitivity of the second sensor can be gradually increased. In this way, the video frames captured by the electronic device also gradually become brighter or darker, which can improve the video shooting effect.

[0473] For details, please refer to the description in the embodiment of Table 4.

[0474] In a possible implementation manner, exposure durations of the first sensor and the second sensor are both the first exposure duration.

[0475] In this way, during the mode switching process, the exposure time of the first sensor and the second sensor remains unchanged, and only the sensitivity is changed, thereby avoiding flickering between two adjacent video frames and affecting the visual effect.

[0476] For example, the first exposure duration may be 10 ms.

[0477] In a possible implementation manner, a ratio between the sensitivity of the second sensor that obtains the first image and the sensitivity of the second sensor that obtains the second image remains unchanged.

[0478] In this way, in a low-light scene, as the ambient brightness becomes brighter or darker, the sensitivity of the second sensor that obtains the first image and the sensitivity of the second sensor that obtains the second image increase or decrease proportionally, avoiding differences in dynamic range.

[0479] Exemplarily, the ratio between the sensitivity of the second sensor for obtaining the first image and the sensitivity of the second sensor for obtaining the second image is 1:16.

[0480] In a possible implementation manner, the ratio between the sensitivity of the first sensor and the sensitivity of the second sensor remains unchanged.

[0481] In this way, in a medium-brightness scene, as the ambient brightness becomes brighter or darker, the sensitivity of the first sensor and the second sensor increases or decreases proportionally, thereby avoiding differences in dynamic range.

[0482] Exemplarily, the ratio between the sensitivity of the first sensor and the sensitivity of the second sensor is 1:16.

[0483] Thus, before and after the sensor mode is switched, the ratio between the sensitivity of the first sensor and the sensitivity of the second sensor is 1:16. The ratio between the sensitivity of the second sensor that obtains the first image and the sensitivity of the second sensor that obtains the second image is also 1:16.

[0484] In a possible implementation, the method further includes: when the ambient brightness is greater than or equal to the second illumination value, the brighter the ambient brightness is, the longer the first exposure time remains unchanged and the shorter the second exposure time is.

[0485] In this way, in a bright scene, as the environment becomes brighter, the exposure time for obtaining the ninth image can be gradually reduced. As the environment becomes darker, the exposure time for obtaining the ninth image can be gradually increased. In this way, the video frames captured by the electronic device also gradually become brighter or darker, which can improve the video shooting effect.

[0486] For details, please refer to the description in the embodiment of Table 5.

[0487] In a possible implementation manner, the method further includes: when the ambient brightness is equal to the second illumination value, the first exposure duration is equal to the second exposure duration.

[0488] Exemplarily, the second illumination value may be 2000 Lux to 2600 Lux.

[0489] The first exposure time and the second exposure time are 10 ms.

[0490] In one possible implementation, the method includes: the electronic device adjusts the sensitivity of the first sensor by adjusting the analog gain and / or digital gain of the first sensor; the electronic device adjusts the sensitivity of the second sensor by adjusting the analog gain and / or digital gain of the second sensor.

[0491] In one possible implementation, the first sensor also includes a first capacitor, and the electronic device adjusts the sensitivity of the first sensor by adjusting the analog gain and / or digital gain of the first sensor, specifically including: when the first capacitor is a LOFIC capacitor, the electronic device adjusts the sensitivity of the first sensor by adjusting the digital gain of the first sensor; when the first capacitor is not a LOFIC capacitor, the electronic device adjusts the sensitivity of the first sensor by adjusting the analog gain and / or digital gain of the first sensor.

[0492] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in this application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integration. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk), etc.

[0493] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.

[0494] In short, the above description is only an embodiment of the technical solution of the present invention, and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made according to the disclosure of the present invention shall be included in the protection scope of the present invention.

Claims

1. A video shooting method, characterized in that: The electronic device includes a camera module, the camera module includes an image sensor and a dual conversion gain sensor, the dual conversion gain sensor includes a first sensor and a second sensor, the conversion gain of the first sensor is less than the conversion gain of the second sensor, and the method includes: The electronic device displays a shooting interface, where the shooting interface is used to display the image captured by the camera; When the ambient brightness is less than a first illumination value, the electronic device processes a first original image output by the image sensor into a first image through the second sensor according to a first sensitivity, and processes the first original image into a second image through the second sensor according to a second sensitivity, wherein the first sensitivity is less than the second sensitivity; The electronic device combines the first image and the second image into a third image, and displays the third image on the shooting interface; When the ambient brightness is between the first illumination value and the second illumination value, the electronic device processes the second original image output by the image sensor into a fourth image through the first sensor according to the third sensitivity, and processes the second original image into a fifth image through the second sensor according to the fourth sensitivity, wherein the third sensitivity is less than the fourth sensitivity, and the fourth sensitivity is less than the second sensitivity; The electronic device synthesizes the fourth image and the fifth image into a sixth image, and displays the sixth image on the shooting interface.

2. The method according to claim 1, characterized in that The method further comprises: When the ambient brightness is greater than or equal to the second illumination value, the electronic device controls the image sensor to output a third original image with the first exposure duration, and controls the image sensor to output a fourth original image with the second exposure duration; The electronic device processes the third original image into a seventh image by using the first sensor according to the third sensitivity, and processes the third original image into an eighth image by using the second sensor according to the fourth sensitivity; The electronic device processes the fourth original image into a ninth image based on a merging manner; The electronic device synthesizes the seventh image, the eighth image and the ninth image into a tenth image, and displays the tenth image on the shooting interface.

3. The method according to claim 2, characterized in that The shooting interface also includes a video recording end button; the method also includes: The electronic device receives a first operation of the user on the video recording end button; In response to the first operation, the electronic device saves a first video, the first video including the third image and the sixth image, or the first video including the third image, the sixth image, and the tenth image.

4. The method according to claim 1 or 2, characterized in that: The shooting interface also includes a video recording start button.

5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: When the ambient brightness is less than the first illumination value, the brighter the ambient brightness is, the smaller the sensitivity of the second sensor for obtaining the first image and the sensitivity of the second sensor for obtaining the second image are.

6. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: When the ambient brightness is between the first illuminance value and the second illuminance value, the brighter the ambient brightness is, the smaller the sensitivity of the first sensor and the sensitivity of the second sensor are.

7. The method according to claim 5 or 6, characterized in that: The exposure durations of the first sensor and the second sensor are both first exposure durations.

8. The method according to claim 5, characterized in that The ratio between the sensitivity of the second sensor for obtaining the first image and the sensitivity of the second sensor for obtaining the second image remains unchanged.

9. The method according to claim 6, characterized in that The ratio between the sensitivity of the first sensor and the sensitivity of the second sensor remains unchanged.

10. The method according to claim 2, characterized in that The method further comprises: When the ambient brightness is greater than or equal to the second illumination value, the brighter the ambient brightness is, the first exposure time remains unchanged and the second exposure time becomes shorter.

11. The method according to claim 2 or 10, characterized in that: The method further comprises: When the ambient brightness is equal to the second illumination value, the first exposure duration is equal to the second exposure duration.

12. The method according to any one of claims 1 to 11, characterized in that: The method comprises: The electronic device adjusts the sensitivity of the first sensor by adjusting the analog gain and / or digital gain of the first sensor; The electronic device adjusts the sensitivity of the second sensor by adjusting the analog gain and / or the digital gain of the second sensor.

13. The method according to claim 12, wherein the first sensor further comprises a first capacitor, characterized in that: The electronic device adjusts the sensitivity of the first sensor by adjusting the analog gain and / or the digital gain of the first sensor, specifically including: In the case where the first capacitor is a LOFIC capacitor, the electronic device adjusts the sensitivity of the first sensor by adjusting the digital gain of the first sensor; In the case that the first capacitor is not a LOFIC capacitor, the electronic device adjusts the sensitivity of the first sensor by adjusting the analog gain and / or digital gain of the first sensor.

14. An electronic device, characterized in that: The electronic device includes a processor and a memory; the memory is coupled to the processor, the memory is used to store computer program code, the computer program code includes computer instructions, and the processor calls the computer instructions to execute the method described in any one of claims 1 to 13.

15. A computer-readable storage medium, characterized in that: Used to store computer instructions, when the computer instructions are executed on an electronic device, the server executes the method described in any one of claims 1 to 13.

16. A computer program product, characterized in that When the computer program product is executed on an electronic device, the electronic device is enabled to execute the method according to any one of claims 1 to 13.

Citation Information

Patent Citations

  • Method for generating HDR image and electronic equipment

    CN114466134A

  • Electronic device and HDR image generation method therefor

    US20220377228A1