Shooting method and related equipment
By adopting different image output modes and dynamic range enhancement mechanisms for different focal segments in electronic devices, the problem of limited dynamic range of image sensors is solved, and the high-definition, sensitivity and dynamic range of video frames during video recording is achieved.
Patent Information
- Application Number
- CN202411375043.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-26
- Publication Date
- 2025-03-07
AI Technical Summary
The dynamic range of image sensors in electronic devices such as mobile phones and tablets is limited, resulting in the unrecognition of the contents of the shadowed and bright areas of the video frame in a video scene with a high dynamic range.
During the video recording process, different image output modes and dynamic range enhancement mechanisms are adopted for different focal segments. Specifically, for the first focal segment, the first image output mode is adopted in a high dynamic highlighting scene, and more image details are obtained through images with different exposure times of multiple frames, and processed in the second image output mode to improve the dynamic range.
It realizes the high definition, sensitivity and dynamic range of video frames during video recording, and improves image quality.
Smart Images

Figure CN119583982A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal technology, and in particular to a shooting method and related equipment. Background Art
[0002] The dynamic range of image sensors in electronic devices such as mobile phones and tablets is limited. When the dynamic range of the video scene is greater than the dynamic range of the image sensor, a high dynamic range (HDR) problem will occur, that is, the shadow area and bright area of the video frame cannot be recognized. In this case, the dynamic range of the image sensor needs to be improved. Summary of the invention
[0003] The present application provides a shooting method and related equipment. According to the shooting method, the electronic device can adopt different image output modes and dynamic range enhancement mechanisms for different focal lengths during video recording, so as to take into account the clarity, sensitivity and dynamic range of the video frames obtained during the video recording process.
[0004] In a first aspect, the present application provides a shooting method. The shooting method can be applied to an electronic device, the electronic device includes a first camera, and the first camera includes a first image sensor. The shooting method may include: the electronic device displays a shooting interface, and the shooting interface can be used to display an image captured by the first camera; when the current zoom factor belongs to the first focal length, and the current dynamic range is greater than the first dynamic range threshold, and the current ambient brightness is greater than the first preset ambient brightness, the electronic device can output M frames of images in the first output mode through the first image sensor, and synthesize the M frames of images into a first image, and display the first image on the shooting interface. Wherein, M is an integer greater than 1. The M frames of images include images obtained by processing the M frames of original images obtained by the first image sensor based on the second output mode, and the M frames of original images are M frames of original images with different exposure times obtained after one exposure.
[0005] In the solution provided in the present application, the electronic device can adopt different image output modes and dynamic range enhancement mechanisms for different focal lengths during video recording. Specifically, for the first focal length, the electronic device can adopt the first image output mode to output images in high-dynamic and high-brightness scenes, and synthesize the output images before displaying them. Among them, the first image output mode is an image output mode based on the second image output mode. In the first image output mode, the electronic device can obtain M frames of original images with different exposure times after one exposure, and then process the M frames of original images based on the second image output mode to obtain M frames of images, and then output the M frames of images. In this way, for high-dynamic and high-brightness scenes under the first focal length, the electronic device can obtain more image details based on multiple frames of images with different exposure times, avoid overexposure or underexposure of the output images, and process the multiple frames of images with different exposure times in the second image output mode, which can improve the dynamic range while improving the resolution, and ultimately improve the quality of the acquired images.
[0006] In some embodiments of the present application, the first camera may be a main camera in the electronic device.
[0007] In one possible implementation, the first camera may be a tele camera. In this case, the first image sensor may be image sensor_2. In another possible implementation, the first camera may also be a wide camera. In this case, the second image sensor may be image sensor_1.
[0008] In some embodiments of the present application, the first focal length may be focal length_2 mentioned below. In a possible implementation, the first focal length may be specifically 2x-2.69x. Of course, the first focal length may also be other focal lengths (e.g., 2x-3x), which is not limited in the present application.
[0009] In some embodiments of the present application, the first dynamic range threshold may be the dynamic range threshold_5 mentioned below. The first preset ambient brightness may be the preset ambient brightness_4 mentioned below.
[0010] It is understandable that the first output mode is an output mode for processing an image based on the second output mode. In some embodiments of the present application, the first output mode is an output mode for obtaining an original image based on SHDR and processing the original image based on the second output mode.
[0011] It is understandable that the second image output mode is an image output mode that processes the image based on the first original image output mode. In some embodiments of the present application, the second image output mode is an image output mode that processes the original image in the first original image output mode and then crops the processed image. Among them, the first original image output mode is a processing mode that converts the original pixel arrangement of the image sensor into a classic Bayer arrangement mode. The first original image output mode may include but is not limited to the remosaic mode mentioned later.
[0012] In some embodiments of the present application, the first image output mode may be the SHDR (Long_I+Short_I) mode mentioned below. The second image output mode may be the in-sensor zoom mode mentioned below.
[0013] In some embodiments of the present application, M may be 2. The M frames of original images may be as follows: Figure 1F The short exposure image and the long exposure image shown. The M frame images may be Short_I images and Long_I images.
[0014] In combination with the first aspect, in a possible implementation, after the electronic device displays the shooting interface, the method may further include: when the current zoom factor belongs to the first focal length, the current dynamic range is greater than the first dynamic range threshold, and the current ambient brightness is less than the second preset ambient brightness, the electronic device may output the second image and the third image in the third image output mode through the first image sensor, and synthesize the second image and the third image into a fourth image, and display the fourth image in the shooting interface. Wherein, the second preset ambient brightness is less than the first preset ambient brightness; the second image is an image obtained by processing the first original image acquired by the first image sensor according to the first sensitivity based on the fourth image output mode, the third image is an image obtained by processing the first original image according to the second sensitivity based on the fourth image output mode, and the first original image is an original image acquired by the first image sensor based on the first exposure time; the first sensitivity is determined based on the second conversion gain, the first analog gain and the first digital gain, the second sensitivity is determined based on the second conversion gain, the second analog gain and the second digital gain, and the first analog gain is less than the second analog gain.
[0015] In the solution provided in the present application, the electronic device can adopt different image output modes and dynamic range enhancement mechanisms for different focal lengths during video recording. Specifically, for the first focal length, the electronic device can adopt the third image output mode to output images in high-dynamic and low-brightness scenes, and synthesize the output images before displaying them. Among them, the third image output mode is an image output mode based on the fourth image output mode. In the third image output mode, the electronic device can obtain a frame of original image after one exposure, and then use the fourth image output mode to process the frame of original image according to two sensitivities (corresponding to two analog gains) to obtain 2 frames of images, and then output the 2 frames of images. In this way, for high-dynamic and low-brightness scenes under the first focal length, the electronic device can use different sensitivities (specifically different analog gains) to process the original image in the fourth image output mode, which can improve the sensitivity and dynamic range, and ultimately improve the quality of the acquired image.
[0016] In some embodiments of the present application, the second preset ambient brightness may be the preset ambient brightness_1 mentioned below.
[0017] It is understandable that the fourth image output mode may be the second original image output mode. The third image output mode is an image output mode in which the image is processed based on the second original image output mode. In some embodiments of the present application, the third image output mode is an image output mode in which the original image is processed in the second original image output mode, and then different analog gains are used to process the processed images respectively. Among them, the second original image output mode is a processing mode in which the original adjacent pixels of the image sensor are added together and read out. The second original image output mode may include but is not limited to the binning mode mentioned later.
[0018] In some embodiments of the present application, the third image output mode may be the DAG mode mentioned below. The fourth image output mode may be the binning mode mentioned below.
[0019] In some embodiments of the present application, the first original image may be as follows: Figure 1C The 2×2 image shown is obtained after binning.
[0020] In some embodiments of the present application, the electronic device processes the first original image through the LAG path to obtain a second image. In this case, the second image can be as follows: Figure 1C Similarly, the electronic device processes the first original image through the HAG path to obtain a second image. In this case, the second image can be as follows: Figure 1CThe HAG image shown. It can be understood that the first analog gain can be the analog gain corresponding to the LAG path. For example, HCG*AG*DG. The second analog gain can be the analog gain corresponding to the HAG path. For example, HCG*(m*AG)*DG. The analog gain corresponding to the LAG path is smaller than the analog gain corresponding to the HAG path.
[0021] In some embodiments of the present application, the first exposure duration may be t1.
[0022] It can be understood that the exposure duration and exposure time involved in this application have the same specific meanings.
[0023] In combination with the first aspect, in a possible implementation, the electronic device may further include a second camera, and the second camera may include a second image sensor. The shooting interface may also be used to display an image captured by the second camera. After the electronic device displays the shooting interface, the method may further include:
[0024] When the current zoom ratio belongs to the second focal length, the current dynamic range is greater than the second dynamic range threshold, and the current object distance is greater than the first object distance, the electronic device outputs the fifth image and the sixth image in the fifth output mode through the second image sensor, and synthesizes the fifth image and the sixth image into a seventh image through the second image sensor, and displays the seventh image on the shooting interface. Among them, the fifth image is an image obtained by processing the second original image according to the third sensitivity based on the fourth output mode, the sixth image is an image obtained by processing the second original image according to the fourth sensitivity based on the fourth output mode, and the second original image is the original image acquired by the second image sensor. The third sensitivity is determined based on the third conversion gain, the third analog gain and the third digital gain, and the fourth sensitivity is determined based on the fourth conversion gain, the fourth analog gain and the fourth digital gain, and the third conversion gain is less than the fourth conversion gain.
[0025] In the solution provided in the present application, the electronic device can adopt different image output modes and dynamic range enhancement mechanisms for different focal lengths during video recording. Specifically, for the second focal length, the electronic device can adopt the fifth image output mode to output images in high dynamic long-distance scenes, and synthesize the output images through the second image sensor before displaying them. Among them, the fifth image output mode is an image output mode based on the fourth image output mode. In the fifth image output mode, the electronic device can obtain a frame of original image after one exposure, and then use the fourth image output mode to process the frame of original image according to two sensitivities (corresponding to two conversion gains) to obtain 2 frames of images, and then merge the 2 frames of images, and finally output the merged image. In this way, for high dynamic long-distance scenes under the second focal length, the electronic device can use the corresponding camera to obtain images, and use different sensitivities (specifically different conversion gains) to process the original images in the fifth image output mode, which can improve the sensitivity and dynamic range, and finally improve the quality of the acquired images.
[0026] In some embodiments of the present application, the second camera may be a secondary camera in the electronic device.
[0027] In a possible implementation, the second camera may be a tele camera. In this case, the second image sensor may be image sensor_2.
[0028] In some embodiments of the present application, the first camera and the second camera may be the same camera. In some other embodiments of the present application, the first camera and the second camera may be different cameras.
[0029] In some embodiments of the present application, the second focal length may be focal length_3 mentioned below. In a possible implementation, the second focal length may be specifically 2.7x-5.39x. Of course, the first focal length may also be other focal lengths (e.g., 3x-5.5x), which is not limited in the present application.
[0030] In some embodiments of the present application, the second dynamic range threshold may be the dynamic range threshold_6 mentioned below. The first object distance may be the preset object distance_1 mentioned below.
[0031] In some embodiments of the present application, the fifth image output mode may be the IDCG mode mentioned below.
[0032] In some embodiments of the present application, the second original image may be as follows: Figure 1B The 2×2 image shown is obtained after binning.
[0033] In some embodiments of the present application, the electronic device processes the second original image through the LCG path to obtain a second image. In this case, the second image can be as follows: Figure 1B Similarly, the electronic device processes the second original image through the HCG path to obtain a second image. In this case, the second image can be as follows: Figure 1B HCG image shown. It can be understood that the first analog gain can be the analog gain corresponding to the LCG path. For example, LCG*AG*DG. The second analog gain can be the analog gain corresponding to the HCG path. For example, HCG*AG*DG. The conversion gain corresponding to the LCG path is less than the conversion gain corresponding to the HCG path.
[0034] It should be noted that, in the fifth image output mode, the second image sensor can perform fusion processing on the LCG image and the HCG image, and output a fused frame of image.
[0035] In combination with the first aspect, in a possible implementation, M may be 2. When the current zoom factor belongs to the first focal length, the current dynamic range is greater than the first dynamic range threshold, and the current ambient brightness is greater than the first preset ambient brightness, if the current ambient brightness changes from being less than the first preset ambient brightness to being greater than the first preset ambient brightness, the M frames of images include an eighth image and a ninth image. The eighth image is an image obtained by processing the third original image according to the fifth sensitivity based on the second output mode, and the ninth image is an image obtained by processing the fourth original image according to the fifth sensitivity based on the second output mode. The third original image and the fourth original image are original images acquired by the first image sensor in a single exposure process based on the second exposure duration and the third exposure duration, respectively. The ratio of the second exposure duration to the third exposure duration is equal to the ratio of the first sensitivity to the second sensitivity. The second exposure duration is less than the third exposure duration, and the second exposure duration is less than the first exposure duration.
[0036] In the solution provided in the present application, when the current zoom ratio belongs to the first focal length, and the current dynamic range is greater than the first dynamic range threshold, and the current ambient brightness is greater than the first preset ambient brightness, if the current ambient brightness changes from not greater than the first preset ambient brightness to greater than the first preset ambient brightness, the electronic device determines that the switching condition for switching from the third image output mode to the first image output mode is met. In this case, the electronic device can switch the image output mode of the first image sensor to the first image output mode, and determine the exposure time and sensitivity used after switching to the first image output mode based on the sensitivity ratio previously used in the third image output mode, and the exposure time and sensitivity corresponding to the HAG path previously used in the third image output mode. This method can gradually adjust the exposure time and sensitivity while ensuring that the sensitivity before and after the mode switching remains unchanged, and can avoid the signal-to-noise ratio jump caused by the large adjustment range of the exposure time and sensitivity corresponding to the two paths, thereby avoiding the inconsistent display effect of the picture before and after the switching due to the signal-to-noise ratio jump.
[0037] In some embodiments of the present application, the fifth sensitivity may be HCG*(m*AG)*DG. The first exposure time may be t1, and the second exposure time may be The third exposure time may be t1. The ratio of the first sensitivity to the second sensitivity may be 1 / m (ie, 1:m), and the ratio of the second exposure time to the third exposure time may be 1 / m (ie, 1:m).
[0038] In combination with the first aspect, in a possible implementation, after the current environment brightness changes from not greater than the first preset environment brightness to greater than the first preset environment brightness, the method may further include: the electronic device gradually increases the exposure time based on which the first image sensor outputs an image in the first image output mode, and gradually reduces the sensitivity based on which the first image sensor outputs an image in the first image output mode. Wherein, in the above-mentioned process of gradually increasing the exposure time based on which the first image sensor outputs an image in the first image output mode, and gradually reducing the sensitivity based on which the first image sensor outputs an image in the first image output mode, the ratio of the exposure time based on which the electronic device outputs two frames of images in the first image output mode each time through the first image sensor is equal to the ratio of the first sensitivity to the second sensitivity, and the sensitivity based on which the electronic device outputs two frames of images in the first image output mode each time through the first image sensor is the same.
[0039] In the solution provided in the present application, after the electronic device switches the image sensor's image output mode from the third image output mode to the first image output mode, for example, after switching from the DAG mode to the SHDR (Long_I+Short_I) mode, the exposure time corresponding to the two channels can be gradually increased, and the sensitivity corresponding to the two channels can be reduced, so as to avoid the signal-to-noise ratio jump caused by the large adjustment range of the exposure time and sensitivity corresponding to the two channels, thereby avoiding the inconsistent display effect of the picture before and after the switching caused by the signal-to-noise ratio jump. Moreover, in this process, the electronic device can keep the sensitivity ratio of the two channels unchanged, thereby ensuring that the dynamic range remains unchanged, thereby avoiding obvious changes in the brightness of the picture due to fluctuations in the dynamic range, and thus improving the user's shooting experience.
[0040] In combination with the first aspect, in a possible implementation method, the electronic device gradually increases the exposure time based on which the first image sensor outputs an image in the first image output mode, which can specifically include: the electronic device gradually increases the exposure time based on which the first image sensor outputs an image in the first image output mode until the minimum value of the exposure time based on which the image is output is equal to the second exposure time.
[0041] In the solution provided in the present application, after the electronic device switches the image output mode of the image sensor from the third image output mode to the first image output mode, for example, from the DAG mode to the SHDR (Long_I+Short_I) mode, the exposure time corresponding to the two paths can be gradually increased until the minimum value of the exposure time based on which the image is output is equal to the second exposure time, without having to set a threshold value to control the increase of the exposure time, thereby simplifying the process.
[0042] In combination with the first aspect, in a possible implementation manner, the fifth sensitivity may be equal to the second sensitivity, and the third exposure time may be equal to the first exposure time.
[0043] In the solution provided in the present application, the electronic device can determine the initial exposure time and sensitivity to be used after switching to the first image output mode based on the exposure time and sensitivity in the third image output mode, without having to re-set the exposure time and sensitivity, thereby simplifying the process.
[0044] In combination with the first aspect, in a possible implementation, the shooting interface may further include a recording end control. The recording end button is used to trigger the electronic device to stop recording the image displayed on the shooting interface. The method may also include: the electronic device detects an operation on the recording end control, and in response to the operation on the recording end control, the electronic device saves a first video, where the first video includes the image displayed on the shooting interface.
[0045] In the solution provided in the present application, the shooting interface may be a video recording interface. The video recording interface may include a video recording end control. The video recording end control may be used to stop the video recording. After the video recording is stopped, the electronic device may save the corresponding recorded video.
[0046] In conjunction with the first aspect, in a possible implementation, the shooting interface includes a video recording start button. The video recording start button is used to trigger the electronic device to record the image displayed on the shooting interface.
[0047] In the solution provided in the present application, the shooting interface may be a video preview interface (eg, user interface 400, user interface 500, user interface 600, etc.).
[0048] In a second aspect, the present application provides a shooting method. The shooting method can be applied to an electronic device, the electronic device includes a first camera, and the first camera includes a first image sensor. The shooting method may include: when the current zoom factor belongs to the first focal length, the current dynamic range is greater than the first dynamic range threshold, and the current ambient brightness is less than the second preset ambient brightness, the electronic device may output the second image and the third image in the third output mode through the first image sensor, and synthesize the second image and the third image into a fourth image, and display the fourth image on the shooting interface. Among them, the second preset ambient brightness is less than the first preset ambient brightness; the second image is an image obtained by processing the first original image acquired by the first image sensor according to the first sensitivity based on the fourth output mode, the third image is an image obtained by processing the first original image according to the second sensitivity based on the fourth output mode, and the first original image is an original image acquired by the first image sensor based on the first exposure time; the first sensitivity is determined based on the second conversion gain, the first analog gain and the first digital gain, the second sensitivity is determined based on the second conversion gain, the second analog gain and the second digital gain, and the first analog gain is less than the second analog gain.
[0049] In a third aspect, the present application provides an electronic device, comprising: one or more processors, and one or more memories; the one or more memories are 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 perform the method described in the first aspect or any one of the implementations of the first aspect.
[0050] In a fourth aspect, the present application provides an electronic device, comprising: one or more processors, and one or more memories; the one or more memories are 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 perform the method described in the second aspect or any one of the implementations of the second aspect.
[0051] In a fifth aspect, the present application provides a computer storage medium comprising computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the method described in the first aspect or any one of the implementations of the first aspect.
[0052] In a sixth aspect, the present application provides a computer storage medium comprising computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the method described in the second aspect or any one of the implementations of the second aspect.
[0053] In the seventh aspect, an embodiment of the present application provides a chip, which can be applied to an electronic device. The chip includes one or more processors, and the processor is used to call computer instructions to enable the electronic device to execute the method described in the first aspect or any one of the implementations of the first aspect.
[0054] In an eighth aspect, an embodiment of the present application provides a chip, which can be applied to an electronic device. The chip includes one or more processors, and the processor is used to call computer instructions to enable the electronic device to execute the method described in the second aspect or any one of the implementations of the second aspect.
[0055] In a ninth aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on an electronic device, enables the electronic device to execute the method described in the first aspect or any one of the implementations of the first aspect.
[0056] In the tenth aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on an electronic device, enables the electronic device to execute the method described in the second aspect or any one of the implementations of the second aspect.
[0057] It can be understood that the electronic device provided in the third aspect, the computer storage medium provided in the fifth aspect, the chip provided in the seventh aspect, and the computer program product provided in the ninth aspect are all used to execute the method described in the first aspect or any one of the implementations of the first aspect. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects of any possible implementation of the first aspect, which will not be repeated here. The electronic device provided in the fourth aspect, the computer storage medium provided in the sixth aspect, the chip provided in the eighth aspect, and the computer program product provided in the tenth aspect are all used to execute the method described in the second aspect or any one of the implementations of the second aspect. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects of any possible implementation of the second aspect, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1A-1G A schematic diagram of a group of image sensors provided in an embodiment of the present application outputting images in different image output modes;
[0059] Figure 2 A schematic diagram of an image sensor switching between different image output modes provided in an embodiment of the present application;
[0060] Figure 3 A schematic diagram of an image sensor provided in an embodiment of the present application switching to an image output mode within focal length_2;
[0061] Figure 4 A schematic diagram of changes in sensitivity and exposure time of an image sensor in a process of switching to an image output mode provided by an embodiment of the present application;
[0062] Figure 5 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;
[0063] Figure 6 A schematic diagram of the software structure of an electronic device provided in an embodiment of the present application;
[0064] Figure 7 A schematic diagram of software and hardware interaction provided in an embodiment of the present application;
[0065] Figure 8A-8D A flowchart of a group of shooting methods provided in an embodiment of the present application;
[0066] Figure 9A-9F A set of user interface schematic diagrams provided for embodiments of the present application. DETAILED DESCRIPTION
[0067] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in the text is only a description of the association relationship of the associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
[0068] It should be understood that the terms "first", "second", etc. in the specification, claims and drawings of the present application 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 process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.
[0069] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments.
[0070] In the actual process of shooting with electronic devices, in order to obtain images containing more image details, electronic devices can improve the dynamic range based on corresponding mechanisms. However, due to the readout time limit, some mechanisms for improving the dynamic range supported in binning output modes (for example, DCG, DAG) cannot be used in remosaic output mode. It can be understood that different output modes have different advantages and disadvantages. For example, reading out images based on the binning mode can increase the number of frames while keeping the field of view area and proportion unchanged, and can also increase the sensitivity of light sensing in dark places, but this output mode will reduce the output resolution. For another example, reading out images based on the remosaic mode can obtain images with many pixels and high clarity, but this output mode will result in small pixels and low sensitivity.
[0071] If an electronic device uses a remosaic mode to read out an image in order to ensure image clarity, the electronic device cannot guarantee the dynamic range and may even suffer from a problem of dynamic range attenuation.
[0072] Based on the above content, the present application provides a shooting method and related equipment. According to the shooting method, the electronic device can adopt different image output modes and dynamic range enhancement mechanisms for different focal lengths during video recording, so as to take into account the clarity, sensitivity and dynamic range of the video frames obtained during the video recording process.
[0073] First, the terms involved in this application are explained to facilitate understanding by those skilled in the art.
[0074] 1. Ambient brightness and brightness scenes
[0075] Ambient brightness may refer to the light intensity (or illumination) of the reflected light of the photographed object captured by the image sensor after being irradiated by light. In some embodiments of the present application, the electronic device may divide the ambient brightness into different brightness scenes based on the difference in light intensity.
[0076] In some embodiments of the present application, the brightness scene may include but is not limited to a highlight scene, a medium-high brightness scene, and a low-brightness scene. It is understandable that different brightness scenes may correspond to different brightness ranges. In a possible implementation, if the ambient brightness is not greater than brightness_1, the brightness scene is a low-brightness scene, if the ambient brightness is greater than brightness_2 and less than brightness_3, the brightness scene is a medium-high brightness scene, and if the ambient brightness is not less than brightness_4, the brightness scene is a highlight scene.
[0077] It is understandable that brightness_1, brightness_2, brightness_3 and brightness_4 can be set according to actual needs, and this application does not limit this. It should be noted that brightness_2 is not less than brightness_1, brightness_3 is greater than brightness_2, and brightness_4 is not less than brightness_3. In some embodiments of this application, brightness_1 can be equal to brightness_2, and brightness_3 can be equal to brightness_4.
[0078] In some embodiments of the present application, brightness_1, brightness_2, brightness_3 and brightness_4 can be logical brightness values set based on the automatic exposure control (AEC) calibration value and the actual ambient brightness. For example, when the AEC calibration exposure time is 1 millisecond and ISO is 1, the logical brightness value is 90, when the AEC calibration exposure time is 2 milliseconds and ISO is 1, the logical brightness value is 80, and when the AEC calibration exposure time is 5 milliseconds and ISO is 1, the logical brightness value is 70. Similarly, other AEC calibration values can also be used to set the corresponding logical brightness values. The electronic device can divide the brightness scene according to the logical brightness value. Exemplarily, brightness_1 and brightness_2 can be equal to 80, and brightness_3 and brightness_4 can be equal to 115. In this case, the brightness range corresponding to the highlight scene can be not less than 115, the brightness range corresponding to the medium and high brightness scene can be 80-115 (excluding 80 and 115), and the brightness range corresponding to the low brightness scene can be not more than 80.
[0079] In some embodiments of the present application, brightness_1, brightness_2, brightness_3 and brightness_4 may be calculated ambient brightness in lux. For example, brightness_1 and brightness_2 may be equal to 200 lux, and brightness_3 and brightness_4 may be equal to 2000 lux. In this case, the brightness range corresponding to the highlight scene may be greater than 2000 lux, the brightness range corresponding to the medium-high brightness scene may be 200 lux-2000 lux, and the brightness range corresponding to the low brightness scene may be 0 lux-200 lux.
[0080] It is understandable that the brightness scenes described in the embodiments of the present application may not be limited to the above three. Moreover, the brightness ranges corresponding to the above three brightness scenes are only used as examples, and the values of the brightness ranges corresponding to different brightness scenes may also be other values, which are not limited in the embodiments of the present application.
[0081] It is understandable that the image sensor mentioned in the present application may be a semiconductor chip, including but not limited to a charge coupled device (CCD) and a complementary metal oxide (CMOS).
[0082] 2. ISO
[0083] 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 CMOS 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.
[0084] 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 produce 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 analog-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 (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 (Digital Gain, DG) in the digital circuit.
[0085] The amplification factor of the analog voltage signal in step (4) is the conversion gain (Conversion Gain, CG). The CG in step (4), the AG in step (5), and the DG in step (7) will affect ISO. In some embodiments of the present application, CG*AG*DG=ISO. In some embodiments of the present application, CG can be a fixed value. In this way, the electronic device can change the size of ISO by adjusting AG and / or DG.
[0086] 3. Dynamic Range (DR) and Dynamic Scenes
[0087] 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 scenes, 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 captured image. The dynamic range that an image sensor can perceive is limited, and is generally determined by the full well capacity (FWC).
[0088] 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.
[0089] 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.
[0090] 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.
[0091] 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.
[0092] For example, the expression of dynamic range can be: DR=20log10(bright / dark). 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.
[0093] In some embodiments of the present application, the electronic device may divide the dynamic scene according to the dynamic range of the shooting scene (hereinafter also referred to as the environmental dynamic range). The dynamic range of the shooting scene is the brightness range from shadow to highlight. In one possible implementation, the dynamic scene may include but is not limited to a low dynamic scene, a high dynamic scene, and an ultra-high dynamic scene.
[0094] In some embodiments of the present application, the electronic device may determine a dynamic scene by acquiring a histogram of an image.
[0095] In a possible implementation, the electronic device may determine the current dynamic range through the acquired image histogram, and determine the current dynamic scene according to the correspondence between the dynamic range and the dynamic scene. It is understandable that the current dynamic range determined by the electronic device through the image histogram may be a logical value, in which case the electronic device may determine the dynamic scene corresponding to the logical value as the current dynamic scene.
[0096] For example, if the logic value of the current dynamic range is less than the dynamic range threshold_1, the current dynamic scene is a low dynamic scene; if the original dynamic scene is a low dynamic scene and the logic value of the current dynamic range is greater than the dynamic range threshold_2, the current dynamic scene is a high dynamic scene; if the original dynamic scene is an ultra-high dynamic scene and the logic value of the current dynamic range is less than the dynamic range threshold_3, the current dynamic scene is a high dynamic scene; if the logic value of the current dynamic range is greater than the dynamic range threshold_4, the current dynamic scene is an ultra-high dynamic scene.
[0097] It is understandable that the dynamic range threshold_1 is less than the dynamic range threshold_2, the dynamic range threshold_2 is less than the dynamic range threshold_3, and the dynamic range threshold_3 is less than the dynamic range threshold_4. The specific values of the dynamic range threshold_1, the dynamic range threshold_2, the dynamic range threshold_3, and the dynamic range threshold_4 can be set according to actual needs, and this application does not limit this. For example, the dynamic range threshold_1 can be 4, the dynamic range threshold_2 can be 6, the dynamic range threshold_3 can be 12, and the dynamic range threshold_4 can be 18.
[0098] In one possible implementation, if the ratio of the area of the shaded part in the histogram to the area of the entire histogram is not greater than ratio_1, the dynamic scene is a low dynamic scene; if the ratio of the area of the shaded part in the histogram to the area of the entire histogram is greater than ratio_2 and less than ratio_3, the dynamic scene is a high dynamic scene; if the ratio of the area of the shaded part in the histogram to the area of the entire histogram is not less than ratio_4, the dynamic scene is an ultra-high dynamic scene.
[0099] It is understandable that ratio_1, ratio_2, ratio_3 and ratio_4 can be set according to actual needs, and the present application does not limit this. It should be noted that ratio_2 is not less than ratio_1, ratio_3 is greater than ratio_2, and ratio_4 is not less than ratio_3. In some embodiments of the present application, ratio_1 can be equal to ratio_2, and ratio_3 can be equal to ratio_4.
[0100] Understandably, the histogram is a graphical representation of the pixels exposed in the image, with the left side of the graph representing black levels and shadows, the right side representing highlights and white levels, and the middle part representing midtones (18% gray). The higher the peaks produced in each area, the more pixels representing a specific tone in that area.
[0101] 4. Signal Noise Ratio (SNR)
[0102] SNR is the ratio of signal to noise, which is an indicator of image quality and can be understood as an important criterion for measuring the quality of an image. The larger the SNR, the better the image quality.
[0103] 5. Image readout mode
[0104] The image readout mode, also known as the image output mode, refers to a mode in which the photosensitive element in the image sensor collects electric charges and reads out and outputs image data in the form of pixels.
[0105] The following is an introduction to the output mode involved in this application:
[0106] (1) binning
[0107] Binning is an image readout mode (i.e., output mode), which refers to adding the charges induced by adjacent pixels (of the same color) together and reading them out in a pixel mode. Binning is divided into horizontal binning and vertical binning. Horizontal binning is to add the charges of adjacent rows together for reading, while vertical binning is to add the charges of adjacent columns together for reading. The advantage of binning technology is that it can combine several pixels to be used as one pixel, while maintaining the field of view angle unchanged, it can increase the photosensitive area, improve the sensitivity to light induction in the dark, and reduce the resolution.
[0108] Specifically, 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. In binning mode, the image sensor can add together the charges induced in adjacent pixel elements collected, read them out in a one-pixel mode, and perform a binning operation on the pixel information. Specifically, in binning mode, the image sensor can merge n×n collected from several pixels into one pixel. Where n is a positive integer. For example, in binning mode, the image sensor can 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, such as Figure 1A As shown, the original pixel distribution of the image acquired by the electronic device through the image sensor may be 4×4, and adjacent 2×2 pixels of the same color may be combined into one pixel, for example, adjacent 2×2 red pixels (such as Figure 1AThe R shown in the figure is merged into one red pixel, so that the 4×4 image is merged into a 2×2 image, and the 2×2 image is used as the binning image output by the image sensor. The binning image is a frame of image. It can be understood that when an electronic device outputs an image in binning mode, the photosensitive area of the pixel can be increased to improve the sensitivity of the dark area to light sensing, and the image readout speed can also be improved.
[0109] (2) Dual Conversion Gain (DCG) and Intra-scene Dual Convert Gain
[0110] For image sensors with DCG capability, one pixel has two potential wells, and the two potential wells correspond to different full well capacities and different conversion gains. The large full well capacity corresponds to low conversion gain (Low Conversion Gain, LCG) and low sensitivity, and the small full well capacity corresponds to high conversion gain (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, so as to obtain two images with different sensitivities through one exposure. These two images are images in high sensitivity mode and images in low sensitivity mode. Among them, the image in high sensitivity mode can be called HCG image, and the image in low sensitivity mode can be called LCG image. It can be understood that the acquisition time of HCG image and LCG image is the same, and the exposure time of HCG image and LCG image is also the same. After the electronic device obtains HCG image and LCG image through the image sensor, it can synthesize HCG image and LCG image into one image to obtain DCG image. Among them, HCG image is intended to restore dark area details, and LCG image is intended to suppress overexposed area and restore bright area content. In this way, the electronic device can reduce the minimum dynamic range value that the image sensor can perceive through HCG, and increase the maximum dynamic range value that the image sensor can perceive through LCG, thereby improving the dynamic range of the image sensor.
[0111] The DCG mode is an image output mode based on the binning mode. If the image sensor supports the DCG capability, the image sensor can output images through the DCG mode to improve the dynamic range of the image and the imaging effect of the image.
[0112] Specifically, after the image sensor combines n×n pixels into one pixel, before outputting an image based on the combined pixels, the image sensor can further use two conversion gains. The image sensor can obtain output image data under two conversion gains based on the HCG channel and the LCG channel, respectively. That is, the image sensor can input the combined pixels into the LCG channel to synthesize an image in a low-sensitivity mode (i.e., an LCG image), and input the combined pixels into the HCG channel to synthesize an image in a high-sensitivity mode (i.e., an HCG image). Figure 1B As shown, the original pixel distribution of the image acquired by the electronic device through the image sensor can be 4×4, and the image sensor can synthesize adjacent 2×2 pixels of the same color into one pixel, and output the LCG image after passing the synthesized pixel through the LCG circuit, the analog circuit and the analog-to-digital conversion module, and output the HCG image after passing the synthesized pixel through the HCG circuit, the analog circuit and the analog-to-digital conversion module. It can be understood that the analog circuit can generate an analog gain (AG) to further amplify the voltage signal.
[0113] It can be understood that in the DCG mode, the image sensor can output two frames of images, namely, an LCG image and an HCG image. The electronic device can fuse the LCG image and the HCG image output by the image sensor through the sensor front end to obtain a fused image, namely, a DCG image.
[0114] It can be understood that the sensitivity corresponding to the low conversion gain channel (i.e., LCG channel) is LCG*AG*DG, and the sensitivity corresponding to the high conversion gain channel (i.e., HCG channel) is HCG*AG*DG. It can be understood that the ratio of the sensitivity of the LCG channel and the HCG channel is fixed, and the ratio is LCG:HCG. Exemplarily, LCG=100, HCG=400, then the sensitivity of the LCG channel: the sensitivity of the HCG channel = 1:4. It should be noted that the ISO in the LCG channel and the HCG channel are different, and the corresponding dynamic ranges of the LCG image and the HCG image are different.
[0115] It can be understood that the processing of the image sensor in the IDCG mode is the same as that in the DCG mode. The difference is that in the IDCG mode, the image sensor can fuse the LCG image and the HCG image and output a fused frame of image, while in the DCG mode, the image sensor outputs two frames of image, and the fusion of the two frames of image is realized by other modules (for example, the sensor front end).
[0116] (3) Dual Analog Gain (DAG)
[0117] An image sensor with DAG capability includes two paths corresponding to different analog gains. The image sensor can use two analog gains in the same scene, so as to obtain two images outputted with different analog gains through one exposure. Among them, the image outputted by high analog gain (HAG) can be called a HAG image, and the image outputted by low analog gain (LAG) can be called a LAG image. It can be understood that the acquisition time of the HAG image and the LAG image is the same, and the exposure time of the HAG image and the LAG image is also the same. After the electronic device obtains the HAG image and the LAG image through the image sensor, the HAG image and the LAG image can be synthesized into one image to obtain a DAG image. It can be understood that the HAG image has improved shadow noise characteristics and can be used to restore dark area details, and the LAG image retains highlight information and can be used to process highlight areas. In this way, the electronic device can reduce the minimum dynamic range value perceivable by the image sensor through HAG, and increase the maximum dynamic range value perceivable by the image sensor through LAG, thereby improving the dynamic range of the image sensor.
[0118] The DAG mode is an image output mode based on the binning mode. If the image sensor supports the DAG capability, the image sensor can output images in the DAG mode to improve the dynamic range of the image and the imaging effect of the image.
[0119] Specifically, after the image sensor synthesizes n×n pixels into one pixel, before outputting an image based on the synthesized pixels, the image sensor can further use two analog gains. The image sensor can obtain output image data under two analog gains based on two paths respectively, that is, the image sensor can input the synthesized pixels into the high analog gain path and the low analog gain path to obtain the HAG image and the LAG image. Figure 1C As shown, the original pixel distribution of the image acquired by the electronic device through the image sensor can be 4×4, and the image sensor can synthesize adjacent 2×2 pixels of the same color into one pixel, and output a LAG image after passing the synthesized pixel through the HCG circuit, the analog circuit and the analog-to-digital conversion module, and output a HAG image after passing the synthesized pixel through the HCG circuit, the analog circuit and the analog-to-digital conversion module. In other words, the image sensor can output a LAG image and a HAG image. In some embodiments of the present application, the electronic device can fuse the LAG image and the HAG image output by the image sensor through the sensor front end to obtain a fused image, namely a DAG image.
[0120] It can be understood that the sensitivity of the low analog gain path (i.e., the LAG path) is HCG*AG*DG, and the gain of the high analog gain path (i.e., the HCG path) is HCG*(m*AG)*DG. Wherein, AG is the analog gain of the LAG path, and m*AG is the analog gain of the HAG path. Wherein, m is greater than 1. It can be understood that AG is less than m*AG. Exemplarily, m=4. In this case, the sensitivity of the LAG path: the sensitivity of the HAG path=1:4.
[0121] According to the above, the analog gains of the LAG path and the HAG path are different, and the analog circuits in the LAG path and the HAG path may be different.
[0122] (4) remosaic
[0123] Remosaic is a picture output mode, which means converting the original pixel arrangement of the 4-cell image sensor into the Bayer arrangement and then reading the image. In other words, remosaic converts the raw image into the classic Bayer pattern, so that the image processor can process the image according to the standard Bayer format.
[0124] Specifically, when the electronic device is in the process of capturing 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. In remosaic mode, the image sensor can rearrange and combine pixels of different colors by swapping pixels, so that every four pixels are rearranged to form an RGGB structure. At this time, the entire image is a Bayer array. Specifically, in remosaic mode, the image sensor can swap several collected pixels, so that every adjacent 2×2 pixels in the swapped pixels are of an RGGB structure. For example, Figure 1D As shown, the original pixel distribution of the image acquired by the electronic device through the image sensor can be 4×4, and the image sensor can rearrange each adjacent 2×2 pixels in the 4×4 pixels into an RGGB structure, and use the rearranged image as the remosaic image obtained by the image sensor. The remosaic image is a frame of image. It can be understood that the electronic device can improve the resolution of the image by outputting the image in remosaic mode.
[0125] (5) In-sensor zoom
[0126] In-sensor zoom is an image output mode based on the remosaic mode. In-sensor zoom refers to reading out the image through the remosaic mode and cropping the read image. It can be understood that the specific size of the cropping process is related to the sensor structure. For example, if the electronic device uses a 2×2 Quadra Sensor, the specific size of the cropping process is 1 / 2 of the original size in length and 1 / 2 of the original size in width.
[0127] Specifically, 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. In the in-sensor zoom mode, the image sensor can rearrange and combine pixels of different colors by swapping pixels, so that every four pixels are rearranged to form an RGGB structure. At this time, the entire image is a Bayer array, and the image sensor then crops the image and uses the cropped image as the image output by the image sensor. For example, Figure 1E As shown, the original pixel distribution of the image acquired by the electronic device through the image sensor can be 4×4, and the image sensor can rearrange each adjacent 2×2 pixels in the 4×4 pixels into an RGGB structure, crop the rearranged image, retain only 2×2 pixels, and use the cropped image containing 2×2 pixels as the image output by the image sensor. The image output by the image sensor is a frame of image. It can be understood that the electronic device can improve the resolution of the image by outputting the image through the in-sensor zoom mode.
[0128] (6) Stagger High Dynamic Range (SHDR)
[0129] Image sensors with Stagger HDR capabilities can increase the frame rate, thereby enabling the acquisition of multiple frames of images with different exposure brightness in one acquisition cycle. For example, Stagger HDR can acquire long-exposure images and short-exposure images in one acquisition cycle. For another example, Stagger HDR can acquire long-exposure images, medium-exposure images, and short-exposure images in one acquisition cycle. Stagger HDR can be used to increase the HDR effect of videos or preview images.
[0130] In comparison, in the Stagger HDR scenario, since images with multiple exposure parameters need to be collected, the frame interval between two frames will be shorter than the frame interval in the non-Stagger HDR scenario. Since the frame interval of Stagger HDR is short, it can greatly improve the ghosting problem in the video and preview process.
[0131] The SHDR modes involved in the present application include an SHDR mode based on an in-sensor zoom mode and an SHDR mode based on IDCG and HCG. Among them, the SHDR mode based on the in-sensor zoom mode refers to the image sensor outputting long exposure images and short exposure images based on the in-sensor zoom mode. That is to say, when the image sensor adopts the SHDR mode based on the in-sensor zoom mode, the image sensor can collect long exposure images and short exposure images, and output long exposure images and short exposure images respectively based on the in-sensor zoom mode. The SHDR mode based on IDCG and HCG refers to the image sensor outputting long exposure images based on the IDCG mode, and outputting short exposure images based on the HCG path. That is to say, when the image sensor adopts the SHDR mode based on IDCG and HCG, the image sensor can collect long exposure images and short exposure images, and output long exposure images based on the IDCG mode, and output short exposure images based on the HCG path.
[0132] For the convenience of description, in this application, the SHDR mode based on the in-sensor zoom mode is recorded as the SHDR (Long_I + Short_I) mode, and the SHDR mode based on IDCG and HCG is recorded as the SHDR (Long IDCG + Short HCG) mode.
[0133] The SHDR (Long_I+Short_I) mode is an image output mode based on the zoom mode in the sensor. Figure 1F As shown, in the SHDR (Long_I+Short_I) mode, the image sensor can collect long exposure images and short exposure images, and use the above-mentioned in-sensor zoom mode to process the collected long exposure images and short exposure images to obtain Long_I images and Short_I images respectively. Among them, the Long_I image is an image obtained after the image sensor processes the long exposure image in the above-mentioned in-sensor zoom mode, and the Short_I image is an image obtained after the image sensor processes the short exposure image in the above-mentioned in-sensor zoom mode.
[0134] It can be understood that in the SHDR (Long_I+Short_I) mode, the sensitivity of the channel that outputs the short exposure image is CG_S*AG*DG, and the sensitivity of the channel that outputs the long exposure image is CG_L*AG*DG. Among them, CG_S is the conversion gain of the channel that outputs the short exposure image, CG_L is the conversion gain of the channel that outputs the long exposure image, and CG_S and CG_L are equal.
[0135] SHDR (Long IDCG + Short HCG) mode is a kind of output mode based on binning mode. Figure 1G As shown, in the SHDR (Long IDCG+Short HCG) mode, the image sensor can capture long exposure images and short exposure images, and the above-mentioned IDCG mode is used to process the captured long exposure image to obtain a Long IDCG image, and the captured short exposure image is output through the HCG path to obtain a Short HCG image.
[0136] 6. Zoom ratio
[0137] The zoom factor mentioned in this application can represent the degree of change in the focal length of the camera, and accordingly, the zoom factor can also represent the degree of change in the field of view and the size change of the subject in the picture (i.e., the image displayed on the display screen of the electronic device). The subject refers to the object photographed by the camera.
[0138] It is understandable that, when the distance between the subject and the camera is the same, the proportion of the subject in the image captured by the long focal length camera will be larger than that in the image captured by the short focal length camera. Specifically, when the focal length changes to n times the original focal length, the size of the subject in the picture also changes to n times the original size. For example, if the focal length of the camera increases to twice the original focal length, the size of the subject in the picture also increases to twice the original size.
[0139] In addition, when the focal length changes, the field of view angle will also change accordingly. Generally speaking, the shorter the focal length, the larger the field of view angle. For example, when the focal length is 15 mm, the field of view angle is about 8 degrees; when the focal length is 10 mm, the field of view angle is about 12 degrees; when the focal length is 7.5 mm, the field of view angle is about 14 degrees; when the focal length is 5 mm, the field of view angle is about 23 degrees; when the focal length is 2.5 mm, the field of view angle is about 45 degrees.
[0140] The zoom factor can be expressed as nx. It means that the focal length changes to n times the original focal length. Where n is a positive number. According to the above, the larger n is, the longer the focal length, the smaller the field of view, and the larger the subject in the image captured by the camera. It is understandable that the present application does not limit the specific value of n. For example, n can be 1, 2, or 10.
[0141] In some embodiments of the present application, the original focal length refers to the focal length of the main camera. Simply put, the main camera refers to the camera that is mainly responsible for shooting. In general, an electronic device may include a main camera and a secondary camera. Among them, the main camera is generally used to capture the subject (i.e., the subject of the shooting), and the main camera has a wide range of applications. It can be used in most shooting scenes, while the secondary camera is generally used to assist in shooting. The secondary camera can be used to supplement the image brightness and details, as well as special shooting scenes such as long-distance shooting and wide-angle shooting. In some other embodiments of the present application, the original focal length refers to the focal length of a standard camera. A standard camera refers to a camera whose field of view is generally in the range of 35 to 50 degrees, and its focal length is roughly equal to the diagonal length of the captured image.
[0142] For example, when the electronic device uses the main camera to shoot, the zoom ratio is 1x. The electronic device can detect a user operation on the zoom ratio control, and in response to the user operation, the electronic device can change the zoom ratio. For example, the electronic device can adjust the zoom ratio to 2x, and can also adjust the zoom ratio to 0.6x.
[0143] A shooting method provided by an embodiment of the present application is introduced below.
[0144] The shooting method may include but is not limited to the following steps:
[0145] S101: The electronic device displays a shooting interface. The shooting interface is used to display images collected by a camera. The camera includes an image sensor.
[0146] The user can trigger the electronic device to display a shooting interface. In some embodiments of the present application, the shooting interface can be a video preview interface. It is understandable that the video preview interface refers to the interface displayed when the electronic device enters the video mode but has not started recording. For example, the video preview interface may include the user interface 300 displayed after the electronic device detects a user operation acting on the video mode option 202. For another example, the video preview interface may also include a user interface 400, a user interface 500, and a user interface 600. In some other embodiments of the present application, the shooting interface can be a video recording interface. It is understandable that the video recording interface refers to the interface displayed after the electronic device starts recording, for example, the video recording interface may include the user interface displayed after the electronic device detects a user operation acting on the video start control 301.
[0147] It is understandable that the camera mentioned in this application refers to a camera module. The camera module may include a lens and an image sensor. In some embodiments of this application, the electronic device may include one or more camera modules.
[0148] In some embodiments of the present application, the electronic device may display the current zoom factor of the electronic device on its shooting interface (eg, Figure 9C-9F shown).
[0149] S102: The electronic device detects the current zoom factor.
[0150] It is understandable that the electronic device can detect the current zoom factor, that is, the zoom factor used when currently acquiring an image.
[0151] In some embodiments of the present application, the electronic device detects the current zoom factor once each time a frame of image is acquired. For example, if the electronic device records video at 30 frames per second (ie, 30 fps), the electronic device may detect the current zoom factor 30 times per second.
[0152] In some embodiments of the present application, the electronic device may detect the current zoom factor once every one or more frames of images.
[0153] In some embodiments of the present application, once the current zoom factor detected by the electronic device is different from the zoom factor detected last time, the electronic device may execute subsequent steps (such as steps S103 to S106).
[0154] In some embodiments of the present application, if the current zoom factor detected by the electronic device is different from the zoom factor detected last time, the current zoom factor can be continuously detected, and if the current zoom factors detected s times continuously are consistent, the electronic device can execute subsequent steps (such as steps S103 to S106). It can be understood that s can be a positive integer. For example, s can be 3.
[0155] S103: When the focal length to which the current zoom factor belongs is focal length_1 or focal length_2, the electronic device determines the current brightness scene and the current dynamic scene based on the image captured by the camera, and determines the image output mode corresponding to the focal length, the current brightness scene and the current dynamic scene to which the current zoom factor belongs. If the image output mode corresponding to the focal length, the current brightness scene and the current dynamic scene to which the current zoom factor belongs is different from the current image output mode, the electronic device switches the image output mode of the image sensor to the image output mode corresponding to the focal length, the current brightness scene and the current dynamic scene to which the current zoom factor belongs, and reads out the image through the image sensor based on the switched image output mode.
[0156] In some embodiments of the present application, focal length_1 may be 1x-1.99x (including 1x and 1.99x), and focal length_2 may be 2x-2.69x (including 2x and 2.69x).
[0157] It is understandable that the electronic device can determine the current ambient brightness based on the acquired image (i.e., the image captured by the camera), and determine that the brightness scene corresponding to the brightness range to which the current ambient brightness belongs is the current brightness scene. The specific implementation method can refer to the above and below, which will not be described in detail here. The electronic device can determine the current dynamic scene based on the histogram of the acquired image. The specific implementation method can refer to the above and below, which will not be described in detail here.
[0158] It can be understood that the correspondence between focal length, brightness scene, dynamic scene and image output mode can be set according to actual needs, and this application does not impose any specific restrictions on this.
[0159] In some embodiments of the present application, the division methods of brightness scenes applicable to different focal lengths may be the same or different. Similarly, the division methods of dynamic scenes applicable to different focal lengths may be the same or different.
[0160] In some embodiments of the present application, the brightness scenes applicable to focal length_1 may include low-brightness scenes, medium-high-brightness scenes, and high-brightness scenes, and the brightness scenes applicable to focal length_2 may also include low-brightness scenes, medium-high-brightness scenes, and high-brightness scenes.
[0161] In a possible implementation, for focal length_1, if the current environment brightness is less than the preset environment brightness_1, the electronic device determines that the current brightness scene is a low brightness scene; if the current environment brightness is greater than the preset environment brightness_2 when the original brightness scene is a low brightness scene, the electronic device determines that the current brightness scene is a medium-high brightness scene; if the current environment brightness is less than the preset environment brightness_3 when the original brightness scene is a high brightness scene, the electronic device determines that the current brightness scene is a medium-high brightness scene; if the current environment brightness is greater than the preset environment brightness_4, the electronic device determines that the current brightness scene is a high brightness scene. Similarly, for focal length_2, if the current environment brightness is less than the preset environment brightness_1, the electronic device determines that the current brightness scene is a low brightness scene; if the current environment brightness is greater than the preset environment brightness_2 when the original brightness scene is a low brightness scene, the electronic device determines that the current brightness scene is a medium-high brightness scene; if the current environment brightness is less than the preset environment brightness_3 when the original brightness scene is a high brightness scene, the electronic device determines that the current brightness scene is a medium-high brightness scene; if the current environment brightness is greater than the preset environment brightness_4, the electronic device determines that the current brightness scene is a high brightness scene.
[0162] It is understandable that the preset environment brightness_1 is less than the preset environment brightness_2, the preset environment brightness_2 is less than the preset environment brightness_3, and the preset environment brightness_3 is less than the preset environment brightness_4. The preset environment brightness_1, the preset environment brightness_2, the preset environment brightness_3, and the preset environment brightness_4 can be set according to actual needs, and the present application does not limit their specific values. For example, the preset environment brightness_1 can be 70, the preset environment brightness_2 can be 90, the preset environment brightness_3 can be 110, and the preset environment brightness_4 can be 120.
[0163] In a possible implementation, for focal length _1, according to the above, if the current environment brightness is not greater than brightness_1, the current brightness scene is a low-brightness scene, if the current environment brightness is greater than brightness_2 and less than brightness_3, the current brightness scene is a medium-high brightness scene, and if the current environment brightness is not less than brightness_4, the current brightness scene is a high-brightness scene. Similarly, for focal length _2, if the current environment brightness is not greater than brightness_1, the current brightness scene is a low-brightness scene, if the current environment brightness is greater than brightness_2 and less than brightness_3, the current brightness scene is a medium-high brightness scene, and if the current environment brightness is not less than brightness_4, the current brightness scene is a high-brightness scene. It can be understood that brightness_1 can be equal to brightness_2, and brightness_3 can be equal to brightness_4. The relevant descriptions of brightness_1, brightness_2, brightness_3 and brightness_4 can be referred to above and will not be repeated here. In a possible implementation, brightness_1 may be greater than preset environment brightness_1 and less than preset environment brightness_2, and brightness_3 may be greater than preset environment brightness_3 and less than preset environment brightness_4. For example, environment brightness_1 may be 70, preset environment brightness_2 may be 90, preset environment brightness_3 may be 110, preset environment brightness_4 may be 120, brightness_1 may be 80, and brightness_3 may be 115. In a possible implementation, brightness_1 may be equal to preset environment brightness_1.
[0164] That is to say, the brightness scene can be divided according to the four thresholds of brightness_1, brightness_2, brightness_3 and brightness_4. For focal length_1 and focal length_2, when the electronic device specifically determines the brightness scene, it can determine the current brightness scene according to the relationship between the current ambient brightness and the above four thresholds, or it can use another set of thresholds (i.e., preset ambient brightness_1, preset ambient brightness_2, preset ambient brightness_3 and preset ambient brightness_4) to specifically determine the current brightness scene on the basis of using the above four thresholds to divide the brightness scene. In this way, it can be ensured that the brightness is stable in a certain brightness scene, and the electronic device switches the image output mode based on the brightness scene to avoid frequent switching of the image output mode due to unstable brightness. Exemplarily, the brightness range corresponding to the low brightness scene is 0-80 (excluding 80). If the original brightness scene is not a low brightness scene, then when the current ambient brightness is less than 70, the electronic device can determine that the current scene is a low brightness scene.
[0165] It should be noted that, in some embodiments of the present application, the brightness scene categories applicable to focal length 1 and focal length 2 may be the same (for example, both include low-brightness scenes, medium-high-brightness scenes, and high-brightness scenes), but the specific division thresholds corresponding to the brightness scenes may be different. Exemplarily, for focal length 1, if the current ambient brightness is not greater than 80, the current brightness scene is a low-brightness scene, but if the current ambient brightness is less than 70 when the original brightness scene is not a low-brightness scene, the electronic device can determine that the current brightness scene is a low-brightness scene. For focal length 2, if the current ambient brightness is not greater than 80, the current brightness scene is a low-brightness scene, but if the current ambient brightness is less than 75 when the original brightness scene is not a low-brightness scene, the electronic device can determine that the current brightness scene is a low-brightness scene.
[0166] In a possible implementation, the dynamic scenes applicable to focal length_1 and focal length_2 are divided differently. The dynamic scenes applicable to focal length_1 may include low dynamic scene_1, high dynamic scene_1 and ultra-high dynamic scene, while the dynamic scenes applicable to focal length_2 may include low dynamic scene_2 and high dynamic scene_2.
[0167] It is understandable that the dynamic range corresponding to low dynamic scene_1 and the dynamic range corresponding to low dynamic scene_2 may be the same or different. The dynamic range corresponding to high dynamic scene_1 and the dynamic range corresponding to high dynamic scene_2 may be the same or different. The dynamic range corresponding to high dynamic scene_2 may include the dynamic range corresponding to an ultra-high dynamic scene. In some embodiments of the present application, the dynamic range corresponding to high dynamic scene_2 may include the dynamic range corresponding to high dynamic scene_1 and the dynamic range corresponding to an ultra-high dynamic scene. It is understandable that the specific division method of the dynamic range and the dynamic scene can refer to the above and below.
[0168] In a possible implementation, the division method of dynamic scenes applicable to focal length_1 may include: if the logical value of the current dynamic range is less than the dynamic range threshold_1, the current dynamic scene is a low dynamic scene_1; if the original dynamic scene is a low dynamic scene_1, and the logical value of the current dynamic range is greater than the dynamic range threshold_2, the current dynamic scene is a high dynamic scene_1; if the original dynamic scene is an ultra-high dynamic scene, and the logical value of the current dynamic range is less than the dynamic range threshold_3, the current dynamic scene is a high dynamic scene_1; if the logical value of the current dynamic range is greater than the dynamic range threshold_4, the current dynamic scene is an ultra-high dynamic scene.
[0169] In a possible implementation, the division method of dynamic scenes applicable to focal length_2 may include: if the logical value of the current dynamic range is less than the dynamic range threshold_5, the current dynamic scene is a low dynamic scene_2; if the logical value of the current dynamic range is not less than the dynamic range threshold_5, the current dynamic scene is a high dynamic scene_2.
[0170] In a possible implementation, the division method of dynamic scenes applicable to focal length_2 may include: if the logical value of the current dynamic range is not greater than the dynamic range threshold_5, the current dynamic scene is a low dynamic scene_2; if the logical value of the current dynamic range is greater than the dynamic range threshold_5, the current dynamic scene is a high dynamic scene_2.
[0171] It can be understood that, according to the above, dynamic range threshold_1 is less than dynamic range threshold_2, dynamic range threshold_2 is less than dynamic range threshold_3, and dynamic range threshold_3 is less than dynamic range threshold_4. The specific values of dynamic range threshold_1, dynamic range threshold_2, dynamic range threshold_3 and dynamic range threshold_4 can be set according to actual needs, and this application does not limit this.
[0172] It is understandable that the dynamic range threshold_5 can be set according to actual needs, and the present application does not limit this. In some embodiments of the present application, the dynamic range threshold_5 can be equal to the dynamic range threshold_2.
[0173] For example, dynamic range threshold_1 may be 4, dynamic range threshold_2 may be 6, dynamic range threshold_3 may be 12, dynamic range threshold_4 may be 18, and dynamic range threshold_5 may be 6.
[0174] Exemplarily, as shown in Table 1, for focal length_1, the image output mode corresponding to low dynamic scene_1 may be a binning mode, the image output mode corresponding to low light scene and high dynamic scene_1 may be a DAG mode, the image output mode corresponding to medium and high light scene and high dynamic scene_1 may be a DCG mode, and the image output mode corresponding to high light scene and ultra-high dynamic scene may be a SHDR (Long IDCG + Short HCG) mode. For focal length_2, the image output mode corresponding to low light scene and low dynamic scene_2 may be a binning mode, the image output mode corresponding to medium and high light scene and low dynamic scene_2 may be an in-sensor zoom mode, the image output mode corresponding to low light scene and high dynamic scene_2 may be a DAG mode, and the image output mode corresponding to high light scene and high dynamic scene_2 may be a SHDR (Long_I + Short_I) mode.
[0175] Table 1
[0176]
[0177]
[0178] It should be noted that, when the focal length to which the current zoom factor belongs is focal length_1 or focal length_2, if the electronic device cannot find the image output mode corresponding to the focal length to which the current zoom factor belongs, the current brightness scene, and the current dynamic scene, the electronic device can maintain the current image output mode. For example, if the current image output mode of the electronic device is the DAG mode, if the current zoom factor of the electronic device is 1.5x, and 1.5x belongs to focal length_1, and it is detected that the current brightness scene is a highlight scene, and the current dynamic scene is a high dynamic scene_1, according to Table 1, the electronic device cannot find the image output mode corresponding to focal length_1, highlight scene, and high dynamic scene_1, then the electronic device can continue to use the DAG mode. For example, if the current image output mode of the electronic device is the in-sensor zoom mode, and if the current zoom ratio of the electronic device is 2.5x, and 2.5x belongs to focal length_2, and if the current brightness scene is detected to be a high-brightness scene, and the current dynamic scene is a low-dynamic scene_2, according to Table 1, the electronic device cannot find the image output mode corresponding to focal length_2, the high-brightness scene, and the low-dynamic scene_2, then the electronic device can continue to use the in-sensor zoom mode. For example, if the current image output mode of the electronic device is the DAG mode, if the current zoom ratio of the electronic device is 2.5x, and 2.5x belongs to focal length_2, and if the current brightness scene is detected to be a medium-high brightness scene, and the current dynamic scene is a high-dynamic scene_2, according to Table 1, the electronic device cannot find the image output mode corresponding to focal length_2, the medium-high brightness scene, and the high-dynamic scene_2, then the electronic device can continue to use the DAG mode.
[0179] According to the above, in some embodiments of the present application, focal length_1 and focal length_2 can use the same brightness scene division method (for example, based on the four thresholds of brightness_1, brightness_2, brightness_3 and brightness_4 to divide low-brightness scenes, medium-high-brightness scenes and high-brightness scenes), but for focal length_2, the electronic device can use another set of thresholds (i.e., preset environment brightness_1, preset environment brightness_2, preset environment brightness_3 and preset environment brightness_4) on the basis of the brightness scene division method to specifically determine the current brightness scene. In the above case, the electronic device determines the image output mode corresponding to the focal length, current brightness scene and current dynamic scene to which the current zoom factor belongs, which can specifically include: when the focal length to which the current zoom factor belongs is focal length_1, the electronic device determines the image output mode corresponding to the current brightness scene and the current dynamic scene. In the above case, the electronic device determines the image output mode corresponding to the focal length to which the current zoom factor belongs, the current brightness scene and the current dynamic scene. Specifically, it may also include: when the focal length to which the current zoom factor belongs is focal length_2, the electronic device determines the current ambient brightness based on the image captured by the camera, and determines the image output mode corresponding to the current ambient brightness, the current brightness scene and the current dynamic scene.
[0180] It can be understood that the correspondence between the brightness scene, dynamic scene and output mode set for focal length_1 can be set according to actual needs, and this application does not make any specific restrictions on this.
[0181] Exemplarily, the correspondence between the brightness scene, dynamic scene and image output mode set for focal length_1 can be shown in Table 1. Specifically, the image output mode corresponding to the low dynamic scene_1 can be a binning mode, the image output mode corresponding to the medium and high brightness scene and the high dynamic scene_1 can be a DCG mode, the image output mode corresponding to the low brightness scene and the high dynamic scene_1 can be a DAG mode, and the image output mode corresponding to the high brightness scene and the ultra-high dynamic scene can be an SHDR (Long IDCG+ShortHCG) mode.
[0182] It can be understood that the correspondence between the ambient brightness, brightness scene, dynamic scene and output mode set for focal length_2 can be set according to actual needs, and this application does not make any specific restrictions on this.
[0183] Exemplarily, the corresponding relationship between the ambient brightness, brightness scene, dynamic scene and image output mode set for focal length_2 can be shown in Table 2. Specifically, when the ambient brightness is less than the preset ambient brightness_1 and the current dynamic scene is the low dynamic scene_2, the corresponding image output mode can be the binning mode; when the ambient brightness is greater than the preset ambient brightness_2 and the current dynamic scene is the low dynamic scene_2, the corresponding image output mode can be the in-sensor zoom mode; when the ambient brightness is less than the preset ambient brightness_1, the current brightness scene is the low brightness scene, and the current dynamic scene is the second high dynamic scene, the corresponding image output mode can be the DAG mode; when the ambient brightness is greater than the preset ambient brightness_4, the current brightness scene is the high brightness scene, and the current dynamic scene is the high dynamic scene_2, the corresponding image output mode can be the SHDR (Long_I+Short_I) mode.
[0184] Table 2
[0185]
[0186] It should be noted that, when the focal length to which the current zoom factor belongs is focal length_2, if the electronic device cannot find the image output mode corresponding to the current ambient brightness, the current brightness scene and the current dynamic scene, the electronic device can maintain the current image output mode. For example, the current image output mode of the electronic device is the binning mode. If the current zoom factor of the electronic device is 2.5x, and 2.5x belongs to focal length_2, and it is detected that the current ambient brightness is greater than the preset ambient brightness_1 but not greater than the preset ambient brightness_2, and the current dynamic scene is the low dynamic scene_2, then the electronic device cannot find the corresponding image output mode (as shown in Table 2), and the current image output mode can be maintained, that is, the electronic device can continue to use the binning mode.
[0187] S104: When the focal length to which the current zoom factor belongs is focal length_3, and the current object distance is greater than the preset object distance_1, the electronic device determines the current dynamic scene based on the image captured by the camera, and determines the image output mode corresponding to the current dynamic scene. If the image output mode corresponding to the current dynamic scene is different from the current image output mode, the electronic device switches the image output mode to the image output mode corresponding to the current dynamic scene, and reads out the image based on the switched image output mode.
[0188] The electronic device can determine the focal length to which the current zoom factor belongs, and the current object distance. When the focal length to which the current zoom factor belongs is focal length_3, and the current object distance is greater than the preset object distance_1, the electronic device can determine the current dynamic scene based on the image captured by the camera, and determine the image output mode corresponding to the current dynamic scene. If the image output mode corresponding to the current dynamic scene is different from the current image output mode, the electronic device can switch the image output mode of the image sensor in the camera to the image output mode corresponding to the current dynamic scene, and read out the image based on the switched image output mode through the image sensor.
[0189] It is understandable that the preset object distance_1 can be set according to actual needs, and this application does not limit this. For example, the preset object distance_1 can be 5 meters.
[0190] In some embodiments of the present application, the electronic device may determine the object distance based on the code value of the focus motor. In some embodiments of the present application, the electronic device may also determine the object distance through some laser devices. In some embodiments of the present application, the electronic device may also determine the object distance through a distance sensor (such as Figure 5 It is understandable that the electronic device can also determine the object distance through other devices (for example, other types of sensors), and this application does not limit this.
[0191] It is understandable that the dynamic scenes applicable to focal length_3 may include low dynamic scene_3 and high dynamic scene_3. It is understandable that the dynamic range corresponding to low dynamic scene_3 may be the same as or different from the dynamic range corresponding to low dynamic scene_2. Similarly, the dynamic range corresponding to high dynamic scene_3 may be the same as or different from the dynamic range corresponding to high dynamic scene_2.
[0192] In a possible implementation, the division method of dynamic scenes applicable to focal length_3 may include: if the logical value of the current dynamic range is less than the dynamic range threshold_6, the current dynamic scene is a low dynamic scene_3; if the logical value of the current dynamic range is not less than the dynamic range threshold_6, the current dynamic scene is a high dynamic scene_3.
[0193] In a possible implementation, the division method of dynamic scenes applicable to focal length_3 may include: if the logical value of the current dynamic range is not greater than the dynamic range threshold_6, the current dynamic scene is a low dynamic scene_3; if the logical value of the current dynamic range is less than the dynamic range threshold_6, the current dynamic scene is a high dynamic scene_3.
[0194] It is understandable that the dynamic range threshold_6 can be set according to actual needs, and the present application does not limit this. In some embodiments of the present application, the dynamic range threshold_6 can be equal to the dynamic range threshold_5. In this case, the dynamic range corresponding to the low dynamic scene_3 is the same as the dynamic range corresponding to the low dynamic scene_2, and the dynamic range corresponding to the high dynamic scene_3 is the same as the dynamic range corresponding to the high dynamic scene_2.
[0195] It can be understood that the correspondence between the dynamic scene set for focal length_3 and the image output mode can be set according to actual needs, and this application does not impose any specific restrictions on this.
[0196] Exemplarily, when the focal length of the current zoom factor of the electronic device is focal length_3, and the current object distance is greater than the preset object distance_1, the electronic device can determine the image output mode based on the corresponding relationship shown in Table 3. Specifically, as shown in Table 3, the image output mode corresponding to the low dynamic scene_3 can be the binning mode, and the image output mode corresponding to the high dynamic scene_3 can be the IDCG mode.
[0197] Table 3
[0198] Dynamic Scenes Output mode (sensor mode) Low dynamic scene_3 Binning mode High Dynamic Scene_3 IDCG Model
[0199] It should also be noted that when the focal length to which the current zoom factor belongs is focal length_3 and the current object distance is greater than the preset object distance_1, the electronic device can use the tele camera. Taking the correspondence between the dynamic scene and the image output mode shown in Table 3 as an example, when the focal length to which the current zoom factor belongs is focal length_3 and the current object distance is greater than the preset object distance_1, if the current dynamic scene is a low dynamic scene_3, the electronic device can determine that the image output mode to be switched is the binning mode of the tele camera, and if the current dynamic scene is a high dynamic scene_3, the electronic device can determine that the image output mode to be switched is the IDCG mode of the tele camera.
[0200] It is understandable that a tele camera usually refers to a telephoto lens, which refers to a lens with a smaller field of view. Shooting with a tele camera can make the subject look farther away and magnified. In some embodiments of the present application, the electronic device may include two cameras. One of the cameras is a wide camera, which is used for daily shooting and can be understood as the so-called main camera (i.e., main camera), and the other camera is a tele camera, which is used to provide an optical zoom function. It is understandable that a wide camera usually refers to a wide-angle lens, which refers to a lens with a larger field of view. Shooting with a wide camera can capture a wide picture.
[0201] It should be noted that the switching of the image output mode mentioned in this application that does not involve changing the camera can all be the switching of the image output mode of the image sensor in the main camera used by the electronic device. In some embodiments of the present application, the electronic device can use the image sensor in the wide camera to switch the image output mode under focal length_1 and focal length_2, and output the image.
[0202] In some embodiments of the present application, focal length_3 can be 2.7x-5.39x (including 2.7x and 5.39x).
[0203] S105: When the focal length to which the current zoom factor belongs is focal length_3, and the current object distance is less than the preset object distance_2, the electronic device determines the current ambient brightness based on the image captured by the camera, and determines the image output mode corresponding to the current ambient brightness. If the image output mode corresponding to the current ambient brightness is different from the current image output mode, the electronic device switches the image output mode of the image sensor to the image output mode corresponding to the current ambient brightness, and reads out the image through the image sensor based on the switched image output mode.
[0204] The electronic device can determine the focal length to which the current zoom factor belongs, and the current object distance. When the focal length to which the current zoom factor belongs is focal length_3, and the current object distance is less than the preset object distance_2, the electronic device can determine the current ambient brightness based on the image captured by the camera, and determine the image output mode corresponding to the current ambient brightness. If the image output mode corresponding to the current ambient brightness is different from the current image output mode, the electronic device can switch the image output mode of the image sensor to the image output mode corresponding to the current ambient brightness, and read out the image through the image sensor based on the switched image output mode.
[0205] It is understandable that the preset object distance_2 is smaller than the preset object distance_1. The preset object distance_2 can be set according to actual needs, and the present application does not limit this. For example, the preset object distance_2 can be 1 meter.
[0206] It is understandable that the specific method for the electronic device to determine the current ambient brightness can be referred to above and will not be repeated here.
[0207] It is understandable that the correspondence between the ambient brightness and the image output mode can be set according to actual needs, and this application does not impose any specific restrictions on this.
[0208] Exemplarily, when the focal length to which the current zoom factor of the electronic device belongs is focal length_3, and the current object distance is less than the preset object distance_2, the electronic device may determine the image output mode based on the corresponding relationship shown in Table 4. Specifically, as shown in Table 4, when the ambient brightness is less than the preset ambient brightness_1, the corresponding image output mode may be the binning mode, and when the ambient brightness is greater than the preset ambient brightness_2, the corresponding image output mode may be the in-sensor zoom mode.
[0209] Table 4
[0210] Ambient brightness Output mode (sensor mode) Less than the preset ambient brightness_1 Binning mode Greater than the preset ambient brightness_2 In-sensor zoom mode
[0211] It should be noted that, when the focal length of the current zoom factor of the electronic device is focal length_3, and the current object distance is less than the preset object distance_2, if the electronic device cannot find the image output mode corresponding to the current ambient brightness, the electronic device can maintain the current image output mode. For example, when the focal length of the current zoom factor is focal length_3, and the current object distance is less than the preset object distance_2, the current image output mode of the electronic device is the binning mode. If the electronic device detects that the current ambient brightness is not less than the preset ambient brightness_1 but not greater than the preset ambient brightness_2, the electronic device cannot find the corresponding image output mode (as shown in Table 4), and the current image output mode can be maintained, that is, the electronic device can still use the binning mode.
[0212] It should also be noted that, when the focal length of the current zoom factor is focal length_3, and the current object distance is less than the preset object distance_2, the electronic device can use the wide camera. Taking the corresponding relationship between the ambient brightness and the image output mode shown in Table 4 as an example, when the focal length of the current zoom factor is focal length_3, and the current object distance is less than the preset object distance_2, if the current ambient brightness is less than the preset ambient brightness_1, the electronic device can determine that the image output mode to be switched is the binning mode of the wide camera, and if the current ambient brightness is greater than the preset ambient brightness_2, the electronic device can determine that the image output mode to be switched is the in-sensor zoom mode of the wide camera.
[0213] It can be understood that the relevant descriptions of the preset ambient brightness_1 and the preset ambient brightness_2 can be referred to above, and this application will not repeat them here.
[0214] S106: When the focal length to which the current zoom factor belongs is focal length_4, the electronic device determines the current ambient brightness and the current object distance based on the image captured by the camera, and determines an image output mode corresponding to the current ambient brightness and the current object distance. If the image output mode corresponding to the current ambient brightness and the current object distance is different from the current image output mode, the electronic device switches the image output mode of the image sensor to the image output mode corresponding to the current ambient brightness and the current object distance, and reads out the image through the image sensor based on the switched image output mode.
[0215] The electronic device can determine the focal length to which the current zoom factor belongs. When the focal length to which the current zoom factor belongs is focal length_4, the electronic device can determine the current object distance, and determine the current ambient brightness based on the image captured by the camera, and determine the image output mode corresponding to the current ambient brightness and the current object distance. If the image output mode corresponding to the current ambient brightness and the current object distance is different from the current image output mode, the electronic device can switch the image output mode of the image sensor in the camera to the image output mode corresponding to the current ambient brightness and the current object distance, and read out the image through the image sensor based on the switched image output mode.
[0216] It is understandable that the specific method for the electronic device to determine the current ambient brightness and the distance of the object can be referred to above and will not be repeated here.
[0217] It is understandable that the correspondence between ambient brightness, object distance and image output mode can be set according to actual needs, and this application does not impose any specific restrictions on this.
[0218] Exemplarily, when the focal length to which the current zoom factor belongs is focal length_4, the electronic device may determine the image output mode based on the corresponding relationship shown in Table 5. Specifically, when the focal length to which the current zoom factor belongs is focal length_4, as shown in Table 5, if the current object distance is greater than the preset object distance_1, and the ambient brightness is less than the preset ambient brightness_1, the corresponding image output mode may be the binning mode of the tele camera, if the current object distance is greater than the preset object distance_1, and the ambient brightness is greater than the preset ambient brightness_2, the corresponding image output mode may be the in-sensor zoom mode of the tele camera, if the current object distance is less than the preset object distance_2, and the ambient brightness is less than the preset ambient brightness_1, the corresponding image output mode may be the binning mode of the wide camera, if the current object distance is less than the preset object distance_2, and the ambient brightness is greater than the preset ambient brightness_2, the corresponding image output mode may be the in-sensor zoom mode of the wide camera.
[0219] Table 5
[0220]
[0221] It can be understood that the relevant descriptions of the preset object distance_1, the preset object distance_2, the preset ambient brightness_1 and the preset ambient brightness_2 can be referred to above, and the present application will not repeat them here.
[0222] It should be noted that, when the focal length to which the current zoom factor belongs is focal length_4, if the electronic device cannot find the image output mode corresponding to the current ambient brightness and the current object distance, the electronic device can maintain the current image output mode. For example, when the focal length to which the current zoom factor belongs is focal length_4, the current image output mode of the electronic device is the binning mode of the tele camera. If the electronic device detects that the current ambient brightness is greater than the preset ambient brightness_1 but not greater than the preset ambient brightness_2, and the current object distance is greater than the preset object distance_1, the electronic device cannot find the corresponding image output mode (as shown in Table 5), and the current image output mode can be maintained, that is, the electronic device can still use the binning mode of the tele camera.
[0223] In some embodiments of the present application, focal length_4 can be 5.4x-10x (including 5.4x and 10x).
[0224] In some embodiments of the present application, when the focal length to which the current zoom factor belongs is focal length_3, if the current object distance changes from greater than the preset object distance_1 to less than the preset object distance_2, the electronic device switches from the tele camera originally used to the wide camera to capture images. In this case, if the electronic device can find an image output mode corresponding to the current ambient brightness, the electronic device can switch the image output mode of the image sensor in the wide camera to the image output mode corresponding to the current ambient brightness, and capture images based on the image output mode. However, if the electronic device cannot find an image output mode corresponding to the current ambient brightness, the electronic device can switch the image output mode of the image sensor in the wide camera to the default image output mode of the wide camera (e.g., binning mode).
[0225] Exemplarily, when the focal length to which the current zoom factor belongs is focal length_3, if the current object distance changes from greater than the preset object distance_1 to less than the preset object distance_2, the electronic device can determine the current ambient brightness. When the current ambient brightness is 80, the preset ambient brightness_1 is 70, and the preset ambient brightness_2 is 90, the electronic device can determine that there is no image output mode corresponding to the current ambient brightness according to Table 4. In this case, the electronic device can switch to the wide camera to capture images, and switch the image output mode of the image sensor in the wide camera to the default image output mode, i.e., the binning mode. In this way, the electronic device can capture images based on the binning mode of the wide camera.
[0226] In some embodiments of the present application, when the focal length to which the current zoom factor belongs is focal length_4, if the current object distance changes from greater than the preset object distance_1 to less than the preset object distance_2, the electronic device switches from the tele camera originally used to the wide camera to collect images. In this case, if the electronic device can find an image output mode corresponding to the current ambient brightness, the electronic device can switch the image output mode of the image sensor in the wide camera to the image output mode corresponding to the current ambient brightness, and collect images based on the image output mode. However, if the electronic device cannot find an image output mode corresponding to the current ambient brightness, the electronic device can switch the image output mode of the image sensor in the wide camera to the default image output mode of the wide camera (e.g., binning mode). Similarly, when the focal length to which the current zoom factor belongs is focal length_4, if the current object distance changes from less than the preset object distance_2 to greater than the preset object distance_1, the electronic device switches from the wide camera originally used to the tele camera to collect images. In this case, if the electronic device can find an image output mode corresponding to the current ambient brightness, the electronic device can switch the image output mode of the image sensor in the tele camera to the image output mode corresponding to the current ambient brightness, and capture images based on the image output mode; however, if the electronic device cannot find an image output mode corresponding to the current ambient brightness, the electronic device can switch the image output mode of the image sensor in the tele camera to the default image output mode of the tele camera (for example, the binning mode).
[0227] Exemplarily, when the focal length to which the current zoom factor belongs is focal length_4, if the current object distance changes from greater than the preset object distance_1 to less than the preset object distance_2, the electronic device can determine the current ambient brightness. When the current ambient brightness is 80, the preset ambient brightness_1 is 70, and the preset ambient brightness_2 is 90, the electronic device can determine that there is no image output mode corresponding to the current ambient brightness according to Table 5. In this case, the electronic device can switch to the wide camera to capture images, and switch the image output mode of the image sensor in the wide camera to the default image output mode, i.e., the binning mode. In this way, the electronic device can capture images based on the binning mode of the wide camera.
[0228] Exemplarily, when the focal length to which the current zoom factor belongs is focal length_4, if the current object distance changes from less than the preset object distance_2 to greater than the preset object distance_1, the electronic device can determine the current ambient brightness. When the current ambient brightness is 80, the preset ambient brightness_1 is 70, and the preset ambient brightness_2 is 90, the electronic device can determine that there is no image output mode corresponding to the current ambient brightness according to Table 5. In this case, the electronic device can switch to the tele camera to capture images, and switch the image output mode of the image sensor in the tele camera to the default image output mode, i.e., the binning mode. In this way, the electronic device can capture images based on the binning mode of the tele camera.
[0229] It should be noted that in some embodiments of the present application, the binning mode is the default image output mode. When the electronic device switches from one focal length to another, the image output mode is first switched to the default image output mode, i.e., the binning mode, and then determines whether the image output mode needs to be switched based on the image output mode switching rule corresponding to the switched focal length (such as steps S103-S106).
[0230] In some embodiments of the present application, the electronic device detects a user operation that triggers a change in zoom ratio (for example, clicking a zoom ratio control on a video recording interface). In response to the user operation, the electronic device can determine whether the focal length to which the zoom ratio is switched is the original focal length. If the focal length to which the zoom ratio is switched is not the original focal length, the electronic device switches the image output mode to the binning mode, and after switching to the binning mode, determines whether it is necessary to switch to another image output mode based on the image output mode switching rule corresponding to the focal length to which the zoom ratio is switched. It can be understood that the original focal length refers to the focal length to which the zoom ratio is used before the electronic device detects the user operation that triggers a change in zoom ratio.
[0231] The above-mentioned embodiments involve a method for switching the image output mode. In order to better understand the embodiments of the present application, a specific implementation method of the method for switching the image output mode involved in the above-mentioned embodiments is introduced below.
[0232] First, the correspondence between the shooting scene and the output mode is introduced.
[0233] It is understandable that the electronic device may store the correspondence between the shooting scene and the image output mode. The shooting scene may be related to the ambient brightness, dynamic range and focal length. In some embodiments of the present application, the shooting scene may only include the brightness scene and the dynamic scene. In some embodiments of the present application, the shooting scene may only include the dynamic scene. In some embodiments of the present application, the shooting scene may only include the dynamic scene and the focal length.
[0234] In some embodiments of the present application, the electronic device may search for an image output mode corresponding to a shooting scene according to a number corresponding to the shooting scene.
[0235] Exemplarily, as shown in Table 6, Table 6 shows the correspondence between the shooting scene and the image output mode, as well as the corresponding AECHDR state enumeration number. Specifically, the AECHDR state enumeration number corresponding to the low dynamic scene is 0 (hereinafter abbreviated as AECHDR=0), and the image output mode corresponding to this number is the binning mode or the in-sensor zoom mode. The AECHDR state enumeration number corresponding to the high dynamic scene under focal length_3 is 1 (hereinafter abbreviated as AECHDR=1), and the image output mode corresponding to this number is the IDCG mode. The AECHDR state enumeration number corresponding to the medium-high brightness high dynamic scene is 2 (hereinafter abbreviated as AECHDR=2), and the image output mode corresponding to this number is the DCG mode. The corresponding AECHDR state enumeration number is 3 (hereinafter abbreviated as AECHDR=3), and the corresponding output mode is DAG mode. The AECHDR state enumeration number corresponding to the high dynamic scene under focal length_2 is 4 (hereinafter abbreviated as AECHDR=4), and the corresponding output mode is SHDR (Long_I+Short_I) mode. The AECHDR state enumeration number corresponding to the highlight ultra-high dynamic scene is 5 (hereinafter abbreviated as AECHDR=5), and the corresponding output mode is SHDR (LongIDCG+Short HCG) mode.
[0236] Table 6
[0237]
[0238] In some embodiments of the present application, the high dynamic scene at focal length_3 may be high dynamic scene_3, and the high dynamic scene at focal length_2 may be high dynamic scene_2.
[0239] It should be noted that, when the AECHDR state enumeration number is 0, the electronic device can determine whether the corresponding image output mode is the binning mode or the in-sensor zoom mode in combination with the focal length to which the current zoom multiple belongs. Specifically, when the AECHDR state enumeration number is 0, if the focal length to which the current zoom multiple belongs is focal length_1, the electronic device can determine that the corresponding image output mode is the binning mode; if the focal length to which the current zoom multiple belongs is focal length_2, the electronic device can determine that the corresponding image output mode is the in-sensor zoom mode; if the focal length to which the current zoom multiple belongs is focal length_3, the electronic device can determine that the corresponding image output mode is the binning mode, specifically the binning mode of the tele camera.
[0240] It should be noted that in some embodiments of the present application, the AECHDR enumeration numbers applicable to different focal lengths may be different. For example, under focal length_1 (i.e., the focal length to which the current zoom factor belongs is focal length_1), the applicable AECHDR enumeration numbers may include 0, 2, 3, and 5; under focal length_2 (i.e., the focal length to which the current zoom factor belongs is focal length_2), the applicable AECHDR enumeration numbers may include 0, 3, and 4; under focal length_3 (i.e., the focal length to which the current zoom factor belongs is focal length_3), the applicable AECHDR enumeration numbers may include 0 and 1; under focal length_4 (i.e., the focal length to which the current zoom factor belongs is focal length_4), there is no applicable AECHDR enumeration number. That is to say, for focal length_1, when the current shooting scene is one of the shooting scenes corresponding to the four AECHDR enumeration numbers of 0, 2, 3 and 5 (i.e., low dynamic scene, medium high brightness high dynamic scene, low brightness high dynamic scene and high brightness ultra-high dynamic scene), the electronic device can switch the image sensor's image output mode to the image output mode corresponding to the AECHDR enumeration number corresponding to the current shooting scene; for focal length_2, when the current shooting scene is one of the shooting scenes corresponding to the three AECHDR enumeration numbers of 0, 3 and 4 (i.e., low dynamic scene, low brightness high dynamic scene and high dynamic scene under focal length_2), the electronic device can switch the image sensor's image output mode to the image output mode corresponding to the AECHDR enumeration number corresponding to the current shooting scene; for focal length_3, when the current shooting scene is one of the shooting scenes corresponding to the two AECHDR enumeration numbers of 0 and 1 (i.e., low dynamic scene and high dynamic scene under focal length_3), the electronic device can switch the image sensor's image output mode to the image output mode corresponding to the AECHDR enumeration number corresponding to the current shooting scene.
[0241] It is worth noting that in some embodiments of the present application, due to the differences in the AECHDR enumeration numbers applicable to different focal lengths, the specific methods for determining the shooting scene at different focal lengths may be different. For example, the AECHDR enumeration numbers applicable to focal length_1, focal length_2, and focal length_3 all include 0. The shooting scene corresponding to AECHDR=0 is a low dynamic scene. In a possible implementation, when the focal length to which the current zoom multiple belongs is focal length_1, if the shooting scene is a low dynamic scene_1, the electronic device can determine AECHDR=0, and when the focal length to which the current zoom multiple belongs is focal length_2, if the shooting scene is a low dynamic scene_2, the electronic device can determine AECHDR=0, and when the focal length to which the current zoom multiple belongs is focal length_3, if the shooting scene is a low dynamic scene_3, the electronic device can determine AECHDR=0. Among them, low dynamic scene_1, low dynamic scene_2, and low dynamic scene_3 can be the same or different. For another example, the AECHDR enumeration numbers applicable to focal length _1 and focal length _2 both include 3. The shooting scene corresponding to AECHDR=3 is a low-brightness and high-dynamic scene. In one possible implementation, when the focal length to which the current zoom multiple belongs is focal length_1, if the shooting scene is a low-brightness scene and a high-dynamic scene_1, the electronic device can determine AECHDR=3, and when the focal length to which the current zoom multiple belongs is focal length_2, if the shooting scene is a low-brightness scene and a high-dynamic scene_2, the electronic device can determine AECHDR=3. Among them, high-dynamic scene_1 and high-dynamic scene_2 can be the same or different. For another example, when the focal length to which the current zoom multiple belongs is focal length_1, if the shooting scene is a medium-high-brightness scene and a high-dynamic scene_1, the electronic device can determine AECHDR=2, and if the shooting scene is a high-brightness scene and an ultra-high-dynamic scene, the electronic device can determine AECHDR=5. For another example, when the focal length of the current zoom factor is focal length_2, if the shooting scene is high dynamic scene_2, the electronic device may determine AECHDR=4. For another example, when the focal length of the current zoom factor is focal length_3, if the shooting scene is high dynamic scene_3, the electronic device may determine AECHDR=1.
[0242] It is understandable that the default image output mode of the electronic device may be a binning mode. In this case, after the electronic device is zoomed to another focal length, the electronic device may first switch the image output mode to the binning mode, and then determine whether to switch to another image output mode according to the zoomed focal length and the shooting scene.
[0243] The following table 6 and Figure 2 A method for switching the output mode is specifically introduced.
[0244] When the focal length to which the current zoom factor of the electronic device belongs is focal length_1, the electronic device can determine the current shooting scene and determine the AECHDR enumeration number corresponding to the current shooting scene. The electronic device can determine that the image output mode corresponding to the AECHDR enumeration number is the target image output mode, and switch the image sensor's image output mode to the target image output mode when the target image output mode is different from the current image output mode.
[0245] It should be noted that, when the focal length to which the current zoom factor of the electronic device belongs is focal length_1, if the AECHDR enumeration number corresponding to the current shooting scene corresponds to a plurality of image output modes, the electronic device can determine one of the plurality of image output modes as the target image output mode based on the focal length to which the current zoom factor belongs.
[0246] For example, according to the above, in some embodiments of the present application, focal length_1 may be 1x-1.99x. Figure 2 It can be seen that, under focal length_1, the electronic device can switch to four image output modes, namely binning mode, DCG mode, DAG mode and SHDR (Long IDCG+Short HCG). It can be understood that for focal length_1, the electronic device can switch to the four image output modes under different switching conditions. Specifically, when the focal length to which the current zoom multiple of the electronic device belongs is focal length_1, if the current shooting scene is a low-dynamic scene, the electronic device can determine that AECHDR=0. According to Table 6, the image output mode corresponding to the number is the binning mode or the in-sensor zoom mode. Since the focal length to which the current zoom multiple belongs is 1x-1.99x, that is, focal length_1, the electronic device can determine that the target image output mode is the binning mode; if the current shooting scene is a medium-high-brightness and high-dynamic scene, the electronic device can determine that AECHDR=2. According to Table 6, the image output mode corresponding to the number is the DCG mode, and the electronic device can determine that the target image output mode is the DCG mode; if the current shooting scene is a low-brightness and high-dynamic scene, the electronic device can determine that AECHDR=3. According to Table 6, the image output mode corresponding to the number is the DAG mode, and the electronic device can determine that the target image output mode is the DAG mode; if the current shooting scene is a high-brightness and ultra-high-dynamic scene, the electronic device can determine that AECHDR=5. According to Table 6, the image output mode corresponding to the number is SHDR (Long IDCG+Short HCG) mode, the electronic device can determine that the target image output mode is SHDR (Long IDCG+Short HCG) mode.
[0247] When the focal length to which the current zoom multiple of the electronic device belongs is focal length_2, the electronic device can determine the current shooting scene and determine the AECHDR enumeration number corresponding to the current shooting scene, and can also determine the current ambient brightness, and then determine the target output mode by combining the current ambient brightness and the output mode corresponding to the AECHDR enumeration number corresponding to the current shooting scene, and switch the image sensor's output mode to the target output mode when the target output mode is different from the current output mode.
[0248] For example, according to the above, in some embodiments of the present application, focal length_2 may be 2x-2.69x. Figure 2 It can be obtained that under focal length_2, there are 4 image output modes that the electronic device can switch to, namely binning mode, in-sensor zoom mode, SHDR (Long_I + Short_I) mode and DAG mode. It can be understood that for focal length_2, the electronic device can switch to the 4 image output modes under different switching conditions. Specifically, when the focal length to which the current zoom multiple of the electronic device belongs is focal length_2, if the current shooting scene is a low-dynamic scene, the electronic device can determine that AECHDR=0. According to Table 6, the image output mode corresponding to this number is the binning mode or the in-sensor zoom mode. In this case, if the current ambient brightness is less than the preset ambient brightness_1, the electronic device can determine that the target image output mode is the binning mode. If the current ambient brightness is greater than the preset ambient brightness_2, the electronic device can determine that the target image output mode is the in-sensor zoom mode. If the current shooting scene is a high-dynamic scene under focal length_2, the electronic device can To determine that AECHDR=4, according to Table 6, the image output mode corresponding to this number is the SHDR (Long_I+Short_I) mode. In this case, if the current ambient brightness is greater than the preset ambient brightness_4, the electronic device can determine that the target image output mode is the SHDR (Long_I+Short_I) mode; if the current shooting scene is a low-brightness and high-dynamic scene, the electronic device can determine that AECHDR=3. According to Table 6, the image output mode corresponding to this number is the DAG mode. In this case, if the current ambient brightness is less than the preset ambient brightness_1, the electronic device can determine that the target image output mode is the DAG mode.
[0249] When the focal length of the current zoom multiple of the electronic device is focal length_3, the electronic device can determine the current object distance, the current ambient brightness, the current shooting scene, and the AECHDR enumeration number corresponding to the current shooting scene. When the current object distance is greater than the preset object distance_1, the electronic device can determine the target image output mode based on the image output mode corresponding to the AECHDR enumeration number corresponding to the current shooting scene, and switch the image output mode of the image sensor to the target image output mode when the target image output mode is different from the current image output mode. When the current object distance is less than the preset object distance_2, the electronic device can determine the target image output mode based on the current ambient brightness, and switch the image output mode of the image sensor to the target image output mode when the target image output mode is different from the current image output mode.
[0250] For example, according to the above, in some embodiments of the present application, focal length_3 may be 2.7x-5.39x. Figure 2It can be obtained that under focal length_3, there are 4 image output modes that the electronic device can switch, namely binning mode (tele), in-sensor zoom mode (wide), binning mode (wide) and IDCG mode (tele). Among them, binning mode (tele) and binning mode (wide) are binning modes adopted by image sensors in different cameras, which can be understood as different image output modes in this application. It can be understood that for focal length_3, the electronic device can switch to these 4 image output modes under different switching conditions. In the case where the focal length to which the current zoom multiple of the electronic device belongs is focal length_3, if the current object distance is greater than the preset object distance_1, the electronic device can use a tele camera, and if the current object distance is less than the preset object distance_2, the electronic device can use a wide camera. Specifically, in the case where the focal length to which the current zoom multiple of the electronic device belongs is focal length_3, if the current object distance is greater than the preset object distance_1, the electronic device can determine the current shooting scene. If the current shooting scene is a low-dynamic scene, the electronic device can determine that AECHDR=0. According to Table 6, the image output mode corresponding to the number is the binning mode or the in-sensor zoom mode, but the focal length to which the current zoom multiple belongs is 2.7x-5.39x, that is, focal length_3. In this case, the electronic device can determine that the target image output mode is the binning mode under the tele camera, that is, the binning mode (tele). If the current shooting scene is a high-dynamic scene under focal length_3, the electronic device can determine that AECHDR=1. According to Table 6, the image output mode corresponding to the number is the IDCG mode, and the electronic device can determine that the target image output mode is the IDCG mode under the tele camera, that is, the IDCG mode (tele). However, in the case where the focal length to which the current zoom multiple of the electronic device belongs is focal length_3, if the current object distance is less than the preset object distance_2, the electronic device can determine the current ambient brightness. If the current ambient brightness is greater than the preset ambient brightness_2, the electronic device can determine that the target image output mode is the in-sensor zoom mode under the wide camera, that is, the in-sensor zoom mode (wide). If the current environment brightness is less than the preset environment brightness_1, the electronic device may determine that the target image output mode is the binning mode under the wide camera, ie, the binning mode (wide).
[0251] When the focal length to which the current zoom factor of the electronic device belongs is focal length 4, the electronic device can determine the current object distance and the current ambient brightness, and determine the target image output mode based on the current object distance and the current ambient brightness, and switch the image sensor's image output mode to the target image output mode when the target image output mode is different from the current image output mode.
[0252] For example, according to the above, in some embodiments of the present application, focal length_4 may be 5.4x-10x. Figure 2 It can be obtained that under focal length_4, there are 4 image output modes that the electronic device can switch, namely binning mode (tele), in-sensor zoom mode (wide), binning mode (wide) and in-sensor zoom mode (tele). Among them, in-sensor zoom mode (tele) and in-sensor zoom mode (wide) are in-sensor zoom modes under different lenses, which can be understood as different image output modes in this application. It can be understood that for focal length_4, the electronic device can switch to these 4 image output modes under different switching conditions. In the case where the focal length to which the current zoom multiple of the electronic device belongs is focal length_4, if the current object distance is greater than the preset object distance_1, the electronic device can use a tele camera, and if the current object distance is less than the preset object distance_2, the electronic device can use a wide camera. Specifically, if the current object distance is greater than the preset object distance_1 and the current ambient brightness is less than the preset ambient brightness_1, the electronic device can determine that the target image output mode is the binning mode under the tele camera; if the current object distance is greater than the preset object distance_1 and the current ambient brightness is greater than the preset ambient brightness_2, the electronic device can determine that the target image output mode is the in-sensor zoom mode under the tele camera; if the current object distance is less than the preset object distance_2 and the current ambient brightness is less than the preset ambient brightness_1, the electronic device can determine that the target image output mode is the binning mode under the wide camera; if the current object distance is less than the preset object distance_2 and the current ambient brightness is greater than the preset ambient brightness_2, the electronic device can determine that the target image output mode is the in-sensor zoom mode under the wide camera.
[0253] According to the above, in some embodiments of the present application, the binning mode is the default image output mode. In this case, when the electronic device switches from one focal length to another, the image output mode is first switched to the default image output mode, i.e., the binning mode, and then based on the above Table 6 and Figure 2 Determine whether to switch the output mode based on the relevant content.
[0254] Combine the following Figure 3 The switching of the image output mode under focal length_2 mentioned in the above embodiment is specifically introduced.
[0255] When the focal length of the current zoom factor of the electronic device is focal length_2, the electronic device can switch the image sensor output mode according to the brightness scene and the dynamic scene. Figure 3As shown, if the current brightness scene is a low brightness scene, and the current dynamic scene is a low dynamic scene, that is, the current shooting scene is a low brightness and low dynamic scene, the electronic device can determine that the target image output mode is a binning mode, and switch the image output mode of the image sensor to the binning mode if the current image output mode is not the binning mode. If the current brightness scene is a medium-high brightness scene, and the current dynamic scene is a low dynamic scene, that is, the current shooting scene is a medium-high brightness and low dynamic scene, the electronic device can determine that the target image output mode is an in-sensor zoom mode, and switch the image output mode of the image sensor to the in-sensor zoom mode if the current image output mode is not the in-sensor zoom mode. If the current brightness scene is a low brightness scene, and the current dynamic scene is a high dynamic scene, that is, the current shooting scene is a low brightness and high dynamic scene, the electronic device can determine that the target image output mode is a DAG mode, and switch the image output mode of the image sensor to the DAG mode if the current image output mode is not the DAG mode. If the current brightness scene is a high-brightness scene, and the current dynamic scene is a high-dynamic scene, that is, the current shooting scene is a high-brightness and high-dynamic scene, the electronic device can determine that the target image output mode is the SHDR (Long_I + Short_I) mode, and switch the image sensor's image output mode to the SHDR (Long_I + Short_I) mode if the current image output mode is not the SHDR (Long_I + Short_I) mode.
[0256] In some embodiments of the present application, Figure 3 As shown, the electronic device uses the binning mode by default to output images after entering the focal length_2 from other focal lengths. In this case, the electronic device can determine the current brightness scene and the current dynamic scene, and determine the target image output mode according to the current brightness scene and the current dynamic scene. Specifically, Figure 3 As shown, if the current brightness scene is a medium-high brightness scene, and the current dynamic scene is a low dynamic scene, the electronic device can determine that the target image output mode is the in-sensor zoom mode, and switch the image sensor's image output mode from the original default image output mode binning mode to the in-sensor zoom mode. If the current brightness scene is a low brightness scene, and the current dynamic scene is a high dynamic scene, the electronic device can determine that the target image output mode is the DAG mode, and switch the image sensor's image output mode from the original default image output mode binning mode to the DAG mode. If the current brightness scene is a high brightness scene, and the current dynamic scene is a high dynamic scene, the electronic device can determine that the target image output mode is the SHDR (Long_I + Short_I) mode, and switch the image sensor's image output mode from the original default image output mode binning mode to the SHDR (Long_I + Short_I) mode.
[0257] In some embodiments of the present application, the electronic device switches the image output mode of the image sensor from the original default image output mode binning mode to the SHDR (Long_I + Short_I) mode, which may specifically include: the electronic device directly switches the image output mode of the image sensor from the original default image output mode binning mode to the SHDR (Long_I + Short_I) mode.
[0258] In some embodiments of the present application, the electronic device switches the image output mode of the image sensor from the original default image output mode binning mode to the SHDR (Long_I + Short_I) mode, which may specifically include: the electronic device first switches the image output mode of the image sensor from the original default image output mode binning mode to the DAG mode, and then switches the image sensor's image output mode from the DAG mode to the SHDR (Long_I + Short_I) mode.
[0259] In some embodiments of the present application, the electronic device switches the image output mode of the image sensor from the original default image output mode binning mode to the SHDR (Long_I + Short_I) mode, which may specifically include: the electronic device first switches the image output mode of the image sensor from the original default image output mode binning mode to the in-sensor zoom mode, and then switches the image sensor's image output mode from the in-sensor zoom mode to the SHDR (Long_I + Short_I) mode.
[0260] According to the above, in some embodiments of the present application, if the current ambient brightness is less than the preset ambient brightness_1, and AECHDR=0, the current shooting scene is a low-brightness and low-dynamic scene. In some embodiments of the present application, if the current ambient brightness is greater than the preset ambient brightness_2, and AECHDR=0, the current shooting scene is a medium-high brightness and low-dynamic scene. In some embodiments of the present application, if the current ambient brightness is less than the preset ambient brightness_1, and AECHDR=3, the current shooting scene is a low-brightness and high-dynamic scene. In some embodiments of the present application, if the current ambient brightness is greater than the preset ambient brightness_4, and AECHDR=4, the current shooting scene is a high-brightness and high-dynamic scene.
[0261] In some embodiments of the present application, Figure 3 The low-brightness and low-dynamic scene shown can be a low-brightness scene and a low-dynamic scene_2, the low-brightness and high-dynamic scene can be a low-brightness scene and a high-dynamic scene_2, the medium-high-brightness and low-dynamic scene can be a medium-high-brightness scene and a low-dynamic scene_2, and the high-brightness and high-dynamic scene can be a high-brightness scene and a high-dynamic scene_2.
[0262] The following describes in detail the switching process between the DAG mode and the SHDR (Long_I+Short_I) mode at focal length_2.
[0263] According to the above, in both the DAG mode and the SHDR (Long_I+Short_I) mode, the electronic device can output two frames of images, and after synthesizing the two frames of images into one frame of image, the image sensor outputs the synthesized frame of image.
[0264] It is understandable that the sensitivity (or ISO), exposure time and aperture size can determine the exposure value (EV) of the acquired image, that is, the brightness (brightness) of the acquired image. In some embodiments, the aperture size of electronic devices such as mobile phones is fixed, so the exposure value can be adjusted by adjusting the exposure time and sensitivity, so that the brightness of the acquired image changes. For ease of understanding, the product of exposure time and sensitivity is used in this application to represent the exposure value. That is, the exposure value is represented by (exposure time * sensitivity). It is understandable that the dynamic range of an image sensor can refer 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 of an image. This means that the dynamic range of an image sensor is related to the exposure value.
[0265] It can be understood that the present application can control the dynamic range of the image sensor by controlling the ratio of the exposure values used when the image sensor acquires two frames of images through two paths in the above two modes. For ease of description, the present application records the ratio of the exposure values used when acquiring two frames of images through two paths (i.e., the ratio between the product of the exposure time and the sensitivity used when acquiring images through two paths) as the sensitivity ratio of the two paths. In the present application, if the sensitivity ratio of the two paths remains unchanged, the dynamic range of the image sensor remains unchanged.
[0266] In the process of switching between the DAG mode and the SHDR (Long_I+Short_I) mode at focal length_2, the electronic device can maintain the dynamic range of the image sensor by maintaining the ratio of the exposure values used when acquiring two frames of images through two paths, thereby avoiding obvious changes in the brightness of the picture due to dynamic range fluctuations, thereby improving the user's shooting experience. That is, the dynamic range of the image sensor can be affected.
[0267] According to the above, if Figure 1C As shown, in DAG mode, there are two paths for outputting images. One path outputs a LAG image with a sensitivity of HCG*AG*DG, and the other path outputs a HAG image with a sensitivity of HCG*(m*AG)*DG. Where m is greater than 1.
[0268] Since the exposure time corresponding to the above two channels is the same, the sensitivity ratio of the two channels in the DAG mode is the ratio of the corresponding sensitivities, that is, 1:m. It can be understood that the specific value of m can be set according to actual needs, and this application does not impose specific restrictions on this. In some embodiments of the present application, m is 4.
[0269] According to the above, if Figure 1F As shown, in the SHDR (Long_I+Short_I) mode, there are two paths for outputting images. One path outputs a short exposure image with a sensitivity of CG_S*AG*DG, and the other path outputs a long exposure image with a sensitivity of CG_L*AG*DG. Among them, CG_S=CG_L.
[0270] Since the sensitivities corresponding to the above two channels are the same, the sensitivity ratio of the two channels in the SHDR (Long_I+Short_I) mode is the ratio of their corresponding exposure times.
[0271] It should be noted that there is a difference between the sensitivity in DAG mode and the sensitivity in SHDR (Long_I + Short_I) mode, and the sensitivity of DAG mode is higher. Since sensitivity is related to gain (for example, sensitivity = CG*AG*DG), for ease of description, the difference between the sensitivity in these two modes is expressed as a ratio between HCG, CG_S and CG_L in this application. Specifically, HCG = a*CG_S = a*CG_L. It can be understood that a is greater than 1, and the specific value of a can be set according to actual needs. This application does not impose specific restrictions on this. In some embodiments of the present application, a is 1.05.
[0272] According to the above, the image output mode corresponding to the low-brightness and high-dynamic scene is the DAG mode, and the image output mode corresponding to the high-brightness and high-dynamic scene is the SHDR (Long_I + Short_I) mode. It can be understood that the switching condition between the DAG mode and the SHDR (Long_I + Short_I) mode involves the change of ambient brightness. Specifically, if the ambient brightness changes from low brightness to high brightness (or the brightness scene changes from a low brightness scene to a high brightness scene), the electronic device switches the image sensor's image output mode from the DAG mode to the SHDR (Long_I + Short_I) mode. If the ambient brightness changes from high brightness to low brightness (or the brightness scene changes from a high brightness scene to a low brightness scene), the electronic device switches the image sensor's image output mode from the SHDR (Long_I + Short_I) mode to the DAG mode.
[0273] like Figure 4As shown, in the DAG mode and the SHDR (Long_I+Short_I) mode, the image sensor outputs two frames of images via channel one and channel two, merges the two frames of images to obtain one frame of image, and outputs this frame of image to other modules for processing.
[0274] Specifically, in DAG mode, channel one is a LAG channel for outputting LAG images, and channel two is a HAG channel for outputting HAG images. Among them, the sensitivity and exposure time corresponding to the LAG channel are HCG*AG*DG and t1, respectively, and the sensitivity and exposure time corresponding to the HAG channel are HCG*(m*AG)*DG and t1, respectively. It can be understood that in DAG mode, the sensitivity ratio of channel one and channel two is 1:m. When the ambient brightness gradually increases and reaches the condition for switching to SHDR (Long_I+Short_I) mode (that is, the current brightness scene becomes a high-brightness scene), the electronic device can switch the image sensor's image output mode from DAG mode to SHDR (Long_I+Short_I) mode. In order to ensure that the dynamic range of the image sensor remains unchanged before and after the switch, it is necessary to maintain the sensitivity ratio of channel one and channel two unchanged, that is, the electronic device needs to maintain the sensitivity ratio of channel one and channel two at 1:m. According to the above, in the SHDR (Long_I+Short_I) mode, the sensitivities corresponding to channel one and channel two are the same, but their corresponding exposure times are different. After switching modes, the electronic device may not change the sensitivity and exposure time corresponding to channel two, and the channel outputs a long exposure image, but change the sensitivity and exposure time corresponding to channel one, and the channel outputs a short exposure image. Specifically, the electronic device may set the sensitivity corresponding to channel one to be the same as the sensitivity corresponding to channel two, and set the exposure time corresponding to channel one according to the sensitivity ratio of the two channels being 1:m. That is, the sensitivity of channel two is still HCG*(m*AG)*DG, i.e. (a*CG_L)*(m*AG)*DG, and the exposure time corresponding to channel two is still t1, and the sensitivity of channel one changes from HCG*AG*DG to HCG*(m*AG)*DG, i.e. (a*CG_S)*(m*AG)*DG, and the exposure time corresponding to channel one changes from t1 to Thus, the sensitivity ratio of the two paths is maintained at 1:m. Figure 4 As shown in the figure, after the image sensor's output mode is switched from DAG mode to SHDR (Long_I+Short_I) mode, the initial sensitivity and initial exposure time used by channel 1 are HCG*(m*AG)*DG and (ie t1 / m), the initial sensitivity and initial exposure time used in channel 2 are HCG*(m*AG)*DG and t1 respectively.
[0275] It is understandable that t1 can be set according to actual needs, and the present application does not impose specific restrictions on this. In some embodiments of the present application, t1 is 1 millisecond (ms). In some other embodiments of the present application, t1 can be 4ms.
[0276] After the electronic device switches the image sensor's image output mode from DAG mode to SHDR (Long_I+Short_I) mode, the exposure time corresponding to the two channels can be gradually increased, and the sensitivity corresponding to the two channels can be reduced. This can avoid the signal-to-noise ratio jump caused by too large an adjustment range of the exposure time and sensitivity corresponding to the two channels, thereby avoiding inconsistent image display effects before and after switching due to the signal-to-noise ratio jump.
[0277] It is understandable that in the process of gradually increasing the exposure time corresponding to the two channels and reducing the sensitivity corresponding to the two channels, the electronic device needs to maintain the sensitivity ratio of the two channels unchanged, that is, maintain the sensitivity ratio of the two channels at 1:m. In some embodiments of the present application, the sensitivity reduced by the electronic device each time is not greater than the sensitivity threshold_1, and the exposure time increased by the electronic device each time is not greater than the time threshold_1. It is understandable that the sensitivity threshold_1 and the time threshold_1 can be set according to actual needs, and the present application does not impose specific restrictions on this. For example, the sensitivity threshold_1 can be 0.1AG, and the time threshold_1 can be 0.5ms.
[0278] In some embodiments of the present application, Figure 4 As shown, the exposure time and sensitivity corresponding to the final channel one are stabilized at t1 and (a*CG_S)*AG*DG, respectively, and the exposure time and sensitivity corresponding to the channel two are stabilized at t1*m and (a*CG_L)*AG*DG, respectively. In some other embodiments of the present application, the exposure time and sensitivity corresponding to the final channel one are stabilized at t1 and CG_S*AG*DG, respectively, and the exposure time and sensitivity corresponding to the channel two are stabilized at t1*m and CG_L*AG*DG, respectively.
[0279] It should be noted that in some embodiments of the present application, when the conditions for switching to the SHDR (Long_I + Short_I) mode are met, if the electronic device detects AC flicker, the electronic device will not switch the image sensor's image output mode to the SHDR (Long_I + Short_I) mode. In this way, it can be avoided that the exposure time used when capturing a short exposure image after switching to the SHDR (Long_I + Short_I) mode is less than the flicker period of the artificial light source (for example, 10 milliseconds) to cause flicker.
[0280] The following introduces the software and hardware structure of the electronic device involved in this application.
[0281] See also Figure 5 , Figure 5 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application.
[0282] The electronic device may include: a processor, an external memory interface, an internal memory, a Universal Serial Bus (USB) interface, a charging management module, a power management module, a battery, an antenna 1, an antenna 2, a mobile communication module, a wireless communication module, a sensor module, a button, a motor, an indicator, a camera, a display screen, and a Subscriber Identity Module (SIM) card slot, etc. The audio module may include a speaker, a receiver, a microphone, an earphone interface, etc., and the sensor module may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc.
[0283] It is to be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device. It is to be understood that the illustrated components can be implemented in hardware, software, or a combination of software and hardware. In some embodiments of the present application, the electronic device may include more components than illustrated. Exemplarily, the electronic device may include other types of sensors. In some other embodiments of the present application, the electronic device may include fewer components than illustrated, or combine certain components, or split certain components, or arrange the components differently. The interface connection relationship between the modules illustrated in the embodiments of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device.
[0284] The processor may include one or more processing units, for example, the processor may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. A memory may also be provided in the processor for storing instructions and data.
[0285] Electronic devices achieve display functions through GPU, display, and application processor.
[0286] The GPU is a microprocessor for image processing, connected to the display screen and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor may include one or more GPUs, which execute program instructions to generate or change display information. The display screen is used to display images, videos, etc. In some embodiments, the electronic device may include one or more display screens.
[0287] The camera is used to capture still images or videos. The ISP is used to process the data fed back by the camera. Light is transmitted to the camera photosensitive element through the lens, and the light signal is converted into an electrical signal. The camera photosensitive element transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. The electronic device may include one or more cameras. In some embodiments of the present application, the electronic device may include a wide camera and a tele camera. It is understandable that the wide camera and the tele camera may include different lenses and image sensors. For ease of description, the present application refers to the lens and image sensor in the wide camera as lens_1 and image sensor_1, respectively, and refers to the lens and image sensor in the tele camera as lens_2 and image sensor_2, respectively.
[0288] The internal memory may include one or more RAMs and one or more non-volatile memories (NVMs). The RAM can be directly read and written by the processor, and can be used to store executable programs (e.g., machine instructions) of the operating system or other running programs, and can also be used to store user and application data, etc. The NVM can also store executable programs and user and application data, etc., and can be loaded into the RAM in advance for direct reading and writing by the processor.
[0289] In the embodiment of the present application, the code for implementing the method described in the embodiment of the present application may be stored in a non-volatile memory. When running the camera application, the electronic device may load the executable code stored in the non-volatile memory into the random access memory.
[0290] The external memory interface can be used to connect to an external non-volatile memory to expand the storage capacity of the electronic device.
[0291] Electronic devices can implement audio functions through audio modules, speakers, receivers, microphones, headphone jacks, and application processors.
[0292] The audio module is used to convert digital audio information into analog audio signal output, and also used to convert analog audio input into digital audio signal. The speaker, also known as the "horn", is used to convert audio electrical signals into sound signals. The receiver, also known as the "earpiece", is used to convert audio electrical signals into sound signals. The microphone, also known as the "microphone" or "microphone", is used to convert sound signals into electrical signals. The headphone jack is used to connect wired headphones.
[0293] A touch sensor is also called a "touch control device". The touch sensor can be set on a display screen. The touch sensor and the display screen form a touch screen, also called a "touch control screen". The touch sensor is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to an application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen. In other embodiments, the touch sensor can also be set on the surface of the electronic device, which is different from the position of the display screen.
[0294] In some embodiments of the present application, the motor in the electronic device may specifically include a focus motor. The electronic device may determine the object distance through the code value of the focus motor, thereby achieving fast focus.
[0295] The distance sensor can be used to measure the distance of an object. The electronic device can measure the distance through infrared or laser. In some embodiments of the present application, in the shooting scene, the electronic device can use the distance sensor to measure the distance to achieve fast focusing.
[0296] It should be noted that the electronic device may further include a photometric sensor. The photometric sensor may be used to determine the ambient brightness and the ambient dynamic range. In some embodiments of the present application, the photometric sensor may be disposed in a camera of the electronic device. It is understandable that the photometric sensor may be used to measure the brightness of light reflected by the subject. That is, reflective photometry. The photometric sensor may include a photometric element. The incident light is refracted through the lens and reflector of the electronic device and enters the built-in photometric sensor, and the photometric sensor may obtain the ambient brightness and the ambient dynamic range.
[0297] See also Figure 6 , Figure 6 A schematic diagram of the software structure of an electronic device provided in an embodiment of the present application.
[0298] In the embodiment of the present application, the software system of the electronic device 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 illustrate the software structure of the electronic device.
[0299] like Figure 6As shown, the electronic device may include: an application layer, an application framework, a hardware abstraction layer (HAL) and a kernel layer (kernel). Among them:
[0300] The application layer can include a series of application packages. Figure 6 As shown in Figure 1, the application package may include applications such as camera, gallery, calendar, map, music, short message, call, etc. The application framework layer provides an application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions. Figure 6 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.
[0301] 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.
[0302] 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.
[0303] 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.
[0304] The phone manager is used to provide communication functions for electronic devices, such as the management of call status (including answering, hanging up, etc.).
[0305] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0306] 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.
[0307] The hardware abstraction layer (HAL) is an interface layer between the operating system kernel and the upper software, and its purpose is to abstract the hardware. The hardware abstraction layer is an abstract interface driven by the device kernel, which is used to implement the application programming interface that provides access to the underlying device to the higher-level Java API framework. HAL can provide a standard interface to display the device hardware functions to the higher-level Java API framework. HAL contains multiple library modules, such as perception modules and AEC modules. Each library module implements an interface for a specific type of hardware component. When the system framework layer API requires access to the hardware of the portable device, the operating system will load the library module for the hardware component. In some embodiments of the present application, the perception module and the AEC module are submodules in the camera HAL. The camera HAL is located between the camera driver and the higher-level Android framework, and can define the interface of the relevant implementation so that the camera application can correctly operate the camera hardware.
[0308] Among them, the perception module can be used to determine the environmental dynamic range (i.e., the dynamic range of the shooting scene) and the environmental brightness based on the image captured by the camera. The AEC module can be used to determine the target image output mode of the image sensor based on the environmental dynamic range, the environmental brightness and / or the object distance, and control the image sensor to switch to the target image output mode, thereby dynamically switching the image sensor's image output mode. For example, the target image output mode determined by the perception module based on the continuous m frames of images captured by the image sensor is the same, and the target image output mode is different from the image output mode currently used by the image sensor, then the perception module can control the image sensor to switch to the target image output mode.
[0309] It is understandable that the camera HAL may also include related modules for pre-processing and post-processing the images captured by the camera, so as to obtain corresponding processed images, for example, preview video frames and recorded video frames in the video recording mode.
[0310] In some embodiments of the present application, the hardware abstraction layer may further include an ISP control module. The ISP control module is a software processing module corresponding to the ISP. The ISP control module may be used to transmit images processed by the ISP to other software modules (e.g., a perception module, a camera application, etc.) so that the other software modules may perform subsequent processing.
[0311] The kernel layer is the layer between hardware and software. The kernel layer is the foundation of the Android operating system. The kernel layer is responsible for hardware drivers, networking, power, system security, and memory management. The kernel layer is an intermediate layer between hardware and software, and its role is to pass application requests to the hardware. The kernel layer can contain display drivers, camera drivers, audio drivers, etc. Among them, the camera driver is used to trigger the camera to turn on when receiving a trigger command sent by the camera application located in the application layer.
[0312] 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.
[0313] based on Figure 5 and Figure 6 The software and hardware structure of the electronic device shown in the figure, and a shooting method provided by an embodiment of the present application is introduced below from the perspective of software and hardware interaction.
[0314] See also Figure 7 , Figure 7 A schematic diagram of software and hardware interaction provided in an embodiment of the present application. Figure 7 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 output from the image sensor 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 image. For example, a RAW video frame.
[0315] In some embodiments of the present application, the electronic device may include multiple cameras. The electronic device may capture images through one camera at a time. In some embodiments of the present application, the electronic device may include a wide camera and a tele camera. The electronic device may use a wide camera and capture images based on lens_1 and image sensor_1 in the wide camera. The electronic device may also switch to a tele camera and capture images based on lens_2 and image sensor_2 in the tele camera. It is understandable that both image sensor_1 and image sensor_2 may use a variety of image output modes. For example, binning mode, in-sensor zoom mode, DCG mode, IDCG mode, DAG mode, SHDR (Long IDCG+ShortHCG) mode, and SHDR (Long_I+Short_I) mode, etc.
[0316] It is understandable that in a partial image output mode, the image sensor can generate two frames of images. In one possible implementation, the image sensor can synthesize the two generated frames of images into one frame of image. In another possible implementation, the image sensor can send the two generated frames of images to the sensor front end, and the sensor front end can synthesize the two frames of images into one frame of image.
[0317] Exemplarily, in DCG mode, IDCG mode, DAG mode, SHDR (Long IDCG + Short HCG) mode and SHDR (Long_I + Short_I) mode, the image sensor can generate two frames of images. Among them, in IDCG mode, the image sensor can synthesize the two generated frames of images into one frame of image. In DCG mode, DAG mode, SHDR (Long IDCG + Short HCG) mode and SHDR (Long_I + Short_I) mode, the image sensor can send the two generated frames of images to the sensor front end, and the sensor front end can synthesize the two frames of images into one frame of image.
[0318] In some embodiments of the present application, in SHDR (Long IDCG + Short HCG) mode and SHDR (Long_I + Short_I) mode, the image sensor can generate three frames of images. Two of them are long exposure images and one is a short exposure image. In one possible implementation, the image sensor synthesizes the two frames of long exposure images into one frame of image, and the image sensor then sends the synthesized frame of image to the sensor front end, and the sensor front end then synthesizes the synthesized frame of image and the short exposure image into one frame of image. In another possible implementation, the image sensor can send the two frames of long exposure images and short exposure images to the sensor front end, and the sensor front end then synthesizes the two frames of long exposure images and short exposure images into one frame of image.
[0319] The image signal processor ISP is used to process the RAW image from the camera and generate an image to be displayed, and send the image to be displayed to the display screen for display. In the video recording scenario, the image to be displayed can be a video frame in YUV (or understood as brightness and chrominance) format. In this case, the image signal processor can send the video frame in YUV format to the display screen for display.
[0320] ISP may include a sensor front end, an image processing engine (IPE), an image processor front end (IFE), an I / O control interface, and the like.
[0321] According to the above, the sensor front end can be used to synthesize multiple frames of images output by the image sensor and the digital-to-analog converter after one exposure, and send the synthesized image to the IFE for processing.
[0322] The process of IFE for processing video frames 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.
[0323] IFE then sends the pre-processed video frames to IPE, and IPE can post-process the pre-processed video frames. On the one hand, IPE 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, IPE can send the post-processed video frame sequence to the perception module, so that the perception module can obtain the environmental dynamic range and environmental brightness based on the post-processed video frame sequence. The perception module then sends the environmental dynamic range and environmental brightness to the AEC module. The AEC module can determine the target output mode of the image sensor based on the focal length of the current zoom factor, the environmental dynamic range and / or the environmental brightness and / or the object distance, and control the image sensor to switch to the target output mode.
[0324] Optionally, the camera may further include a light metering sensor, which may monitor ambient brightness and ambient dynamic range.
[0325] 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, IPE can perform anti-shake processing on the current video frame. In the local tone mapping processing, IPE 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, IPE 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.
[0326] In some embodiments of the present application, if the user triggers the end of recording, the electronic device can save the recorded video frames in the form of video in a gallery.
[0327] In some embodiments of the present application, the user can trigger the saving of video frames during the process of recording a video. In this case, the electronic device can save the video frames triggered by the user in the gallery.
[0328] It is understandable that the ISP control module can control the ISP to transmit the processed image to the perception module. In some embodiments of the present application, the perception module can determine the ambient brightness based on the processed image, and transmit the ambient brightness to the AEC module so that the AEC module determines the target output mode. In some embodiments of the present application, the perception module can determine the ambient brightness and the ambient dynamic range based on the processed image, and transmit the ambient brightness and the ambient dynamic range to the AEC module so that the AEC module determines the target output mode.
[0329] Combine the following Figure 8A-8D A specific implementation of the above embodiment is introduced.
[0330] The following is an example of how the image sensor switches to the image output mode in the preview state after entering the video recording mode. The process of the image sensor switching to the image output mode after starting the video recording can also be referred to the following description, which will not be further explained in this application.
[0331] 1. Enter the video mode, and the image sensor switches to the image output mode at focal length 1 (such as Fig. 8A (shown)
[0332] The user can trigger the electronic device to start the camera application and trigger it to enter the video mode. After the electronic device enters the video mode, it can start to display the video preview screen. In some embodiments of the present application, focal length_1 is the focal length to which the default zoom factor belongs after the electronic device enters the video mode. In this case, after the electronic device enters the video mode, if the user does not trigger switching to other focal lengths outside focal length_1 (i.e., does not adjust the zoom factor or adjusts the zoom factor within focal length_1), the image sensor in the electronic device can switch the image output mode according to the ambient brightness and the ambient dynamic range.
[0333] S201: The electronic device receives an operation that triggers starting a camera application.
[0334] The user can trigger the electronic device to start the camera application by clicking the camera application icon (eg, camera application icon 101), etc. Accordingly, the electronic device can receive the operation of triggering the start of the camera application.
[0335] S202: The electronic device starts a camera application.
[0336] In response to the electronic device receiving the operation of starting the camera application, the electronic device can start the camera application. It is understandable that after the electronic device receives the operation of triggering the start of the camera application, it can not only start the camera application but also start the camera. After the camera is started, it starts to collect images through the lens and image sensor therein.
[0337] For example, Fig. 9AAs shown, the electronic device can display a user interface 100. The user interface 100 displays a page with application icons, which may include multiple application icons (e.g., a camera application icon 101, a settings application icon, a calendar application icon, etc.). It can be understood that the camera application icon 101 is an icon of a camera application (which may be referred to as a camera application for short). The electronic device can detect a user operation on the camera application icon 101, and in response to the user operation, the electronic device can start the camera application and display a screen such as Fig. 9B User interface 200 shown. User interface 200 may include preview area 201, camera mode options area, album shortcut controls, shutter controls, camera flip controls and zoom multiple controls 203. The camera mode options area may display one or more shooting mode options. The shooting mode options may include: night scene mode options, portrait mode options, photo mode options, video mode options 202 and more options. It is understandable that the present application does not limit the form of expression of shooting mode options on the interface. Zoom multiple control 203 may indicate that the zoom multiple currently used by the electronic device is 1x.
[0338] It is understandable that the user operations mentioned in this application may include but are not limited to touch (for example, click, etc.), voice control, gestures and other operations, and this application does not limit this.
[0339] In some embodiments of the present application, after starting the camera application, the CameraUI module in the camera application can display the relevant interface of the camera application (e.g., user interface 200). The CameraUI module can be responsible for the human-computer interaction of the camera application, such as controlling the display of the shooting interface and the interface elements therein, and monitoring and responding to user operations occurring in the shooting interface.
[0340] S203: The CameraUI module in the camera application receives an operation that triggers entering a video recording mode.
[0341] The user can trigger the electronic device to enter the recording mode by clicking on the recording mode option or the like.
[0342] Exemplarily, the operation of triggering the entry into the recording mode may be a user operation on the recording mode option 202 .
[0343] S204: The CameraUI module displays the video preview interface_1.
[0344] After the CameraUI module receives the operation of triggering entering the video recording mode, in response to the operation, the CameraUI module can display the video recording preview interface_1.
[0345] For example, the electronic device may detect a user operation on the video recording mode option 202. In response to the user operation, the electronic device enters the video recording mode and displays a video recording mode. Fig. 9C User interface 300 is shown. User interface 300 is a preview interface in the video recording mode, i.e., a video recording preview interface. The controls included in user interface 300 are substantially the same as those included in user interface 200, except that user interface 300 may include a video recording start control 301 and an HDR control 302. HDR control 302 in user interface 300 is in an on state. It should be noted that when HDR control 302 is in an on state, the electronic device may switch the image sensor output mode in combination with the ambient brightness when detecting different dynamic scenes. Fig. 9C As shown, user interface 300 may also include a zoom factor control 303 .
[0346] According to the above example, the video preview interface_1 may be the user interface 300 .
[0347] In some embodiments of the present application, the video preview interface_1 displays a default zoom factor. The default zoom factor is the initial zoom factor used after entering the video mode. The focal length to which the default zoom factor belongs is focal length_1.
[0348] In some embodiments of the present application, the default zoom factor may be 1x.
[0349] S205: In response to the operation of triggering entering the video recording mode, the image sensor outputs a preview video frame based on a default image output mode.
[0350] After the CameraUI module receives the operation of triggering the entry into the video recording mode, in response to the operation of triggering the entry into the video recording mode, the camera application can control the image sensor to output the preview video frame based on the default image output mode.
[0351] In some embodiments of the present application, after the electronic device switches the shooting mode, the camera application can control the image sensor to switch to the default image output mode. Exemplarily, in the photo mode, the image sensor outputs images based on the DCG mode. If the user triggers the electronic device to switch to the video recording mode in this case, after the electronic device enters the video recording mode, the camera application can control the image sensor to switch to the default image output mode and output the preview video frame based on the default image output mode.
[0352] In some embodiments of the present application, after the CameraUI module in the camera application receives the operation of triggering entering the recording mode, it can notify the AEC module that the user has triggered the electronic device to enter the recording mode, and the AEC module can control the image sensor to output the preview video frame based on the default output mode.
[0353] According to the above, in some embodiments of the present application, the default output mode is the binning mode.
[0354] S206: The image sensor sends a preview video frame to the ISP, which then sends it to the ISP control module.
[0355] After the image sensor outputs the preview video frame based on the default output mode, the preview video frame can be sent to the ISP. The ISP can process the preview video frame and send it to the ISP control module after processing the preview video frame. That is, the preview video frame sent by the ISP control module to the perception module and the CameraUI module may be different from the preview video frame received by the ISP control module.
[0356] S207: The ISP control module sends a preview video frame to the CameraUI module.
[0357] After receiving the preview video frame sent by the ISP, the ISP control module may send the preview video frame to the CameraUI module.
[0358] Correspondingly, the CameraUI module can receive the preview video frame output by the image sensor based on the default output mode sent by the ISP control module.
[0359] S208: The ISP control module sends a preview video frame to the perception module.
[0360] After receiving the preview video frame sent by the ISP, the ISP control module may send the preview video frame to the perception module.
[0361] Correspondingly, the perception module can receive the preview video frame output by the image sensor based on the default output mode sent by the ISP control module.
[0362] S209: The CameraUI module displays the preview video frame output based on the default output mode in the preview window.
[0363] After the CameraUI module receives the preview video frame sent by the ISP control module, it can display the preview video frame output based on the default output mode in the preview window (for example, the preview area 304 in the user interface 300).
[0364] S210: The perception module determines the current environment dynamic range and the current environment brightness based on the preview video frame.
[0365] After the perception module receives the preview video frame output based on the default output mode sent by the ISP control module, it can determine the current environment dynamic range and the current environment brightness based on the preview video frame. It can be understood that the specific implementation method of the electronic device determining the dynamic range and the environment brightness based on the image can refer to the above.
[0366] In some embodiments of the present application, the perception module can determine the current environment dynamic range and the current environment brightness based on the preview video frame, and send the current environment dynamic range and the current environment brightness to the AEC module. In a possible implementation, after the perception module determines the current environment dynamic range and the current environment brightness based on the preview video frame, it can determine the current dynamic scene and the current brightness scene based on the current environment dynamic range and the current environment brightness, respectively.
[0367] Optionally, the perception module can determine the ambient brightness based on the average brightness value of the preview video frame. Specifically, the perception module can count the average brightness values of the pixels in the preview video frame respectively, and determine the ambient brightness based on the average brightness value. In a possible implementation, the perception module can determine whether the preview video frame is overexposed or underexposed based on the average brightness value of the preview video frame, and if the preview video frame is not overexposed or underexposed, then the perception module can determine the current ambient brightness based on the exposure value when the preview video frame is obtained (i.e., the sensitivity and exposure time when the preview video frame is obtained), and the AEC calibration value (including the AEC calibration exposure time and the ISO during calibration), thereby determining the current brightness scene. In a possible implementation, the average brightness value of the pixels in the preview video frame is the current ambient brightness. In a possible implementation, the perception module can determine the brightness scene based on the ambient brightness. For example, if the perception module determines that the average brightness value of the pixels in the preview video frame is not greater than brightness_1, then the perception module can determine that the current shooting scene is a low-brightness scene.
[0368] In some embodiments of the present application, the perception module can directly determine the current brightness scene and the current dynamic scene based on the preview video frame, and send the current brightness scene and the current dynamic scene to the AEC module. According to the above, different brightness scenes can be divided based on the illuminance value of the ambient brightness. For example, low-brightness scenes, medium-high-brightness scenes, and high-brightness scenes. Different brightness scenes have different brightness ranges.
[0369] Optionally, the perception module may determine the brightness scene based on the similarity between the grayscale histogram of the preview video frame and a preset grayscale histogram of the brightness scene.
[0370] Specifically, the electronic device stores grayscale histograms corresponding to different brightness scenes, and the grayscale histogram is used to represent the brightness distribution of pixels in the image, and the brightness can be understood as the brightness when the image is in YUV format. One or more grayscale histograms can be included in each brightness scene. The perception module can obtain the grayscale histogram of the preview video frame based on the preview video frame. And respectively calculate the similarity between the grayscale histogram of the preview video frame and the grayscale histogram corresponding to different brightness scenes. When the similarity is greater than the similarity threshold_1, the perception module can 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 grayscale histogram preset in the low-brightness scene is greater than the similarity threshold_1, the perception module can determine that the current brightness scene is a low-brightness scene, and determine the current ambient brightness. It can be understood that the similarity threshold_1 can be set according to actual needs, and this application does not limit this.
[0371] It is understandable that the way in which the perception module determines the ambient brightness is not limited to the above content, and this application does not limit this.
[0372] S211: The perception module sends the current environment dynamic range and the current environment brightness to the AEC module.
[0373] The perception module determines the current environment dynamic range and the current environment brightness based on the preview video frame, and sends the current environment dynamic range and the current environment brightness to the AEC module.
[0374] Correspondingly, the AEC module can receive the current environment dynamic range and current environment brightness sent by the perception module.
[0375] S208, S210 and S211 may also be executed in real time / periodically / irregularly, so that the image sensor can dynamically switch between different image output modes based on the environmental dynamic range and the environmental brightness.
[0376] Optionally, the electronic device may not perform S208, S210 and S211. In this case, the electronic device may determine the ambient brightness and the ambient dynamic range through another light metering sensor. The relevant description of the light metering sensor can be referred to above and will not be repeated here.
[0377] S212: The AEC module determines a target image output mode based on the current environment dynamic range and the current environment brightness.
[0378] It is understood that after the AEC module receives the current environment dynamic range and the current environment brightness sent by the perception module, it can determine the current dynamic scene and the current brightness scene, and determine the image output mode corresponding to the current dynamic scene and the current brightness scene under focal length_1, that is, the target image output mode. It is understood that the specific method of determining the target image output mode based on focal length_1, the current dynamic scene and the current brightness scene can be referred to above, and will not be repeated here.
[0379] In some embodiments of the present application, the AEC module receives the current dynamic scene and the current brightness scene sent by the perception module, and can determine the target image output mode based on the current dynamic scene and the current brightness scene.
[0380] S213: The AEC module determines whether the target output mode is consistent with the default output mode.
[0381] After the AEC module determines the target image output mode, it can determine whether the target image output mode is consistent with the current image output mode, that is, determine whether the target image output mode is consistent with the default image output mode. If the target image output mode is consistent with the default image output mode, the image sensor continues to output the preview video frame based on the default image output mode, and if the target image output mode is inconsistent with the default image output mode, the electronic device can execute step S214, that is, the AEC module in the electronic device instructs the image sensor to switch from the default image output mode to the target image output mode.
[0382] S214: The AEC module instructs the image sensor to switch from the default image output mode to the target image output mode.
[0383] When the target image output mode is inconsistent with the default image output mode, the AEC module can instruct (or control) the image sensor to switch from the default image output mode to the target image output mode.
[0384] S215: The image sensor outputs a preview video frame based on the target image output mode.
[0385] After the image sensor switches the image output mode to the target image output mode, the preview video frame can be output based on the target image output mode.
[0386] S216: The image sensor sends a preview video frame to the ISP, which then sends it to the ISP control module.
[0387] After the image sensor outputs the preview video frame based on the default image output mode, the preview video frame can be sent to the ISP. The ISP can process the preview video frame and send it to the ISP control module after processing the preview video frame.
[0388] S217: The ISP control module sends a preview video frame to the CameraUI module.
[0389] After receiving the preview video frame output by the image sensor based on the target image output mode sent by the ISP, the ISP control module can send the preview video frame to the CameraUI module.
[0390] Correspondingly, the CameraUI module can receive the preview video frame output by the image sensor based on the target output mode sent by the ISP control module.
[0391] S218: The ISP control module sends a preview video frame to the perception module.
[0392] After the ISP control module receives the preview video frame output by the image sensor based on the target image output mode sent by the ISP, the preview video frame can be sent to the perception module.
[0393] Correspondingly, the perception module can receive the preview video frame output by the image sensor based on the target output mode sent by the ISP control module.
[0394] S219: The CameraUI module displays the preview video frame output based on the target output mode in the preview window.
[0395] After the CameraUI module receives the preview video frame sent by the ISP control module, it can display the preview video frame output based on the target output mode in the preview window (for example, the preview area 304 in the user interface 300).
[0396] 2. Switch to the zoom factor in focal length_2, and the image sensor switches to the image output mode in focal length_2 (such as Figure 8B (shown)
[0397] The user can trigger the adjustment of the zoom ratio of the electronic device in the video recording mode. In some embodiments of the present application, the user can trigger the electronic device to adjust the zoom ratio to the zoom ratio in focal length_2. In this case, if the user does not trigger switching to other focal lengths outside focal length_2 (i.e., does not adjust the zoom ratio or adjusts the zoom ratio within focal length_2), the image sensor in the electronic device can switch the image output mode according to the ambient brightness and the ambient dynamic range.
[0398] In some embodiments of the present application, the electronic device can zoom from the zoom factor in focal length_1 or focal length_3 or focal length_4 to the zoom factor in focal length_2.
[0399] S301: The CameraUI module receives an operation that triggers zooming from the zoom factor in other focal lengths to the zoom factor in focal length_2.
[0400] Specifically, the user can trigger the adjustment of the electronic device from other focal lengths to the zoom multiples in focal length_2 (for example, zoom multiple_1) by clicking the zoom multiple control. Correspondingly, the CameraUI module can receive the operation of triggering the zoom from the zoom multiples in other focal lengths to the zoom multiples in focal length_2. It can be understood that zoom multiple_1 can be any zoom multiple in focal length_2.
[0401] Exemplarily, the operation of triggering the zooming from the zoom factor in other focal segments to the zoom factor in focal segment_2 may be a user operation on the zoom factor control 303 .
[0402] S302: The CameraUI module displays the video preview interface_2.
[0403] In response to triggering the operation of zooming from the zoom factor in other focal lengths to the zoom factor in focal length_2 (e.g., zoom factor_1), the CameraUI module displays the video preview interface_2. In some embodiments of the present application, the video preview interface_2 displays the changed zoom factor (e.g., zoom factor_1).
[0404] For example, the electronic device can detect the effect of Fig. 9C In response to the operation of sliding upward and pausing on the zoom factor control 303 shown in FIG. 1 , the electronic device can adjust the zoom factor from 1x to 2x and display the following information: Fig.9D The user interface 400 shown. The user interface 400 may include an HDR control 302, a zoom factor control 401, and a preview area 402. The HDR control 302 in the user interface 400 is in an on state. The zoom factor control 401 may indicate that the current zoom factor used by the electronic device is 2x.
[0405] According to the above example, the video preview interface_2 may be the user interface 400, and the zoom factor_1 may be 2x.
[0406] S303: In response to triggering an operation of zooming from a zoom factor in other focal lengths to a zoom factor in focal length_2, the image sensor switches to a default image output mode, and outputs a preview video frame based on the default image output mode.
[0407] In some embodiments of the present application, after the electronic device switches the zoom factor in one focal length to the zoom factor in another focal length, the electronic device may switch the image output mode of the image sensor to the default image output mode.
[0408] After the CameraUI module receives an operation that triggers zooming from the zoom factor in other focal lengths to the zoom factor in focal length_2, in response to the operation, the camera application can control the image sensor to output a preview video frame based on the default output mode.
[0409] In some embodiments of the present application, after the CameraUI module in the camera application receives an operation that triggers the zoom factor in other focal lengths to the zoom factor in focal length_2, it can notify the AEC module that the user has triggered the zoom to another focal length, and the AEC module can control the image sensor to output a preview video frame based on the default output mode.
[0410] S304: The image sensor sends a preview video frame to the ISP, which then sends it to the ISP control module.
[0411] S305: The ISP control module sends a preview video frame to the CameraUI module.
[0412] S306: The image sensor sends a preview video frame to the perception module.
[0413] It can be understood that the specific implementation of steps S304 to S306 can refer to the relevant descriptions of steps S206 to S208 and steps S216 to S218.
[0414] S307: The CameraUI module displays the preview video frame output based on the default output mode in the preview window.
[0415] After the CameraUI module receives the preview video frame sent by the ISP control module, it can display the preview video frame output based on the default output mode in the preview window (for example, the preview area 402 in the user interface 400).
[0416] S308: The perception module determines the current environment dynamic range and the current environment brightness based on the preview video frame.
[0417] After the perception module receives the preview video frame output based on the default output mode sent by the ISP control module, the current environment dynamic range and the current environment brightness can be determined based on the preview video frame. It can be understood that the specific implementation method of the electronic device determining the dynamic range and the environment brightness based on the image can be referred to above (such as step S210), which will not be repeated here.
[0418] S309: The perception module sends the current environment dynamic range and the current environment brightness to the AEC module.
[0419] The perception module determines the current environment dynamic range and the current environment brightness based on the preview video frame, and sends the current environment dynamic range and the current environment brightness to the AEC module.
[0420] Correspondingly, the AEC module can receive the current environment dynamic range and current environment brightness sent by the perception module.
[0421] S310: The AEC module determines a target image output mode based on the current environment dynamic range and the current environment brightness.
[0422] It is understood that after the AEC module receives the current environment dynamic range and the current environment brightness sent by the perception module, it can determine the current dynamic scene and the current brightness scene, and determine the output mode corresponding to the current dynamic scene and the current brightness scene under focal length_2, that is, the target output mode. It is understood that the specific method of determining the target output mode based on focal length_2, the current dynamic scene and the current brightness scene can be referred to above, and will not be repeated here.
[0423] In some embodiments of the present application, the AEC module receives the current dynamic scene and the current brightness scene sent by the perception module, and can determine the target image output mode based on the current dynamic scene and the current brightness scene.
[0424] S311: The AEC module determines whether the target output mode is consistent with the default output mode.
[0425] After the AEC module determines the target image output mode, it can determine whether the target image output mode is consistent with the current image output mode, that is, whether the target image output mode is consistent with the default image output mode. If the target image output mode is consistent with the default image output mode, the image sensor continues to output the preview video frame based on the default image output mode, and if the target image output mode is inconsistent with the default image output mode, the electronic device can execute step S312, that is, the AEC module in the electronic device instructs the image sensor to switch from the default image output mode to the target image output mode.
[0426] S312: The AEC module instructs the image sensor to switch from the default image output mode to the target image output mode.
[0427] S313: The image sensor outputs a preview video frame based on the target image output mode.
[0428] S314: The image sensor sends a preview video frame to the ISP, which then sends it to the ISP control module.
[0429] S315: The ISP control module sends a preview video frame to the CameraUI module.
[0430] S316: The ISP control module sends a preview video frame to the perception module.
[0431] S317: The CameraUI module displays the preview video frame output based on the target output mode in the preview window.
[0432] It can be understood that the specific implementation of steps S312 to S317 can refer to the relevant descriptions of steps S206 to S208, and steps S216 to S218.
[0433] 3. Switch to the zoom factor in focal length_3, and the image sensor switches to the image output mode in focal length_3 (such as Figure 8C (shown)
[0434] The user can trigger the adjustment of the zoom ratio of the electronic device in the video recording mode. In some embodiments of the present application, the user can trigger the electronic device to adjust the zoom ratio to the zoom ratio in focal length_3. In this case, if the user does not trigger switching to other focal lengths outside focal length_3 (i.e., does not adjust the zoom ratio or adjusts the zoom ratio within focal length_3), the image sensor in the electronic device can switch the image output mode according to the ambient brightness, ambient dynamic range and object distance.
[0435] In some embodiments of the present application, the electronic device can zoom from the zoom factor in focal length_1 or focal length_2 or focal length_4 to the zoom factor in focal length_3.
[0436] S401: The CameraUI module receives an operation that triggers zooming from the zoom factor in other focal lengths to the zoom factor in focal length_3.
[0437] Specifically, the user can trigger the adjustment of the electronic device from other focal lengths to the zoom multiples in focal length_3 (for example, zoom multiple_2) by clicking the zoom multiple control. Correspondingly, the CameraUI module can receive the operation of triggering the zoom from the zoom multiples in other focal lengths to the zoom multiples in focal length_3. It can be understood that zoom multiple_2 can be any zoom multiple in focal length_3.
[0438] Exemplarily, the operation of triggering the zooming from the zoom factors in other focal lengths to the zoom factors in focal length_3 may be a user operation on the zoom factor control 401.
[0439] S402: The CameraUI module displays the video preview interface_3.
[0440] In response to triggering the operation of zooming from the zoom factor in other focal lengths to the zoom factor in focal length_3, the CameraUI module displays the video preview interface_3. In some embodiments of the present application, the video preview interface_3 displays the changed zoom factor (for example, zoom factor_2).
[0441] For example, the electronic device can detect the effect of Fig.9D In response to the operation of sliding upward and pausing on the zoom factor control 401 shown in FIG. 1 , the electronic device can adjust the zoom factor from 2x to 3x and display the following information: Fig.9EThe user interface 500 shown in FIG. 5 may include an HDR control 302, a zoom factor control 501, and a preview area 502. The HDR control 302 in the user interface 500 is in an on state. The zoom factor control 501 may indicate that the current zoom factor of the electronic device is 3x.
[0442] According to the above example, the video preview interface_3 may be the user interface 500, and the zoom factor_2 may be 3x.
[0443] S403: In response to triggering an operation of zooming from a zoom factor in other focal lengths to a zoom factor in focal length_3, the image sensor switches to a default image output mode, and outputs a preview video frame based on the default image output mode.
[0444] S404: The image sensor sends a preview video frame to the ISP, which then sends it to the ISP control module.
[0445] S405: The ISP control module sends a preview video frame to the CameraUI module.
[0446] S406: The image sensor sends a preview video frame to the perception module.
[0447] S407: The CameraUI module displays the preview video frame output based on the default output mode in the preview window.
[0448] It is understandable that the specific implementation of steps S403 to S408 may refer to the relevant description of steps S303 to S307.
[0449] S408: The perception module determines the current environment dynamic range and the current environment brightness based on the preview video frame.
[0450] It can be understood that the specific method in which the perception module determines the current environment dynamic range and the current environment brightness based on the preview video frame can be referred to above and will not be repeated here.
[0451] In some embodiments of the present application, the perception module may determine the current environment dynamic range and the current environment brightness based on the preview video frame, and send the current environment dynamic range and the current environment brightness to the AEC module.
[0452] In some other embodiments of the present application, after the perception module determines the current environment dynamic range and the current environment brightness based on the preview video frame, it can determine the current dynamic scene and the current brightness scene, and send the current dynamic scene and the current brightness scene to the AEC module.
[0453] S409: The perception module sends the current environment dynamic range and the current environment brightness to the AEC module.
[0454] After the perception module determines the current environment dynamic range and the current environment brightness based on the preview video frame, it can send the current environment dynamic range and the current environment brightness to the AEC module. Correspondingly, the AEC module can receive the current environment dynamic range and the current environment brightness sent by the perception module.
[0455] In some embodiments of the present application, the perception module may determine the current dynamic scene based on the current environmental dynamic range. In this scenario, the perception module may send the current dynamic scene to the AEC module.
[0456] Similarly, in some embodiments of the present application, the perception module may determine the current brightness scene based on the current ambient brightness. In this scenario, the perception module may send the current brightness scene to the AEC module.
[0457] S410: The distance sensor determines the current object distance.
[0458] It can be understood that the distance sensor can emit infrared or laser to measure the distance between the electronic device and the subject, so as to obtain the current object distance. For specific implementation, please refer to the above or related technical documents.
[0459] S411: The distance sensor sends the current object distance to the AEC module.
[0460] It is understandable that after the distance sensor determines the current object distance, it can send the current object distance to the AEC module. Correspondingly, the AEC module can receive the current object distance sent by the distance sensor.
[0461] S412: The AEC module determines the target image output mode based on the current environment dynamic range, the current environment brightness and the current object distance.
[0462] It can be understood that after the AEC module receives the current environment dynamic range, the current environment brightness and the current object distance, it can determine whether the current object distance is greater than the preset object distance_1, and whether it is less than the preset object distance_2. If the current object distance is greater than the preset object distance_1, the AEC module can determine the current dynamic scene based on the current environment dynamic range, and determine the image output mode corresponding to the current dynamic scene at focal length_3, which is the target image output mode. If the current object distance is less than the preset object distance_2, the AEC module can determine the current brightness scene based on the current environment brightness, and determine the image output mode corresponding to the current brightness scene at focal length_3, which is the target image output mode.
[0463] It can be understood that the specific method of determining the target output mode based on focal length_3, current object distance, and current dynamic scene / current brightness scene can be referred to above and will not be repeated here.
[0464] S413: The AEC module determines whether the target output mode is consistent with the default output mode.
[0465] After the AEC module determines the target image output mode, it can determine whether the target image output mode is consistent with the current image output mode, that is, whether the target image output mode is consistent with the default image output mode. If the target image output mode is consistent with the default image output mode, the image sensor continues to output the preview video frame based on the default image output mode, and if the target image output mode is inconsistent with the default image output mode, the electronic device can execute step S414, that is, the AEC module in the electronic device instructs the image sensor to switch from the default image output mode to the target image output mode.
[0466] S414: The AEC module instructs the image sensor to switch from the default image output mode to the target image output mode.
[0467] It should be noted that the electronic device may include multiple cameras. In some embodiments of the present application, the AEC module may instruct the image sensor in the camera originally used to switch the image output mode, and use the image sensor to output the image. For example, the default image output mode is the binning mode under the tele camera, and the target image output mode is the IDCG mode under the tele camera. The AEC module may instruct the image sensor in the tele camera (i.e., image sensor_2) to switch to the IDCG mode, and use image sensor_2 to output the image. In some embodiments of the present application, the AEC module may instruct the image sensors in other cameras to switch the image output mode, and use the image sensor to output the image. For example, the default image output mode is the binning mode under the tele camera, and the target image output mode is the sensor-in-zoom mode under the wide camera. The AEC module may instruct the image sensor in the wide camera (i.e., image sensor_1) to switch to the sensor-in-zoom mode, and use image sensor_1 to output the image.
[0468] It can be understood that the relevant description of switching cameras when switching the target output mode at focal length_3 can be found above and will not be repeated here.
[0469] S415: The image sensor outputs a preview video frame based on the target image output mode.
[0470] S416: The image sensor sends a preview video frame to the ISP, which then sends it to the ISP control module.
[0471] S417: The ISP control module sends a preview video frame to the CameraUI module.
[0472] S418: The ISP control module sends a preview video frame to the perception module.
[0473] S419: The CameraUI module displays the preview video frame output based on the target output mode in the preview window.
[0474] It can be understood that the specific implementation of steps S415 to S419 can refer to the relevant description of steps S215 to S219.
[0475] 4. Switch to the zoom factor in focal length_4, and the image sensor switches to the image output mode in focal length_4 (such as Fig.8D (shown)
[0476] The user can trigger the adjustment of the zoom ratio of the electronic device in the video recording mode. In some embodiments of the present application, the user can trigger the electronic device to adjust the zoom ratio to the zoom ratio in focal length_4. In this case, if the user does not trigger switching to other focal lengths outside focal length_4 (i.e., does not adjust the zoom ratio or adjusts the zoom ratio within focal length_4), the image sensor in the electronic device can switch the image output mode according to the ambient brightness, ambient dynamic range and object distance.
[0477] In some embodiments of the present application, the electronic device can zoom from the zoom factor in focal length_1 or focal length_2 or focal length_3 to the zoom factor in focal length_4.
[0478] S501: The CameraUI module receives an operation that triggers zooming from a zoom factor in another focal length to a zoom factor_3 in focal length_4.
[0479] Specifically, the user can trigger the adjustment of the electronic device from other focal lengths to the zoom multiples in focal length_4 (for example, zoom multiple_2) by clicking the zoom multiple control. Correspondingly, the CameraUI module can receive the operation of triggering the zoom multiples in other focal lengths to the zoom multiples in focal length_4. It can be understood that zoom multiple_3 can be any zoom multiple in focal length_4.
[0480] Exemplarily, the operation of triggering the zooming from the zoom factor in other focal lengths to the zoom factor in focal length_4 may be a user operation on the zoom factor control 501.
[0481] S502: The CameraUI module displays the video preview interface_4.
[0482] In response to triggering the operation of zooming from the zoom factor in other focal lengths to the zoom factor in focal length_4, the CameraUI module displays the video preview interface_4. In some embodiments of the present application, the video preview interface_4 displays the changed zoom factor (for example, zoom factor_3).
[0483] For example, the electronic device can detect the effect of Fig.9EIn response to the operation of sliding upward and pausing on the zoom factor control 501 shown in FIG. 1 , the electronic device can adjust the zoom factor from 3x to 6x and display the following: Fig.9F The user interface 600 shown. The user interface 600 may include the HDR control 302, the zoom factor control 601 and the preview area 602. Among them, the HDR control 302 in the user interface 600 is in a closed state. The zoom factor control 601 may indicate that the current zoom factor adopted by the electronic device is 6x.
[0484] According to the above example, the video preview interface_4 may be the user interface 600, and the zoom factor_3 may be 6x.
[0485] S503: In response to triggering an operation of zooming from a zoom factor in other focal lengths to a zoom factor in focal length_4, the image sensor switches to a default image output mode, and outputs a preview video frame based on the default image output mode.
[0486] S504: The image sensor sends a preview video frame to the ISP, which then sends it to the ISP control module.
[0487] S505: The ISP control module sends a preview video frame to the CameraUI module.
[0488] S506: The ISP control module sends a preview video frame to the perception module.
[0489] S507: The CameraUI module displays the preview video frame output based on the default output mode in the preview window.
[0490] It can be understood that the specific implementation of steps S503 to S507 can refer to the relevant description of steps S303 to S307.
[0491] S508: The perception module determines the current environment brightness based on the preview video frame.
[0492] It is understandable that the relevant description of the perception module determining the current ambient brightness can be found above and will not be repeated here.
[0493] In some embodiments of the present application, after the perception module determines the current environment brightness based on the preview video frame, the current environment brightness can be sent to the AEC module.
[0494] In some other embodiments of the present application, after the perception module determines the current environment brightness based on the preview video frame, it can determine the current brightness scene based on the current environment brightness and send the current brightness scene to the AEC module.
[0495] S509: The perception module sends the current ambient brightness to the AEC module.
[0496] Correspondingly, the AEC module can receive the current ambient brightness sent by the perception module.
[0497] S510: The distance sensor determines the current object distance.
[0498] It is understandable that the distance sensor can determine the current object distance. For details, please refer to the above and related technical documents, which will not be repeated here.
[0499] S511: The distance sensor sends the current object distance to the AEC module.
[0500] Accordingly, the AEC module can receive the current object distance sent by the distance sensor.
[0501] S512: The AEC module determines the target image output mode based on the current ambient brightness and the current object distance.
[0502] After the AEC module receives the current ambient brightness and current object distance sent by the perception module, it can determine the current brightness scene based on the current ambient brightness, and determine the output mode corresponding to the current brightness scene and the current object distance. This output mode is the target output mode.
[0503] In some embodiments of the present application, the AEC module may receive the current brightness scene sent by the perception module. In this case, the AEC module may directly determine that the output mode corresponding to the current brightness scene and the current object distance is the target output mode. It is understandable that the correspondence between the brightness scene, the object distance and the output mode can be referred to above and will not be repeated here.
[0504] S513: The AEC module determines whether the target output mode is consistent with the default output mode.
[0505] After the AEC module determines the target image output mode, it can determine whether the target image output mode is consistent with the current image output mode, that is, whether the target image output mode is consistent with the default image output mode. If the target image output mode is consistent with the default image output mode, the image sensor continues to output the preview video frame based on the default image output mode, and if the target image output mode is inconsistent with the default image output mode, the electronic device can execute step S514, that is, the AEC module in the electronic device instructs the image sensor to switch from the default image output mode to the target image output mode.
[0506] S514: The AEC module instructs the image sensor to switch from the default image output mode to the target image output mode.
[0507] Similar to step S414, when the electronic device switches to the target image output mode, it can switch cameras and use image sensors in other cameras to output images. The specific method can be referred to above and will not be repeated here.
[0508] S515: The image sensor outputs a preview video frame based on the target image output mode.
[0509] S516: The image sensor sends a preview video frame to the ISP, which then sends it to the ISP control module.
[0510] S517: The ISP control module sends a preview video frame to the CameraUI module.
[0511] S518: The ISP control module sends a preview video frame to the perception module.
[0512] S519: The CameraUI module displays the preview video frame output based on the target output mode in the preview window.
[0513] It can be understood that the specific implementation of steps S515 to S519 can refer to the relevant description of steps S215 to S219.
[0514] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person of ordinary skill in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A shooting method, characterized in that: Applied to an electronic device, the electronic device includes a first camera, the first camera includes a first image sensor; the method includes: Display a shooting interface; the shooting interface is used to display the image captured by the first camera; When the zoom ratio belongs to the first focal length, when the dynamic range changes from the first dynamic range to the second dynamic range, and the ambient brightness changes from the first brightness to the second brightness, switching the image output mode of the first image sensor from the in-sensor zoom mode to the SHDR mode; Acquire a first image in the SHDR mode by using the first image sensor; The first dynamic range is smaller than the second dynamic range, and the first brightness is smaller than the second brightness.
2. The method according to claim 1, characterized in that The method further comprises: When the zoom ratio belongs to the first focal length, when the ambient brightness changes from the second brightness to the third brightness, switching the image output mode of the first image sensor from the SHDR mode to the DAG mode; acquiring a fourth image by the first image sensor in the DAG mode; Wherein, the third brightness is smaller than the second brightness.
3. The method according to claim 1 or 2, characterized in that The method further comprises: When the zoom ratio belongs to the first focal length, when the dynamic range changes from the third dynamic range to the fourth dynamic range, switching the image output mode of the first image sensor from the DAG mode to the binning mode; outputting an image by the first image sensor in the binning mode; The brightness of the fourth dynamic range is smaller than that of the third dynamic range.
4. The method according to any one of claims 1 to 3, characterized in that The electronic device further includes a second camera, the second camera includes a second image sensor; the shooting interface is further used to display an image captured by the second camera; and the method further includes: When the zoom ratio belongs to the second focal length, the second image sensor outputs an image; When the object distance is greater than the first object distance, when the dynamic range changes from the fifth dynamic range to the sixth dynamic range, switching the image output mode of the second image sensor from the binning mode to the IDCG mode; acquiring a seventh image in the IDCG mode by using the second image sensor; Among them, the second focal length is greater than the first focal length, and the sixth dynamic range is greater than the fifth dynamic range.
5. The method according to any one of claims 1 to 4, characterized in that Acquiring a first image in the SHDR mode by using the first image sensor includes: Outputting M frames of images in the SHDR mode through the first image sensor, where M is an integer greater than 1; The M frames of images are synthesized into the first image.
6. The method according to any one of claims 1 to 5, characterized in that The first dynamic range is smaller than a first dynamic range threshold, the second dynamic range is larger than the first dynamic range threshold, the first brightness is smaller than a first preset ambient brightness, and the second brightness is larger than the first preset ambient brightness.
7. The method according to any one of claims 1 to 6, characterized in that The SHDR mode is an image output mode for processing an image based on the in-sensor zoom mode. The in-sensor zoom mode is an image output mode for processing an original image in a processing method corresponding to the remosaic mode, and then performing cropping processing on the processed image. The processing method corresponding to the remosaic mode is a processing method for converting the original pixel arrangement of the image sensor into a classic Bayer arrangement.
8. The method according to claim 2, characterized in that Acquiring a fourth image in the DAG mode by using the first image sensor includes: outputting a second image and a third image by the first image sensor in the DAG mode; The second image and the third image are combined to form the fourth image.
9. The method according to claim 8, characterized in that Outputting the second image and the third image in the DAG mode by the first image sensor includes: Acquire a first original image based on a first exposure time by using the first image sensor, process the first original image according to a first sensitivity based on a processing method corresponding to a binning mode to obtain the second image, and process the first original image according to a second sensitivity based on a processing method corresponding to the binning mode to obtain the third image; Among them, the first sensitivity is determined based on the second conversion gain, the first analog gain and the first digital gain, the second sensitivity is determined based on the second conversion gain, the second analog gain and the second digital gain, and the first analog gain is less than the second analog gain; the processing method corresponding to the binning mode is a processing method of adding the original adjacent pixels of the image sensor together and reading them out.
10. The method according to any one of claims 2, 8 and 9, characterized in that: The third brightness is less than the second preset ambient brightness, and the second preset ambient brightness is less than the first preset ambient brightness; in the process in which the ambient brightness changes from the second brightness to the third brightness, the dynamic range is greater than the first dynamic range threshold.
11. The method according to claim 4, characterized in that Acquiring a seventh image in the IDCG mode by using the second image sensor includes: outputting a fifth image and a sixth image through the second image sensor in the IDCG mode; The fifth image and the sixth image are combined into the seventh image.
12. The method according to claim 11, characterized in that Outputting the fifth image and the sixth image in the IDCG mode by the second image sensor includes: Acquire a second original image through the second image sensor, process the second original image according to the third sensitivity based on the processing method corresponding to the binning mode to obtain the fifth image, and process the second original image according to the fourth sensitivity based on the processing method corresponding to the binning mode to obtain the sixth image; Among them, the third sensitivity is determined based on a third conversion gain, a third analog gain and a third digital gain, the fourth sensitivity is determined based on a fourth conversion gain, a fourth analog gain and a fourth digital gain, and the third conversion gain is less than the fourth conversion gain; the processing method corresponding to the binning mode is a processing method of adding together and reading out the original adjacent pixels of the image sensor.
13. The method according to any one of claims 4, 11 and 12, characterized in that: The fifth dynamic range is smaller than the second dynamic range threshold, and the sixth dynamic range is larger than the second dynamic range threshold.
14. The method according to claim 5, characterized in that The M is 2; the M frame images include an eighth image and a ninth image; the eighth image is an image obtained by processing the third original image according to the fifth sensitivity based on the in-sensor zoom mode, and the ninth image is an image obtained by processing the fourth original image according to the fifth sensitivity based on the in-sensor zoom mode; the third original image and the fourth original image are original images acquired by the first image sensor in a single exposure process based on the second exposure time and the third exposure time respectively; the ratio of the second exposure time to the third exposure time is equal to the ratio of the first sensitivity to the second sensitivity; the second exposure time is less than the third exposure time, and the second exposure time is less than the first exposure time.
15. The method according to claim 14, characterized in that After the dynamic range changes from the first dynamic range to the second dynamic range, the method further includes: gradually increasing an exposure time according to which the first image sensor outputs an image in the SHDR mode, and gradually decreasing a sensitivity according to which the first image sensor outputs an image in the SHDR mode; Among them, in the process of gradually increasing the exposure time based on which the first image sensor outputs images in the SHDR mode, and gradually reducing the sensitivity based on which the first image sensor outputs images in the SHDR mode, the ratio of the exposure times based on which the electronic device outputs two frames of images in the SHDR mode through the first image sensor each time is equal to the ratio of the first sensitivity to the second sensitivity, and the sensitivity based on which the electronic device outputs the two frames of images in the SHDR mode through the first image sensor each time is the same.
16. The method according to claim 15, characterized in that The stepwise increasing of the exposure time according to which the first image sensor outputs an image in the SHDR mode specifically includes: The exposure duration according to which the first image sensor outputs an image in the SHDR mode is gradually increased until a minimum value of the exposure durations according to which the image is output is equal to the second exposure duration.
17. The method according to any one of claims 14 to 16, characterized in that The fifth sensitivity is equal to the second sensitivity; the third exposure time is equal to the first exposure time.
18. The method according to any one of claims 1 to 17, characterized in that The first camera is a wide camera, and the second camera is a tele camera; the shooting interface further includes a recording end control or a recording start control; the recording end control is used to trigger the electronic device to stop recording the image displayed on the shooting interface; the recording start control is used to trigger the electronic device to record the image displayed on the shooting interface; In the case where the shooting interface includes the video recording end control, the method further includes: The electronic device detects an operation on the video recording end control; In response to the operation on the video recording end control, the electronic device saves a first video, where the first video includes an image displayed on the shooting interface.
19. An electronic device, characterized in that: The electronic device includes a camera, a processor and a memory; the camera is coupled to the memory and 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-18.
20. A computer-readable storage medium, characterized in that: Used to store computer instructions, when the computer instructions are executed on an electronic device, the electronic device executes any one of the methods of claims 1-18.
