Image noise reduction method, electronic terminal and computer readable storage medium
By using multiple modules and texture detection in the image denoising model, various denoised images are generated and weights are set, solving the problem of difficult style adjustment in deep learning models and achieving flexible denoising style adjustment and improved computational efficiency.
Patent Information
- Application Number
- CN202511509081.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-21
- Publication Date
- 2026-03-06
AI Technical Summary
Deep learning image denoising models are difficult to adjust quickly once the parameters are fixed, and retraining is computationally expensive, making it impossible to meet the personalized needs of different customers.
An image denoising model is adopted, which generates a variety of denoised images and texture images through multiple denoising modules and texture detection modules. The texture image is used to determine the current region and set the denoising weight. Different denoised images are fused to adjust the style and avoid retraining.
It enables the adjustment of denoising style without retraining the model, reducing computational load and meeting personalized needs.
Smart Images

Figure CN121616480A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image technology, and in particular to an image noise reduction method, an electronic terminal, and a computer-readable storage medium. Background Technology
[0002] Deep learning-based image denoising has surpassed traditional methods in certain environments. However, deep learning-based image denoising is limited by its high computational cost, weak generalization ability, and poor parameter adjustability. Once the network is trained, the parameters are fixed, making it virtually impossible to manually and quickly modify the parameters to change the denoising style to meet different customer needs. Therefore, if a change in denoising style is required, the model must be retrained, which is computationally intensive. Summary of the Invention
[0003] The main technical problem solved by this invention is to provide an image denoising method, apparatus, electronic terminal and computer-readable storage medium. The image denoising method of this application can adjust the denoising weights and reduce the amount of computation by using a single image denoising model with multiple different denoising styles.
[0004] To solve the above-mentioned technical problems, the first technical solution adopted by the present invention is: to provide an image noise reduction method, comprising:
[0005] An image denoising model is used to process the image to be processed, and a first output result corresponding to each pixel in the image to be processed is obtained. The first output result includes at least two first denoised images and a first texture image; the at least two first denoised images have different denoising intensities.
[0006] Determine the current region of the current pixel based on the first texture image;
[0007] Determine the corresponding noise reduction weight for each first noise reduction image based on the current region;
[0008] Based on the denoising weights, at least two first denoised images are fused to obtain the image denoising result of the image to be processed.
[0009] To solve the above-mentioned technical problems, the second technical solution adopted by the present invention is: to provide an electronic terminal, the electronic terminal including a memory and a processor coupled to each other, the processor being used to execute program instructions stored in the memory, and the processor being used to execute program data to implement the steps in the image noise reduction method described above.
[0010] To solve the above-mentioned technical problems, the third technical solution adopted by the present invention is to provide a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps in the image noise reduction method described above.
[0011] The beneficial effects of this invention are as follows: Unlike existing technologies, the provided image denoising method includes: processing an image to be processed using an image denoising model to obtain a first output result corresponding to each pixel in the image to be processed, wherein the first output result includes at least two first denoised images and a first texture image; the at least two first denoised images correspond to different denoising intensities; determining the current region of the current pixel based on the first texture image; determining a corresponding denoising weight for each first denoised image based on the current region; and fusing the at least two first denoised images based on the denoising weights to obtain the image denoising result of the image to be processed. This image denoising method only needs to determine the denoising weights when the denoising style needs to be adjusted, without retraining the image denoising model, thus reducing computational load. Attached Figure Description
[0012] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0013] Figure 1 This is a flowchart illustrating the first embodiment of the image noise reduction method provided by the present invention;
[0014] Figure 2 This is a schematic diagram of an embodiment of the image denoising model provided by the present invention;
[0015] Figure 3 This is a flowchart illustrating an embodiment of the image denoising model training method in the image denoising method provided by the present invention;
[0016] Figure 4a and Figure 4b This is a schematic diagram of a texture detection template;
[0017] Figure 5 This is a schematic diagram of an embodiment of the image denoising model provided by the present invention for image denoising;
[0018] Figure 6 This is a schematic diagram of the framework of an embodiment of the electronic terminal provided by the present invention;
[0019] Figure 7This is a schematic diagram of a framework of an embodiment of the computer-readable storage medium provided by the present invention. Detailed Implementation
[0020] The embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0021] In the following description, specific details such as particular system architectures, interfaces, and technologies are presented for illustrative purposes rather than for limiting purposes, in order to provide a thorough understanding of this application.
[0022] In this article, the term "and / or" simply describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. Additionally, the character " / " generally indicates that the preceding and following related objects have an "or" relationship. Furthermore, "more" in this article means two or more objects.
[0023] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0024] Before providing a further detailed description of the embodiments of this application, the nouns and terms involved in the embodiments of this application will be explained, and the nouns and terms involved in the embodiments of this application shall be interpreted as follows.
[0025] The image denoising method provided in this application can be implemented by a server or terminal alone, or by a server and terminal working together. In some embodiments, the terminal or server can implement the image denoising method provided in this application by running a computer program. For example, the computer program can be a native program or software module in an operating system; it can be a native application (APP), i.e., a program that needs to be installed in the operating system to run, such as a client that supports virtual scenes, such as a game APP; it can also be a mini-program, i.e., a program that only needs to be downloaded to a browser environment to run; or it can be a mini-program that can be embedded in any APP. In short, the above-mentioned computer program can be any form of application, module, or plugin.
[0026] To enable those skilled in the art to better understand the technical solution of the present invention, the image noise reduction method provided by the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0027] Please see Figure 1 The above is a flowchart illustrating the first embodiment of the image denoising method of this application, specifically including:
[0028] Step S11: Use the image denoising model to process the image to be processed, and obtain the first output result corresponding to each pixel in the image to be processed.
[0029] In one embodiment, the image denoising model includes at least two denoising modules, a texture detection module, and a stitching module; wherein the at least two denoising modules are cascaded sequentially, and the output channel of each denoising module is connected to the input channel of the stitching module, and the output channel of the stitching module is connected to the texture detection module. The at least two denoising modules have different denoising intensities, and the output channel of each denoising module is used to output a corresponding first denoised image. The output channel of the texture detection module is used to output a first texture image.
[0030] Combination Figure 2 This application uses an image denoising model comprising three denoising modules, one texture detection module, and a stitching module as an example for illustration. The three denoising modules are denoising module 1, denoising module 2, and denoising module 3, which are cascaded sequentially. Specifically, the input channel of denoising module 2 is connected to the output channel of denoising module 1, and the input channel of denoising module 3 is connected to the output channel of denoising module 2. Further, the input channel of the stitching module is connected to the output channels of denoising modules 1, 2, and 3, respectively, and the stitched output channel is connected to the texture detection module. The denoising intensities of denoising modules 1, 2, and 3 are different.
[0031] It should be noted that denoising modules 1, 2, and 3 are network models specifically designed for denoising. These three denoising modules can be the same or different. In one embodiment, denoising modules with the same architecture can be used, but different numbers of convolutional channels can be set to make the denoising intensity of the three modules different. For example, the denoising intensity of denoising module 1 is less than that of denoising module 2, and the denoising intensity of denoising module 2 is less than that of denoising module 3. The texture detection module is used to detect edge regions, texture regions, and flat regions of the image.
[0032] In one embodiment, the image denoising model is primarily trained before using the image denoising model of this application, specifically in conjunction with... Figure 3 ,include:
[0033] Step S31: Obtain training samples, which include sample images and test images.
[0034] Specifically, the training samples include sample images and test images; the test images include at least two sets of denoised test images with different noise intensities and one set of texture test images.
[0035] In one embodiment, a set of noisy images is collected as sample images, at least two sets of images with different noise intensities are collected as noise reduction test images, and a set of noise-free images is collected as texture test images.
[0036] In one specific embodiment, with Figure 2 The image denoising model shown is used as an example for illustration. The image denoising model includes three denoising modules, therefore, three sets of images with different noise intensities need to be collected as denoising test images. Specifically, noisy images are collected and noise modeling is performed to obtain Gaussian noise values and Poisson noise values. Then, a large number of noise-free images of different scenes are collected, and three different intensities of Gaussian noise and Poisson noise are added to the noise-free images to obtain three denoising test images with different noise intensities, denoted as LOut1, LOut2, and LOut3, respectively. The noise intensity of LOut1 is greater than that of LOut2, and the noise intensity of LOut2 is greater than that of LOut3.
[0037] It should be noted that the dimensions of the images in the training samples are represented by C×H×W, where C represents the number of channels in the image. If the image is a color image, then C is 3 (R, G, B). If it is a grayscale image, then C is 1. If the image is a multispectral image, then C is the number of channels contained in the multispectral spectrum.
[0038] Step S32: Process the sample image using the initial image denoising model to obtain the second output result corresponding to each pixel in the sample image; the second output result includes at least two second denoised images and one second texture image.
[0039] Specifically, the sample image is used as input in, which is then fed into the initial image denoising model. Figure 2 In the image denoising model shown, the sample image is processed using the initial image denoising model to obtain a second output result corresponding to each pixel in the sample image. The second output result includes at least two second denoised images and one second texture image.
[0040] Specifically, noise reduction module 1 outputs a second noise-reduced image Out1, noise reduction module 2 outputs a second noise-reduced image Out2, noise reduction module 3 outputs a second noise-reduced image Out3, and the texture detection module outputs a second texture image Mask, thus obtaining the second output result. The larger the value in the second texture image Mask, the closer the pixel is to the edge region; the smaller the value, the closer the pixel is to a flat region. Transitions in between are considered texture regions. It should be noted that the sample image contains several pixels, and for each pixel, a second noise-reduced image Out1, a second noise-reduced image Out2, a second noise-reduced image Out3, and a second texture image Mask will be output.
[0041] It should be noted that the stitching module stitches together the second denoised images Out1, Out2, and Out3, and then inputs them into the texture detection module. The texture detection module ultimately outputs a second texture image Mask. The sizes of the images output by each of the denoising modules 1, 2, and 3 are consistent with the size of the sample image, facilitating stitching by the stitching module. Specifically, the stitching module stitches together the second denoised images Out1, Out2, and Out3, resulting in an image size of 3C×H×W. This is achieved by stacking the second denoised images Out1, Out2, and Out3 in the channel direction, thus increasing the number of channels. The stitched image is then used as input to the texture detection module, which ultimately outputs a Mask with a size of 1×H×W.
[0042] Step S33: Establish a denoising loss function based on the denoised test image and the second denoised image, and establish a texture loss function based on the texture test image and the second texture image, thereby obtaining the image denoising model.
[0043] Through the above steps, the second denoised image Out1, the second denoised image Out2, the second denoised image Out3, and the second texture image Mask can be obtained. Three sets of denoised test images LOut1, LOut2, and LOut3 with different noise intensities are also collected, where the noise intensity of LOut1 is greater than that of LOut2, and the noise intensity of LOut2 is greater than that of LOut3. Since it is necessary to ensure that the denoising intensity of denoising module 1 is less than that of denoising module 2, and the denoising intensity of denoising module 2 is less than that of denoising module 3, the denoised test image LOut1 with the highest noise intensity is used as the test sample for denoising module 1, the denoised test image LOut2 with intermediate noise intensity is used as the test sample for denoising module 2, and the denoised test image LOut3 with the lowest noise intensity is used as the test sample for denoising module 3. It can be understood that the higher the noise intensity of the denoised test image, the lower the denoising intensity of the corresponding denoising module, and the lower the denoising intensity of the corresponding output second denoised image.
[0044] Furthermore, independent denoising loss functions are established for the corresponding denoising modules based on the corresponding denoised test image and the second denoised image, thereby training the corresponding denoising modules. It should be noted that, since three denoising modules with different denoising intensities are needed, the denoising test image LOut1 (maximum noise intensity) and the second denoised image Out1 (minimum noise intensity) are used as parameters for the loss function of denoising module 1, thus minimizing the denoising intensity of denoising module 1. Similarly, the denoising test image LOut2 (moderate noise intensity) and the second denoised image Out2 (moderate noise intensity) are used as parameters for the loss function of denoising module 2, thus achieving a moderate denoising intensity. Finally, the denoising test image LOut3 (minimum noise intensity) and the second denoised image Out3 (maximum noise intensity) are used as parameters for the loss function of denoising module 3, thus maximizing the denoising intensity of denoising module 3.
[0045] Since the image denoising model of this application has three denoising modules, each of these three denoising modules needs to be trained independently.
[0046] Specifically, first freeze denoising module 2, denoising module 3, and texture detection module, and train denoising module 1 separately. Use the corresponding second denoised image Out1 and the denoised test image LOut1 to establish an independent denoising loss function for denoising module 1:
[0047]
[0048] Where Loss1 represents the loss value corresponding to the noise reduction module 1, and number1 is the number of pixels in the second noise reduction image Out1. For example, if the image size of the second noise reduction image Out1 is C×H×W, then number1 is C×H×W. || is the L1 norm, and the L1 norm can be represented by the following formula (2):
[0049]
[0050] During training, Loss1 is checked each time. If Loss1 is less than the first preset value ε1, then the training of denoising module 1 is complete. At this time, denoising module 1, denoising module 3, and texture detection module are frozen. According to the above formula (1), an independent denoising loss function is established for the corresponding denoising module 2 using the corresponding second denoised image Out2 and denoising test image LOut2. The denoising module 2 is trained. Loss2 is checked each time. If Loss2 is less than the second preset value ε2, then the training of denoising module 2 is complete. At this time, denoising module 1, denoising module 2, and texture detection module are frozen. According to the above formula (1), an independent denoising loss function is established for the corresponding denoising module 3 using the corresponding second denoised image Out3 and denoising test image LOut3. The denoising module 3 is trained. Loss3 is checked each time. If Loss3 is less than the third preset value ε3, then the training of denoising module 3 is complete.
[0051] After training the three noise reduction modules using the above method, the texture detection module will be trained next. Specifically, texture detection is first performed on the texture test image to obtain a texture image. This application sets two texture detection templates, which are used to perform texture detection on the texture test image. The two texture detection templates are as follows: Figure 4a and Figure 4b As shown.
[0052] In one embodiment, the texture detection formula is shown in formula (3) below:
[0053]
[0054] Where LMask represents the texture image, c represents the number of channels in the image, mox and moy represent two texture detection templates, * represents the convolution operation, and I i This represents the image of the i-th channel in the texture test image, and max represents the maximum value.
[0055] Furthermore, a texture loss function is established based on the texture image and the second texture image for the texture detection module, thereby training the texture detection module.
[0056] Specifically, the freezing and denoising modules 1, 2, and 3 establish a texture loss function based on the texture image LMask and the second texture image Mask, as shown in formula (4):
[0057]
[0058] Here, Loss4 represents the loss value, and number2 is the number of pixels in the texture image LMask, for example, 1×H×W. The texture detection module is trained until the Loss4 loss is less than the fourth preset value ε4.
[0059] In one embodiment, the trained denoising module and the trained texture detection module are further fused to obtain an image denoising model. The above embodiment trains denoising module 1, denoising module 2, denoising module 3 and texture detection module independently. This application also requires joint training of denoising module 1, denoising module 2, denoising module 3 and texture detection module. In a specific embodiment, a joint denoising loss function is established based on the independent denoising loss functions corresponding to all denoising modules; and a texture loss function is established based on the texture image and the second texture image as the texture detection module. The loss function of the image denoising model is determined based on the joint denoising loss function and the texture loss function, thereby obtaining the image denoising model. Specifically, the loss function of the image denoising model is shown in the following formula (5):
[0060]
[0061] Where Loss represents the loss function of the image denoising model, it should be noted that the first part of formula (5) represents the joint denoising loss function, which is actually the sum of the independent denoising loss functions of denoising module 1, denoising module 2 and denoising module 3, and the second part is the texture loss function of the texture detection module. As can be seen from formula (5), the loss function of the image denoising model is actually the sum of the independent denoising loss functions of denoising module 1, denoising module 2 and denoising module 3 and the texture loss function of the texture detection module.
[0062] In training the image denoising model, this application first trains each denoising module and texture detection module independently, and then trains the denoising module and texture detection module as a whole for joint training. Independent training aims to ensure local optima for each module in the model, while joint training aims to ensure global optima for the model.
[0063] Furthermore, in order to simultaneously consider both local and global optima, this application requires iterative joint training of the model. Specifically, the denoising module 1, denoising module 2, denoising module 3, and texture detection module are first trained independently. After the model converges, joint training is performed using the above formula (5). Then, the denoising module 1, denoising module 2, denoising module 3, and texture detection module are trained independently again. After the model converges, joint training is performed using the above formula (5). This process is repeated (e.g., 120 times) to finally obtain the image denoising model.
[0064] The above process is used to train an image denoising model, which is then used to denoise the image to be processed, thereby obtaining at least two first denoised images and one first texture image; the at least two first denoised images have different denoising intensities.
[0065] After training the image denoising model, the image to be processed is input into the image denoising model to process the image to be processed, and the first output result corresponding to each pixel in the image to be processed is obtained. The first output result includes at least two first denoised images and one first texture image; the at least two first denoised images correspond to different denoising intensities.
[0066] Specific combination Figure 5 Image denoising models, for example Figure 2 As shown, the image to be processed is input into the image denoising model, resulting in three first denoised images and one first texture image, Maskr. The three first denoised images are Output1, Output2, and Output3. The denoising intensity of Output1 is less than that of Output2, and the denoising intensity of Output2 is less than that of Output3.
[0067] Step S12: Determine the current region of the current pixel based on the first texture image.
[0068] In one embodiment, each pixel in the first texture image is normalized to obtain a texture reference image corresponding to each pixel; the current region of the current pixel is determined based on the range of the texture reference image.
[0069] Specifically, each pixel in the first texture image is normalized, adjusting its value to the range [0, 1].
[0070]
[0071] Where tMask represents the normalized texture reference image of any pixel point, such as (i,j), Maskr represents the first texture image of pixel point (i,j), min(Maskr) represents the minimum value in the first texture image, and max(Maskr) represents the maximum value in the first texture image.
[0072] In one embodiment, if the calculated range of the texture reference image tMask for the pixel at position (i,j) is 0.5 < tMask < 1, then the pixel at position (i,j) is close to a textured region and an edge region. If the calculated range of the texture reference image tMask for the pixel at position (i,j) is 0 < tMask < 0.5, then the pixel at position (i,j) is close to a flat region and a textured region.
[0073] Step S13: Determine the corresponding denoising weight for each first denoised image based on the current region.
[0074] In one embodiment, a preset noise reduction weight table is set for each region of the image to be processed. In one embodiment, it is assumed that the horizontal axis of the preset noise reduction weight table is a preset texture reference image (denoted as t), and the vertical axis is the image region. The preset noise reduction weight table is shown in Table (1) below:
[0075]
[0076]
[0077] Table (1)
[0078] It should be noted that, generally, low-intensity noise reduction is needed for edge regions, while high-intensity noise reduction is needed for flat regions. Therefore, noise reduction module 1 is prioritized for edge regions, noise reduction module 3 is prioritized for flat regions, and noise reduction module 2 is prioritized for textured regions. For a pixel (i,j), it will produce the first denoised images Output1, Output2, and Output3 from the three noise reduction modules.
[0079] If the current pixel, for example, at position (i,j), is close to a flat or textured area, then a larger noise reduction weight needs to be set for Output2 and Output3. If it is close to a textured or edge area, then a larger noise reduction weight needs to be set for the textured or edge area. Based on this rule, a preset noise reduction weight table is set.
[0080] Since Output3 has a stronger noise reduction effect than Output2, and Output2 has a stronger noise reduction effect than Output1, the following adjustments can be made: To reduce noise and preserve more detail, decrease the values in the rows corresponding to flat areas and increase the values in the rows corresponding to edge areas in the preset noise reduction weight table. Conversely, to increase noise reduction, increase the values in the rows corresponding to flat areas and decrease the values in the rows corresponding to edge areas. To improve texture protection, increase the values in the rows corresponding to texture areas in the preset noise reduction weight table.
[0081] Specifically, referring to Table (1), if the texture reference image tMask of the pixel at position (i,j) satisfies: 0.5 < tMask < 1, then the denoising weight of the pixel at position (i,j) is columns t1 and t2 in Table (1). If the texture reference image tMask of the pixel at position (i,j) satisfies: 0 < tMask < 0.5, then the denoising weight of the pixel at position (i,j) is columns t2 and t3 in Table (1). The three elements in each column correspond to the denoising weights of the three first denoised images Output1, Output2, and Output3, respectively.
[0082] Step S14: Based on the denoising weights, fuse at least two first denoised images to obtain the image denoising result of the image to be processed.
[0083] The mapping parameters corresponding to each first denoised image are calculated based on the denoising weights and the texture reference image.
[0084] Specifically, the texture reference image tMask of the pixel at position (i,j) is denoted as tMask(i,j). If 0.5 < tMask(i,j) < 1, the mapping parameter corresponding to each first denoised image can be calculated using the following formula (6), where the mapping parameter al(i,j) of the first denoised image corresponding to the pixel at position (i,j) is calculated as follows:
[0085] al(i,j)2×(t2×(1.0-tMask(i,j))+t1×(tMask(i,j)-0.5)) Formula (6).
[0086] If 0 < tMask(i,j) < 0.5, the mapping parameters corresponding to each first denoised image can be calculated using the following formula (7), where the mapping parameter al(i,j) of the first denoised image corresponding to the pixel at position (i,j) is calculated as follows:
[0087] al(i,j)=2×(t3×(0.5-tMask(i,j))+t2×(tMask(i,j)) Formula (7).
[0088] In the above formulas (6) and (7), since t1, t2 and t3 each contain 3 different denoising weights, the obtained al(i,j) also includes the mapping parameters corresponding to the first denoised image with 3 different denoising intensities, namely al(i,j,1), al(i,j,2) and al(i,j,3), where al(i,j,1) is the mapping parameter of the first denoised image Output1, al(i,j,2) is the mapping parameter of the first denoised image Output2, and al(i,j,3) is the mapping parameter of the first denoised image Output3.
[0089] At least two first denoised images are fused based on the mapping parameters corresponding to each first denoised image. In one embodiment, image fusion is performed using the following formula (8):
[0090]
[0091] Where Res(i,j) represents the result of fusion of the pixel at position (i,j), Output1(i,j) represents the first denoised image Output1 of the pixel at position (i,j), Output2(i,j) represents the first denoised image Output2 of the pixel at position (i,j), and Output3(i,j) represents the first denoised image Output3 of the pixel at position (i,j).
[0092] The above formula (8) can be used to obtain the fusion result of at least two first denoised images for each pixel. The above process is repeated for each pixel to finally obtain the image denoising result Res of the image to be processed.
[0093] The image denoising method of this application utilizes an image denoising model to output multiple first denoised images. The positions of pixels are determined based on the first texture images, and corresponding denoising weights are determined according to the pixel positions, thus allowing for adaptive configuration of various denoising styles. If a change in denoising style is required, only the denoising weights need to be adjusted; retraining the model is not necessary, reducing computational cost.
[0094] Please see Figure 6 , Figure 6 This is a schematic diagram of the framework of an embodiment of the electronic terminal provided by the present invention. The electronic terminal 80 includes a memory 81 and a processor 82 coupled to each other. The processor 82 is used to execute program instructions stored in the memory 81 to implement the steps of any of the above-described image noise reduction method embodiments. In a specific implementation scenario, the terminal 80 may include, but is not limited to, a microcomputer or a server. In addition, the terminal 80 may also include mobile devices such as laptops and tablets, which are not limited here.
[0095] Specifically, processor 82 controls itself and memory 81 to implement the steps of any of the above-described image denoising method embodiments. Processor 82 can also be referred to as a CPU (Central Processing Unit). Processor 82 may be an integrated circuit chip with signal processing capabilities. Processor 82 can also be a general-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor can be a microprocessor or any conventional processor. Furthermore, processor 82 can be implemented using integrated circuit chips.
[0096] Please see Figure 7 , Figure 7 This is a schematic diagram of a framework of an embodiment of a computer-readable storage medium provided by the present invention. The computer-readable storage medium 90 stores program instructions 901 that can be executed by a processor. The program instructions 901 are used to implement the steps of any of the above-described image noise reduction method embodiments.
[0097] In some embodiments, the functions or modules of the apparatus provided in this disclosure can be used to perform the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0098] The description of the various embodiments above tends to emphasize the differences between the various embodiments. The similarities or similarities between them can be referred to, and for the sake of brevity, they will not be repeated here.
[0099] In the several embodiments provided in this application, it should be understood that the disclosed methods and apparatus can be implemented in other ways. For example, the apparatus implementations described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.
[0100] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0101] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0102] The above are merely embodiments of the present invention and do not limit the scope of patent protection of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. An image denoising method, characterized in that, The method comprises: processing the to-be-processed image by using an image denoising model to obtain a first output result corresponding to each pixel point in the to-be-processed image, the first output result comprising at least two first denoising images and a first texture image; the at least two first denoising images corresponding to different denoising intensities; determining a current region of a current pixel point based on the first texture image; determining a corresponding denoising weight for each first denoising image based on the current region; fusing the at least two first denoising images based on the denoising weights to obtain an image denoising result of the to-be-processed image.
2. The image denoising method of claim 1, wherein, The method of determining a current region of a current pixel point based on the first texture image comprises: performing normalization processing on each pixel point in the first texture image to obtain a texture reference image corresponding to each pixel point; determining the current region of the current pixel point based on the range of the texture reference image.
3. The image denoising method of claim 2, wherein, The method of fusing the at least two first denoising images based on the denoising weights comprises: calculating a mapping parameter corresponding to each first denoising image based on the denoising weights and the texture reference image; fusing the at least two first denoising images based on the mapping parameter corresponding to each first denoising image.
4. The image denoising method of claim 1, wherein, The method of determining a corresponding denoising weight for each first denoising image based on the current region comprises: setting a preset denoising weight table for each region of the to-be-processed image; determining a corresponding denoising weight for each first denoising image based on the current region and the preset denoising weight table.
5. The image denoising method of claim 1, wherein, The method further comprises: obtaining training samples, the training samples comprising sample images and test images; the test images comprising at least two groups of denoising test images with different noise intensities and a group of texture test images; processing the sample images by using an initial image denoising model to obtain a second output result corresponding to each pixel point in the sample images; the second output result comprising at least two second denoising images and a second texture image; establishing a denoising loss function based on the denoising test images and the second denoising images, and establishing a texture loss function based on the texture test images and the second texture image to obtain the image denoising model.
6. The image denoising method according to any one of claims 1 to 5, characterized in that, The image denoising model comprises: at least two denoising modules, a texture detection module, and a splicing module; wherein the at least two denoising modules are sequentially cascaded, and the output channel of each denoising module is connected to the input channel of the splicing module, and the output channel of the splicing module is connected to the texture detection module; wherein the denoising intensities of the at least two denoising modules are different, and the output channel of each denoising module is used to output a corresponding first denoising image, and the output channel of the texture detection module is used to output the first texture image.
7. The image denoising method of claim 5, wherein, The method of establishing a denoising loss function based on the denoising test images and the second denoising images, and establishing a texture loss function based on the texture test images and the second texture image to obtain the image denoising model comprises: establish an independent denoising loss function for the corresponding denoising module based on the corresponding denoising test image and the second denoising image, so as to train the corresponding denoising module; perform texture detection on the texture test image to obtain a texture image; establish a texture loss function for the texture detection module based on the texture image and the second texture image, so as to train the texture detection module; fuse the trained denoising module and the trained texture detection module to obtain the image denoising model.
8. The image denoising method of claim 7, characterized in that, fuse the trained denoising module and the trained texture detection module to obtain the image denoising model, comprising: establish a joint denoising loss function based on the independent denoising loss functions corresponding to all denoising modules, and establish a texture loss function for the texture detection module based on the texture image and the second texture image; determine a loss function of the image denoising model based on the joint denoising loss function and the texture loss function, so as to obtain the image denoising model.
9. An electronic terminal, characterized in that The electronic terminal comprises a memory and a processor coupled with each other, the processor is used to execute program instructions stored in the memory, and the processor is used to execute program data to implement steps in the image denoising 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 a computer program, and the computer program is executed by the processor to implement steps in the image denoising method according to any one of claims 1 to 8.