Image processing method, electronic device and readable storage medium

By using the associated black level image for correction for each RAW image and combining it with an image processing model, the color noise and color cast problems in low-light scenes in HDR imaging are solved, and the imaging quality is improved.

CN119299586BActive Publication Date: 2025-09-26HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410051328.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-12
Publication Date
2025-09-26
Estimated Expiration
2044-01-12

AI Technical Summary

Technical Problem

In existing technologies, when performing HDR imaging, global black level correction based on the main part of the image leads to color noise and color cast problems in dark scenes. The error is amplified, affecting the imaging effect.

Method used

The black level image associated with each RAW image is used for correction, and the pre-trained image processing model is combined to perform black level correction and fusion processing, and the attention module is used to improve the image denoising effect.

Benefits of technology

Effectively reduce the correction error at different positions of the image, avoid color noise and color cast, and improve HDR imaging effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119299586B_ABST
    Figure CN119299586B_ABST
Patent Text Reader

Abstract

The present application provides an image processing method, an electronic device, and a readable storage medium, relating to the field of image processing technology. In this method, when the electronic device is shooting in HDR mode, the following steps are performed: obtaining multiple RAW images, the multiple RAW images corresponding to different exposures; obtaining multiple black level images associated with the multiple RAW images, the multiple black level images corresponding to different sensitivities, each RAW image being associated with at least one of the multiple black level images; obtaining an HDR image based on the multiple RAW images and the multiple black level images, each black level image in the multiple black level images being used to perform black level correction on the associated RAW image. Since different pixel points in a black level image generally correspond to different pixel values, i.e., black level values, based on the solution of the present application, different positions in each RAW image can be corrected based on different black level values, thereby improving the imaging effect of HDR.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to an image processing method, an electronic device, and a readable storage medium. Background Art

[0002] High dynamic range (HDR) imaging is a technology that captures multiple images of a scene at varying exposure levels and combines them into a single HDR image. Compared to ordinary images, HDR images maintain bright areas while maintaining clear shadow detail, providing greater dynamic range and image detail.

[0003] Current technology typically uses image signal processing (ISP) technology to process HDR images. However, this processing uses a global black level value determined based on the main portion of the image, which means that when processing image areas outside the main portion based on this value, there may be certain errors. In low-light scenes, the camera gain is usually large, that is, the corresponding amplification factor of the image signal is large, which causes the above errors to be amplified, and thus causes problems such as color noise and color cast in HDR imaging. Summary of the Invention

[0004] The present application provides an image processing method, an electronic device, and a readable storage medium, which can improve the imaging effect of HDR.

[0005] In a first aspect, an embodiment of the present application provides an image processing method, which is applied to an electronic device, and the method includes: detecting a shooting instruction, where the shooting instruction is used to request the electronic device to shoot in HDR mode; in response to the shooting instruction, acquiring multiple RAW images, where the multiple RAW images correspond to different exposure amounts; acquiring multiple black level images associated with the multiple RAW images, where the multiple black level images correspond to different sensitivities, and each RAW image is associated with at least one of the multiple black level images; obtaining an HDR image based on the multiple RAW images and the multiple black level images, where each black level image in the multiple black level images is used to perform black level correction on the associated RAW image.

[0006] It should be noted that different pixels in a black level image usually correspond to different pixel values, that is, to different black level values. Based on this, the present application uses the black level image associated with each RAW image to perform black level correction, so that different positions in each RAW image can be corrected based on different black level values. Compared with the use of global black level value correction, it can effectively reduce the correction error at different positions in the image, thereby avoiding problems such as color noise and color cast in HDR imaging, and providing users with better HDR imaging effects.

[0007] In combination with the above-mentioned first aspect, in certain implementations of the first aspect, before obtaining multiple black level images associated with multiple RAW images, the method also includes: in a dark condition, respectively capturing multiple images at multiple sensitivities; performing time domain averaging processing on the pixel values ​​in the multiple images corresponding to each sensitivity to obtain the black level image corresponding to each sensitivity; and determining the black level image associated with each RAW image based on the exposure corresponding to each RAW image.

[0008] An image captured under a dark condition can be understood as a black frame image, and each pixel value in the black frame image can be understood as a black level value.

[0009] This application obtains black level images at various sensitivities based on images captured under dark conditions. This allows the subsequent rapid acquisition of a black level image associated with the RAW image based on the exposure of the RAW image. Specifically, the sensitivity used to capture the RAW image can be first determined based on the exposure of the RAW image, and then the corresponding black level image can be determined based on the sensitivity used to capture the RAW image. In addition, this application processes the black level values ​​in multiple images captured at each sensitivity using a time-domain averaging method to obtain a black level image corresponding to each sensitivity, thereby improving the accuracy of the black level image corresponding to each sensitivity.

[0010] In combination with the above-mentioned first aspect and the above-mentioned implementation methods, in certain implementation methods of the first aspect, obtaining an HDR image based on multiple RAW images and multiple black level images includes: inputting multiple RAW images and multiple black level images into a pre-trained first image processing model to obtain a first denoised RAW image, the first image processing model being used to perform black level correction of multiple RAW images based on multiple black level images, and to perform fusion of multiple RAW images; and obtaining an HDR image based on the first denoised RAW image.

[0011] This application performs black level correction and fusion processing on multiple RAW images based on a pre-trained first image processing model, which can achieve better denoising effect on the image and thus improve the HDR imaging effect.

[0012] In combination with the above-mentioned first aspect and the above-mentioned implementation methods, in certain implementation methods of the first aspect, the first image processing model is trained based on at least one set of sample data, each set of sample data in the at least one set of sample data includes a sample true value image, multiple sample RAW images, and multiple sample black level images associated with the multiple sample RAW images, the multiple sample RAW images are obtained by degrading the sample true value images, and the multiple sample RAW images correspond to different exposure amounts. The training process of the first image processing model includes: taking the multiple sample RAW images and the multiple sample black level images as inputs of the first image processing model, and training the first image processing model using the sample true value images as training targets, so that the difference between the output of the first image processing model and the sample true value image is less than or equal to a first preset value.

[0013] In HDR imaging, it is usually necessary to go through the multi-exposure image fusion denoising process and the ISP post-processing process. The above-mentioned sample true value image can be understood as the denoised image without ISP post-processing. The sample true value image can be obtained by degrading the high-quality sample HDR image.

[0014] In combination with the above-mentioned first aspect and the above-mentioned implementation manner, in some implementation manners of the first aspect, obtaining an HDR image based on multiple RAW images and multiple black level images includes: stitching multiple RAW images and multiple black level images in the channel dimension to obtain a stitched image; inputting the stitched image into a pre-trained second image processing model to obtain a second denoised RAW image, the second image processing model being used to implement black level correction of multiple RAW images based on multiple black level images, and to implement fusion of multiple RAW images; and obtaining an HDR image based on the second denoised RAW image.

[0015] This application uses a pre-trained second image processing model to perform black level correction and fusion processing on multiple RAW images in the stitched image, which can achieve better image denoising and thus improve HDR imaging. In addition, stitching multiple RAW images and multiple black level images in the channel dimension allows the model to simultaneously consider information from different images.

[0016] In combination with the above-mentioned first aspect and the above-mentioned implementation method, in some implementation methods of the first aspect, the second image processing model is trained based on at least one set of sample data, each set of sample data in the at least one set of sample data includes a sample true value image and a sample stitched image, the sample stitched image is stitched together in the channel dimension by multiple sample RAW images and multiple sample black level images associated with the multiple sample RAW images, the multiple sample RAW images are obtained by degrading the sample true value images, and the multiple sample RAW images correspond to different exposure amounts. The training process of the second image processing model includes: using the sample stitched image as the input of the second image processing model, and using the sample true value image as the training target to train the second image processing model, so that the difference between the output of the second image processing model and the sample true value image is less than or equal to the second preset value.

[0017] The model is trained based on a stitched image of multiple RAW images and multiple black level images in the channel dimension as the input of the model, so that the model can consider information from different images at the same time.

[0018] In combination with the above-mentioned first aspect and the above-mentioned implementation, in some implementations of the first aspect, the image processing model includes an attention module.

[0019] Among them, the attention module is used to implement the attention mechanism, so that more attention can be paid to important feature information during image processing, that is, the important feature information is given greater weight during the processing, invalid information is discarded and effective information is enhanced. The attention module can greatly improve the denoising effect of the model output image, thereby improving the HDR imaging effect.

[0020] In combination with the above-mentioned first aspect and the above-mentioned implementation, in some implementations of the first aspect, before acquiring multiple RAW images in response to a shooting instruction, the method also includes: detecting that the light intensity of the current shooting scene is less than or equal to a third preset value.

[0021] In this way, in practice, the solution of the present application can be enabled and executed only when it is detected that the current scene is dark, thereby avoiding the resource consumption caused by enabling any scene.

[0022] In a second aspect, an embodiment of the present application provides an electronic device comprising: one or more processors; one or more memories; the memories storing one or more programs, which, when executed by the processor, enables the electronic device to execute any possible method in the first aspect above.

[0023] In a third aspect, an embodiment of the present application provides a device that is included in an electronic device and has the function of implementing the electronic device behavior in the above aspects and possible implementations of the above aspects. The functions can be implemented by hardware or by hardware executing corresponding software implementations. The hardware or software includes one or more modules or units corresponding to the above functions. For example, a display module or unit, a detection module or unit, a processing module or unit, etc.

[0024] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein instructions are stored in the computer-readable storage medium, which, when executed on a computer, enables the computer to execute the method described in the first aspect above.

[0025] In a fifth aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the method described in the first aspect above.

[0026] The technical effects obtained by the above-mentioned second, third, fourth and fifth aspects are similar to the technical effects obtained by the corresponding technical means in the above-mentioned first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 A schematic diagram of an interface for enabling HDR mode in a camera application according to an embodiment of the present application is shown;

[0028] Figure 2 A schematic diagram showing the principle of synthesizing an HDR image provided in an embodiment of the present application is shown;

[0029] Figure 3 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown;

[0030] Figure 4 A schematic diagram of the software structure of an electronic device provided in an embodiment of the present application is shown;

[0031] Figure 5 A schematic diagram showing a flow chart of an image processing method provided in an embodiment of the present application is shown;

[0032] Figure 6 A schematic diagram showing the association relationship between a RAW image and a black level image provided in an embodiment of the present application is shown;

[0033] Figure 7 A schematic diagram of a process for synthesizing an HDR image provided in an embodiment of the present application is shown;

[0034] Figure 8 A schematic diagram of a process for generating a denoised RAW image using a model according to an embodiment of the present application is shown;

[0035] Figure 9 A schematic diagram of the training process of a model provided in an embodiment of the present application is shown;

[0036] Figure 10 A schematic diagram of a process for generating a denoised RAW image using a model according to another embodiment of the present application is shown;

[0037] Figure 11 A schematic diagram of the training process of another model provided in an embodiment of the present application is shown;

[0038] Figure 12 A schematic diagram of the structure of an image processing device provided in an embodiment of the present application is shown;

[0039] Figure 13 A schematic diagram of the structure of a chip provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0040] To facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. For example, the first chip and the second chip are merely used to distinguish different chips and do not limit their order. Those skilled in the art will understand that the words "first" and "second" do not limit the quantity or execution order, and the words "first" and "second" do not necessarily mean that they are different.

[0041] It should be noted that in the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described in this application as "exemplary" or "for example" should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.

[0042] In the embodiments of the present application, "at least one" refers to one or more, and "more" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.

[0043] To facilitate understanding, some of the terms involved in the embodiments of this application are first explained below.

[0044] High dynamic range (HDR) is a technology that synthesizes images with a high dynamic range by combining multiple frames of images with varying exposures. Compared to ordinary images, high dynamic range images maintain bright areas while maintaining clear shadow details, providing greater dynamic range and image detail. "Dynamic range" refers to the ratio of signal intensities (e.g., brightness), and in photography, is also referred to as "light ratio" or "contrast."

[0045] Exposure value (EV): refers to the intensity and duration of light perceived by the camera. When shooting with a camera, due to the limitations of dynamic range, the exposure value may be too high or too low, resulting in overexposure or underexposure of the subject and background. Overexposure results in an image that is too bright, failing to capture detail in highlights; underexposure results in a dark image, failing to capture detail in shadows.

[0046] Exposure parameters include aperture, exposure time, and ISO. Exposure time can be adjusted by controlling shutter speed. Faster shutter speeds shorten exposure time, resulting in less exposure. Conversely, slower shutter speeds increase exposure time, resulting in greater exposure and brighter images.

[0047] The larger the aperture (the smaller the value), such as F2.8, the greater the exposure and the brighter the image. The smaller the aperture (the larger the value), such as F16, the less exposure and the lower the image brightness.

[0048] ISO is a measure of a photosensitive element's sensitivity to light. Specifically, the higher the ISO, the better the light resolution, the more light it detects, and the brighter the image. Conversely, the lower the ISO, the weaker the light resolution, the less light it detects, and the lower the image brightness. ISO can be divided into several levels, such as 50, 100, 200, 400, 800, 1600, 3200, 4800, 6400, and so on.

[0049] In actual application, the exposure amount during shooting can be controlled by controlling parameters such as aperture, exposure time and sensitivity, thereby controlling the shooting effect. By reasonably adjusting the exposure parameters, the generated image can be made more vivid in color, higher in contrast and clearer in image details.

[0050] RAW image: A RAW image refers to the original image obtained by converting the captured light source signal into a digital signal by the image sensor in the electronic device.

[0051] Camera gain: Cameras typically have an amplifier that amplifies the sensor's signal. The gain is called the gain. It's important to note that low-light scenes typically have a higher gain, meaning the signal is amplified more.

[0052] Image subject: It is the main object in the image, dominates the overall image, and is the focus of the image. For example, the subject can be the middle area of ​​the image.

[0053] Image signal processing (ISP): This module processes the digital signals output by the front-end image sensor. The ISP process typically involves various modules, including black level compensation (BLC), lens shading correction (LSC), bad pixel correction, demosaicing, automatic white balance (AWB), color correction (CC), and gamma correction (GC).

[0054] The above is a brief introduction to the terms involved in the embodiments of this application, and no further details will be given below.

[0055] The image processing method provided in the embodiments of the present application can be applied to various electronic devices that have a shooting function and provide an HDR mode in the shooting function. The shooting function can take photos or videos. The electronic device can be, but is not limited to, a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, a vehicle-mounted device, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) / virtual reality (VR) device, etc., and the embodiments of the present application are not limited to this.

[0056] For example, taking a mobile phone as an electronic device, Figure 1 A schematic diagram of an interface for enabling HDR mode in a camera application is shown in an embodiment of the present application.

[0057] When the user turns on the screen of the electronic device and controls the electronic device to be in unlocked state, the mobile phone can display the following Figure 1 The interface shown in (a) above may be the desktop of an electronic device, on which icons of multiple installed applications are displayed, such as a clock application icon, a calendar application icon, a gallery application icon, a memo application icon, a file management application icon, an email application icon, a music application icon, a calculator application icon, a video application icon, a sports and health application icon, a weather application icon, a browser application icon, a smart life application icon, a settings application icon, a recorder application icon, an application store application icon, an address book application icon, a phone application icon, a message application icon, and a camera application icon 10, etc.

[0058] The user can perform a touch operation on the camera application icon 10, which can be a click operation, a long press operation, etc. Accordingly, the electronic device receives the user's touch operation on the camera application icon 10, and in response to the user's touch operation on the camera application icon 10, the electronic device starts the camera application.

[0059] After the camera application is started, the electronic device can display Figure 1 The shooting interface shown in (b) of FIG. The shooting interface includes a currently captured preview image, a shooting control 11, and functional controls corresponding to various shooting modes. For example, the functional controls corresponding to various shooting modes may include a night scene mode control, a portrait mode control, a photo mode control, a video mode control, an aperture mode control, and more controls 12 for enabling more functions in the camera application. The shooting control 11 is used to trigger the shooting operation of the electronic device.

[0060] When the user needs to use the HDR function of the electronic device to shoot an image, the user can click on the more control 12, and in response to the user's click operation, the electronic device can display the following information: Figure 1 The corresponding menu bar shown in (c) in the figure has an HDR control 13 displayed in the menu bar. In response to the user's triggering operation on the HDR control 13, the mobile phone enables the HDR mode. Figure 1 As shown in (d) of FIG, after the electronic device enables HDR mode, an HDR logo 14 and a shooting control 11 may be displayed in the camera shooting interface. The HDR logo 14 may prompt the user that the camera is currently in HDR mode. Thereafter, in response to a user clicking the shooting control 11 (an example of a shooting instruction), the electronic device may use the HDR function to capture image frames with different exposure levels. The electronic device may then fuse the image frames with different exposure levels to generate an HDR image and display it to the user.

[0061] Currently, multiple exposure fusion (MEF) is generally used to achieve HDR imaging. Figure 2 As shown, the MEF solution usually refers to the camera exposing multiple times in a short period of time, collecting three types of RAW images: short exposure frames, medium exposure frames, and long exposure frames, and then generating HDR images by fusing these three types of RAW images. Among them, different exposure amounts provide picture information of different brightness areas. Short exposure frames are underexposed to provide highlight information, long exposure frames are overexposed to provide dark area information, and medium exposure frames are reference frames that can provide medium-bright information. It should be understood that Figure 2 The numbers of the three types of exposure frames, short, medium, and long, shown are only examples. In actual operation, in HDR mode, the number of frames of each type may include one frame or multiple frames without limitation. For example, a short exposure frame may include 2 frames, a medium exposure frame may include 4 frames, and a long exposure frame may include 1 frame.

[0062] Current technology typically utilizes image processing (ISP) technology to generate HDR images. However, during ISP processing, a black level value is typically adjusted based on the main portion of the image, and this black level value is then used as a global parameter for black level correction across the entire image. Because this parameter is determined based on the main portion of the image, it is more suitable for the main portion and may not be applicable to areas outside the main portion. Therefore, errors may occur when processing image areas outside the main portion based on this parameter. This error is generally small in brighter scenes and has little impact on the HDR imaging effect. However, in darker scenes, due to the high camera gain (i.e., the corresponding amplification factor of the image signal), this error is amplified, leading to color noise and color cast in the HDR image, resulting in poor HDR imaging results.

[0063] Based on this, the present application proposes to use the black level image associated with each RAW image in the multi-exposure image to perform black level correction. Since different pixel points in the black level image usually correspond to different pixel values ​​(that is, correspond to different black level values), different positions in each RAW image can be corrected based on different black level values. Compared with the use of global black level value correction, it can effectively reduce the correction error at different positions in the image, thereby avoiding problems such as color noise and color cast in HDR imaging, and providing users with better HDR imaging effects.

[0064] The following is a schematic diagram of the hardware structure of the electronic device 100 that can implement the solution of this application. Figure 3 A hardware structure diagram of an electronic device 100 provided in an embodiment of the present application is shown.

[0065] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

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

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

[0068] The controller can generate an operation control signal based on the instruction operation code and timing signal to complete the control of instruction fetching and execution.

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

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

[0071] The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C bus lines. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, and the like via different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 180K via the I2C interface, enabling communication between the processor 110 and the touch sensor 180K via the I2C bus interface, thereby implementing the touch function of the electronic device 100.

[0072] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the I2S interface, enabling the function of answering calls through a Bluetooth headset.

[0073] The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface, enabling the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.

[0074] The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the UART interface, enabling the function of playing music through Bluetooth headphones.

[0075] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display 194 and the camera 193. MIPI interfaces include the camera serial interface (CSI) and the display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the camera function of the electronic device 100. The processor 110 and the display 194 communicate via the DSI interface to implement the display function of the electronic device 100.

[0076] The GPIO interface can be configured via software. The GPIO interface can be configured as either a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to the camera 193, display 194, wireless communication module 160, audio module 170, sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0077] The USB interface 130 is an interface that complies with USB standards and may be a Mini USB interface, a Micro USB interface, a USB Type-C interface, or the like. The USB interface 130 can be used to connect a charger to charge the electronic device 100, or to transfer data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio. This interface can also be used to connect other electronic devices, such as augmented reality devices.

[0078] It is understood that the interface connection relationship between the modules illustrated in the embodiment of the present invention is merely an illustrative illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods from the above embodiments, or a combination of multiple interface connection methods.

[0079] The charging management module 140 is configured to receive charging input from a charger. The charger can be either a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 can receive wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also provide power to the electronic device via the power management module 141.

[0080] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and provides power to the processor 110, the internal memory 121, the display 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage, impedance). In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.

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

[0082] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.

[0083] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0084] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0085] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0086] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).

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

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

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

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

[0091] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then passes the electrical signal to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

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

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

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

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

[0096] The internal memory 121 can be used to store computer executable program codes, which include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121 and / or instructions stored in a memory provided in the processor.

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

[0098] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be provided in the processor 110, or some functional modules of the audio module 170 can be provided in the processor 110.

[0099] The speaker 170A, also called a "speaker", is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music or listen to hands-free calls through the speaker 170A.

[0100] The receiver 170B, also called a "handset", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or a voice message, the user can place the receiver 170B close to the ear to hear the voice.

[0101] Microphone 170C, also known as "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to the microphone 170C to input the sound signal into the microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the source of sound, realize directional recording function, etc.

[0102] The headphone jack 170D is used to connect a wired headphone and can be the USB interface 130 or a 3.5mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0103] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180A can be located on display screen 194. There are many types of pressure sensors 180A, such as resistive, inductive, and capacitive. A capacitive pressure sensor can include at least two parallel plates made of conductive material. When force acts on pressure sensor 180A, the capacitance between the electrodes changes. Electronic device 100 determines the intensity of the pressure based on this change in capacitance. When a touch operation is applied to display screen 194, electronic device 100 detects the touch intensity based on pressure sensor 180A. Electronic device 100 can also calculate the touch location based on the detection signal from pressure sensor 180A. In some embodiments, touch operations applied to the same touch location but with different touch intensities can correspond to different operation instructions. For example, when a touch operation with an intensity less than a first pressure threshold is applied to a short message application icon, a command to view short messages is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to a short message application icon, a command to create a new short message is executed.

[0104] The gyroscope sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the electronic device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyroscope sensor 180B can also be used for navigation and somatosensory game scenes.

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

[0106] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip case. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip cover based on the magnetic sensor 180D. Based on the detected opening and closing status of the case or flip cover, features such as automatic unlocking of the flip cover can be configured.

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

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

[0109] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light outward through the light emitting diode. The electronic device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100. The electronic device 100 can use the proximity light sensor 180G to detect that the user is holding the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode and pocket mode to automatically unlock and lock the screen.

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

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

[0112] The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 reduces the performance of the processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to prevent the electronic device 100 from shutting down abnormally due to low temperature. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 boosts the output voltage of the battery 142 to prevent abnormal shutdown due to low temperature.

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

[0114] The bone conduction sensor 180M can obtain vibration signals. In some embodiments, the bone conduction sensor 180M can obtain vibration signals from the vibrating bones of the human body. The bone conduction sensor 180M can also contact the human pulse to receive blood pressure pulse signals. In some embodiments, the bone conduction sensor 180M can also be set in headphones to form bone conduction headphones. The audio module 170 can parse out voice signals based on the vibration signals of the vibrating bones of the human body obtained by the bone conduction sensor 180M to implement voice functions. The application processor can parse heart rate information based on the blood pressure pulse signals obtained by the bone conduction sensor 180M to implement heart rate detection functions.

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

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

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

[0118] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to and separated from the electronic device 100 by inserting it into or removing it from the SIM card interface 195. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.

[0119] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present invention, the Android system with a layered architecture is used as an example to illustrate the software structure of the electronic device 100. It should be noted that in the embodiment of the present application, the operator system of the electronic device may include but is not limited to (Symbian), (Android), (iOS), (Blackberry), Hongmeng (HarmonyOS) and other operating systems, this application does not make any limitation.

[0120] Figure 4 A software structure block diagram of an electronic device 100 provided in an embodiment of the present application is shown.

[0121] A layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other through software interfaces. In some embodiments, the Android system consists of, from top to bottom, the application layer, the application framework layer, the hardware abstraction layer (HAL), the kernel layer, and the hardware layer.

[0122] The application layer may include a camera application or other applications, including but not limited to music, gallery, Bluetooth, calendar, short message, call, navigation and other applications.

[0123] The application framework layer may provide an application programming interface (API) and a programming framework to the application programs of the application layer; the application framework layer may include some predefined functions.

[0124] For example, the application framework layer may include a camera access interface; the camera access interface may include camera management and camera equipment; wherein, camera management may be used to provide an access interface for managing the camera; and camera equipment may be used to provide an interface for accessing the camera.

[0125] The hardware abstraction layer (HAL) abstracts hardware. For example, it can include the camera HAL and other hardware device abstraction layers. The camera HAL includes image processing algorithms, among other things. After the camera's image sensor captures RAW image data, it uses image processing algorithms to process it and produce HDR images. Furthermore, the camera abstraction layer stores captured images in the gallery app for easy viewing by the user.

[0126] The kernel layer is used to provide drivers for different hardware devices. For example, the driver layer may include camera drivers, display drivers, and image processor drivers.

[0127] The hardware layer may include multiple image sensors, multiple image signal processors, cameras, displays, and other hardware devices.

[0128] In this application, by calling the hardware abstraction layer interface in the hardware abstraction layer, the application layer and application framework layer above the hardware abstraction layer can be connected with the driver layer and hardware layer below, thereby realizing camera data transmission and function control.

[0129] The camera hardware interface layer within the hardware abstraction layer allows manufacturers to customize functionality based on their needs. Compared to the hardware abstraction layer interface, the camera hardware interface layer is more efficient, flexible, and has lower latency. It also allows for more comprehensive access to the ISP and GPU for image processing. Images input to the hardware abstraction layer can come from image sensors or stored images.

[0130] The scheduling layer in the hardware abstraction layer includes a general functional interface for management and control.

[0131] The camera service layer in the hardware abstraction layer is used to access the ISP and other hardware interfaces.

[0132] The following combination Figures 5 to 7 The image processing method provided in this application is described in detail. Figure 5 A flow chart of an image processing method provided in an embodiment of the present application is shown. Figure 5The image processing method shown can be Figure 3 The electronic device shown in , or, configured in Figure 3 The chip in the electronic device shown performs; Figure 5 The image processing method shown includes steps S510 to S550, which are described in detail below.

[0133] S510: The electronic device starts a camera application and turns on an HDR mode.

[0134] When the user wants to launch the camera application, the user can click Figure 1 The camera application icon 10 shown in (a) of FIG. 1 is configured such that the electronic device can receive a user's touch operation on the camera application icon 10, and the electronic device starts the camera application in response to the touch operation, and displays the following after the camera application is started: Figure 1 The shooting interface shown in (b) in the figure can be adjusted by the user. Figure 1 The interface shown turns on HDR mode for shooting.

[0135] It is understandable that there are multiple ways to start the camera application. In addition to the above-mentioned touch operation on the camera application icon to start the camera application, the camera application can also be started by voice triggering or sliding triggering. For example, when the electronic device is in the lock screen state, the user can instruct the electronic device to start the camera application by sliding the gesture to the right on the display screen of the electronic device. Alternatively, the electronic device is in the lock screen state, and the lock screen interface includes the icon of the camera application. The user instructs the electronic device to start the camera application by clicking the icon of the camera application. Alternatively, when the electronic device is running other applications, the application has the permission to call the camera application; the user can instruct the electronic device to start the camera application by clicking the corresponding control. For example, when the electronic device is running an instant messaging application, the user can instruct the electronic device to start the camera application by using the control of the camera function. The embodiment of the present application does not limit the specific operation method of starting the camera application.

[0136] In some embodiments, after the electronic device starts the camera application, the HDR mode of the camera application is already turned on, and the electronic device can display Figure 1 The shooting interface shown in (d).

[0137] S520: The electronic device detects a shooting instruction, where the shooting instruction is used to request the electronic device to shoot in HDR mode.

[0138] After the HDR mode of the electronic device's shooting function is turned on, the user can issue a shooting instruction to request the electronic device to shoot in HDR mode to obtain an HDR image. For example, the shooting instruction can be a user's click operation on the shooting control, and the shooting control can be such as Figure 1 It should be understood that the user can also trigger the electronic device to shoot through voice commands, gesture commands, etc., and this application does not impose any limitation on this.

[0139] S530: In response to the shooting instruction, the electronic device acquires a plurality of RAW images, where the plurality of RAW images correspond to different exposure values.

[0140] Before acquiring multiple RAW images, the electronic device first determines the exposure and frame count corresponding to the short, medium, and long exposure frames, respectively. The exposure of the medium frame is greater than that of the short frame and less than that of the long frame. The electronic device then acquires multiple RAW images based on the determined exposure and frame count. It should be understood that once the electronic device determines the exposure, the corresponding exposure parameters, such as exposure time and sensitivity, are also determined.

[0141] It should be understood that after launching the camera application, the camera can capture a preview image during the preview process. The electronic device can determine the shooting scene based on the preview image and then invoke an algorithm corresponding to the shooting scene to determine the exposure amount and number of frames for short exposure frames, medium exposure frames, and long exposure frames. Determining the exposure amount includes determining the exposure time and sensitivity corresponding to each frame.

[0142] It should be understood that when the electronic device determines that the current shooting scene is a dark light scene, it can call the algorithm corresponding to the dark light scene to determine the exposure amount and frame number of the short exposure frame, the exposure amount and frame number of the medium exposure frame, and the exposure amount and frame number of the long exposure frame, and then obtain multiple RAW images based on the determined exposure amount and frame number.

[0143] The low-light scene may be a scene with relatively low light, a cloudy day, or a night scene, without limitation. In a specific implementation, the low-light scene may refer to a scene with light intensity less than or equal to a third preset value, such as 0.2 lux, 0.3 lux, 0.5 lux, 1 lux, or 3 lux, without limitation, where lux is the unit: lux.

[0144] In one implementation, before the electronic device executes step S530, it can first detect the captured scene. When it detects that the scene is currently in a dark light, it starts the image processing algorithm provided in this application, that is, executes steps S530 to S550.

[0145] S540: The electronic device acquires a plurality of black level images associated with the plurality of RAW images.

[0146] The multiple black level images correspond to different sensitivities, and each RAW image may be associated with at least one of the multiple black level images, that is, each RAW image may be associated with one or more of the multiple black level images.

[0147] It should be understood that each black level image in the plurality of black level images is used to perform black level correction on the RAW image associated therewith. Since each RAW image is associated with at least one of the plurality of black level images, it means that each RAW image can be corrected by at least one black level image.

[0148] In a specific implementation, the electronic device can pre-calibrate black level images at different sensitivities. For example, black level images at sensitivities of 3200, 4800, 6400, 9600, and 12800 can be pre-calibrated. This allows, after acquiring multiple RAW images, to determine a black level image associated with each RAW image based on the exposure corresponding to each RAW image. Specifically, the sensitivity used to capture each RAW image can be first determined based on the exposure corresponding to each RAW image. Then, the black level image associated with each RAW image can be determined based on the sensitivity used to capture each RAW image and the pre-calibrated black level images at different sensitivities.

[0149] Optionally, among the multiple RAW images, if there are RAW images with the same sensitivity, these RAW images with the same sensitivity can be associated with the same black level image. Figure 6 As shown, if the sensitivity used by RAW image 1 and RAW image 2 is 3200, they can be simultaneously associated with the black level image 1 corresponding to the sensitivity; if the sensitivity used by RAW image 4 and RAW image 5 is 4800, they can be simultaneously associated with the black level image 2 corresponding to the sensitivity.

[0150] Optionally, among multiple RAW images, if the sensitivity used by a RAW image is not pre-calibrated, a black level image corresponding to a pre-calibrated sensitivity near the sensitivity can be associated with the RAW image. Figure 6As shown, if the sensitivity used by the RAW image 3 is 4000 and the black level image at this sensitivity has not been pre-calibrated, the black level image with a sensitivity of 3200 and the black level image corresponding to the sensitivity of 4800 can be selected as the black level images associated with the RAW image 3, and then the two black level images can be averaged in the time domain to obtain the black level image at the sensitivity of 4000, and then the black level correction of the RAW image 3 can be performed based on the black level image.

[0151] In one possible implementation, the calibration process of the black level image can be as follows: under no light conditions, multiple images are collected at multiple sensitivities respectively, and then the pixel values ​​in the multiple images corresponding to each sensitivity are averaged in the time domain to obtain the black level image corresponding to each sensitivity.

[0152] The image captured under the above-mentioned no-light condition can be understood as a black frame image.

[0153] It is understandable that different pixels in each image captured by the camera usually correspond to different pixel values. Therefore, different pixels in the black level image obtained after time-domain averaging of multiple images will also correspond to different pixel values, that is, black level values.

[0154] Taking the calibration of the black level image with a sensitivity of 3200 as an example, in the specific implementation, 100 frames of images can be collected under no light conditions when the sensitivity is 3200, and then the black level conditions in these 100 frames of images are statistically analyzed based on the time domain averaging method (that is, the average of all pixel values ​​at the same pixel coordinate position in these 100 frames of images is statistically analyzed) to obtain the black level image under this sensitivity.

[0155] Optionally, after the black level image is obtained by the time domain averaging method, the black level image may be subjected to processing such as bad pixel correction and image filtering.

[0156] S550: The electronic device obtains an HDR image according to the multiple RAW images and the multiple black level images.

[0157] In the specific implementation, this step is as follows: Figure 7 As shown, this may include:

[0158] Step S551 : obtaining a denoised RAW image according to a plurality of RAW images and a plurality of black level images.

[0159] That is, denoising is performed on multiple RAW images in the RAW domain.

[0160] The denoising process for the multiple RAW images includes performing black level correction on the multiple RAW images based on the multiple black level images, and fusing the multiple RAW images to obtain denoised RAW images. It should be understood that each of the multiple black level images is used to perform black level correction on the RAW image associated therewith.

[0161] To improve denoising, this application proposes utilizing an image processing model to implement this denoising process, specifically, using the image processing model to perform black level correction and image fusion. It should be understood that, in practice, this can also be achieved without utilizing an image processing model, and this application does not limit this. For ease of description, the following description primarily uses the image processing model as an example for denoising.

[0162] In one possible implementation, Figure 8 As shown, multiple RAW images and multiple black level images can be input into a pre-trained image processing model (e.g., a first image processing model), and the model can output a denoised RAW image (e.g., a first denoised RAW image) based on the pre-trained model parameters.

[0163] The image processing model can be trained based on at least one set of sample data, each of which includes a sample ground truth image, multiple sample RAW images, and multiple sample black level images associated with the multiple sample RAW images, where the multiple sample RAW images correspond to different exposure levels. The multiple sample RAW images and the multiple sample black level images serve as training input data for the image processing model, while the sample ground truth images serve as training targets for the model.

[0164] The sample true value image can be understood as a sample denoised RAW image, which can be obtained by degrading a high-quality sample HDR image captured by the camera. Optionally, the high-quality sample HDR image can be determined by a scoring algorithm. For example, a scoring algorithm can be used to score each HDR image historically captured by the camera, and then the HDR image with the highest score can be selected as the high-quality sample HDR image. The high-quality sample HDR image can also be determined by professional technicians based on experience, without limitation.

[0165] The plurality of sample RAW images can be further degraded based on the sample true value images obtained by the above degradation. It should be understood that the above degradation operation can be implemented based on degradation parameters pre-calibrated in the camera.

[0166] The plurality of sample black level images are determined from pre-calibrated black level images at different sensitivities based on exposure amounts of the plurality of sample RAW images.

[0167] In actual operation, such as Figure 9 As shown, before training the image processing model, sample data can be obtained based on the following steps: obtaining a high-quality sample HDR image; degrading the sample HDR image based on a pre-calibrated first degradation parameter to obtain a sample true value image; degrading the sample true value image based on a pre-calibrated second degradation parameter to obtain multiple sample RAW images, that is, multiple images with different exposure amounts; and obtaining multiple sample black level images associated with the multiple sample RAW images.

[0168] like Figure 9 As shown, based on the above-mentioned sample data, the training process of the image processing model may include: taking multiple sample RAW images and multiple sample black level images as inputs of the image processing model, and taking the sample true value images as training targets to train the image processing model, so that the difference between the output of the image processing model and the sample true value image is less than or equal to a preset value (for example, a first preset value).

[0169] It should be understood that in practice, the image processing model can be trained using multiple sets of sample data.

[0170] It should be understood that when training the prediction model, it is necessary to make the model prediction value as close to the true value as possible, that is, to make the difference between the image output by the model and the sample true value image as small as possible. Optionally, the difference between the image output by the model and the sample true value image can be calculated by a loss function. The larger the difference of the loss function, the greater the difference between the image output by the model and the sample true value image. Then, the training of the image processing model becomes a process of minimizing the output value of the loss function (i.e., the loss value) as much as possible until the loss value is less than or equal to the preset value.

[0171] In another possible implementation, Figure 10 As shown, multiple RAW images and multiple black level images can be stitched together in the channel dimension to obtain a stitched image; then the stitched image is input into a pre-trained image processing model (e.g., a second image processing model) to obtain a denoised RAW image (e.g., a second denoised RAW image).

[0172] Channel-wise stitching involves stacking multiple images in the channel dimension to increase the depth of the feature map. This allows the image processing model to learn image features from different spatial locations and fuse them at the same level. The principle of channel stitching is as follows: for example, if the dimensions of images A and B are [H, W, C1] and [H, W, C2], respectively, where C1 and C2 are the number of channels, the resulting dimensions after stitching in the channel dimension are [H, W, C1 + C2].

[0173] This application uses a pre-trained image processing model to perform black level correction and fusion processing on multiple RAW images in the stitched image, which can achieve better image denoising and thus improve HDR imaging. In addition, stitching multiple RAW images and multiple black level images in the channel dimension allows the model to simultaneously consider information from different images.

[0174] The image processing model is trained based on at least one set of sample data. Each set of sample data includes a sample ground truth image and a sample stitched image. The sample stitched image is composed of a plurality of sample RAW images and a plurality of sample black level images associated with the plurality of sample RAW images, stitched together in the channel dimension. The plurality of sample RAW images correspond to different exposure levels. The sample stitched images serve as the training input data for the image processing model, and the sample ground truth images serve as the training targets for the model.

[0175] The sample true value image can be understood as a sample denoised RAW image, which can be obtained by degrading a high-quality sample HDR image captured by the camera. Optionally, the high-quality sample HDR image can be determined by a scoring algorithm. For example, a scoring algorithm can be used to score each HDR image historically captured by the camera, and then the HDR image with the highest score can be selected as the high-quality sample HDR image. The high-quality sample HDR image can also be determined by professional technicians based on experience, without limitation.

[0176] The plurality of sample RAW images can be further degraded based on the sample true value images obtained by the above degradation. It should be understood that the above degradation operation can be implemented based on degradation parameters pre-calibrated in the camera.

[0177] The plurality of sample black level images are determined from pre-calibrated black level images at different sensitivities based on exposure amounts of the plurality of sample RAW images.

[0178] In actual operation, such as Figure 11 As shown, before training the image processing model, sample data can be obtained based on the following steps: obtaining a high-quality sample HDR image; degrading the sample HDR image based on a pre-calibrated first degradation parameter to obtain a sample true value image; degrading the sample true value image based on a pre-calibrated second degradation parameter to obtain multiple sample RAW images, that is, multiple images with different exposure amounts; obtaining multiple sample black level images associated with the multiple sample RAW images; and splicing the multiple sample RAW images and the multiple sample black level images in the channel dimension to obtain a sample spliced ​​image.

[0179] like Figure 11As shown, based on the above sample data, the training process of the image processing model may include: taking the sample spliced ​​image as the input of the image processing model, and taking the sample true value image as the training target to train the image processing model, so that the difference between the output of the image processing model and the sample true value image is less than or equal to a preset value (for example, a second preset value).

[0180] It should be understood that in practice, the image processing model can be trained using multiple sets of sample data.

[0181] It should be understood that when training a prediction model, the model prediction value is generally made as close to the true value as possible, that is, the difference between the image output by the model and the sample true value image is made as small as possible. Optionally, the difference between the image output by the model and the sample true value image can be calculated by a loss function. The larger the difference of the loss function, the greater the difference between the image output by the model and the sample true value image. In this way, the training of the image processing model becomes a process of minimizing the output value of the loss function (i.e., the loss value) as much as possible until the loss value is less than or equal to the preset value.

[0182] In this application, a model is trained based on a stitched image of multiple RAW images and multiple black level images in the channel dimension as the input of the model, so that the model can consider information from different images at the same time.

[0183] The above-mentioned image processing model (for example, the first image processing model and / or the second image processing model) can be a neural network model, a deep neural network (DNN) model, a convolutional neural network (CNN) model, a lightweight U-Net network model, etc., and this application does not limit this.

[0184] The above-mentioned image processing model (e.g., the first image processing model and / or the second image processing model) may include an attention module. The attention module is used to implement an attention mechanism, which allows the image processing process to pay more attention to important feature information, i.e., to give more weight to important feature information during the processing process, thereby discarding invalid information and enhancing valid information. The attention module can greatly improve the denoising effect of the model output image, thereby improving HDR imaging.

[0185] Step S552: Perform ISP processing on the denoised RAW image to obtain an HDR image.

[0186] The ISP processing can be understood as post-processing the brightness, contrast, color, etc. of the denoised RAW image. It should be understood that the HDR image obtained after the ISP processing can be displayed to the user.

[0187] In summary, the present application uses the black level image associated with each RAW image to perform black level correction, so that different positions in each RAW image can be corrected based on different black level values. Compared with the use of global black level value correction, it can effectively reduce the correction error at different positions in the image, thereby avoiding problems such as color noise and color cast in HDR imaging, and providing users with better HDR imaging effects.

[0188] Combined with the above Figures 5 to 11 , an embodiment of the method of the present application is described, and the device for executing the above method provided by the embodiment of the present application is described below.

[0189] like Figure 12 As shown, Figure 12 FIG. 1 shows a schematic diagram of the structure of an image processing device provided in an embodiment of the present application. Figure 12 As shown, the device 1200 includes a detection unit 1210 , an acquisition unit 1220 and a processing unit 1230 .

[0190] Among them, the detection unit 1210 is used to detect a shooting instruction, which is used to request the electronic device to shoot in HDR mode; in response to the shooting instruction, the acquisition unit 1220 is used to acquire multiple RAW images, and the multiple RAW images correspond to different exposure amounts; acquire multiple black level images associated with the multiple RAW images, and the multiple black level images correspond to different sensitivities, and each RAW image is associated with at least one of the multiple black level images; the processing unit 1230 is used to obtain an HDR image based on the multiple RAW images and the multiple black level images, and each black level image in the multiple black level images is used to perform black level correction on the associated RAW image.

[0191] In one possible implementation, the processing unit 1230 is further used to: capture multiple images at multiple sensitivities under no light conditions; perform time-domain averaging processing on the pixel values ​​in the multiple images corresponding to each sensitivity to obtain a black level image corresponding to each sensitivity; and determine a black level image associated with each RAW image based on the exposure corresponding to each RAW image.

[0192] In one possible implementation, the processing unit 1230 is further used to: input multiple RAW images and multiple black level images into a pre-trained first image processing model to obtain a first denoised RAW image, the first image processing model being used to perform black level correction of the multiple RAW images based on the multiple black level images, and to perform fusion of the multiple RAW images; and obtain an HDR image based on the first denoised RAW image.

[0193] In one possible implementation, the first image processing model is trained based on at least one group of sample data, each group of sample data in the at least one group of sample data includes a sample true value image, multiple sample RAW images, and multiple sample black level images associated with the multiple sample RAW images, the multiple sample RAW images are obtained by degrading the sample true value images, and the multiple sample RAW images correspond to different exposure amounts. The processing unit 1230 is also used to: use the multiple sample RAW images and the multiple sample black level images as inputs of the first image processing model, and use the sample true value images as training targets to train the first image processing model, so that the difference between the output of the first image processing model and the sample true value image is less than or equal to a first preset value.

[0194] In one possible implementation, the processing unit 1230 is further used to: stitch multiple RAW images and multiple black level images in the channel dimension to obtain a stitched image; input the stitched image into a pre-trained second image processing model to obtain a second denoised RAW image, the second image processing model being used to implement black level correction of multiple RAW images based on the multiple black level images, and to implement fusion of multiple RAW images; and obtain an HDR image based on the second denoised RAW image.

[0195] In one possible implementation, the second image processing model is trained based on at least one group of sample data, each group of sample data in the at least one group of sample data includes a sample true value image and a sample stitched image, the sample stitched image is stitched together in the channel dimension by multiple sample RAW images and multiple sample black level images associated with the multiple sample RAW images, the multiple sample RAW images are obtained by degrading the sample true value images, and the multiple sample RAW images correspond to different exposure amounts; the processing unit 1230 is also used to: use the sample stitched image as the input of the second image processing model, and use the sample true value image as the training target to train the second image processing model, so that the difference between the output of the second image processing model and the sample true value image is less than or equal to a second preset value.

[0196] In a possible implementation, the detection unit 1210 is further configured to detect that the illumination intensity of the current shooting scene is less than or equal to a third preset value.

[0197] In one possible implementation, the apparatus 1100 may further include a storage unit. The storage unit is connected to the detection unit 1210, the acquisition unit 1220, and the processing unit 1230 via a circuit. The storage unit may include one or more memories, which may be devices in one or more devices or circuits used to store programs or data. The storage unit may exist independently and be connected to the processing unit via a communication bus. The storage unit may also be integrated with the detection unit 1210, the acquisition unit 1220, and the processing unit 1230.

[0198] The storage unit may store computer-executable instructions for the method in apparatus 1200, so that apparatus 1200 executes the method in the above-described embodiment. The storage unit may be a register, a cache memory, or a random access memory (RAM). The storage unit may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions.

[0199] Figure 13 FIG. 1 shows a schematic diagram of the structure of a chip provided in an embodiment of the present application. Figure 13 As shown, the chip 1300 includes one or more (including two) processors 1301 , a communication line 1302 and a communication interface 1303 . Optionally, the chip 1300 also includes a memory 1304 .

[0200] In some embodiments, the memory 1304 stores the following elements: executable modules or data structures, or a subset thereof, or an extended set thereof.

[0201] The method described in the above embodiment of the present application can be applied to the processor 1301, or implemented by the processor 1301. The processor 1301 may be an integrated circuit chip with signal processing capabilities. During implementation, the steps of the above method can be completed by hardware integrated logic circuits in the processor 1301 or instructions in the form of software. The above processor 1301 can be a general-purpose processor (for example, a microprocessor or a conventional processor), a digital signal processor, an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates, transistor logic devices or discrete hardware components.

[0202] The steps of the method disclosed in the embodiments of the present application can be directly implemented as a hardware decoding processor, or can be implemented by a combination of hardware and software modules in the decoding processor. Among them, the software module can be located in a mature storage medium in the field such as random access memory, read-only memory, programmable read-only memory, or electrically erasable programmable read only memory (EEPROM). The storage medium is located in memory 1304, and processor 1301 reads the information in memory 1304 and completes the steps of the above method in combination with its hardware.

[0203] The processor 1301 , the memory 1304 , and the communication interface 1303 may communicate with each other via a communication line 1302 .

[0204] In the above embodiment, the instructions stored in the memory for execution by the processor may be implemented in the form of a computer program product, wherein the computer program product may be pre-written in the memory or downloaded and installed in the memory in the form of software.

[0205] The present application embodiment also provides a computer program product, which includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a server or data center that includes one or more available media integrations. For example, available media can include magnetic media (e.g., floppy disk, hard disk or tape), optical media (e.g., digital versatile disc (DVD)), or semiconductor media (e.g., solid state disk (SSD)).

[0206] The present application provides an image processing device, which is an electronic device or is included in an electronic device. The device includes: one or more processors; one or more memories; the memories store one or more programs, and when the one or more programs are executed by the processors, the device executes the technical solution in the above method embodiment.

[0207] The present application provides a chip. The chip includes a processor configured to invoke a computer program stored in a memory to execute the technical solution in the above-described method embodiment. The implementation principles and technical effects are similar to those of the above-described related embodiments and will not be further elaborated here.

[0208] The embodiments of the present application also provide a computer-readable storage medium. The computer-readable storage medium stores a computer program or instructions. When the computer program or instructions are executed by a processor, the above-mentioned method is implemented. The methods described in the above embodiments can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. If implemented in software, the functions can be stored as one or more instructions or codes on a computer-readable medium or transmitted on a computer-readable medium. Computer-readable media can include computer storage media and communication media, and can also include any medium that can transfer a computer program from one place to another. The storage medium can be any target medium that can be accessed by a computer.

[0209] As a possible design, computer-readable media may include compact disc read-only memory (CD-ROM), RAM, ROM, EEPROM or other optical disc storage; computer-readable media may include magnetic disk storage or other magnetic disk storage devices. Moreover, any connecting line may also be appropriately referred to as a computer-readable medium. For example, if the software is transmitted from a website, server or other remote source using a coaxial cable, fiber optic cable, twisted pair, DSL or wireless technologies such as infrared, radio and microwave, the coaxial cable, fiber optic cable, twisted pair, DSL or wireless technologies such as infrared, radio and microwave are included in the definition of medium. Disks and optical discs as used herein include compact discs (CDs), laser discs, optical discs, DVDs, floppy disks and Blu-ray discs, where disks generally reproduce data magnetically, while optical discs reproduce data optically using lasers. Combinations of the above should also be included within the scope of computer-readable media.

[0210] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processing unit of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0211] The above specific implementation methods further illustrate the purpose, technical solutions and beneficial effects of this application in detail. It should be understood that the above are only specific implementation methods of this application and are not intended to limit the scope of protection of this application. Any modifications, equivalent replacements, improvements, etc. made on the basis of the technical solutions of this application should be included in the scope of protection of this application.

Claims

1. An image processing method, characterized in that: The method is applied to an electronic device, and includes: detecting a shooting instruction, wherein the shooting instruction is used to request the electronic device to shoot in a high dynamic range (HDR) mode; In response to the shooting instruction, acquiring a plurality of RAW images, wherein the plurality of RAW images correspond to different exposure values; Acquire a plurality of black level images associated with the plurality of RAW images, the plurality of black level images corresponding to different sensitivities, each RAW image being associated with at least one of the plurality of black level images; Inputting the multiple RAW images and the multiple black level images into a pre-trained first image processing model to obtain a first denoised RAW image, wherein the first image processing model is used to perform black level correction on the multiple RAW images based on the multiple black level images, each of the multiple black level images is used to perform black level correction on an associated RAW image, and is used to achieve fusion of the multiple RAW images; An HDR image is obtained according to the first denoised RAW image.

2. The method according to claim 1, characterized in that Before acquiring a plurality of black level images associated with the plurality of RAW images, the method further includes: Under no-light conditions, multiple images are collected at multiple sensitivities; Performing time-domain averaging processing on pixel values ​​in a plurality of images corresponding to each sensitivity to obtain a black level image corresponding to each sensitivity; A black level image associated with each of the RAW images is determined based on the exposure amount corresponding to each of the RAW images.

3. The method according to claim 1 or 2, characterized in that The first image processing model is trained based on at least one set of sample data, where each set of sample data includes a sample true value image, multiple sample RAW images, and multiple sample black level images associated with the multiple sample RAW images. The multiple sample RAW images are obtained by degrading the sample true value images, and the multiple sample RAW images correspond to different exposure values. The training process of the first image processing model includes: The multiple sample RAW images and the multiple sample black level images are used as inputs of the first image processing model, and the sample true value images are used as training targets to train the first image processing model, so that the difference between the output of the first image processing model and the sample true value images is less than or equal to a first preset value.

4. The method according to claim 1 or 2, characterized in that The first image processing model includes an attention module.

5. The method according to claim 1 or 2, characterized in that Before acquiring a plurality of RAW images in response to the shooting instruction, the method further includes: It is detected that the illumination intensity of the current shooting scene is less than or equal to a third preset value.

6. An image processing method, characterized in that: The method is applied to an electronic device, and includes: detecting a shooting instruction, wherein the shooting instruction is used to request the electronic device to shoot in a high dynamic range (HDR) mode; In response to the shooting instruction, acquiring a plurality of RAW images, wherein the plurality of RAW images correspond to different exposure values; Acquire a plurality of black level images associated with the plurality of RAW images, the plurality of black level images corresponding to different sensitivities, each RAW image being associated with at least one of the plurality of black level images; Performing a stitching process on the multiple RAW images and the multiple black level images in a channel dimension to obtain a stitched image; Inputting the stitched image into a pre-trained second image processing model to obtain a second denoised RAW image, wherein the second image processing model is used to perform black level correction on the multiple RAW images based on the multiple black level images, each of the multiple black level images is used to perform black level correction on an associated RAW image, and is used to achieve fusion of the multiple RAW images; An HDR image is obtained according to the second denoised RAW image.

7. The method according to claim 6, characterized in that Before acquiring a plurality of black level images associated with the plurality of RAW images, the method further includes: Under no-light conditions, multiple images are collected at multiple sensitivities; Performing time-domain averaging processing on pixel values ​​in a plurality of images corresponding to each sensitivity to obtain a black level image corresponding to each sensitivity; A black level image associated with each of the RAW images is determined based on the exposure amount corresponding to each of the RAW images.

8. The method according to claim 6 or 7, characterized in that The second image processing model is trained based on at least one set of sample data, where each set of sample data in the at least one set of sample data includes a sample true value image and a sample stitched image, where the sample stitched image is stitched together in a channel dimension by multiple sample RAW images and multiple sample black level images associated with the multiple sample RAW images, where the multiple sample RAW images are degraded based on the sample true value images, and the multiple sample RAW images correspond to different exposure values. The training process of the second image processing model includes: The sample stitching image is used as the input of the second image processing model, and the sample true value image is used as the training target to train the second image processing model, so that the difference between the output of the second image processing model and the sample true value image is less than or equal to a second preset value.

9. The method according to claim 6 or 7, characterized in that The second image processing model includes an attention module.

10. The method according to claim 6 or 7, characterized in that Before acquiring a plurality of RAW images in response to the shooting instruction, the method further includes: It is detected that the illumination intensity of the current shooting scene is less than or equal to a third preset value.

11. An electronic device, characterized in that: include: one or more processors; one or more memories; The memory stores one or more programs, and when the one or more programs are executed by the processor, the electronic device executes the method according to any one of claims 1 to 5, or executes the method according to any one of claims 6 to 10.

12. A computer-readable storage medium, characterized in that The computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the method according to any one of claims 1 to 5, or the method according to any one of claims 6 to 10.

Citation Information

Patent Citations

  • Information processing apparatus and method, and computer readable storage medium

    CN113674364A

  • Photographing method, electronic equipment and computer readable storage medium

    CN114095666A