Image processing method, electronic equipment and readable storage medium
By performing black level correction for RAW images with different exposures and using image processing models for denoising and fusion processing, the color noise and color casting problems in dark light scenes in HDR imaging are solved, and the color casting problems in HDR imaging are improved. Imaging effect.
Patent Information
- Application Number
- CN202410051328.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-12
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2044-01-12
AI Technical Summary
In dark light scenarios, the existing HDR imaging technology has caused problems such as color noise and color casting in image processing, which affects the imaging effect.
Black level correction is performed for RAW images and black level images of different exposures, and denoising and fusion processing is performed through pre-trained image processing models, and the attention module is used to improve the image processing effect.
It effectively reduces the correction errors at different positions of the image, avoids color noise and color cast problems in HDR imaging, and provides better HDR imaging effects.
Smart Images

Figure CN119299586A_ABST
Abstract
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 uses different exposures to obtain multiple images of a scene and combines these images with different exposures into one HDR image. Compared with ordinary images, the bright parts of HDR images are not overexposed, and the details in the dark parts are clearly visible, which can provide more dynamic range and image details.
[0003] When performing HDR imaging, current technology usually uses image signal processing (ISP) technology to process images. However, during the processing, a global black level value is used based on the main part of the image, which means that there may be certain errors when processing image areas outside the main part based on this value. In low-light scenes, the camera gain is usually large, that is, the magnification corresponding to the image signal is large, which causes the above errors to be amplified, and then 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, the shooting instruction is used to request the electronic device to shoot in HDR mode; in response to the shooting instruction, 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 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, 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, the correction error at different positions in the image can be effectively reduced, 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 acquiring multiple black level images associated with multiple RAW images, the method also includes: under no light conditions, respectively capturing multiple images at multiple sensitivities; performing time domain averaging processing on pixel values in the multiple images corresponding to each sensitivity to obtain a black level image corresponding to each sensitivity; and determining a 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] The present application obtains black level images at various sensitivities based on images at various sensitivities collected under no-light conditions, so that a black level image associated with the RAW image can be quickly obtained based on the exposure of the RAW image. Specifically, the sensitivity used to shoot the RAW image can be 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 shoot the RAW image. In addition, the present application processes the black level values in multiple images collected at each sensitivity by a time-domain averaging method to obtain a black level image corresponding to each sensitivity, which can improve 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 manner, in some implementation manners 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 implement black level correction of multiple RAW images based on multiple black level images, and to implement fusion of multiple RAW images; 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 some implementation methods of the first aspect, 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 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, a multi-exposure image fusion denoising process and an ISP post-processing process are usually required. The above-mentioned sample true value image can be understood as a denoised image without ISP post-processing. The sample true value image can be obtained by degradation processing of a 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 being used to implement fusion of multiple RAW images; obtaining an HDR image based on the second denoised RAW image.
[0015] This application performs black level correction and fusion processing on multiple RAW images in the stitched image based on the pre-trained second image processing model, which can achieve better denoising effect on the image and thus improve the HDR imaging effect. In addition, multiple RAW images and multiple black level images are stitched in the channel dimension, so that the model can consider information from different images at the same time.
[0016] In combination with the above-mentioned first aspect and the above-mentioned implementation manner, in some implementation manners of the first aspect, 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 training process of the second image processing model includes: taking the sample stitched image as the input of the second image processing model, and taking 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 manner, in some implementation manners 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 has a greater weight in the processing process, and 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 manner, in some implementation manners 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 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 memory stores one or more programs, and when one or more programs are executed by the processor, the electronic device executes any possible method in the above-mentioned first aspect.
[0023] In a third aspect, an embodiment of the present application provides a device, which is included in an electronic device, and the device has the function of realizing the above-mentioned aspects and the behavior of the electronic device in the possible implementation methods of the above-mentioned aspects. The function can be implemented by hardware, or the corresponding software can be implemented by hardware. The hardware or software includes one or more modules or units corresponding to the above-mentioned 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, and when the computer-readable storage medium is run on a computer, the computer executes 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 An example of an interface schematic diagram for enabling HDR mode in a camera application provided in 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 of 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 of generating a denoised RAW image through a model provided in an embodiment of the present application is shown;
[0035] Fig. 9 A schematic diagram of a training process of a model provided in an embodiment of the present application is shown;
[0036] Fig.10 A schematic diagram of a process for generating a denoised RAW image by a model according to another example provided in an embodiment of the present application is shown;
[0037] Fig.11 A schematic diagram of a training process of another model provided in an embodiment of the present application is shown;
[0038] Fig.12 A schematic diagram of the structure of an image processing device provided in an embodiment of the present application is shown;
[0039] Fig.13 A schematic diagram of the structure of a chip provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0040] In order 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 the same items or similar items with basically the same functions and effects. For example, the first chip and the second chip are only used to distinguish different chips, and their order is not limited. Those skilled in the art can understand that the words "first" and "second" do not limit the quantity and execution order, and the words "first" and "second" do not necessarily limit them to be different.
[0041] It should be noted that in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0042] In the embodiments of the present application, "at least one" refers to one or more, and "plurality" 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: A exists alone, A and B exist at the same time, and B exists 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" or similar expressions refers to any combination of these items, including any combination of single 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 terms involved in the embodiments of the present application are first explained below.
[0044] High dynamic range (HDR): is a technology that uses multiple consecutive frames of images with different exposures to synthesize images with high dynamic range. Compared with ordinary images, high dynamic range images have bright areas that are not overexposed and dark details that are clearly visible, providing more dynamic range and image details. "Dynamic range" refers to the ratio of signal intensity (for example, brightness), which can also be called "light ratio" or "contrast" in photography.
[0045] Exposure value (EV): refers to the intensity and duration of light perceived by the camera. When shooting with a camera, due to the limitation of dynamic range, the exposure may be too high or too low, which will directly lead to overexposure or underexposure of the subject and background. If overexposed, the image will be too bright and the details of the bright parts will not be reflected; if underexposed, the image will be too dark and the details of the dark parts will not be reflected.
[0046] Exposure parameters include aperture, exposure time and sensitivity. Among them, the exposure time can be adjusted by controlling the shutter speed. The faster the shutter speed, the shorter the exposure time and the less exposure; on the contrary, the slower the shutter speed, the longer the exposure time, the more exposure and the higher the image brightness.
[0047] The larger the aperture (the smaller the value), such as F2.8, the more exposure there is and the brighter the image is. The smaller the aperture (the larger the value), such as F16, the less exposure there is and the brighter the image is.
[0048] Among them, ISO is used to measure the sensitivity of photosensitive components to light. Specifically, the higher the sensitivity, the stronger the ability to analyze light, the more light is sensed, and the image brightness increases; on the contrary, the lower the sensitivity, the weaker the ability to analyze light, the less light is sensed, and the image brightness decreases. Sensitivity can be divided into several gears, such as 50, 100, 200, 400, 800, 1600, 3200, 4800, 6400, etc.
[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 with clearer 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 usually have an amplifier that amplifies the sensor's signal. The amplification factor is called gain. It should be noted that the camera gain corresponding to low-light scenes is usually larger, that is, the amplification factor corresponding to the signal is larger.
[0052] Image subject: It is the main object of expression in the image, dominates the overall situation in the 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): mainly used to process the digital signal output by the front-end image sensor. In the process of ISP processing, each module is often used to process the image. The image can be processed in turn by black level compensation (BLC), lens shading correction (LSC), bad pixel correction, demosaic, automatic white balance (AWB), color correction (CC), gamma correction (GC), etc.
[0054] The above is a brief introduction to the terms involved in the embodiments of the present application, which will not be repeated 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, a laptop, 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 according to an embodiment of the present application is shown.
[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, and the touch operation 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 may display the following Figure 1 The shooting interface shown in (b) in FIG. The shooting interface includes a preview image currently captured, a shooting control 11, and function controls corresponding to various shooting modes. For example, the function 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 opening 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 capture 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 FIG. 1 shows an HDR control 13. 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) in the figure, after the electronic device enables the HDR mode, the camera shooting interface may display an HDR logo 14 and a shooting control 11, and the HDR logo 14 may prompt the user that the current camera is in the HDR mode. Afterwards, in response to the user's click operation on the shooting control 11 (an example of a shooting instruction), the electronic device may use the HDR function to shoot image frames with different exposures, and then the electronic device may fuse the image frames with different exposures to generate an HDR image and display it to the user.
[0061] At present, the multiple exposure fusion (MEF) solution 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 the three types of RAW images. Among them, different exposure amounts provide picture information of different brightness areas. Short exposure frames can provide highlight information if they are underexposed, long exposure frames can provide dark area information if they are overexposed, and medium exposure frames can provide medium-bright information as reference frames. 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] In the process of generating HDR images, current technology usually uses ISP technology to process images. However, in the ISP processing process, the black level value is usually adjusted based on the main part of the image, and then the black level value is used as a global parameter to correct the black level of the entire image. Since this parameter is determined based on the main body of the image, it means that this parameter is more suitable for the main part and may not be applicable to the part outside the main body. Therefore, when processing the image area outside the main body based on this parameter, there may be a certain error. This error is generally small in brighter scenes and has little effect on the HDR imaging effect; but in dark scenes, due to the large camera gain, that is, the corresponding magnification of the image signal is large, the above error is also amplified, which leads to problems such as color noise and color cast in HDR imaging, resulting in poor HDR imaging effect.
[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, the correction error at different positions in the image can be effectively reduced, 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 an electronic device 100 that can implement the solution of the present application. Figure 3 A schematic diagram of the hardware structure 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 is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[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), etc. Different processing units may be independent devices or integrated into one or more processors.
[0068] Among them, the controller can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and execution.
[0069] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0070] In some embodiments, the processor 110 may include one or more interfaces. The interface 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, etc.
[0071] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, thereby realizing 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 achieve communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 via the I2S interface to achieve the function of answering a call 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 to realize 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 for asynchronous communication. The 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 generally 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 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.
[0075] The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the shooting function of the electronic device 100. The processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the electronic device 100.
[0076] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the 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 the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.
[0078] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic 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 in the above embodiments, or a combination of multiple interface connection methods.
[0079] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device through 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 supplies power to the processor 110, the internal memory 121, the display screen 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 number, battery health status (leakage, impedance), etc. 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 the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0083] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., 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. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent 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 the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a 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, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of 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] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0088] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0089] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0090] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.
[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 optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0092] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0093] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0094] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.
[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 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in 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 playing, recording, voice calls, video calls, etc. through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the 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 arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.
[0099] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.
[0100] The receiver 170B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the human ear.
[0101] Microphone 170C, also called "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 microphone 170C to input the sound signal into 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 sound source, realize directional recording function, etc.
[0102] The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130 or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0103] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the touch operation intensity according to the pressure sensor 180A. The electronic device 100 can also calculate the touch position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
[0104] The gyro sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyro sensor 180B. The gyro sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyro 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 gyro 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 through the air pressure value measured by the air pressure sensor 180C to assist 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 leather 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 according to the magnetic sensor 180D. Then, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, the flip cover can be automatically unlocked.
[0107] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in all directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.
[0108] The distance sensor 180F is used to measure the distance. The electronic device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.
[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 holds 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] The ambient light sensor 180L is used to sense the ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.
[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 a 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 avoid abnormal shutdown of the electronic device 100 due to low temperature. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 performs a boost on the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
[0113] The touch sensor 180K is also called a "touch control device". The touch sensor 180K can be set on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch control screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.
[0114] The bone conduction sensor 180M can obtain a vibration signal. In some embodiments, the bone conduction sensor 180M can obtain a vibration signal of a vibrating bone block of the vocal part of the human body. The bone conduction sensor 180M can also contact the human pulse to receive a blood pressure beat signal. In some embodiments, the bone conduction sensor 180M can also be set in an earphone and combined into a bone conduction earphone. The audio module 170 can parse out a voice signal based on the vibration signal of the vibrating bone block of the vocal part obtained by the bone conduction sensor 180M to realize a voice function. The application processor can parse the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M to realize a heart rate detection function.
[0115] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input 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] Indicator 192 may be an indicator light, which may be used to indicate charging status, power 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 the SIM card interface 195 or pulling it out 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, and the like. 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 may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present invention takes the Android system of the layered architecture 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 example of an electronic device 100 provided in an embodiment of the present application is shown.
[0121] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into the application layer, application framework layer (Application Framework), hardware abstract layer (HAL), kernel layer, and hardware layer from top to bottom.
[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 is used to abstract the hardware. For example, the hardware abstraction layer can include the camera hardware abstraction layer and other hardware device abstraction layers; the camera hardware abstraction layer includes image processing algorithms, etc. After the camera's image sensor obtains RAW image data, it processes the RAW image data through the image processing algorithm to obtain an HDR image. In addition, the camera abstraction layer also saves the captured image to the gallery application for users to view.
[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, display screens, 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] In the camera hardware interface layer in the hardware abstraction layer, manufacturers can customize functions according to their needs. Compared with the hardware abstraction layer interface, the camera hardware interface layer is more efficient, flexible, and has low latency. It can also call ISP and GPU more richly to achieve image processing. The image input to the hardware abstraction layer can come from an image sensor or a stored picture.
[0130] The scheduling layer in the hardware abstraction layer contains a general functional interface for management and control.
[0131] The camera service layer in the hardware abstraction layer is used to access the interface of the ISP and other hardware.
[0132] Combine the following Figures 5 to 7 The image processing method provided in this application is described in detail. Figure 5 A flowchart 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 executes; Figure 5 The image processing method shown includes steps S510 to S550, and S510 to S550 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 app, the user can tap Figure 1 The camera application icon 10 shown in (a) of FIG. 1 can enable the electronic device to 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 In the shooting interface shown in (b) in the figure, users can Figure 1 The interface shown turns on HDR mode for shooting.
[0135] It is understandable that there are many 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 a 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 a lock screen state, and the lock screen interface includes an 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 the following 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 an HDR mode.
[0138] After the HDR mode of the shooting function of the electronic device is turned on, the user can issue a shooting instruction to request the electronic device to shoot in the 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 The shooting control 11 shown in (d) in FIG. 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 make any limitation to 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 needs to determine the exposure and frame number corresponding to the short exposure frame, the medium exposure frame, and the long exposure frame, respectively, wherein the exposure of the medium exposure frame is greater than the exposure of the short exposure frame and less than the exposure of the long exposure frame; and then acquire multiple RAW images according to the determined exposure and frame number. It should be understood that after 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 starting the camera application, the camera can obtain a preview image during the preview process. The electronic device can determine the shooting scene based on the preview image, and then call the algorithm corresponding to the shooting 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. 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 dark light scene may be a scene with relatively dim light, a cloudy scene, or a night scene, without limitation. In a specific implementation, the dark light scene may refer to a scene with light intensity less than or equal to a third preset value, and the third preset value may be, for example, 0.2lux, 0.3lux, 0.5lux, 1lux, 3lux, etc., without limitation, wherein lux is the unit: lux.
[0144] In one implementation, before the electronic device executes step S530, it can first detect the captured scene, and when it detects that the scene is currently in a dark light, it starts the image processing algorithm provided in the present 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 may pre-calibrate black level images at different sensitivities, for example, black level images at sensitivities of 3200, 4800, 6400, 9600, 12800, etc., so that after acquiring multiple RAW images, the black level image associated with each RAW image may be determined based on the exposure corresponding to each RAW image. Specifically, the sensitivity used for shooting each RAW image may be determined based on the exposure corresponding to each RAW image, and then the black level image associated with each RAW image may be determined based on the sensitivity used for shooting 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 adopted 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 adopted 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 may be associated with the RAW image. Figure 6As shown, if the sensitivity adopted by the RAW image 3 is 4000, and the black level image at this sensitivity has not been pre-calibrated, a black level image with a sensitivity of 3200 and a black level image corresponding to a sensitivity of 4800 can be selected as black level images associated with the RAW image 3, and subsequently the two black level images can be averaged in the time domain to obtain a black level image at a 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, so 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 lightless 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 mean 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 Figure 7 As shown, it 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 a plurality of 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 black level image in the multiple black level images is used to perform black level correction on the RAW image associated therewith.
[0161] In order to improve the denoising effect, the present application proposes that the denoising process can be implemented by using an image processing model, that is, the black level correction and image fusion can be implemented by using an image processing model. It should be understood that in actual operation, the image processing model may not be used for implementation, and the present application does not limit this. For ease of description, the following mainly introduces the denoising process by using an image processing model as an example.
[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, wherein each set of sample data in the at least one set of sample data includes a sample true value image, a plurality of sample RAW images, and a plurality of sample black level images associated with the plurality of sample RAW images, and the plurality of sample RAW images correspond to different exposure values. The plurality of sample RAW images and the plurality of sample black level images are training input data of the image processing model, and the sample true value images are training targets of 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 taken by a camera. Optionally, the high-quality sample HDR image can be determined by a scoring algorithm. For example, for the HDR images acquired by the camera history, a scoring algorithm can be used to score each HDR image, and then the HDR image with a higher 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 multiple sample RAW images can be further degraded according to the sample true value images obtained by the above degradation. It should be understood that the above degradation operation can be implemented based on the degradation parameters pre-calibrated in the camera.
[0166] The plurality of sample black level images are determined in pre-calibrated black level images at different sensitivities based on exposure amounts of the plurality of sample RAW images.
[0167] In actual operation, Fig. 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 a plurality of sample RAW images, that is, a plurality of images with different exposure amounts; and obtaining a plurality of sample black level images associated with the plurality of sample RAW images.
[0168] like Fig. 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 larger 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, Fig.10 As shown, multiple RAW images and multiple black level images can be stitched 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] Among them, splicing processing in the channel dimension means stacking multiple images in the channel dimension to increase the depth of the feature map. In this way, the image processing model can learn image features at different spatial locations and fuse them at the same level. The principle of channel splicing is as follows: for example, the sizes of image A and image B are [H, W, C1] and [H, W, C2] respectively, where C1 and C2 are the number of channels respectively, and the size after splicing in the channel dimension is [H, W, C1+C2].
[0173] This application performs black level correction and fusion processing on multiple RAW images in the stitched image based on a pre-trained image processing model, which can achieve better denoising effect on the image and thus improve the HDR imaging effect. In addition, stitching multiple RAW images and multiple black level images in the channel dimension allows the model to consider information from different images at the same time.
[0174] The 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 stitching image, the sample stitching image is stitched together in a channel dimension by a plurality of sample RAW images and a plurality of sample black level images associated with the plurality of sample RAW images, and the plurality of sample RAW images correspond to different exposures. The sample stitching image is the training input data of the image processing model, and the sample true value image is the training target of 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 taken by a camera. Optionally, the high-quality sample HDR image can be determined by a scoring algorithm. For example, for the HDR images acquired by the camera history, a scoring algorithm can be used to score each HDR image, and then the HDR image with a higher 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 multiple sample RAW images can be further degraded according to the sample true value images obtained by the above degradation. It should be understood that the above degradation operation can be implemented based on the degradation parameters pre-calibrated in the camera.
[0177] The plurality of sample black level images are determined in pre-calibrated black level images at different sensitivities based on exposure amounts of the plurality of sample RAW images.
[0178] In actual operation, Fig.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 a plurality of sample RAW images, that is, a plurality of images with different exposure amounts; obtaining a plurality of sample black level images associated with the plurality of sample RAW images; and splicing the plurality of sample RAW images and the plurality of sample black level images in the channel dimension to obtain a sample spliced image.
[0179] like Fig.11As shown, based on the above sample data, the training process of the image processing model may include: taking the sample stitching 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 the prediction model, the prediction value of the model 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 larger 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.
[0182] In the present 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 (for example, the first image processing model and / or the second image processing model) may include an attention module. The attention module is used to implement the attention mechanism, so that the image processing process pays more attention to important feature information, that is, the important feature information has a greater weight in the processing process, and the invalid information is discarded and the effective information is enhanced. The denoising effect of the model output image can be greatly improved through the attention module, thereby improving HDR imaging.
[0185] Step S552: Perform ISP processing on the denoised RAW image to obtain an HDR image.
[0186] Among them, 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 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, the correction error at different positions in the image can be effectively reduced, 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 explained, and the device for executing the above method provided by the embodiment of the present application is described below.
[0189] like Fig.12 As shown, Fig.12 FIG. 1 is a schematic diagram showing the structure of an image processing device provided in an embodiment of the present application. Fig.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: acquire multiple images at multiple sensitivities under no light conditions; perform time-domain averaging processing on 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 a 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 is used to implement black level correction of multiple RAW images based on the multiple black level images, and is used to implement fusion of multiple RAW images; 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 a 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 is 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; obtain an HDR image based on the second denoised RAW image.
[0195] In a 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 a possible implementation, the device 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 line. The storage unit may include one or more memories, and the memory may be a device used to store programs or data in one or more devices or circuits. 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 of the method in the apparatus 1200 so that the apparatus 1200 executes the method in the above-mentioned embodiment. The storage unit may be a register, a cache memory, or a random access memory (RAM), etc. The storage unit may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions.
[0199] Fig.13 FIG. 1 shows a schematic diagram of the structure of a chip provided in an embodiment of the present application. Fig.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 implementations, 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. In the implementation process, the steps of the above method can be completed by the hardware integrated logic circuit in the processor 1301 or the 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 embodiment of the present application can be directly embodied as being executed by a hardware decoding processor, or can be executed 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 a random access memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable read only memory (EEPROM). The storage medium is located in the memory 1304, and the processor 1301 reads the information in the 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 the communication line 1302 .
[0204] In the above embodiments, 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 may be 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 the 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 a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a server, a data center, etc. that includes one or more available media integrated. For example, the available medium can include a magnetic medium (e.g., a floppy disk, a hard disk or a tape), an optical medium (e.g., a digital versatile disc (digital versatiledisc, DVD)), or a semiconductor medium (e.g., a solid state drive (solid state disk, SSD)), etc.
[0206] The present application provides an image processing device, which is an electronic device or is included in an electronic device, and the device includes: 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 device executes the technical solution in the above method embodiment.
[0207] The embodiment of the present application provides a chip. The chip includes a processor, and the processor is used to call a computer program in a memory to execute the technical solution in the above method embodiment. Its implementation principle and technical effect are similar to those of the above related embodiments, and will not be repeated 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 instruction. The above method is implemented when the computer program or instruction is executed by the processor. The method described in the above embodiment can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. If implemented in software, the function 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, the computer-readable medium may include a compact disc read-only memory (CD-ROM), RAM, ROM, EEPROM or other optical disc storage; the computer-readable medium may include a magnetic disk storage or other magnetic disk storage device. 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 technology (such as infrared, radio and microwave), the coaxial cable, fiber optic cable, twisted pair, DSL or wireless technology such as infrared, radio and microwave are included in the definition of the 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 in 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 generate 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 processes in the flowchart and / or block diagram. 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 the present application in detail. It should be understood that the above are only specific implementation methods of the present application and are not used to limit the protection scope of the present application. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solutions of the present application should be included in the protection scope of the present application.
Claims
1. An image processing method, characterized in that: The method is applied to an electronic device, and the method comprises: A shooting instruction is detected, where 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, and each RAW image being associated with at least one of the plurality of black level images; An HDR image is obtained according to 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 an associated 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 obtaining of the HDR image according to the multiple RAW images and the multiple black level images comprises: 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 implement black level correction of the multiple RAW images based on the multiple black level images, and to implement fusion of the multiple RAW images; The HDR image is obtained according to the first denoised RAW image.
4. The method according to claim 3, characterized in that The first image processing model is trained according to 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, a plurality of sample RAW images, and a plurality of sample black level images associated with the plurality of sample RAW images, the plurality of sample RAW images are obtained by degrading the sample true value images, and the plurality of sample RAW images correspond to different exposures. 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.
5. The method according to claim 1 or 2, characterized in that: The obtaining of the HDR image according to the multiple RAW images and the multiple black level images comprises: Performing splicing processing on the multiple RAW images and the multiple black level images in a channel dimension to obtain a spliced 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 implement black level correction of the multiple RAW images based on the multiple black level images, and to implement fusion of the multiple RAW images; The HDR image is obtained according to the second denoised RAW image.
6. The method according to claim 5, characterized in that 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 stitching image, the sample stitching image is stitched together in a channel dimension by a plurality of sample RAW images and a plurality of sample black level images associated with the plurality of sample RAW images, the plurality of sample RAW images are obtained by degrading the sample true value images, and the plurality of sample RAW images correspond to different exposures, and 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.
7. The method according to any one of claims 3 to 6, characterized in that The image processing model includes an attention module.
8. The method according to any one of claims 1 to 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.
9. 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 8.
10. 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 8.
Citation Information
Patent Citations
Adaptive black level correction method
CN105578082A
Image processing method and device, storage medium and electronic device
CN110198417A
Information processing apparatus and method, and computer readable storage medium
CN113674364A
Photographing method, electronic equipment and computer readable storage medium
CN114095666A
Black level correction method and device, computer readable storage medium and terminal
CN115720299A