Exposure control method and electronic equipment
By detecting the scene parameters of the camera preview screen and adjusting the exposure strategy to improve the dynamic range, the imaging problem of staggered HDR technology in complex scenarios is solved, achieving better image quality.
Patent Information
- Application Number
- CN202410042277.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-10
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2044-01-10
AI Technical Summary
In complex scenarios, cameras that support staggered HDR technology have poor imaging dynamic range, resulting in poor image quality.
By detecting the scene parameters of the camera preview screen, including the proportion of overexposure and underexposure area, moving objects, light and dark stripes, etc., adjusting the exposure strategy to improve the dynamic range. Specific measures include adjusting the exposure time and gain value of the exposure frame, and using a multi-frame fusion algorithm to generate preview and shooting images.
Improves the dynamic range and display effect of the preview and shooting images, reduces motion blur and light and dark stripes, and improves image quality.
Smart Images

Figure CN120343409A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of imaging, and in particular, to an exposure control method and an electronic device. Background Art
[0002] In the field of imaging, the dynamic range of an image refers to the range of luminance differences between the brightest part and the darkest part of the image. It should be understood that the larger the dynamic range of the image, the more details the image presents in the highlight part and the shadow part. Correspondingly, the dynamic range of a camera refers to the range of luminance that the images captured by the camera can present. For example, the images captured by a camera supporting high dynamic range (HDR) technology can retain more details in highlight or shadow scenes, and have better imaging effects compared to cameras that do not support HDR technology.
[0003] HDR technology can be divided into single-frame HDR technology and multi-frame HDR technology. Among them, single-frame HDR technology can achieve high dynamic range of an image through single-exposure acquisition, while multi-frame HDR technology requires continuous acquisition of two frames (respectively called long frame and short frame) or multiple frames with different exposure durations for fusion to achieve high dynamic range of the image.
[0004] The images obtained by traditional multi-frame HDR technology usually have high resolution. However, since the frames with different exposure durations are not aligned in the time domain, motion blur may occur. To alleviate this problem, the staggered high dynamic range (staggered HDR) technology emerged. The staggered high dynamic range technology uses a row-interleaved method to acquire long frames and short frames, that is, after a long exposure is performed on each row to obtain a long frame, a short exposure is immediately performed again to obtain a short frame, rather than performing short exposure after all rows have completed long exposure as in traditional multi-frame HDR technology. It can be seen that the staggered HDR technology can reduce the time difference between the long frame and the short frame, thereby alleviating the motion blur problem faced by traditional multi-frame HDR technology.
[0005] However, since the images to be captured by the camera may be in relatively complex scenes, the dynamic range of the images captured by a camera supporting staggered HDR technology may be poor in these complex scenes. Summary of the Invention
[0006] To solve this problem, the embodiments of the present application provide an exposure control method and an electronic device, which can determine an exposure strategy according to the scene parameters of the image to be captured by the camera. Among them, when the proportion of overexposed and underexposed areas in the overall area is greater than a preset proportion, the exposure strategy includes a strategy to improve the dynamic range of the preview screen and / or the captured screen. In this way, it is beneficial to improve the display effect of the preview screen and / or the captured screen.
[0007] To achieve the above object, the embodiments of the present application adopt the following technical solutions:
[0008] In a first aspect, an exposure control method is provided, which is applied to an electronic device. The electronic device includes a camera, and the camera supports the line-interleaved high-dynamic range technology. The line-interleaved high-dynamic range technology supports outputting a set of exposure frames including a first exposure frame and a second exposure frame, and the sum of the exposure durations of the first exposure frame and the second exposure frame is less than or equal to a preset duration. The method includes: starting the camera to take a picture. In response to detecting the scene parameters of the preview screen of the camera, determining the exposure strategy corresponding to the scene parameters. The scene parameters include the proportion information, motion information, and stripe information in the preview screen. Among them, the proportion information is the proportion of the overexposed and underexposed areas in the overall area, the motion information is used to indicate whether there is a moving object in the preview screen and the moving speed of the moving object, and the stripe information is used to indicate whether there are light and dark stripes in the preview screen. The exposure strategy is used to specify the exposure duration of the first exposure frame and / or the second exposure frame, and to specify the strategy for generating the preview screen and the strategy for generating the captured screen. When the proportion information is greater than a preset proportion, the exposure strategy includes a strategy for increasing the dynamic range of the captured screen. Based on the exposure strategy corresponding to the scene parameters, controlling the camera to generate the preview screen and / or the captured screen.
[0009] Based on this solution, the electronic device can execute different exposure strategies according to different scenes currently captured by the camera. For example, when the proportion of the overexposed and underexposed areas in the overall area is greater than a preset proportion, a strategy that can increase the dynamic range of the preview screen and / or the captured screen is executed. In this way, it is beneficial to improve the display effect of the preview screen and / or the captured screen.
[0010] In a possible implementation, determining the exposure strategy corresponding to the scene parameters includes: when the scene parameters of the preview screen indicate that the proportion information in the preview screen is greater than a preset proportion, there is a moving object and the moving speed is a first speed, and there are no light and dark stripes, the corresponding exposure strategy includes: reducing the exposure amount of the second exposure frame, and reducing the exposure duration of the first exposure frame based on the first speed. Generating the preview screen and the captured screen according to the fusion frame of the first exposure frame and the second exposure frame, or, generating the preview screen according to the fusion frame of the first exposure frame and the second exposure frame, selecting the fusion frame of the first exposure frame and the second exposure frame or the first exposure frame as the reference frame, and generating the captured screen by passing the first exposure frame and the second exposure frame through a multi-frame fusion algorithm.
[0011] In a possible implementation, the scene parameters further include the illuminance information in the preview screen, and the illuminance information is used to indicate the light intensity of the light. Determining the exposure strategy corresponding to the scene parameters further includes: when the scene parameters in the preview screen indicate that the ratio information in the preview screen is less than a preset ratio, there are moving objects and the moving speed is the first speed, there are no bright and dark stripes, and the light intensity of the light is less than the preset illuminance, the corresponding exposure strategy is: setting the exposure duration of the second exposure frame to the preset exposure duration or one-nth of the exposure duration of the first exposure frame, and reducing the exposure duration of the first exposure frame based on the first speed. Generating a preview screen according to the first exposure frame, selecting the first exposure frame as the reference frame, and generating a captured image by passing the first exposure frame through a multi-frame fusion algorithm. Wherein, the preset exposure duration is less than or equal to 13 ms, and n is greater than or equal to 2.
[0012] In a possible implementation, the scene parameters further include the illuminance information in the preview screen, and the illuminance information is used to indicate the light intensity of the light. Determining the exposure strategy corresponding to the scene parameters further includes: when the scene parameters in the preview screen indicate that the ratio information in the preview screen is less than a preset ratio, there are moving objects and the moving speed is the first speed, there are no bright and dark stripes, and the light intensity of the light is greater than the preset illuminance, the corresponding exposure strategy is: reducing the exposure duration of the first exposure frame based on the first speed, and setting the exposure duration and gain value of the second exposure frame to be the same as those of the first exposure frame. Generating a preview screen according to the first exposure frame, selecting the first exposure frame as the reference frame, and generating a captured image by passing the first exposure frame and the second exposure frame through a multi-frame fusion algorithm.
[0013] In a possible implementation, it further includes: when the scene parameters in the preview screen indicate that the ratio information in the preview screen is less than a preset ratio, there are moving objects and the moving speed is the first speed, and there are bright and dark stripes, the corresponding exposure strategy is: reducing the exposure duration of the second exposure frame based on the first speed, and setting the exposure duration of the first exposure frame to an integer multiple of the flashing period of the light source. Generating a preview screen according to the first exposure frame, correcting the bright and dark stripes in the second exposure frame based on the de-striping algorithm and the first exposure frame, selecting the corrected second exposure frame as the reference frame, and generating a captured image by passing the first exposure frame and the second exposure frame through a multi-frame fusion algorithm.
[0014] In a possible implementation, it further includes: when the scene parameters in the preview screen indicate that the proportion information in the preview screen is greater than a preset proportion, there is a moving object and the moving speed is the first speed, and there are bright and dark stripes, the corresponding exposure strategy is: setting the exposure duration of the first exposure frame to an integer multiple of the flashing period of the light source, and reducing the exposure duration of the second exposure frame based on the first speed. Generating a preview screen according to the first exposure frame, correcting the bright and dark stripes in the second exposure frame based on the de-striping algorithm and the first exposure frame, selecting the corrected second exposure frame as the reference frame, and generating a captured image by the multi-frame fusion algorithm for the first exposure frame, the second exposure frame, and the post-shot frame. The post-shot frame refers to the additional frame of the camera after the electronic device takes a photo.
[0015] In a possible implementation, the scene parameters further include the illuminance information in the preview screen, and the illuminance information is used to indicate the illumination intensity of the light. Determining the exposure strategy corresponding to the scene parameters further includes: when the scene parameters in the preview screen indicate that the proportion information in the preview screen is less than the preset proportion, there is no object movement, there are no bright and dark stripes, and the illumination intensity of the light is greater than the preset illuminance, the corresponding exposure strategy is: setting the exposure duration and the gain value of the second exposure frame to be the same as those of the first exposure frame. Generating a preview screen according to the first exposure frame, selecting the first exposure frame as the reference frame, and generating a captured image by the multi-frame fusion algorithm for the first exposure frame and the second exposure frame. Wherein, the preset exposure duration is less than or equal to 13 ms, and n is greater than or equal to 2.
[0016] In a possible implementation, the scene parameters further include the illuminance information in the preview screen, and the illuminance information is used to indicate the illumination intensity of the light. Determining the exposure strategy corresponding to the scene parameters further includes: when the scene parameters in the preview screen indicate that the proportion information in the preview screen is less than the preset proportion, there is no object movement, there are no bright and dark stripes, and the illumination intensity of the light is less than the preset illuminance, the corresponding exposure strategy is: setting the exposure duration of the second exposure frame to the preset exposure duration or one nth of the exposure duration of the first exposure frame, and increasing the exposure duration of the first exposure frame. Generating a preview screen according to the first exposure frame, selecting the first exposure frame as the reference frame, and generating a captured image by the multi-frame fusion algorithm for the first exposure frame. Wherein, the preset exposure duration is less than or equal to 13 ms, and n is greater than or equal to 2.
[0017] In a possible implementation, determining the exposure strategy corresponding to the scene parameters further includes: when the scene parameters in the preview screen indicate that the proportion information in the preview screen is greater than the preset proportion, there is no moving object, and there are no bright and dark stripes, the corresponding exposure strategy is: reducing the exposure amount of the second exposure frame. Generating a preview screen and a captured image according to the fusion frame of the first exposure frame and the second exposure frame, or generating a preview screen according to the fusion frame of the first exposure frame and the second exposure frame, selecting the first exposure frame as the reference frame, and generating a captured image by the multi-frame fusion algorithm for the first exposure frame and the second exposure frame.
[0018] In a possible implementation, the method further includes: when the scene parameters of the preview screen indicate that there are bright and dark stripes in the preview screen, the exposure duration of the first exposure frame in the corresponding exposure strategy satisfies: the exposure duration of the first exposure frame is an integer multiple of the light source flashing period.
[0019] In a possible implementation, reducing the exposure duration of the first exposure frame based on the first speed includes: determining the exposure time reduction amplitude mapping value corresponding to the first speed. Calculating the quotient of the exposure duration of the first exposure frame and the exposure time reduction amplitude mapping value to obtain the new exposure duration of the first exposure frame. Calculating the product of the gain value of the first exposure frame and the exposure time reduction amplitude mapping value to obtain the new gain value of the first exposure frame.
[0020] In a possible implementation, reducing the exposure duration of the second exposure frame based on the first speed includes: determining the exposure time reduction amplitude mapping value corresponding to the first speed. Calculating the quotient of the exposure duration of the second exposure frame and the exposure time reduction amplitude mapping value to obtain the new exposure duration of the second exposure frame. Calculating the product of the gain value of the second exposure frame and the exposure time reduction amplitude mapping value to obtain the new gain value of the second exposure frame.
[0021] In a possible implementation, the preset duration is equal to 33 ms minus the readout durations of the first exposure frame and the second exposure frame.
[0022] In a second aspect, an electronic device is provided. The electronic device includes one or more processors, one or more memories, and a camera that supports line-interleaved high dynamic range technology. One or more processors are connected to the camera, one or more memories are coupled to one or more processors, and one or more memories store a computer program. When the one or more processors execute the computer program, the electronic device executes the exposure control method according to any item in the first aspect.
[0023] In a third aspect, a computer-readable storage medium is provided. The computer-readable storage medium includes a computer program, and when the computer program runs, it executes the steps of any method in the first aspect.
[0024] In a fourth aspect, a computer device is provided, including a memory, a processor, and a computer program stored on the memory. The processor executes the computer program to implement the steps of any method in the first aspect.
[0025] In a fifth aspect, a computer program product is provided, including a computer program. When the computer program is executed by a processor, it performs the steps of any method in the first aspect.
[0026] In a sixth aspect, a chip system is provided. The chip includes a processing circuit and an interface. The processing circuit is configured to call and run a computer program stored in a storage medium to execute the exposure control method according to any one of the first aspect and its possible designs.
[0027] It should be understood that for the technical solutions provided in the second to sixth aspects above, their technical features can all correspond to the exposure control method provided in the first aspect and its possible designs. Therefore, the beneficial effects achieved are similar and will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 FIG. [Label] is a schematic hardware structure diagram of an electronic device provided by an embodiment of the present application;
[0029] Figure 2 FIG. [Label] is a schematic software architecture diagram of an electronic device provided by an embodiment of the present application;
[0030] Figure 3 FIG. [Label] is a schematic flowchart of an exposure control method provided by an embodiment of the present application;
[0031] Figure 4 FIG. [Label] is a schematic diagram of a camera frame output provided by an embodiment of the present application;
[0032] Figure 5 FIG. [Label] is another schematic diagram of a camera frame output provided by an embodiment of the present application;
[0033] Figure 6 FIG. [Label] is a schematic diagram of the composition of a chip system provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0034] In the embodiments of the present application, "first", "second", "third", etc. are used to distinguish different objects, rather than to limit a specific order. In addition, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design solution described as "exemplary" or "for example" in the embodiments of the present application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific manner.
[0035] For ease of understanding, some professional terms related to the embodiments of the present application will be described first below.
[0036] Please note that in the above translation, [Label] represents the specific label or number that should be filled in according to the actual drawing content in the original Chinese text. Since it is not provided in the question, it is left blank in the translation.Exposure: The product of the exposure duration and the gain value. Herein, the exposure duration refers to the time for which the shutter needs to be opened in order to project light onto the photosensitive surface of the camera's photosensitive element. The exposure duration is usually controlled by the camera's shutter, and the gain value is determined by the sensitivity of the photosensitive element in the camera. Both the exposure duration and the gain value are positively correlated with the brightness of the captured image. The longer the exposure duration, the brighter the captured image; the higher the gain value, the brighter the captured image.
[0037] Sensitivity: Used to measure the sensitivity of the photosensitive element in the camera to light. The higher the sensitivity of the photosensitive element, the more sensitive the photosensitive element is to light, and the stronger the analytical ability of the photosensitive element to light. In the embodiments of the present application, the sensitivity can also be referred to as ISO (International Standards Organization) sensitivity, ISO value, etc.
[0038] Auto exposure (AE) algorithm: An algorithm by which the camera automatically adjusts the exposure amount and the gain value according to the intensity of the external light, for alleviating the overexposure or underexposure problem. Herein, overexposure means that the exposure amount is greater than a pre-set exposure amount threshold, which can be referred to as the first exposure amount threshold in the embodiments of the present application. Underexposure means that the exposure amount is less than a pre-set exposure amount threshold, which can be referred to as the second exposure amount threshold in the embodiments of the present application. The first exposure amount threshold and the second exposure amount threshold can be the same or different. The AE algorithm can identify the overexposed area and the underexposed area in the picture, and can determine the proportion of the overexposed area and the underexposed area in the picture in the overall area of the picture. In the embodiments of the present application, this proportion can be referred to as the proportion information of the picture.
[0039] Banding phenomenon: refers to the stroboscopic stripes with light and dark intervals that appear in the preview screen or shooting screen of the camera. This phenomenon is related to the flicker cycle of the light source and the exposure time. Generally speaking, when the exposure time is an integer multiple of the flicker cycle of the light source, banding will not occur. When the exposure time is not an integer multiple of the flicker cycle of the light source, banding may occur. Taking the light source powered by 50Hz alternating current as an example, the flicker cycle of the light source is 10ms. When the camera shoots the scene where the light source is located, setting the exposure time to an integer multiple of 10ms can obtain a banding-free picture. If the exposure time is not an integer multiple of 10ms, banding may appear in the preview screen and the shooting screen. In an embodiment of the present application, the electronic device may include an anti-flicker sensor, which can detect the flicker frequency of the light source (i.e., the flicker cycle of the light source) in the scene currently being shot or previewed. In an embodiment of the present application, the electronic device can determine whether banding exists in the preview screen and the shooting screen based on the flickering period of the light source detected by the flicker sensor and the exposure time of each exposure frame, or directly detect whether banding exists in the preview screen displayed by the camera.
[0040] Debanding algorithm: an algorithm used to eliminate or reduce the banding phenomenon in the picture. For example, the debanding algorithm can eliminate or reduce the banding phenomenon in the picture by adjusting the gamma curve parameters in the camera parameters or the local tone mapping parameters in the image sensor parameters. For another example, the debanding algorithm can also use a deep neural network to correct the color and brightness of the banding frame using the non-banding frame, thereby eliminating or reducing the light and dark stripes in the banding frame. Among them, the non-banding frame refers to a frame without light and dark stripes, and the banding frame refers to a frame with light and dark stripes.
[0041] Motion detection algorithm: used to detect whether there is a moving object in the captured image and the preview image and the moving speed of the moving object. In some possible implementations, the algorithm can determine whether there is a moving object in the image by the position of each object in multiple consecutive image frames. For example, when the position of an object in two adjacent image frames changes, it means that there is a moving object in the image, and the moving speed of the moving object can be determined based on the change in position and the time between two adjacent frames.
[0042] Hardware fusion algorithm: A hardware algorithm that can be executed by the sensor of a camera. A camera supporting the staggered HDR technology outputs a set of exposure frames at a time. The sensor of the camera fuses the set of exposure frames into one frame through the hardware fusion algorithm. When the set of exposure frames includes two types of exposure frames, namely long frames and short frames, the sensor of the camera can fuse the long frames and short frames into one frame through the hardware fusion algorithm. In the embodiments of the present application, the image obtained after fusing the long frames and short frames can be called a fusion frame. The hardware fusion algorithm can retain the respective advantages of the long frames and short frames. For example, since the dynamic ranges of the long frames and short frames are different, the fusion frame generated through the hardware fusion algorithm will retain the dynamic ranges of the long frames and short frames, that is, the fusion frame has a higher dynamic range than the long frames and short frames.
[0043] Multi-frame fusion algorithm: A software processing algorithm that can be executed by the GPU (graphics processing unit) of an electronic device. The multi-frame fusion algorithm can fuse any number of exposure frames into one frame. When the exposure amounts of the multi-frame exposure frames are different, an image frame with a higher dynamic range can be obtained through the multi-frame fusion algorithm. When the exposure amounts of the multi-frame exposure frames are the same, an image with a higher signal-to-noise ratio and higher image quality can be obtained through the multi-frame fusion algorithm. The input of the multi-frame fusion algorithm includes a reference frame and one or more exposure frames to be fused. Among them, the content in the output frame of the multi-frame fusion algorithm is consistent with the reference frame.
[0044] Based on the above technical terms, the application background of the exposure control method provided in the embodiments of the present application will be introduced below.
[0045] When a user views a video picture through an electronic device such as a mobile phone, the frame rate threshold for perceiving whether the video picture is stuck is 30 frames per second. That is to say, when the frame rate of the video picture is greater than 30 frames per second, the user will not perceive that the video picture is stuck. When the frame rate of the video picture is less than 30 frames per second, the user will perceive that the video picture is stuck. Therefore, when playing or displaying a video picture, the mobile phone should try to ensure that the frame rate of the video picture is above 30 frames per second.
[0046] Exemplarily, when the video picture is a preview picture displayed in the camera interface, the camera should ensure that the frame rate of the preview picture is greater than or equal to 30 frames per second. The rate at which the camera transmits the display frame to the display screen should be greater than or equal to 30 frames per second, or rather, the time taken for the camera to generate the display frame should be less than 1 / 30 s, approximately 33.3 ms. Among them, the display frame is a frame of image transmitted by the camera to the display screen for display on the display screen.
[0047] In other words, to ensure the smoothness of the preview screen, the time for the camera to generate a frame for display should be less than 33.3 ms. Exemplarily, when a camera supporting line-interleaved high dynamic range technology obtains the frame for display through two different exposure frames, namely a long frame and a short frame, the sum of the exposure duration of the long frame, the exposure duration of the short frame, and the readout times of the long frame and the short frame needs to be less than or equal to 33.3 ms. Among them, the readout times of the long frame and the short frame are approximately 1.9 ms. That is to say, the sum of the exposure duration of the long frame and the exposure duration of the short frame needs to be less than or equal to 31.4 ms. In the embodiments of the present application, the long frame may also be referred to as the first exposure frame, and the short frame may also be referred to as the second exposure frame. It should be noted that a set of frames output by a camera supporting the staggered HDR technology may also include more exposure frames, such as three exposure frames, four exposure frames, etc. The embodiments of the present application take two frames as an example.
[0048] The image to be captured by the camera may be in a relatively complex scene, such as a high dynamic range scene, a scene with moving objects, etc. In these relatively complex scenes, a camera supporting the staggered HDR technology may have problems such as poor dynamic range of imaging.
[0049] To solve the above problems, an exposure control method and an electronic device provided in the embodiments of the present application can, when detecting that the proportion of overexposed and underexposed areas in the preview screen of the camera is greater than a preset proportion, apply a strategy in the camera that can improve the dynamic range of the preview screen and / or the captured screen, thereby improving the display effect of the preview screen and / or the captured screen.
[0050] In the embodiments of the present application, the electronic device may be a portable terminal with a camera, such as a mobile phone, a tablet computer, a wearable device (such as a smart watch), a vehicle-mounted device, etc. Among them, the camera supports the staggered HDR technology.
[0051] As an example, please refer to Figure 1 , which is a schematic hardware structure diagram of an electronic device provided in the embodiments of the present application. The exposure control method provided in the embodiments of the present application can be applied to an electronic device 100 as shown in Figure 1 .
[0052] As shown in Figure 1 , the electronic device 100 may include a processor 101, a display screen 102, a power management module 103, a battery 104, a sensor module 105, a button 106, a camera 107, and an internal memory 108, etc.
[0053] Among them, the processor 101 may include one or more processing units. For example, the processor 101 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video stream codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors 101.
[0054] The controller may be the nerve center and command center of the electronic device 100. The controller may generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching and executing instructions.
[0055] A memory may also be provided in the processor 101 for storing instructions and data. In some embodiments, the memory in the processor 101 is a cache memory. This memory may save the instructions or data that the processor 101 has just used or recycled. If the processor 101 needs to use the instruction or data again, it can directly call it from the memory. This avoids repeated access and reduces the waiting time of the processor 101, thus improving the efficiency of the system.
[0056] When the processor 101 executes the instructions stored in the memory, it can cause the electronic device 100 to execute the exposure control method provided in the embodiments of the present application.
[0057] The electronic device 100 realizes the image display function through the GPU, the display screen 102, and the application processor, etc. The GPU is a microprocessor for image processing and has functions such as geometric calculation and graphics rendering.
[0058] The display screen 102 is used to display images, video streams, etc. Exemplarily, the display screen 102 may display the images captured by the camera 107.
[0059] The power management module 103 is used to receive the input of the battery 104 and supply power to the processor 101, the display screen 102, the camera 107, etc. The power management module 103 may also be used to monitor parameters such as the battery 104 capacity, the battery 104 cycle count, and the battery 104 health status (leakage, impedance). In some other embodiments, the power management module 103 may also be provided in the processor 101.
[0060] The battery 104 is used to receive an external power input to store electrical energy, and is also used to output the stored electrical energy to components such as the processor 101 and the display screen 102 through the power management module 103.
[0061] The sensor module 105 may include components such as a flicker sensor, a motion sensing sensor, a touch sensor, a pressure sensor, a gyroscope sensor, an acceleration sensor, a distance sensor, an ambient light sensor, a fingerprint sensor, and a temperature sensor to implement functions of sensing and / or acquiring different signals.
[0062] The button 106 includes a power-on button, a volume button, etc. The button 106 can be a mechanical button or a touch button. The electronic device 100 can receive the input of the button 106 and generate a key signal input related to the user settings and function control of the electronic device 100. For example, the electronic device 100 can start the camera in response to the operation of the user double-clicking the button 106.
[0063] The camera 107 is used to take photos and videos. In the embodiment of the present application, the camera 107 can be a camera that supports the staggered HDR technology.
[0064] The internal memory 108 can be used to store computer-executable program code, and the executable program code includes instructions. The processor 101 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 108.
[0065] The internal memory 108 can also store one or more computer programs corresponding to the exposure control method provided in the embodiment of the present application.
[0066] It should be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 100. In other embodiments, the electronic device 100 may include more or fewer components than shown, or combine certain components, or split certain components, or have different component arrangements. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.
[0067] The above Figure 1 introduced the hardware structure of the electronic device provided in the embodiment of the present application. Figure 1 The illustrated electronic device may be installed with an operating system. Under the operation of the operating system, the electronic device can implement functions such as communication, playing audio and video, taking photos, and taking videos. The operating system may include, but is not limited to etc. Below, taking a system with a layered architecture as an example, the software architecture of the electronic device provided in the embodiment of the present application is exemplarily described.
[0068] Please refer to Figure 2, which is a schematic diagram of the software architecture of an electronic device provided by an embodiment of the present application. As Figure 2 shown, the software architecture of the electronic device 200 can be divided into four layers, from top to bottom are the application layer 201, the framework layer 202, the hardware abstraction layer 203 and the driver layer 204.
[0069] The application layer 201 may include all applications installed in the electronic device (Application), such as the camera application, etc.
[0070] Exemplarily, the electronic device can respond to the user's click operation on the camera application and send a startup instruction to the camera to start the camera.
[0071] The applications in the application layer 201 are all developed based on the framework layer 202. The framework layer 202 includes a large number of application programming interfaces (Application Programming Interface, API) available for developers to use. Developers can develop each application in the application layer 201 by using these application programming interfaces. Exemplarily, the application programming interfaces in the framework layer 202 may include the camera management service, etc.
[0072] The Hardware Abstract Layer (Hardware Abstract Layer) 203 is located between the framework layer 202 and the driver layer 204, and is used to abstract the hardware in the electronic device. Specifically, the hardware abstraction layer 203 can encapsulate the driver programs in the driver layer 204 into general interfaces that can be called by the framework layer 202. These general interfaces can be compatible with various different models of hardware. In this way, the operating system of the electronic device can be hardware-independent and the applicability of various hardware can be improved.
[0073] In the embodiment of the present application, the hardware abstraction layer 203 may include the camera hardware abstraction layer, etc. Among them, the driver program corresponding to the camera hardware abstraction layer is the camera driver, the corresponding hardware is the camera, and the API in the corresponding framework layer 202 is the camera management service.
[0074] The driver layer 204 is used to drive the corresponding hardware to work. In the embodiment of the present application, the driver layer may include the camera driver, etc. Among them, the camera driver is used to drive the camera 107 to work.
[0075] The above Figure 2 introduces the software architecture of the electronic device provided by the embodiment of the present application. It should be understood that Figure 2 the shown software structure does not constitute a specific limitation on the electronic device. In some other embodiments, the electronic device may include more or fewer layers, which will not be specifically limited here. Figure 2
[0076] The exposure control method provided by the embodiments of the present application is applied to an electronic device. Among them, the hardware structure of the electronic device can be as shown in Figure 1 shown, and the software architecture of the electronic device can be as shown in Figure 2 shown. Exemplarily, the exposure control method can be applied to the camera application in the electronic device.
[0077] It should be noted that the electronic device to which the exposure control method provided by the embodiments of the present application is applied includes a camera with staggered HDR technology. Among them, the staggered HDR technology supports outputting a group of exposure frames including at least two different exposure durations. Taking two as an example, the two exposure frames are respectively called the first exposure frame and the second exposure frame. In the embodiments of the present application, the first exposure frame can also be called the long frame, and the second exposure frame can also be called the short frame.
[0078] The sum of the exposure duration of the first exposure frame and the exposure duration of the second exposure frame is less than a preset duration. Among them, the preset duration can be 33 ms in the above embodiments minus the readout time of the first exposure frame and the second exposure frame, such as 31.4 ms, etc., and no specific limitation is made here.
[0079] Based on the above description of the hardware structure and software architecture of the electronic device, the exposure control method provided by the embodiments of the present application will be introduced below.
[0080] Please refer to Figure 3 , which is a schematic flowchart of an exposure control method provided by the embodiments of the present application. As shown in Figure 3 shown, the process may include the following steps.
[0081] S301. Start the camera to take a picture.
[0082] Among them, there are various ways to start the camera to take a picture, such as clicking the camera icon on the desktop of the electronic device, swiping the camera icon on the lock screen interface of the electronic device, etc.
[0083] S302. In response to detecting the scene parameters of the preview screen of the camera, determine the exposure strategy corresponding to the scene parameters.
[0084] Among them, the preview screen of the camera refers to the screen in the preview interface of the camera application. Taking a mobile phone as an example, the mobile phone can start the camera application and enter the preview interface of the camera application in response to the user clicking the camera icon on the mobile phone desktop; or, the mobile phone can start the camera application and enter the preview interface of the camera application in response to the user double-clicking the power button. The screen displayed in the preview interface of the camera is the preview screen of the camera. In the embodiments of the present application, the preview screen of the camera can also be called the preview screen, etc., and will not be elaborated later.
[0085] After starting the camera to take a photo, the camera application controls the camera to output an exposure frame based on a default exposure strategy. The camera application generates a preview image or a captured image according to the exposure frame. Among them, the captured image refers to the image generated by the camera after the user clicks the capture control in the camera application. The exposure strategy is used to specify the exposure duration of each exposure frame, and to specify the strategy for generating the preview image and the strategy for generating the captured image, etc.
[0086] The scene parameters in the camera preview image may include, but are not limited to, at least one of the following parameters: the proportion of overexposed and underexposed areas in the preview image to the overall area, whether there are moving objects and the moving speed of the moving objects, whether there are bright and dark stripes, the illumination intensity of the light, etc. Among them, the proportion of overexposed and underexposed areas in the preview image to the overall area can also be called proportion information, whether there are moving objects and the moving speed of the moving objects can also be called motion information, whether there are bright and dark stripes can also be called stripe information, and the illumination intensity of the light can also be called illuminance information.
[0087] In the embodiments of the present application, the electronic device can determine the proportion of overexposed and underexposed areas in the preview image to the overall area through the AE algorithm (i.e., the automatic exposure algorithm in the foregoing embodiments), determine whether there are moving objects and the moving speed of the moving objects in the preview image through the motion detection algorithm, determine whether there is banding in the preview image through the flicker sensor and the current exposure duration, and determine the illumination intensity of the light in the preview image through the ambient light sensor.
[0088] Different scenes corresponding to each scene parameter. Exemplarily, if the proportion of overexposed and underexposed areas in the preview image is greater than a preset proportion, it indicates that the scene to be captured by the camera is a high dynamic range scene (HDR scene). If the proportion of overexposed and underexposed areas in the preview image is less than a preset proportion, it indicates that the scene to be captured by the camera is a non-high dynamic range scene (non-HDR scene). If there are moving objects in the preview image, it indicates that the scene to be captured by the camera is a motion scene. If there are no moving objects in the preview image, it indicates that the scene to be captured by the camera is a non-motion scene. If there is banding in the preview image, it indicates that the scene to be captured by the camera is a banding scene. If there is no banding in the preview image, it indicates that the scene to be captured by the camera is a non-banding scene. If the illumination intensity of the light in the preview image is greater than the preset illuminance, it indicates that the scene to be captured by the camera is a high illuminance scene. If the illumination intensity of the light in the preview image is less than the preset illuminance, it indicates that the scene to be captured by the camera is a low illuminance scene.
[0089] It should be understood that when the scene parameters include multiple parameters such as ratio information, motion information, stripe information, and illumination information, the scenes indicated by the scene parameters also include various types. For example, assuming that the scene parameters include the proportion of overexposed and underexposed areas in the preview screen to the overall area, whether there are moving objects, and the moving speed of the moving objects, the scenes indicated by the scene parameters include HDR scene + motion scene, non-HDR scene + motion scene, HDR scene + non-motion scene, and non-HDR scene + non-motion scene.
[0090] In the embodiments of the present application, the electronic device can pre-store a preset correspondence relationship, and determine the exposure strategy corresponding to the scene parameters in the camera preview screen according to the preset correspondence relationship.
[0091] Among them, the preset correspondence relationship includes the corresponding relationship between different scene parameters and different exposure strategies, or the preset correspondence relationship can include the corresponding relationship between different shooting scenes and different exposure strategies. The preset correspondence relationship can be stored in the electronic device in the form of a table, key-value pairs, etc.
[0092] Exemplarily, some preset correspondence relationships can be shown in Table 1 below. Among them, the ratio information of 1 means that the ratio information in the preview screen is greater than the preset ratio, that is, the proportion of overexposed and underexposed areas in the preview screen to the overall area is greater than the preset ratio, and the ratio information of 0 means that the ratio information in the preview screen is less than the preset ratio. The preset ratio can be values such as 10%, 15%, etc., which are not limited here. The motion information of 1 means that there are moving objects in the preview screen, and the motion information of 0 means that there are no moving objects in the preview screen. The stripe information of 1 means that there are bright and dark stripes in the preview screen, and the stripe information of 0 means that there are no bright and dark stripes in the preview screen. The illumination information of 1 means that the illumination intensity of the light in the preview screen is greater than the preset illumination, and the illumination information of 0 means that the illumination intensity of the light in the preview screen is less than the preset illumination. The preset illumination can be 145lv, 150lv, 155lv, etc., which are not limited here.
[0093]
[0094]
[0095]
[0096] Table 1
[0097] In Table 1 above, the preset exposure duration is less than or equal to 13 ms, and n is an integer greater than or equal to 2. It should be noted that for the exposure duration of the exposure frame, the gain value converges by the AE algorithm, and the exposure amount of the exposure frame will not change when adjusting the exposure duration of the exposure frame in the above strategy. Next, each exposure strategy corresponding to the scene parameters in Table 1 will be specifically introduced. First, the exposure strategy corresponding to the case where the ratio information in the scene parameters is less than the preset ratio, there are no moving objects, no bright and dark stripes, and the illumination intensity of the light is greater than the preset illuminance will be introduced, that is, Strategy 1 in Table 1 above.
[0098] As shown in Table 1, Strategy 1 is to set the exposure duration and gain value of the second exposure frame to be the same as those of the first exposure frame; generate a preview image based on the first exposure frame, select the first exposure frame as the reference frame, and generate a captured image by fusing the first exposure frame and the second exposure frame through a multi-frame fusion algorithm.
[0099] Among them, generating a preview image based on the first exposure frame means sending the first exposure frame for display to generate a preview image.
[0100] After the camera's sensor detects the light information, it will continuously generate exposure frames according to the light information to form an exposure frame sequence. Selecting the first exposure frame means selecting one frame of the first exposure frame from the sequence of the first exposure frames. It should be understood that the sequence of the first exposure frames includes multiple consecutive first exposure frames.
[0101] For the reference frame, the description of the multi-frame fusion algorithm can refer to the foregoing embodiments or related technologies, and will not be elaborated here.
[0102] In Strategy 1, the first exposure frame and the second exposure frame use the same exposure duration and gain value. When generating the captured image, the first exposure frame is used as the reference frame, and the first exposure frame and the second exposure frame are fused using the multi-frame fusion algorithm. Since the first exposure frame and the second exposure frame are the same set of exposure frames, the time interval between frames is short, which is conducive to registration and can avoid or reduce the ghosting in the captured image generated by the multi-frame fusion algorithm.
[0103] Exemplarily, the captured image generation algorithm of the camera requires 4 exposure frames to generate a captured image. Please refer to Figure 4 , which is a schematic diagram of a camera frame output provided by an embodiment of the present application. As Figure 4 shown, the camera generates 7 sets of frame outputs within a period of time. These 7 sets of frame outputs include 7 frames of the first exposure frame and 7 frames of the second exposure frame. Among them, the 7 frames of the second exposure frame are numbered S1 to S7 respectively, and the 7 frames of the first exposure frame are numbered L1 to L7 respectively. The first exposure frame and the second exposure frame with the same number in the numbers are the same set of frame outputs.
[0104] In Strategy 1, the electronic device can send the first exposure frame for display to generate a preview image, and select two sets of the first exposure frames and the second exposure frames to input into a multi-frame fusion algorithm to generate a captured image. For example, the electronic device can select Figure 4 S5, S6, L5, and L6 in
[0105] to input into the multi-frame fusion algorithm, where L5 or L6 can be selected as the reference frame.
[0106] The following introduces the exposure strategy corresponding to the scenario parameters in which the ratio information in the scenario parameters is less than a preset ratio, there are no moving objects, no bright and dark stripes, and the illumination intensity of the light is less than the preset illuminance, that is, Strategy 3 in Table 1 above.
[0107] As shown in Table 1, Strategy 3 is to set the exposure duration of the second exposure frame to the preset exposure duration or one-nth of the exposure duration of the first exposure frame, and increase the exposure duration of the first exposure frame; generate a preview image according to the first exposure frame, select the first exposure frame as the reference frame, and generate a captured image by passing the first exposure frame through a multi-frame fusion algorithm.
[0108] Among them, generating a preview image according to the first exposure frame means sending the first exposure frame for display to generate a preview image. Selecting the first exposure frame means selecting one first exposure frame from the sequence of the first exposure frames.
[0109] In Strategy 3, both the preset exposure duration and one-nth of the exposure duration of the first exposure frame are relatively small exposure durations. Setting the exposure duration of the second exposure frame to a relatively small exposure duration can expand the selectable range of the exposure duration of the second exposure frame. When generating a captured image, using the first exposure frame as the reference frame and adopting a multi-frame fusion algorithm to fuse the first exposure frame to obtain a captured image. In this way, it is beneficial to improve the signal-to-noise ratio of the captured image and enhance the image quality of the captured image.
[0110] Exemplarily, the shooting screen generation algorithm of the camera requires 4 exposure frames to generate a shooting screen. Then, in Strategy 3, the electronic device can send the first exposure frame for display to generate a preview screen, and select four first exposure frames to input into the multi-frame fusion algorithm to generate a shooting screen. For example, the electronic device can select Figure 4 L3, L4, L5, and L6 in
[0111] to input into the multi-frame fusion algorithm, where L5 or L6 can be selected as the reference frame. The scene parameters corresponding to Strategy 4 are similar to those corresponding to Strategy 3, except that the corresponding stripe information is different. Similar to Strategy 3, when the ratio information in the scene parameters is greater than the preset ratio, there are no moving objects, there are light and dark stripes, and the illumination intensity of the light is less than the preset illuminance, the corresponding Strategy 4 can be: set the exposure duration of the second exposure frame to the preset exposure duration or one-nth of the exposure duration of the first exposure frame, increase the exposure duration of the first exposure frame, and the exposure duration of the first exposure frame is required to be an integer multiple of the flicker period of the light source; generate a preview screen according to the first exposure frame, select the first exposure frame as the reference frame, and generate a shooting screen by passing the first exposure frame through the multi-frame fusion algorithm.
[0112] Next, the exposure strategy corresponding to the case where the ratio information in the scene parameters is less than the preset ratio, there are moving objects and the moving speed is the first speed, there are no light and dark stripes, and the illumination intensity of the light is less than the preset illuminance is introduced, that is, Strategy 5 in Table 1 above.
[0113] As shown in Table 1, Strategy 5 is to set the exposure duration of the second exposure frame to the preset exposure duration or one-nth of the exposure duration of the first exposure frame, and reduce the exposure duration of the first exposure frame based on the first speed; generate a preview screen according to the first exposure frame, select the first exposure frame as the reference frame, and generate a shooting screen by passing the first exposure frame through the multi-frame fusion algorithm.
[0114] Among them, generating a preview screen according to the first exposure frame means sending the first exposure frame for display to generate a preview screen. Selecting the first exposure frame means selecting one first exposure frame from the sequence of the first exposure frames.
[0115] In Strategy 5, both the preset exposure duration and one-nth of the exposure duration of the first exposure frame are relatively small exposure durations. Setting the exposure duration of the second exposure frame to a relatively small exposure duration can expand the optional range of the exposure duration of the second exposure frame. Reducing the exposure duration of the first exposure frame based on the first speed can include: determining the exposure time reduction amplitude mapping value corresponding to the first speed; dividing the exposure duration of the first exposure frame by the exposure time reduction amplitude mapping value to obtain the new exposure duration of the first exposure frame. Reducing the exposure duration of the first exposure frame is beneficial to reducing the motion blur in the preview screen and the shooting screen. Among them, the corresponding relationship between the first speed and the exposure time reduction amplitude mapping value can be pre-stored in the electronic device.
[0116] Exemplarily, the exposure time reduction amplitude mapping value corresponding to the first speed is ratio; the exposure duration of the first exposure frame before adjustment is EL1, and the gain value is GL1; the exposure duration of the first exposure frame after adjustment is EL2, and the gain value is GL2; then after reducing the exposure duration of the first exposure frame by the first speed without changing the exposure amount, the following formula (1) is satisfied among EL1, GL1, EL2, and GL2.
[0117]
[0118] In addition, when generating the captured image in Strategy 5, the first exposure frame is used as the reference frame, and the multi-frame fusion algorithm is used to fuse the first exposure frame to obtain the captured image. In this way, it is beneficial to improve the signal-to-noise ratio of the captured image and enhance the image quality of the captured image.
[0119] Exemplarily, the captured image generation algorithm of the camera requires 4 exposure frames to generate the captured image. Then in Strategy 5, the electronic device can send the first exposure frame for display to generate a preview image, select four first exposure frames and input them into the multi-frame fusion algorithm to generate the captured image. For example, the electronic device can select Figure 4 L3, L4, L5, and L6 among them and input them into the multi-frame fusion algorithm, where L5 or L6 can be selected as the reference frame.
[0120] The following introduces the exposure strategy corresponding to the case where the ratio information in the scene parameters is less than the preset ratio, there are moving objects and the moving speed is the first speed, there are no light and dark stripes, and the illumination intensity of the light is greater than the preset illuminance, that is, Strategy 6 in Table 1 above.
[0121] As shown in Table 1, Strategy 6 is to reduce the exposure duration of the first exposure frame based on the first speed, set the exposure duration and gain value of the second exposure frame to be the same as those of the first exposure frame; generate a preview image according to the first exposure frame, select the first exposure frame as the reference frame, and generate the captured image by fusing the first exposure frame and the second exposure frame through the multi-frame fusion algorithm.
[0122] Among them, generating a preview image according to the first exposure frame means sending the first exposure frame for display to generate a preview image. Selecting the first exposure frame means selecting one first exposure frame from the sequence of the first exposure frames.
[0123] In Strategy 6, the first exposure frame and the second exposure frame call the same exposure duration and gain value. When generating the captured image, the first exposure frame is used as the reference frame, and the multi-frame fusion algorithm is used to fuse the first exposure frame and the second exposure frame. Since the first exposure frame and the second exposure frame are the same exposure frame, the time interval between frames is short, which is beneficial for registration, and can avoid or reduce the possible ghosting in the captured image generated by the multi-frame fusion algorithm.
[0124] In addition, reducing the exposure duration of the first exposure frame based on the first speed can weaken the motion blur in the preview image and the captured image. For the specific solution, please refer to the relevant description in Strategy 5, which will not be elaborated here.
[0125] Exemplarily, the captured image generation algorithm of the camera requires 4 exposure frames to generate a captured image. Then, in Strategy 6, the electronic device can send the first exposure frame for display to generate a preview image, and select two sets of the first exposure frames and the second exposure frames to input into the multi-frame fusion algorithm to generate a captured image. For example, the electronic device can select Figure 4 S5, S6, L5, and L6 in
[0126] Next, an exposure strategy corresponding to the case where the ratio information in the scene parameters is less than the preset ratio, there are moving objects with the first speed, and there are light and dark stripes will be introduced, that is, Strategy 7 in Table 1 above. It can be seen that Strategy 7 has no corresponding relationship with the illuminance information.
[0127] As shown in Table 1, Strategy 7 is to reduce the exposure duration of the second exposure frame based on the first speed, and set the exposure duration of the first exposure frame to an integer multiple of the light source's flicker period; generate a preview image based on the first exposure frame, correct the light and dark stripes in the second exposure frame based on the de-striping algorithm and the first exposure frame, select the corrected second exposure frame as the reference frame, and generate a captured image by passing the first exposure frame and the second exposure frame through the multi-frame fusion algorithm.
[0128] In Strategy 7, reducing the exposure duration of the second exposure frame based on the first speed can eliminate or weaken the motion blur in the preview image and the captured image. Setting the exposure duration of the first exposure frame to an integer multiple of the light source's flicker period can eliminate or weaken the light and dark stripes in the preview image. Correcting the light and dark stripes in the second exposure frame based on the de-striping algorithm and the first exposure frame, selecting the corrected second exposure frame as the reference frame, and generating a captured image by passing the first exposure frame and the second exposure frame through the multi-frame fusion algorithm can not only eliminate or weaken the light and dark stripes in the preview image and the captured image, but also avoid the presence of ghost images in the captured image generated by the multi-frame fusion algorithm, or weaken the possible ghost images in the captured image generated by the multi-frame fusion algorithm.
[0129] In addition, for the specific solution of reducing the exposure duration of the second exposure frame based on the first speed, please refer to the relevant description in Strategy 5, which will not be elaborated here.
[0130] Exemplarily, the captured image generation algorithm of the camera requires 4 exposure frames to generate a captured image. Then, in Strategy 7, the electronic device can send the first exposure frame for display to generate a preview image, and select two sets of the first exposure frames and the second exposure frames to input into the multi-frame fusion algorithm to generate a captured image. For example, the electronic device can selectFigure 4 S5, S6, L5, and L6 in Figure 4 are input into the multi-frame fusion algorithm. Among them, S5 can be corrected based on the de-striping algorithm and L5, and then the corrected S5 is used as the reference frame.
[0131] The following introduces the exposure strategy corresponding to the case where the proportion information in the scene parameters is greater than the preset proportion, there are no moving objects, and there are no light and dark stripes, that is, Strategy 8 in Table 1 above. It can be seen that there is no corresponding relationship between Strategy 8 and the illuminance information.
[0132] As shown in Table 1 above, Strategy 8 includes two strategies. One is to reduce the exposure amount of the second exposure frame; generate a preview image and a captured image based on the fused frame of the first exposure frame and the second exposure frame. The other is to reduce the exposure amount of the second exposure frame; generate a preview image based on the fused frame of the first exposure frame and the second exposure frame, select the first exposure frame as the reference frame, and generate a captured image by passing the first exposure frame and the second exposure frame through the multi-frame fusion algorithm.
[0133] In the first strategy of Strategy 8, by reducing the exposure amount of the second exposure frame and generating a preview image and a captured image based on the fused frame of the first exposure frame and the second exposure frame, the dynamic range that the preview image and the captured image can present is increased. In the second strategy of Strategy 8, by reducing the exposure amount of the second exposure frame and generating a preview image based on the fused frame of the first exposure frame and the second exposure frame, the dynamic range that the preview image can present is increased. By reducing the exposure amount of the second exposure frame, selecting the first exposure frame as the reference frame, and generating a captured image by passing the first exposure frame and the second exposure frame through the multi-frame fusion algorithm, the dynamic range that the captured image can present can be increased. Moreover, since the first exposure frame and the second exposure frame are the same exposure frame, the time interval between frames is short, which is beneficial for registration, and it is possible to avoid ghosts in the captured image generated by the multi-frame fusion algorithm or reduce the possible ghosts in the captured image generated by the multi-frame fusion algorithm.
[0134] In addition, when the exposure amount of the second exposure frame is reduced, the exposure time is relatively short. Therefore, in a low-illuminance scene, the range of adjustment of the exposure duration of the first exposure frame is relatively large.
[0135] Exemplarily, the captured image generation algorithm of the camera requires 4 exposure frames to generate a captured image. Then, in the first strategy of Strategy 8, the electronic device can send the 4 fused frames of 4 first exposure frames and 4 second exposure frames for display to generate a preview image and send them for capture to generate a captured image. In the second strategy of Strategy 8, the electronic device can send the 4 fused frames of 4 first exposure frames and 4 second exposure frames for display to generate a preview image, select two sets of first exposure frames and second exposure frames and input them into the multi-frame fusion algorithm to generate a captured image. For example, the electronic device can select Figure 4S5, S6, L5, and L6 in are input into the multi-frame fusion algorithm, where L5 can be selected as the reference frame.
[0136] The scene parameters corresponding to Strategy 9 are similar to those corresponding to Strategy 8, except that the corresponding stripe information is different. That is, when the ratio information in the scene parameters is greater than the preset ratio, there are no moving objects, and there are light and dark stripes, the corresponding Strategy 9 can be: reducing the exposure amount of the second exposure frame, setting the exposure duration of the first exposure frame to an integer multiple of the flashing period of the light source; generating a preview image and a captured image based on the fused frame of the first exposure frame and the second exposure frame, or selecting the first exposure frame as the reference frame, and generating a captured image by passing the first exposure frame and the second exposure frame through the multi-frame fusion algorithm. The beneficial effects of Strategy 9 and Strategy 8 are similar, except that Strategy 9 can also eliminate or reduce the light and dark stripes in the preview image and the captured image by setting the exposure duration of the first exposure frame to an integer multiple of the flashing period of the light source.
[0137] Next, the exposure strategy corresponding to the situation where the ratio information in the scene parameters is greater than the preset ratio, there are moving objects and the moving speed is the first speed, and there are no light and dark stripes will be introduced, that is, Strategy 10 in Table 1 above. It can be seen that there is no corresponding relationship between Strategy 10 and the illuminance information.
[0138] As shown in Table 1 above, Strategy 10 also includes two strategies. The first strategy is to reduce the exposure amount of the second exposure frame and reduce the exposure duration of the first exposure frame based on the first speed; generate a preview image and a captured image based on the fused frame of the first exposure frame and the second exposure frame. The second strategy is to reduce the exposure amount of the second exposure frame and reduce the exposure duration of the first exposure frame based on the first speed; generate a preview image based on the fused frame of the first exposure frame and the second exposure frame, select the fused frame of the first exposure frame and the second exposure frame or the first exposure frame as the reference frame, and generate a captured image by passing the first exposure frame and the second exposure frame through the multi-frame fusion algorithm.
[0139] Reducing the duration of the first exposure frame based on the first speed can eliminate or reduce the motion blur in the preview image and the captured image. The specific solution can refer to the foregoing embodiments and will not be elaborated here. By reducing the exposure amount of the second exposure frame, the dynamic range that the preview image and the captured image can present can be increased.
[0140] In the first strategy of Strategy 10, a preview image and a captured image are generated based on the fused frame of the first exposure frame and the second exposure frame, which can improve the dynamic range that the preview image and the captured image can present. In the second strategy of Strategy 10, a preview image is generated based on the fused frame of the first exposure frame and the second exposure frame, which can improve the dynamic range that the preview image can present. Taking the fused frame of the first exposure frame and the second exposure frame or the first exposure frame as the reference frame, and generating the captured image by passing the first exposure frame and the second exposure frame through a multi-frame fusion algorithm can not only improve the dynamic range that the preview image can present, and because the first exposure frame and the second exposure frame are the same exposure frame, the time interval between frames is short, which is conducive to registration, and can also avoid or reduce the ghosting that may exist in the captured image generated by the multi-frame fusion algorithm.
[0141] In addition, when the exposure amount of the second exposure frame is reduced, the exposure time will be relatively short. Therefore, in low-light scenarios, the range of the exposure duration of the first exposure frame that can be adjusted is relatively large.
[0142] Exemplarily, the captured image generation algorithm of the camera requires 4 exposure frames to generate the captured image. Then, in the first strategy of Strategy 10, the electronic device can send the 4 fused frames of 4 first exposure frames and 4 second exposure frames for display to generate the preview image, and send them for capture to generate the captured image. In the second strategy of Strategy 10, the electronic device can send the 4 fused frames of 4 first exposure frames and 4 second exposure frames for display to generate the preview image, select two groups of the first exposure frame and the second exposure frame and input them into the multi-frame fusion algorithm to generate the captured image. For example, the electronic device can select Figure 4 S5, S6, L5, L6 in
[0143] The following introduces the exposure strategy corresponding to the case where the ratio information in the scene parameters is greater than the preset ratio, there are moving objects and the moving speed is the first speed, and there are bright and dark stripes, that is, Strategy 11 in Table 1 above. It can be seen that Strategy 11 has no corresponding relationship with the illuminance information.
[0144] As shown in Table 1, Strategy 11 can be: setting the exposure duration of the first exposure frame to an integer multiple of the flashing period of the light source, reducing the exposure duration of the second exposure frame based on the first speed; generating the preview image based on the first exposure frame, correcting the bright and dark stripes in the second exposure frame based on the de-striping algorithm and the first exposure frame, selecting the corrected second exposure frame as the reference frame, and generating the captured image by passing the first exposure frame, the second exposure frame, and the subsequent frame through the multi-frame fusion algorithm.
[0145] In Strategy 11, setting the exposure duration of the first exposure frame to an integer multiple of the light source's blinking period and generating a preview image based on the first exposure frame can prevent the appearance of bright and dark stripes in the preview image.
[0146] Reducing the exposure duration of the second exposure frame based on the first speed can prevent motion blur in the captured image. For the specific process, reference can be made to the foregoing embodiments.
[0147] Avoiding the appearance of bright and dark stripes in the captured image by using the de-striping algorithm and the first exposure frame to correct the bright and dark stripes in the second exposure frame. For the specific processes, reference can be made to the relevant descriptions in the foregoing embodiments, and details will not be elaborated here.
[0148] Selecting the corrected second exposure frame as the reference frame and generating the captured image by using the multi-frame fusion algorithm for the first exposure frame, the second exposure frame, and the subsequent frames means that, with the corrected second exposure frame as the reference frame, the first exposure frame sequence, the second exposure frame sequence, and the subsequent frame sequence are used as the input of the multi-frame fusion algorithm to obtain the captured image. Herein, the subsequent frame refers to the additional frame output by the camera after the electronic device responds to the user's shooting instruction and performs shooting. Exemplarily, the subsequent frame includes the subsequent increased-exposure frame and the subsequent decreased-exposure frame, where the increased-exposure frame is used to brighten the dark area and the decreased-exposure frame is used to suppress overexposure, thereby enhancing the dynamic range of the final output image. This subsequent frame is not used for display but only for the multi-frame fusion algorithm. In Strategy 10, the dynamic range of the captured image can be enhanced by using this subsequent frame.
[0149] Please refer to Figure 5 , which is another schematic diagram of the camera frame output provided by the embodiment of the present application. As Figure 5 shown, the camera generates 7 groups of frame outputs within a period of time. These 7 groups of frame outputs include 7 first exposure frames and 7 second exposure frames. Among them, the 7 second exposure frames are numbered S1 to S7 respectively, and the 7 first exposure frames are numbered L1 to L7 respectively. The first exposure frame and the second exposure frame with the same number in the numbering are the same group of frame outputs.
[0150] As Figure 5 shown, if the shooting moment of the electronic device for shooting is the moment of the S6 and L6 frame outputs, then in Strategy 11, the electronic device can send the first exposure frame for display to generate a preview image, select two groups of the first exposure frames and the second exposure frames before the shooting moment, and one or more exposure frames (i.e., the subsequent frames) after the shooting moment and input them into the multi-frame fusion algorithm to generate the captured image. For example, the electronic device can select Figure 5 S5, S6, L5, L6, S7 in and input them into the multi-frame fusion algorithm. Among them, the bright and dark stripes in S5 can be corrected based on the de-striping algorithm and L5, and the corrected S5 is selected as the reference frame.
[0151] The above is the relationship between the scene parameters and the exposure strategies provided by the embodiments of the present application. After determining the exposure strategy based on the scene parameters in the camera preview screen, the exposure strategy can be applied in the camera.
[0152] S303. Based on the exposure strategy corresponding to the scene parameters, control the camera to generate a preview screen and / or a captured screen.
[0153] In other words, the electronic device can set the exposure strategy of the camera to the exposure strategy corresponding to the above scene parameters. In this way, the camera can generate a preview screen or a captured screen based on the exposure strategy corresponding to the above scene parameters.
[0154] Based on the above description, it should be understood that for the exposure control method provided by the embodiments of the present application, when the proportion of the overexposed and underexposed areas in the overall area of the camera preview screen is greater than a preset proportion, a strategy that can improve the dynamic range of the preview screen and / or the captured screen is applied in the camera, thereby improving the display effect of the preview screen and / or the captured screen.
[0155] Please refer to Figure 6 , which is a schematic diagram of the composition of a chip system provided by the embodiments of the present application. The chip system 600 can be set in an electronic device. For example, the chip system 600 can be set in a mobile phone. Exemplarily, the chip system 600 can include: a processor 601 and a communication interface 602, which are used to support the electronic device to implement the functions involved in the above embodiments. In a possible design, the chip system 600 further includes a memory for storing the necessary program instructions and data of the electronic device. The chip system can be composed of chips or can include chips and other discrete devices. It should be noted that in some implementation manners of the present application, the communication interface 602 can also be referred to as an interface circuit.
[0156] It should be noted that all relevant contents of the steps involved in the above method embodiments can be cited in the function descriptions of the corresponding functional modules, and will not be repeated here.
[0157] The embodiments of the present application further provide a computer storage medium, in which computer instructions are stored. When the computer instructions run on an electronic device, the electronic device is enabled to execute the above relevant method steps to implement the method in the above embodiments.
[0158] The embodiments of the present application further provide a computer program product. When the computer program product runs on a computer, the computer is enabled to execute the above relevant steps to implement the method in the above embodiments.
[0159] In addition, an embodiment of the present application further provides a device, which may specifically be a chip, a component or a module. The device may include a processor and a memory connected to each other. The memory is used to store computer-executable instructions. When the device runs, the processor may execute the computer-executable instructions stored in the memory, so that the chip executes the methods in the above method embodiments. It should be noted that all relevant content of the steps involved in the above method embodiments can be cited in the function descriptions of the corresponding functional modules, and will not be elaborated herein.
[0160] Among them, the electronic device, computer storage medium, computer program product or chip provided in the embodiments of the present application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be elaborated herein.
[0161] The above mainly introduces the solution provided in the embodiments of the present application from the perspective of the electronic device. To implement the above functions, it includes the corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of the examples described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in the way of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
[0162] The embodiments of the present application can divide the devices involved according to the above method examples. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of a software functional module. It should be noted that the division of modules in the embodiments of the present application is illustrative, only a logical function division, and there may be other division methods in actual implementation.
[0163] The functions, actions, operations, steps, etc. in the above embodiments can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using a software program, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from a website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wirelessly (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more integrated media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)), etc.
[0164] Although the present application has been described in connection with specific features and their embodiments, it is obvious that various modifications and combinations can be made without departing from the spirit and scope of the present application. Accordingly, the present specification and the drawings are merely exemplary illustrations of the present application as defined by the appended claims and are considered to cover any and all modifications, variations, combinations, or equivalents within the scope of the present application. Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these changes and modifications.
Claims
1. An exposure control method, characterized in that, Applied to an electronic device; the electronic device includes a camera, and the camera supports row-interleaved high dynamic range technology; the row-interleaved high dynamic range technology supports outputting a set of exposure frames including a first exposure frame and a second exposure frame, and the sum of the exposure durations of the first exposure frame and the second exposure frame is less than or equal to a preset duration; The method includes: Starting the camera to take a picture; In response to detecting the scene parameters of the preview screen of the camera, determining the exposure strategy corresponding to the scene parameters; the scene parameters include the proportion information, motion information, and stripe information in the preview screen; wherein, the proportion information is the proportion of overexposed and underexposed areas in the overall area, the motion information is used to indicate whether there is a moving object in the preview screen and the moving speed of the moving object, and the stripe information is used to indicate whether there are light and dark stripes in the preview screen; the exposure strategy is used to specify the exposure duration of the first exposure frame and / or the second exposure frame, and to specify the strategy for generating the preview screen and the strategy for generating the shooting screen; when the proportion information is greater than a preset proportion, the exposure strategy includes a strategy for enhancing the dynamic range of the shooting screen; Based on the exposure strategy corresponding to the scene parameters, controlling the camera to generate a preview screen and / or a shooting screen.
2. The method according to claim 1, wherein The determining the exposure strategy corresponding to the scene parameters includes: when the scene parameters of the preview screen indicate that the proportion information in the preview screen is greater than a preset proportion, there is a moving object and the moving speed is the first speed, and there are no light and dark stripes, the corresponding exposure strategy includes: reducing the exposure amount of the second exposure frame, and reducing the exposure duration of the first exposure frame based on the first speed; generating the preview screen and the shooting screen according to the fusion frame of the first exposure frame and the second exposure frame, or generating the preview screen according to the fusion frame of the first exposure frame and the second exposure frame, selecting the fusion frame of the first exposure frame and the second exposure frame or the first exposure frame as the reference frame, and generating the shooting screen by passing the first exposure frame and the second exposure frame through a multi-frame fusion algorithm.
3. The method according to claim 1, characterized in that, The scene parameters further include the illuminance information in the preview screen, and the illuminance information is used to indicate the illumination intensity of the light; The determining the exposure strategy corresponding to the scene parameters further includes: When the scene parameters of the preview screen indicate that the proportion information in the preview screen is less than the preset proportion, there is a moving object and the moving speed is the first speed, there are no light and dark stripes, and the illumination intensity of the light is less than the preset illuminance, the corresponding exposure strategy is: setting the exposure duration of the second exposure frame to the preset exposure duration or one nth of the exposure duration of the first exposure frame, and reducing the exposure duration of the first exposure frame based on the first speed; generating the preview screen according to the first exposure frame, selecting the first exposure frame as the reference frame, and generating the shooting screen by passing the first exposure frame through a multi-frame fusion algorithm; wherein, the preset exposure duration is less than or equal to 13 ms, and n is greater than or equal to 2.
4. The method according to claim 1, wherein The scene parameters further include the illuminance information in the preview screen, and the illuminance information is used to indicate the illumination intensity of the light; The determination of the exposure strategy corresponding to the scene parameters further includes: When the scene parameters of the preview screen indicate that the proportion information in the preview screen is less than the preset proportion, there are moving objects with a first speed, no bright and dark stripes, and the illumination intensity of the light is greater than the preset illuminance, the corresponding exposure strategy is: based on the first speed, reduce the exposure duration of the first exposure frame, and set the exposure duration and gain value of the second exposure frame to be the same as those of the first exposure frame; generate a preview screen according to the first exposure frame, select the first exposure frame as the reference frame, and generate a captured image by passing the first exposure frame and the second exposure frame through a multi-frame fusion algorithm.
5. The method according to claim 1, wherein The determination of the exposure strategy corresponding to the scene parameters further includes: When the scene parameters of the preview screen indicate that the proportion information in the preview screen is less than the preset proportion, there are moving objects with a first speed, and there are bright and dark stripes, the corresponding exposure strategy is: based on the first speed, reduce the exposure duration of the second exposure frame, and set the exposure duration of the first exposure frame to an integer multiple of the flashing period of the light source; generate a preview screen according to the first exposure frame, correct the bright and dark stripes in the second exposure frame based on the de-striping algorithm and the first exposure frame, select the corrected second exposure frame as the reference frame, and generate a captured image by passing the first exposure frame and the second exposure frame through a multi-frame fusion algorithm.
6. The method according to claim 1, wherein The determination of the exposure strategy corresponding to the scene parameters further includes: When the scene parameters of the preview screen indicate that the proportion information in the preview screen is greater than the preset proportion, there are moving objects with a first speed, and there are bright and dark stripes, the corresponding exposure strategy is: set the exposure duration of the first exposure frame to an integer multiple of the flashing period of the light source, and reduce the exposure duration of the second exposure frame based on the first speed; generate a preview screen according to the first exposure frame, correct the bright and dark stripes in the second exposure frame based on the de-striping algorithm and the first exposure frame, select the corrected second exposure frame as the reference frame, and generate a captured image by passing the first exposure frame, the second exposure frame, and the subsequent frame through a multi-frame fusion algorithm; the subsequent frame refers to the additional frame of the camera after the electronic device takes a photo.
7. The method according to claim 1, wherein The scene parameters further include the illuminance information in the preview screen, and the illuminance information is used to indicate the illumination intensity of the light; The determination of the exposure strategy corresponding to the scene parameters further includes: When the scene parameters of the preview screen indicate that the proportion information in the preview screen is less than the preset proportion, there is no object movement, no bright and dark stripes, and the illumination intensity of the light is greater than the preset illuminance, the corresponding exposure strategy is: set the exposure duration and gain value of the second exposure frame to be the same as those of the first exposure frame; generate a preview screen according to the first exposure frame, select the first exposure frame as the reference frame, and generate a captured image by passing the first exposure frame and the second exposure frame through a multi-frame fusion algorithm; where the preset exposure duration is less than or equal to 13 ms, and n is greater than or equal to 2.
8. The method according to claim 1, wherein The scene parameters further include the illuminance information in the preview screen, and the illuminance information is used to indicate the light intensity of the light; The determining the exposure strategy corresponding to the scene parameters further includes: When the scene parameters of the preview screen indicate that the proportion information in the preview screen is less than the preset proportion, there is no object movement, no bright and dark stripes, and the light intensity of the light is less than the preset illuminance, the corresponding exposure strategy is: setting the exposure duration of the second exposure frame to the preset exposure duration or one nth of the exposure duration of the first exposure frame, and increasing the exposure duration of the first exposure frame; generating a preview screen according to the first exposure frame, selecting the first exposure frame as a reference frame, and generating a captured image by using the first exposure frame through a multi-frame fusion algorithm; wherein, the preset exposure duration is less than or equal to 13 ms, and n is greater than or equal to 2.
9. The method according to claim 1, characterized in that The determining the exposure strategy corresponding to the scene parameters further includes: When the scene parameters of the preview screen indicate that the proportion information in the preview screen is greater than the preset proportion, there is no moving object, and there are no bright and dark stripes, the corresponding exposure strategy is: reducing the exposure amount of the second exposure frame; generating a preview screen and a captured image according to the fusion frame of the first exposure frame and the second exposure frame, or generating a preview screen according to the fusion frame of the first exposure frame and the second exposure frame, selecting the first exposure frame as a reference frame, and generating a captured image by using the first exposure frame and the second exposure frame through a multi-frame fusion algorithm.
10. The method according to any one of claims 7-9, characterized in that, The method further includes: When the scene parameters of the preview screen indicate that there are bright and dark stripes in the preview screen, the exposure duration of the first exposure frame in the corresponding exposure strategy satisfies: the exposure duration of the first exposure frame is an integer multiple of the light source flashing period.
11. The method according to any one of claims 2-4, characterized in that, The reducing the exposure duration of the first exposure frame based on the first speed includes: Determining an exposure time reduction amplitude mapping value corresponding to the first speed; Calculating the quotient of the exposure duration of the first exposure frame and the exposure time reduction amplitude mapping value to obtain the new exposure duration of the first exposure frame; Calculating the product of the gain value of the first exposure frame and the exposure time reduction amplitude mapping value to obtain the new gain value of the first exposure frame.
12. The method according to any one of claims 5-6, characterized in that, The reducing the exposure duration of the second exposure frame based on the first speed includes: Determining an exposure time reduction amplitude mapping value corresponding to the first speed; Calculating the quotient of the exposure duration of the second exposure frame and the exposure time reduction amplitude mapping value to obtain the new exposure duration of the second exposure frame; Calculating the product of the gain value of the second exposure frame and the exposure time reduction amplitude mapping value to obtain the new gain value of the second exposure frame.
13. The method according to any one of claims 1-12, characterized in that, The preset duration is equal to 33 ms minus the readout durations of the first exposure frame and the second exposure frame.
14. An electronic device, characterized in that, The electronic device includes one or more processors, one or more memories, and a camera supporting line-interleaved high dynamic range technology; the one or more processors are connected to the camera, the one or more memories are coupled to the one or more processors, and the one or more memories store a computer program; When the one or more processors execute the computer program, the electronic device is caused to execute the exposure control method according to any one of claims 1-13.
15. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a computer program which, when running, executes the exposure control method according to any one of claims 1-13.
16. A computer device, characterized in that, Comprising a memory, a processor, and a computer program stored on the memory, the processor executes the computer program to implement the steps of the method according to any one of claims 1-13.
17. A computer program product, characterized in that, Comprising a computer program which, when executed by a processor, performs the steps of the method according to any one of claims 1-13.
Citation Information
Patent Citations
Exposure time adjusting method and circuit thereof
CN115514901A
Image data processing method, storage medium, image processor and electronic equipment
CN115706864A
Image generation method and image generation device
CN117041747A
Photographing method and electronic equipment
CN117201930A
Method and Apparatus for Expanded Dynamic Range Imaging
US20090135263A1