Image processing method, electronic equipment and computer readable storage medium

By obtaining noise information from the original image and performing fusing and superimposing frequency and edge information, the problem of missing details after image noise reduction is solved, and the image quality and natural display effect are improved.

CN120343412AActive Publication Date: 2025-07-18HONOR DEVICE CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202410047154.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-10
Publication Date
2025-07-18
Estimated Expiration
2044-01-10

AI Technical Summary

Technical Problem

The prior art can easily lead to the loss of image details after image noise reduction processing, affecting image quality.

Method used

The noise information used to represent the image details is obtained from the original image and superimpose it on the denoised image. The details are missing through noise fusion processing of different frequencies and edge information.

Benefits of technology

It effectively improves the image processing effect and restores image details, making the processed image closer to the user's subjective feelings and reduces the problem of noise mutation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120343412A_ABST
    Figure CN120343412A_ABST
Patent Text Reader

Abstract

The invention relates to the field of image processing, in particular to an image processing method, electronic equipment and a computer readable storage medium. The method comprises the steps that a first interface is displayed through a display screen of the electronic equipment, the first interface is a shooting interface of a camera application, the first interface comprises a first control, and the first control is used for triggering shooting; in response to a first operation of a user on the first control, obtaining an original image collected by an image sensor of a camera in the electronic equipment; performing de-noising processing on the original image to obtain a de-noised first image; acquiring a first noise image for representing image details according to the original image; performing superposition processing according to the first image and the first noise image to obtain a processed second image; and displaying a second interface through the display screen, wherein the second interface comprises the second image. Through the method, the image processing effect is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] During the process of a camera taking an image, the image sensor will unavoidably receive some noise signals. To improve the image quality, the captured image is usually denoised to filter out the noise in the image. However, since it is difficult to distinguish between noise and signals, the denoised image is prone to the problem of missing details. Summary of the Invention

[0003] This application provides an image processing method, an electronic device, and a computer-readable storage medium, which solve the problem of missing details in the denoised image.

[0004] To achieve the above object, this application adopts the following technical solutions:

[0005] In a first aspect, an image processing method is provided, which is applied to an electronic device. The method includes:

[0006] Display a first interface through the display screen of the electronic device. The first interface is the shooting interface of the camera application, and the first interface includes a first control for triggering shooting;

[0007] In response to a first operation of the user on the first control, obtain a raw image collected by the image sensor of the camera in the electronic device;

[0008] Perform denoising processing on the raw image to obtain a first denoised image;

[0009] Obtain a first noise image for representing image details according to the raw image;

[0010] Perform superposition processing on the first image and the first noise image to obtain a second processed image;

[0011] Display a second interface through the display screen. The second interface includes the second image.

[0012] In the embodiments of this application, noise information for representing image details is obtained from the raw image, and the noise information is superimposed on the denoised image, making up for the defect of missing details in the denoised image and effectively improving the image processing effect.

[0013] The raw image can be an image in RAW format.

[0014] In an implementation of the first aspect, obtaining the first noise image for representing the image details according to the original image includes:

[0015] Performing an image subtraction process on the first image and the original image to obtain a difference image;

[0016] Obtaining the channel data representing the luminance value in the difference image to obtain the first noise image;

[0017] Wherein, the image subtraction process is the pixel value of the first pixel point minus the pixel value of the second pixel point, the first pixel point is the pixel point in the original image, and the second pixel point is the pixel point corresponding to the first pixel point in the first image.

[0018] Wherein, the image subtraction process is the pixel value of the first pixel point minus the pixel value of the second pixel point, the first pixel point is the pixel point in the original image, and the second pixel point is the pixel point corresponding to the first pixel point in the first image.

[0019] In some implementations, the first image and the first noise image are RGB images. Correspondingly, the difference image is also an RGB image. The difference image can be converted into a YUV image, and the data of the Y channel is obtained from this YUV image to obtain the first noise image.

[0020] Wherein, YUV is a color encoding method. The Y channel in the YUV image represents the luminance of the image, and the U channel and the V channel represent the colors of the image.

[0021] In the embodiments of the present application, it is equivalent that the first noise image only includes the channel data of the luminance value and does not include the data of the color channels. Correspondingly, after the subsequent superposition process, both the details of the image are increased and the color of the image is not changed, which is beneficial to improving the image processing effect.

[0022] In one embodiment, the image subtraction process may include:

[0023] Performing a demosaicing process on the first image to obtain the processed first image;

[0024] Performing a demosaicing process on the original image to obtain the processed original image;

[0025] Performing an image subtraction process on the processed first image and the processed original image to obtain a difference image.

[0026] In an implementation of the first aspect, performing a superposition process on the first image and the first noise image to obtain the processed second image includes:

[0027] Obtain a second noise image and a third noise image according to the first noise image, wherein the image frequency of the second noise image is higher than that of the third noise image;

[0028] Perform noise fusion processing on the second noise image and the third noise image according to the luminance values of the pixels in the first image to obtain a fourth noise image;

[0029] Perform superposition processing on the fourth noise image and the first image to obtain the processed second image.

[0030] In some implementation manners, Gaussian filtering processing can be respectively performed on the first noise image by using different convolution kernels to obtain the second noise image and the third noise image.

[0031] It can be understood that the second noise image is equivalent to high-frequency noise, and the third noise image is equivalent to low-frequency noise. Usually, there are fewer image details in high-frequency noise, and more image details in low-frequency noise. In the embodiments of the present application, by obtaining noise images with different frequencies, a suitable noise image can be selected for superposition during subsequent superposition, which is beneficial to improving the flexibility and processing effect of image processing.

[0032] In an implementation manner of the first aspect, the performing noise fusion processing on the second noise image and the third noise image according to the luminance values of the pixels in the first image to obtain a fourth noise image includes:

[0033] If the luminance value of the third pixel point is less than the first threshold, determine the luminance value of the fourth pixel point according to the first weight, the first luminance value, and the second luminance value;

[0034] Wherein, the third pixel point is a pixel point in the first image, the fourth pixel point is a pixel point in the fourth noise image corresponding to the third pixel point, the first luminance value is the luminance value in the third noise image corresponding to the third pixel point, and the second luminance value is the luminance value in the second noise image corresponding to the third pixel point.

[0035] In an implementation manner of the first aspect, the performing noise fusion processing on the second noise image and the third noise image according to the luminance values of the pixels in the first image to obtain a fourth noise image includes:

[0036] If the luminance value of the third pixel point is greater than the second threshold, determine the luminance value of the fourth pixel point according to the second weight, the first luminance value, and the second luminance value.

[0037] In an implementation manner of the first aspect, the noise fusion process of the second noise image and the third noise image according to the brightness values of the pixels in the first image to obtain a fourth noise image includes:

[0038] If the first brightness value of the third pixel point is greater than the first threshold and less than the second threshold, determine a third weight according to the first weight, the second weight, and the first brightness value;

[0039] Determine the brightness value of the fourth pixel point according to the first brightness value, the second brightness value, and the third weight.

[0040] In an implementation manner of the first aspect, the superposition process of the fourth noise image and the first image to obtain the processed second image includes:

[0041] Obtain a superposition weight according to the edge information in the first image;

[0042] Superpose the fourth noise image and the first image according to the superposition weight to obtain the processed second image.

[0043] In an example, when the brightness value of the third pixel point is less than the first threshold, the brightness value of the fourth pixel point can be calculated according to the formula noise = α1 × noise1 + (1 - α1)noise2, where noise represents the brightness value of the fourth pixel point, noise1 represents the first brightness value, noise2 represents the second brightness value, and α1 represents the first weight. When the brightness value of the third pixel point is greater than the second threshold, the brightness value of the fourth pixel point can be calculated according to the formula noise = α2 × noise1 + (1 - α2)noise2, where α2 represents the second weight. When the brightness value of the third pixel point is greater than the first threshold and less than the second threshold, the brightness value of the fourth pixel point can be calculated according to the formula noise = α3 × noise1 + (1 - α3)noise2, where α3 represents the third weight.

[0044] Among them, the method for calculating the third weight can be: according to the formula Among them, t3 represents the brightness value of the third pixel point, t1 represents the first threshold, and t2 represents the second threshold.

[0045] In the embodiments of the present application, two thresholds are set, and the intermediate range of the two thresholds is equivalent to the transition region of the image brightness. In this transition region, the weights of the second noise image and the third noise image are smoothly adjusted, so that the details in the superimposed fourth noise image are smoother, which can effectively reduce the problem of sudden change of details after superimposing noise, thereby facilitating the improvement of the image processing effect.

[0046] In one implementation of the first aspect, obtaining the superimposition weight according to the edge information in the first image includes:

[0047] Detect the edge information in the first image to obtain the edge image of the first image;

[0048] Obtain the superimposition weight according to the edge image.

[0049] In some examples, an image detection model can be used to detect the edge information in the first image. Among them, the image detection model can be a neural network model or other algorithm models with the ability to detect image edges.

[0050] In one implementation of the first aspect, detecting the edge information in the first image to obtain the edge image of the first image includes:

[0051] Perform downsampling on the channel data representing the luminance value in the first image to obtain a sampled image;

[0052] Perform a first blurring process on the sampled image to obtain a first blurred image;

[0053] Perform edge detection on the first blurred image to obtain the edge image.

[0054] In the embodiments of the present application, through downsampling, it is beneficial to improve the efficiency of subsequent data processing.

[0055] In one implementation of the first aspect, obtaining the superimposition weight according to the edge image includes:

[0056] Perform a second blurring process on the edge image to obtain the blurred edge image;

[0057] Obtain the superimposition weight according to the blurred edge image.

[0058] In the embodiments of the present application, through the second blurring process, the uneven parts in the edge image can be smoothed, which can effectively reduce the abruptness of the image edge details in the superimposed image and is beneficial to improving the image processing effect.

[0059] In one implementation of the first aspect, the superimposition weight includes the weight value corresponding to each pixel point in the fourth noise image;

[0060] Obtaining the superimposition weight according to the blurred edge image includes:

[0061] If the pixel value of the fifth pixel point is the first value, set the weight value of the sixth pixel point to the fourth weight value;

[0062] Wherein, the fifth pixel is a pixel in the blurred edge image, the sixth pixel is the pixel corresponding to the fifth pixel in the fourth noise image, and the first value is the minimum brightness value in the blurred edge image.

[0063] In one implementation of the first aspect, obtaining the superimposition weight according to the blurred edge image includes:

[0064] If the pixel value of the fifth pixel is the second value, set the weight of the sixth pixel to the fifth weight;

[0065] Wherein, the second value is the maximum brightness value in the blurred edge image, and the fourth weight is less than the fifth weight.

[0066] In one implementation of the first aspect, obtaining the superimposition weight according to the blurred edge image includes:

[0067] If the pixel value of the fifth pixel is greater than the first value and less than the second value, calculate the sixth weight according to the fourth weight, the fifth weight, and the pixel value of the fifth pixel;

[0068] Set the weight of the sixth pixel to the sixth weight.

[0069] In the embodiments of the present application, it is equivalent to calculating the superimposition weights of different texture regions according to the edge image, making the edge details in the superimposed image smoother, effectively reducing the problem of sudden changes in details after superimposing noise, and thus facilitating the improvement of the image processing effect.

[0070] In a second aspect, a chip system is provided. The chip system includes a processor, the processor is coupled to a memory, and the processor executes a computer program stored in the memory to implement the method according to any one of the first aspects.

[0071] In a third aspect, an electronic device is provided. The electronic device includes a processor, and the processor is configured to run a computer program stored in a memory so that the electronic device implements the method according to any one of the first aspects.

[0072] In a fourth aspect, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program, and when the computer program is executed by one or more processors, the method according to any one of the first aspects is implemented.

[0073] In a fifth aspect, a computer program product is provided. When the computer program product runs on an electronic device, the electronic device can implement the method according to any one of the first aspects. Description of the Drawings

[0074] Figure 1 It is a schematic diagram of the denoised image provided by the embodiment of the present application;

[0075] Figure 2 It is a schematic structural diagram of an electronic device provided by the embodiment of the present application;

[0076] Figure 3 It is a software structure block diagram of the electronic device 100 according to the embodiment of the present application;

[0077] Figure 4 It is a schematic flowchart of the image processing method provided by the embodiment of the present application;

[0078] Figure 5 It is a schematic flowchart of the superimposing processing method provided by the embodiment of the present application;

[0079] Figure 6 It is a schematic diagram of the fusion weight provided by the embodiment of the present application;

[0080] Figure 7 It is a schematic diagram of the edge image provided by the embodiment of the present application;

[0081] Figure 8 It is a schematic diagram of the superimposing weight provided by the embodiment of the present application;

[0082] Figure 9 It is a schematic diagram of the image processing flow provided by the embodiment of the present application. Detailed implementation manners

[0083] In the following description, specific details such as specific system structures and technologies are presented for the purpose of illustration rather than limitation, so as to thoroughly understand the embodiments of the present application. However, those skilled in the art should clearly understand that the present application can also be implemented in other embodiments without these specific details.

[0084] It should be understood that when used in the specification and appended claims of the present application, the term "comprising" indicates the presence of the described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or their combinations.

[0085] It should also be understood that in the embodiments of the present application, "one or more" means one, two or more than two; "and / or" describes the association relationship of associated objects, indicating that three relationships can exist; for example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after.

[0086] In addition, in the description of the specification and the appended claims of the present application, the terms "first", "second", "third", "fourth", etc. are only used for distinguishing descriptions and should not be construed as indicating or implying relative importance.

[0087] Reference to "one embodiment" or "some embodiments" etc. described in the specification of the present application means that a specific feature, structure, or characteristic described in connection with that embodiment is included in one or more embodiments of the present application. Thus, statements such as "in one embodiment", "in some embodiments", "in other some embodiments", "in still other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "comprising", "including", "having" and their variants all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0088] During the process of a camera taking an image, the image sensor will unavoidably receive some noise signals. To improve the image quality, generally, the captured image is denoised to filter out the noise in the image. However, since it is difficult to distinguish between noise and signals, the image after denoising is prone to the problem of missing details.

[0089] See Figure 1 , which is a schematic diagram of the denoised image provided by the embodiment of the present application. As Figure 1 shown in region 11 in, some image details are missing in the denoised image, resulting in the image being blurred and unclear.

[0090] Based on this, the embodiment of the present application provides an image processing method. In the embodiment of the present application, noise information representing image details is obtained from the original image, and this noise information is superimposed on the denoised image, making up for the defect of missing details in the denoised image and effectively improving the image processing effect.

[0091] The image processing method provided by the embodiment of the present application can be applied to an electronic device with a screen and a shooting function. The electronic device can be a tablet computer, a mobile phone, a camera, a camera, a smart TV, a wearable device, a smart screen, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, etc. The embodiment of the present application does not limit the specific type of the electronic device.

[0092] See Figure 2, which is a schematic structural diagram of an electronic device provided by an embodiment of the present application. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 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. Among them, the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a touch sensor 180K, an ambient light sensor 180L, etc.

[0093] It can be understood that the structure schematically shown in the embodiments of the present application 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 certain components, or split certain components, or have different component arrangements. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0094] 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 image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors. For example, the processor 110 is used to execute the image processing method in the embodiments of the present application.

[0095] Among them, the controller may be the nerve center and command center of the electronic device 100. The controller may generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching instructions and executing instructions.

[0096] A memory can also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can hold the instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can directly call it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0097] The external memory 120 generally refers to the external storage. In the embodiments of the present application, the external memory refers to the storage other than the internal memory of the electronic device and the cache of the processor, and this storage is generally a non-volatile memory.

[0098] The internal memory 121, which can also be referred to as "memory", can be used to store computer-executable program codes, and the executable program codes include instructions. The internal memory 121 can include a program storage area and a data storage area. Among them, the program storage area can store the operating system, application programs required for at least one function (such as the sound playback function, the image playback function, etc.).

[0099] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can adopt 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), a Miniled, a MicroLed, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 can include one or N display screens 194, where N is a positive integer greater than 1. In some embodiments, the electronic device 100 displays a user interface through the display screen 194.

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

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

[0102] The camera 193 is used to capture static images or videos. An 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 transmits 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 format such as RGB, YUV, etc. In some embodiments, the electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1. Exemplarily, the camera 193 is used to capture an image of the user looking at the display screen 194.

[0103] The electronic device 100 also includes various sensors that can convert various different physical signals into electrical signals. Exemplarily, the pressure sensor 180A is used to sense pressure signals and can convert the pressure signals into electrical signals. The gyroscope sensor 180B can be used to determine the motion posture of the electronic device 100. The barometric pressure sensor 180C is used to measure barometric pressure. The magnetic sensor 180D includes a Hall sensor. The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes). The distance sensor 180F is used to measure distance. The electronic device 100 can measure distance through infrared or laser. The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. 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 sensed ambient light brightness. The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to achieve fingerprint unlocking, access application locks, fingerprint photography, fingerprint answering of incoming calls, etc. The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 executes a temperature processing strategy using the temperature detected by the temperature sensor 180J. The bone conduction sensor 180M can acquire vibration signals.

[0104] The touch sensor 180K, also known as the "touch panel". The touch sensor 180K can be disposed on the display screen 194. The touch sensor 180K and the display screen 194 together form a touch screen, also known as the "touch control screen". The touch sensor 180K is used to detect touch operations acting thereon or nearby. The touch sensor can transmit 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 some other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device 100, at a different position from that of the display screen 194.

[0105] Exemplarily, in the embodiments of the present application, the touch sensor 180K can detect a click operation of a user on an icon of an application program, and transmit the detected click operation to the application processor to determine that the click operation is used to start or run the application program, and then execute the running operation of the application program.

[0106] The wireless communication function of the electronic device 100 can be implemented by the antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modulation and demodulation processor, and baseband processor, etc.

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

[0108] The above is a specific description of the embodiments of the present application taking the electronic device 100 as an example. It should be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device 100. The electronic device 100 may have more or fewer components than those shown in the figure, may combine two or more components, or may have different component configurations. The various components shown in the figure can be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and / or application specific integrated circuits.

[0109] In addition, an operating system runs on the above components. Such as the iOS operating system, Android open source operating system, and Windows operating system, etc. Application programs can be installed and run on this operating system.

[0110] The operating system of the electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservices architecture, or cloud architecture. The embodiments of the present application take the Android system with a layered architecture as an example to exemplarily illustrate the software structure of the electronic device 100.

[0111] Figure 3 It is the software structure block diagram of the electronic device 100 in the embodiments of the present application.

[0112] The layered architecture divides software into several layers, and each layer has clear roles and divisions of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, namely the application layer, the application framework layer, the hardware abstraction layer, and the driver layer.

[0113] The application layer may include a series of application packages. As Figure 3 shown, the application packages may include a camera and a gallery. For example, the images captured by the camera application can be stored in the gallery application.

[0114] The application framework layer provides application programming interfaces (APIs) and programming frameworks for the applications in the application layer. The application framework layer includes some predefined functions. As Figure 3 shown, the application framework layer may include a camera access interface for providing an application programming interface and a programming framework for the camera application.

[0115] The hardware abstraction layer is an interface layer located between the operating system kernel and the hardware circuit, and it is used to abstract the hardware. As Figure 3 shown, the hardware abstraction layer may include a camera device and an algorithm library. Among them, the camera device is used to abstract the camera hardware into an instance for upper-layer applications to call. The algorithm library provides various data processing algorithms. As Figure 3 shown, the algorithm library includes the image processing algorithm provided by the embodiments of the present application.

[0116] The driver layer is applied to drive the hardware device. As Figure 3 shown, the driver layer may include a camera driver for driving the hardware devices related to the camera, such as an image sensor and an image signal processor.

[0117] Refer to Figure 3 , and the following introduces the image processing process.

[0118] 1. Display a first interface of the camera application through the display screen of the electronic device.

[0119] Among them, the first interface is the shooting interface of the camera application, and the first interface includes a first control, and the first control is used to trigger shooting.

[0120] 2. In response to a first operation of the user on the first control, the application layer sends a shooting instruction to the hardware abstraction layer through the camera access interface of the application framework layer.

[0121] Among them, the first operation may be a click or a double-click, etc.

[0122] 3. The hardware abstraction layer receives a shooting instruction and sends a driving instruction to the camera driver in the driver layer.

[0123] 4. The camera driver in the driver layer receives the driving instruction and drives the image sensor of the camera in the hardware layer to collect signals.

[0124] 5. The image sensor in the hardware layer sends the collected signals to the camera device in the hardware abstraction layer through the camera driver in the driver layer.

[0125] 6. The camera device in the hardware abstraction layer generates a raw image (an image in RAW format) based on the signals collected by the image sensor and sends the raw image to the algorithm library in the hardware abstraction layer.

[0126] A filter covering the image sensor enables the image sensor to capture color information. For example, the filter can be a red / green / blue Bayer filter. The red / green / blue Bayer filter only allows red / green / blue light to pass through, enabling the image sensor to detect the intensities of red / green / blue light, and then converting them into corresponding electrical signals according to the intensities of red / green / blue light to generate an image in RAW format. An image in RAW format generally adopts the arrangement of a Bayer array. Therefore, a RAW image can also be called a Bayer array image.

[0127] 7. The algorithm library in the hardware abstraction layer performs image processing on the raw image using the image processing algorithm of the embodiment of the present application to obtain a processed image (an image in YUV format) and sends the processed image to the camera device in the hardware abstraction layer.

[0128] 8. The camera device in the hardware abstraction layer sends a driving instruction to the camera driver in the driver layer according to the processed image to drive the image signal processor in the hardware layer to generate an RGB image (the second image) based on the processed image.

[0129] 9. The image signal processor in the hardware layer sends the generated RGB image to the camera device in the hardware abstraction layer through the camera driver and then sends it to the camera application in the application layer through the camera access interface in the application framework layer.

[0130] 10. The camera application in the application layer receives the RGB image and displays a second interface, and the second interface includes the RGB image.

[0131] 11. The camera application in the application layer can send the RGB image to the gallery application so that the user can view the RGB image in the gallery application.

[0132] The following introduces the image processing method of the embodiment of the present application.

[0133] See Figure 4, which is a schematic flow chart of the image processing method provided by the embodiments of the present application. As an example rather than a limitation, as Figure 4 shown, the image processing method may include the following steps:

[0134] S401, perform denoising processing on the original image to obtain a first denoised image.

[0135] As described in step 6 above, the original image is an image collected by the image sensor of the camera and not processed by the image signal processor. The original image may be an image in RAW format.

[0136] In some implementation manners, a filter may be used to perform denoising processing on the original image. Optionally, the filter may be a median filter, a mean filter, a Wiener filter, etc.

[0137] In some other implementation manners, a neural network may be used to perform denoising processing on the original image. Specifically, the original image is input into the trained neural network, and the first denoised image is output.

[0138] In the embodiments of the present application, the method for denoising processing is not specifically limited.

[0139] S402, obtain a first noise image for representing image details according to the original image.

[0140] In one embodiment, step S402 may include:

[0141] Perform image subtraction processing on the first image and the original image to obtain a difference image;

[0142] Obtain the channel data for representing the brightness value in the difference image to obtain the first noise image.

[0143] Among them, the image subtraction processing is the pixel value of the first pixel point minus the pixel value of the second pixel point. The first pixel point is the pixel point in the original image, and the second pixel point is the pixel point corresponding to the first pixel point in the first image.

[0144] In the embodiments of the present application, the image sizes of the first image and the original image are the same. For example, if the first image is 480×640, then the original image is also 480×640. In other words, each pixel point in the first image has its corresponding pixel point in the original image. For example, for the pixel value of the pixel point in the first row and the first column of the first image being 96, and the pixel value of the pixel point in the first row and the first column of the original image being 5, then the pixel value of the pixel point in the first row and the first column of the difference image is 96 - 5 = 91.

[0145] In some implementations, the first image and the first noise image are RGB images. Correspondingly, the difference image is also an RGB image. The difference image can be converted into a YUV image, and the data of the Y channel is obtained from the YUV image to obtain the first noise image.

[0146] Among them, YUV is a color encoding method. The Y channel in the YUV image represents the brightness of the image, and the U channel and the V channel represent the colors of the image.

[0147] In the embodiments of the present application, it is equivalent that the first noise image only includes the channel data of the brightness value and does not include the data of the color channel. Correspondingly, after the subsequent superposition processing, both the details of the image are increased and the color of the image is not changed, which is beneficial to improving the image processing effect.

[0148] As described in the above embodiments, the original image is an image in RAW format. The image in RAW format is a single-channel intensity image, which is not conducive to subsequent image processing. To solve this problem, in one embodiment, the image subtraction processing may include:

[0149] Performing demosaicing on the first image to obtain the processed first image;

[0150] Performing demosaicing on the original image to obtain the processed original image;

[0151] Performing image subtraction processing according to the processed first image and the processed original image to obtain a difference image.

[0152] In the embodiments of the present application, the demosaicing processing can perform color calibration on the Bayer array image to correct the possible deviation due to color distortion or inaccurate camera color, and reconstruct a full-color image, that is, form an RGB image.

[0153] It should be noted that the first image and the original image described in the subsequent embodiments of the present application may refer to the first image and the original image after demosaicing processing, that is, the first image and the original image in the subsequent embodiments are both RGB images.

[0154] S403, performing superposition processing according to the first image and the first noise image to obtain the processed second image.

[0155] Figure 4 In the above embodiments, the noise information representing the image details is obtained from the original image and superimposed on the denoised image, making up for the defect of missing details in the denoised image and effectively improving the image processing effect. In addition, since the noise image is the noise signal of the original image itself and is closer to the hardware original noise signal, the processed image is closer to the user's subjective feeling.

[0156] In one implementation, the superimposing process may include: adding the pixel value of a pixel point in the first image to the pixel value of the corresponding pixel point in the first noise image. For example, if the pixel value of the pixel point at the first row and the first column of the first image is 96, and the pixel value of the pixel point at the first row and the first column of the first noise image is 2, then the pixel value of the pixel point at the first row and the first column of the second image is 96 + 2 = 98.

[0157] The above method of superimposing process is relatively simple to calculate, but noise highlighting is likely to occur in the image after the superimposing process, that is, the noise in the superimposed area is relatively obvious, resulting in an unnatural display effect of the image.

[0158] Based on this, the embodiments of the present application provide a superimposing process method.

[0159] See Figure 5 , which is a schematic flowchart of the superimposing process method provided by the embodiments of the present application. By way of example and not limitation, as Figure 5 shown, the superimposing process method in step S403 may include:

[0160] S501, obtaining a second noise image and a third noise image according to the first noise image.

[0161] In some implementations, different convolution kernels may be used to perform Gaussian filtering on the first noise image respectively to obtain the second noise image and the third noise image.

[0162] Wherein, the image frequency of the second noise image is higher than that of the third noise image.

[0163] It can be understood that the second noise image is equivalent to high-frequency noise, and the third noise image is equivalent to low-frequency noise. Usually, there are fewer image details in high-frequency noise, and more image details in low-frequency noise. In the embodiments of the present application, by obtaining noise images with different frequencies, a suitable noise image can be selected for superimposing in the subsequent superimposing process, which is beneficial to improving the flexibility and processing effect of image processing.

[0164] In some implementations, the mean image of the second noise image and the third noise image may be superimposed on the first image to obtain the processed second image. Specifically, the calculation method of the mean image is: calculating the average value of the pixel value of each pixel point in the second noise image and the pixel value of the corresponding pixel point in the third noise image to obtain the mean image.

[0165] This implementation method is equivalent to calculating intermediate-frequency noise based on high-frequency noise and low-frequency noise, and then superimposing the intermediate-frequency noise on the first denoised image. Since the intermediate-frequency noise is superimposed on the entire first image, the details in different regions of the superimposed image still cannot be effectively distinguished. To solve this problem, the embodiment of the present application adopts the method described in S502.

[0166] S502: Perform noise fusion processing on the second noise image and the third noise image according to the brightness values of the pixels in the first image to obtain a fourth noise image.

[0167] In the embodiment of the present application, the respective fusion weights of the second noise image and the third noise image can be determined according to the brightness values of the pixels in the first image, and then the second noise image and the third noise image are subjected to noise fusion processing according to the fusion weights to obtain a fourth noise image.

[0168] In one implementation, if the brightness value of the third pixel is less than the preset threshold, the brightness value of the fourth pixel is determined as the first brightness value; if the brightness value of the third pixel is greater than the preset threshold, the brightness value of the fourth pixel is determined as the second brightness value.

[0169] Wherein, the third pixel is a pixel in the first image, the fourth pixel is the pixel corresponding to the third pixel in the fourth noise image, the first brightness value is the brightness value corresponding to the third pixel in the third noise image, and the second brightness value is the brightness value corresponding to the third pixel in the second noise image.

[0170] In another implementation, if the brightness value of the third pixel is less than the first threshold, the brightness value of the fourth pixel is determined according to the first weight value, the first brightness value, and the second brightness value; if the brightness value of the third pixel is greater than the second threshold, the brightness value of the fourth pixel is determined according to the second weight value, the first brightness value, and the second brightness value; if the first brightness value of the third pixel is greater than the first threshold and less than the second threshold, the third weight value is determined according to the first weight value, the second weight value, and the first brightness value, and the brightness value of the fourth pixel is determined according to the first brightness value, the second brightness value, and the third weight value.

[0171] Exemplarily, refer to Figure 6 , which is a schematic diagram of the fusion weight provided by the embodiment of the present application. As Figure 6As shown in (a) therein, it is the weight of the third noise image in the first implementation manner. It can be seen that when the brightness value of the third pixel point is less than the preset threshold, the weight of the third noise image is 1. Correspondingly, the weight of the second noise image is 0, that is, only the brightness value (the first brightness value) of the pixel point corresponding to the third pixel point in the third noise image is adopted. When the brightness value of the third pixel point is greater than the preset threshold, the weight of the third noise image is 0. Correspondingly, the weight of the second noise image is 1, that is, only the brightness value (the second brightness value) of the pixel point corresponding to the third pixel point in the second noise image is adopted.

[0172] As Figure 6 As shown in (b) therein, it is the weight of the third noise image in the second implementation manner. When the brightness value of the third pixel point is less than the first threshold, the brightness value of the fourth pixel point can be calculated according to the formula noise = α1×noise1 + noise2(1 - α1), where noise represents the brightness value of the fourth pixel point, noise1 represents the first brightness value, noise2 represents the second brightness value, and α1 represents the first weight value. When the brightness value of the third pixel point is greater than the second threshold, the brightness value of the fourth pixel point can be calculated according to the formula noise = α2×noise1 + noise2(1 - α2), where α2 represents the second weight value. When the brightness value of the third pixel point is greater than the first threshold and less than the second threshold, the brightness value of the fourth pixel point can be calculated according to the formula noise = α3×noise1 + noise2(1 - α3), where α3 represents the third weight value.

[0173] Among them, the way to calculate the third weight value can be: according to the formula where t3 represents the brightness value of the third pixel point, t1 represents the first threshold, and t2 represents the second threshold.

[0174] Comparing Figure 6 the two ways of calculating weights shown, in the first implementation manner, it is equivalent to setting the weights of the second noise image and the third noise image to 1, 0 or 0, 1. In this way, when the pixel points near the preset threshold in the first image are superimposed with noise, mutations are likely to occur, affecting the image display effect. In the second implementation manner, two thresholds are set, and the middle range between the two thresholds is equivalent to the transition region of the image brightness. In this transition region, the weights of the second noise image and the third noise image are smoothly adjusted, making the details in the superimposed fourth noise image smoother, effectively reducing the problem of detail mutations after superimposing noise, and thus being beneficial to improving the image processing effect.

[0175] S503, perform a superimposing process on the fourth noise image and the first image to obtain the processed second image.

[0176] Figure 5In the described embodiment, it is equivalent to setting the weights of noise images with different frequencies according to the brightness information of the denoised first image, so as to fuse noise images with different frequencies in different brightness regions of the image. In this way, the problem of noise images in the image after superposition processing can be effectively reduced, which is beneficial to improving the display effect of the processed image.

[0177] In some embodiments, step S503 may include:

[0178] I. Obtain the superposition weight according to the edge information in the first image;

[0179] II. Superpose the fourth noise image and the first image according to the superposition weight to obtain the processed second image.

[0180] In the embodiments of the present application, it is equivalent to considering the image edge during the process of superposing noise. Since the image details at the image edge and non-image edge are different, through the above method, different intensities of noise can be adaptively superposed in different regions of the image, thereby reducing the problem of sudden change of image edge details after superposing noise, making the processed image appear more natural, and being beneficial to improving the image processing effect.

[0181] In some implementation manners, the step of obtaining the superposition weight in I may include:

[0182] Detect the edge information in the first image to obtain the edge image of the first image; obtain the superposition weight according to the edge image.

[0183] In some examples, an image detection model may be used to detect the edge information in the first image. Among them, the image detection model may be a neural network model or other algorithm models with image edge detection capabilities.

[0184] In some implementation manners, the process of obtaining the edge image in I may include:

[0185] Perform downsampling processing on the channel data representing the brightness value in the first image to obtain a sampled image;

[0186] Perform a first blurring process on the sampled image to obtain a first blurred image;

[0187] Perform edge detection processing on the first blurred image to obtain the edge image.

[0188] In some examples, the first image may be converted so that the first image in RGB format is converted into an image in YUV format. Then, downsampling processing is performed on the data of the Y channel in the YUV format image to obtain a sampled image.

[0189] In the embodiments of the present application, through downsampling processing, it is beneficial to improve the efficiency of subsequent data processing.

[0190] In some examples, the first blurring process can be a Gaussian blurring process, that is, performing Gaussian filtering on the sampled image.

[0191] In the embodiments of the present application, through the first blurring process, the uneven image edges in the sampled image can be smoothed, which can effectively reduce the abruptness of the image edge details in the superimposed image and is beneficial to improving the image processing effect.

[0192] In some implementation manners, the process of obtaining the edge image in I may include:

[0193] Performing a second blurring process on the edge image to obtain the blurred edge image;

[0194] Obtaining the superimposition weight according to the blurred edge image.

[0195] In some examples, the second blurring process can be a Gaussian blurring process, that is, performing Gaussian filtering on the edge image.

[0196] In the embodiments of the present application, through the second blurring process, the uneven parts in the edge image can be smoothed, which can effectively reduce the abruptness of the image edge details in the superimposed image and is beneficial to improving the image processing effect.

[0197] Exemplarily, refer to Figure 7 , which is a schematic diagram of the edge image provided by the embodiments of the present application. As Figure 7 shown in (a) in Figure 7 , it is the edge image. As shown in (b) in

[0198] , it is the edge image after the second blurring process. By comparison, it can be seen that the edge image after the second blurring process is smoother.

[0199] In some implementation manners, the steps of obtaining the superimposition weight in I may include:

[0200] If the pixel value of the fifth pixel point is the first value, then set the weight of the sixth pixel point to the fourth weight;

[0201] If the pixel value of the fifth pixel point is the second value, then set the weight of the sixth pixel point to the fifth weight;

[0202] If the pixel value of the fifth pixel point is greater than the first value and less than the second value, then calculate the sixth weight according to the fourth weight, the fifth weight and the pixel value of the fifth pixel point, and set the weight of the sixth pixel point to the sixth weight.

[0203] Among them, the fifth pixel point is a pixel point in the blurred edge image, the sixth pixel point is the pixel point corresponding to the fifth pixel point in the fourth noise image, the first value is the minimum brightness value in the blurred edge image, the second value is the maximum brightness value in the blurred edge image, and the fourth weight is less than the fifth weight.

[0204] Exemplarily, referring to Figure 8 , it is a schematic diagram of the superimposed weights provided by the embodiments of the present application. As Figure 8 shown, the first value is 0 and the second value is 255, that is, the range of the brightness value in the edge image is 0-255. Among them, the method for calculating the sixth weight can be: according to the formula where α6 represents the sixth weight, t5 represents the brightness value of the fifth pixel point, α4 represents the fourth weight, and α5 represents the fifth weight.

[0205] In the embodiments of the present application, it is equivalent to calculating the superimposed weights of different texture regions according to the edge image, making the edge details in the superimposed image smoother, effectively reducing the problem of sudden changes in details after superimposing noise, and thus facilitating the improvement of the image processing effect.

[0206] In some implementation manners, the superimposing process in step II may include:

[0207] Multiplying the brightness value of each pixel point in the fourth noise image by the corresponding weight in the superimposed weights to obtain a processed fifth noise image; superimposing the fifth noise image and the first image to obtain a processed second image.

[0208] The manner of superimposing the fifth noise image and the first image is the same as the superimposing manner described in step S403, and specific reference may be made to the description in the embodiment of step S403.

[0209] To more clearly describe the execution process of the above image processing, the following uses Figure 9 to describe the schematic diagram of the image processing flow provided by the embodiments of the present application.

[0210] S901, obtain the original image.

[0211] The process of obtaining the original image can be referred to the description of steps 1-6 in the above Figure 3 embodiment.

[0212] S902, perform denoising processing on the original image to obtain the first image.

[0213] Step S902 is the same as the above step S401, and specific reference may be made to the description in the embodiment of S401.

[0214] S903, perform demosaicing on the first image to obtain the processed first image.

[0215] S904, perform demosaicing on the original image to obtain the processed original image.

[0216] S905, perform image subtraction on the processed first image and the processed original image to obtain a difference image.

[0217] S906, obtain the channel data representing the luminance value in the difference image to obtain a first noise image.

[0218] Steps S903 - S906 are the same as the process described in step S402 above. For details, refer to the description in the embodiment of S402.

[0219] S907, obtain a second noise image and a third noise image based on the first noise image.

[0220] Step S907 is the same as step S501 above. For details, refer to the description in the embodiment of S501.

[0221] S908, perform conversion processing on the first image to obtain an image in YUV format.

[0222] S909, obtain the fusion weight between the second noise image and the third noise image based on the luminance value of the image in YUV format.

[0223] The implementation method of step S909 can be referred to the description in the above Figure 6 embodiment.

[0224] S910, detect the edge information in the image in YUV format to obtain an edge image.

[0225] S911, perform second blurring processing on the edge image to obtain a blurred edge image.

[0226] S912, obtain the superimposition weight based on the blurred edge image.

[0227] The implementation methods of steps S910 - S912 can be referred to the description in the embodiment of step I above.

[0228] S913, perform noise fusion processing on the second noise image and the third noise image according to the fusion weight and the superimposition weight to obtain a fourth noise image.

[0229] S914, perform superimposition processing on the fourth noise image and the first image to obtain the processed second image.

[0230] In some implementation manners, the second noise image and the third noise image may be subjected to noise fusion processing according to the fusion weights to obtain a fourth noise image; and then the fourth noise image and the first image may be subjected to superposition processing according to the superposition weights.

[0231] Among them, the manner of the noise fusion processing may refer to the description in the embodiment of step S502.

[0232] In the embodiment of the present application, the noise information for representing the image details is obtained from the original image, and the noise information is superimposed on the denoised image, making up for the defect of the lack of details in the denoised image and effectively improving the image processing effect. In addition, in the process of superimposing the noise, information such as brightness and image edges is comprehensively considered, and signals are superimposed with different intensities on different regions of the image, so as to obtain a more natural image effect.

[0233] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution, and the execution order of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.

[0234] The embodiment of the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments can be implemented.

[0235] The embodiment of the present application further provides a computer program product. When the computer program product runs on an electronic device, the electronic device can implement the steps in the above method embodiments.

[0236] When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, to implement all or part of the processes in the above-described embodiment methods of this application, a computer program can be used to instruct relevant hardware to complete. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-described method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable medium can at least include: any entity or device capable of carrying the computer program code to a first device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk, or an optical disc, etc. In some jurisdictions, according to legislation and patent practice, the computer-readable medium cannot be an electrical carrier signal and a telecommunication signal.

[0237] The embodiment of this application also provides a chip system. The chip system includes a processor, and the processor is coupled to a memory. The processor executes the computer program stored in the memory to implement the steps of any method embodiment of this application. The chip system can be a single chip or a chip module composed of multiple chips.

[0238] In the above embodiments, the descriptions of each embodiment have their own focuses. For the parts not detailed or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0239] Those of ordinary skill in the art can realize that the units and method steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application. Finally, it should be noted that: the above is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any change or replacement within the technical scope disclosed in this application should be covered by the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.

Claims

1. An image processing method, characterized in that, Applied to an electronic device, the method includes: Displaying a first interface through the display screen of the electronic device, the first interface being a shooting interface of a camera application, the first interface including a first control for triggering shooting; In response to a first operation of the user on the first control, obtaining a raw image collected by an image sensor of a camera in the electronic device; Performing denoising processing on the raw image to obtain a first denoised image; Obtaining a first noise image for representing image details according to the raw image; Performing superposition processing on the first image and the first noise image to obtain a processed second image; Displaying a second interface through the display screen, the second interface including the second image.

2. The method according to claim 1, characterized in that, The obtaining a first noise image for representing image details according to the raw image includes: Performing image subtraction processing on the first image and the raw image to obtain a difference image; Obtaining channel data for representing brightness values in the difference image to obtain the first noise image; Wherein, the image subtraction processing is subtracting the pixel value of a second pixel point from the pixel value of a first pixel point, the first pixel point being a pixel point in the raw image, and the second pixel point being a pixel point corresponding to the first pixel point in the first image.

3. The method according to claim 1, wherein The performing superposition processing on the first image and the first noise image to obtain a processed second image includes: Obtaining a second noise image and a third noise image according to the first noise image, wherein the image frequency of the second noise image is higher than that of the third noise image; Performing noise fusion processing on the second noise image and the third noise image according to the brightness value of a pixel in the first image to obtain a fourth noise image; Performing superposition processing on the fourth noise image and the first image to obtain the processed second image.

4. The method according to claim 3, characterized in that The performing noise fusion processing on the second noise image and the third noise image according to the brightness value of a pixel in the first image to obtain a fourth noise image includes: If the brightness value of a third pixel point is less than a first threshold, determining the brightness value of a fourth pixel point according to a first weight, a first brightness value, and a second brightness value; Wherein, the third pixel point is a pixel point in the first image, the fourth pixel point is a pixel point corresponding to the third pixel point in the fourth noise image, the first brightness value is the brightness value corresponding to the third pixel point in the third noise image, and the second brightness value is the brightness value corresponding to the third pixel point in the second noise image.

5. The method according to claim 4, wherein The performing noise fusion processing on the second noise image and the third noise image according to the brightness value of a pixel in the first image to obtain a fourth noise image includes: If the brightness value of a third pixel point is greater than a second threshold, determining the brightness value of a fourth pixel point according to a second weight, a first brightness value, and a second brightness value.

6. The method according to claim 5, wherein The performing noise fusion processing on the second noise image and the third noise image according to the brightness value of a pixel in the first image to obtain a fourth noise image includes: If the first luminance value of the third pixel is greater than the first threshold and less than the second threshold, determine a third weight according to the first weight, the second weight, and the first luminance value; Determine the luminance value of the fourth pixel according to the first luminance value, the second luminance value, and the third weight.

7. The method according to any one of claims 3 to 6, characterized in that The superimposing the fourth noise image and the first image to obtain the processed second image includes: Obtain a superimposing weight according to the edge information in the first image; Superimpose the fourth noise image and the first image according to the superimposing weight to obtain the processed second image.

8. The method according to claim 7, characterized in that, The obtaining a superimposing weight according to the edge information in the first image includes: Detect the edge information in the first image to obtain an edge image of the first image; Obtain a superimposing weight according to the edge image.

9. The method according to claim 8, wherein The detecting the edge information in the first image to obtain an edge image of the first image includes: Perform downsampling on the channel data for representing luminance values in the first image to obtain a sampled image; Perform a first blurring process on the sampled image to obtain a first blurred image; Perform edge detection on the first blurred image to obtain the edge image.

10. The method according to claim 9, wherein The obtaining a superimposing weight according to the edge image includes: Perform a second blurring process on the edge image to obtain the blurred edge image; Obtain the superimposing weight according to the blurred edge image.

11. The method according to claim 10, wherein The superimposing weight includes the weight corresponding to each pixel in the fourth noise image; The obtaining a superimposing weight according to the blurred edge image includes: If the pixel value of the fifth pixel is a first value, set the weight of the sixth pixel to a fourth weight; Wherein, the fifth pixel is a pixel in the blurred edge image, the sixth pixel is the pixel corresponding to the fifth pixel in the fourth noise image, and the first value is the minimum luminance value in the blurred edge image.

12. The method according to claim 11, wherein The obtaining a superimposing weight according to the blurred edge image includes: If the pixel value of the fifth pixel is a second value, set the weight of the sixth pixel to a fifth weight; Wherein, the second value is the maximum luminance value in the blurred edge image, and the fourth weight is less than the fifth weight.

13. The method according to claim 12, wherein The obtaining a superimposing weight according to the blurred edge image includes: If the pixel value of the fifth pixel is greater than the first value and less than the second value, calculate a sixth weight according to the fourth weight, the fifth weight, and the pixel value of the fifth pixel; Set the weight of the sixth pixel to the sixth weight.

14. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method according to any one of claims 1 to 13 is implemented.

15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 13 is implemented.

Citation Information

Patent Citations

  • Pre-dithering in high dynamic range video coding

    CN105723711A

  • Adaptive weighted filter image denoising method, device and image processing device

    CN109389560A

  • Image processing method and device, storage medium and electronic equipment

    CN112419161A

  • Image processing method and device, electronic equipment and storage medium

    CN114066738A

  • Image noise reduction method, image noise reduction device, terminal and storage medium

    CN114511450A