Image noise reduction method and device, equipment and medium
By using wavelet decomposition and clustering, the noise reduction threshold of the image is determined, and noise reduction processing of high-frequency components is performed for different clusters. This solves the problem of noise interference in the image, improves the image quality, and enhances its application in fields such as biomedicine and machine vision.
Patent Information
- Application Number
- CN202511044725.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-28
- Publication Date
- 2025-11-21
AI Technical Summary
Existing technologies struggle to effectively filter out noise during image acquisition, processing, and transmission, impacting image quality, particularly in applications such as biomedicine and machine vision.
The image is decomposed by wavelet, and pixel clusters are performed to determine the correspondence between the brightness value and the noise estimate of each cluster. The accurate noise reduction threshold is calculated, and these thresholds are used to denoise the high-frequency components. Finally, the denoised image is obtained by wavelet reconstruction.
It improves image noise reduction and enhances image quality, especially by removing noise more accurately in different clusters, thereby improving the effectiveness of image applications in fields such as biomedicine and machine vision.
Smart Images

Figure CN120997516A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of image technology, and particularly relates to an image denoising method and device, equipment and medium. BACKGROUND
[0002] The application field of images is wide, and relates to the fields of biomedical science and machine vision. The quality of images directly affects the effectiveness of the application of the images in these fields. However, the images are inevitably disturbed by noise in the process of acquisition, processing and transmission, and therefore, it is extremely important to filter out the noise in the images. SUMMARY
[0003] The embodiments of the present application provide an image denoising method, device, equipment and medium, so as to realize different clustering of images, adopt a more accurate denoising threshold, and perform wavelet high-frequency denoising, thereby making the image denoising effect better.
[0004] The embodiments of the present application provide an image denoising method, which comprises the following steps.
[0005] An image to be denoised is acquired, and wavelet decomposition is performed on the image to be denoised to obtain a wavelet decomposition result, wherein the wavelet decomposition result comprises a low-frequency component and a high-frequency component;
[0006] Pixel clustering is performed on the image to be denoised to obtain at least one cluster;
[0007] For each cluster, the following steps are performed.
[0008] Based on the wavelet decomposition result, a corresponding relationship between the luminance value and the noise estimation value of at least one pixel in the cluster is determined;
[0009] Based on the pixel value of each pixel in the cluster and the corresponding relationship, a denoising threshold corresponding to the cluster is determined;
[0010] The high-frequency component of each pixel in the cluster is denoised by using the denoising threshold corresponding to the cluster;
[0011] Based on the low-frequency component and the denoised high-frequency component of each cluster, wavelet reconstruction is performed to obtain a denoised image.
[0012] The embodiment of the application obtains a to-be-noise-reduced image, and performs wavelet decomposition on the to-be-noise-reduced image, so that a wavelet decomposition result including a low-frequency component and a high-frequency component can be obtained; pixel clustering is performed on the to-be-noise-reduced image, so that at least one cluster can be obtained; further, for each cluster: a corresponding relationship between a brightness value and a noise estimation value of at least one pixel point of the cluster is determined based on the wavelet decomposition result; a noise reduction threshold corresponding to the cluster is determined based on a pixel value of each pixel point of the cluster and the corresponding relationship, so that the accuracy of noise reduction threshold estimation is improved; the high-frequency components of each pixel point of the cluster are more accurately noise-reduced by using the noise reduction threshold corresponding to the cluster; finally, wavelet reconstruction is performed based on the low-frequency component and the noise-reduced high-frequency component of each cluster, so that a noise-reduced image is obtained, and the image noise reduction effect is improved.
[0013] In some embodiments, for each cluster, the corresponding relationship between the brightness value and the noise estimation value of at least one pixel point of the cluster is determined based on the wavelet decomposition result, including:
[0014] For each pixel point of each cluster: the low-frequency component of the pixel point is taken as the brightness value of the pixel point, and the average value of the plurality of high-frequency components corresponding to the pixel point is taken as the noise estimation value of the pixel point, so that the corresponding relationship between the brightness value and the noise estimation value of the pixel point is established.
[0015] In some embodiments, for each pixel point of each cluster: the low-frequency component of the pixel point is taken as the brightness value of the pixel point, and the average value of the plurality of high-frequency components corresponding to the pixel point is taken as the noise estimation value of the pixel point, so that the corresponding relationship between the brightness value and the noise estimation value of the pixel point is established, including:
[0016] For each pixel point i of each cluster:
[0017] The element corresponding to the pixel point i of the value vector V is determined by using the following formula:
[0018] V(LL(i)) = V(LL(i)) + |HL(i)| + |LH(i)| + |HH(i)|
[0019] V(LL(i)) represents the cumulative value of the absolute values of all high-frequency components of the pixel point i;
[0020] HL(i) represents the value of the horizontal high-frequency component HL of the pixel point i;
[0021] LH(i) represents the value of the vertical high-frequency component LH of the pixel point i;
[0022] HH(i) represents the value of the diagonal high-frequency component HH of the pixel point i;
[0023] An element corresponding to pixel point i in the number vector S is determined by using the following formula:
[0024] S(LL(i)) = S(LL(i)) + 3
[0025] wherein S(LL(i)) represents the cumulative number of high-frequency components of pixel point i;
[0026] A vector VS is established by using the value vector V and the number vector S, and an element corresponding to pixel point i in the vector VS represents a corresponding relationship between the luminance value of pixel point i and the noise estimation value.
[0027] In some embodiments, the vector VS is established by using the value vector V and the number vector S, including:
[0028] An element corresponding to pixel point i in the number vector S is added by a preset value greater than zero to obtain a non-zero value, and an element corresponding to pixel point i in the value vector V is divided by the non-zero value to obtain an element corresponding to pixel point i in the vector VS.
[0029] In some embodiments, for each cluster, based on the pixel value of each pixel point in the cluster and the corresponding relationship, a denoising threshold corresponding to the cluster is determined, including:
[0030] For each cluster:
[0031] The number d of pixel points in the cluster and the pixel value of each pixel point in the cluster are determined.
[0032] For each pixel point i in the cluster, based on the luminance value of the pixel point i and the corresponding relationship, a noise estimation value of the pixel point i is determined, and based on the noise estimation value of the pixel point i, a noise variance of the pixel point i is determined.
[0033] The pixel value of each pixel point in the cluster is taken as a value range of the denoising threshold, and based on the number d of pixel points, the value range of the denoising threshold, and a preset loss function, a loss function estimation value of d denoising thresholds is determined.
[0034] The denoising threshold corresponding to the minimum value in the loss function estimation value of the d denoising thresholds is determined as the denoising threshold corresponding to the cluster.
[0035] In some embodiments, the formula of the loss function is as follows:
[0036]
[0037] wherein, represents the noise variance of pixel point i.
[0038] the g corresponding to the pixel point i t (y i ) and g′ t (y i ) respectively satisfy:
[0039]
[0040] wherein, y represents a high-frequency component with noise;
[0041] t represents a denoising threshold.
[0042] In some embodiments, the denoising threshold is taken from the minimum value in the pixel values of the d pixel points, and is incremented each time until the maximum value in the pixel values of the d pixel points is reached.
[0043] In some embodiments, for each of the clusters, the high-frequency components of each pixel point in the cluster are denoised using the denoising threshold corresponding to the cluster, including:
[0044] For each of the clusters, the high-frequency components of each pixel point in the cluster are denoised using the following formula:
[0045]
[0046] wherein, t represents the denoising threshold corresponding to the cluster;
[0047] y represents the high-frequency component with noise of the current pixel point in the cluster;
[0048] represents the high-frequency component after denoising of the current pixel point in the cluster.
[0049] An image denoising device provided by an embodiment of the present application includes:
[0050] a wavelet decomposition unit configured to obtain a to-be-denoised image and perform wavelet decomposition on the to-be-denoised image to obtain a wavelet decomposition result, wherein the wavelet decomposition result includes a low-frequency component and a high-frequency component;
[0051] a clustering unit configured to perform pixel point clustering on the to-be-denoised image to obtain at least one cluster;
[0052] a partition denoising unit configured to, for each of the clusters:
[0053] determine a corresponding relationship between a luminance value and a noise estimation value of at least one pixel point in the cluster based on the wavelet decomposition result;
[0054] determine a denoising threshold corresponding to the cluster based on a pixel value of each pixel point in the cluster and the corresponding relationship.
[0055] The high frequency components of each pixel point in the cluster are denoised by using the denoising threshold corresponding to the cluster.
[0056] A wavelet reconstruction unit is configured to perform wavelet reconstruction based on the low frequency components and the denoised high frequency components of each cluster to obtain a denoised image.
[0057] Another embodiment of the present application provides an electronic device including a memory and a processor, wherein the memory is configured to store program instructions, and the processor is configured to invoke the program instructions stored in the memory to perform any of the above methods.
[0058] Another embodiment of the present application provides a computer readable storage medium storing computer executable instructions, and the computer executable instructions are configured to cause the computer to perform any of the above methods. BRIEF DESCRIPTION OF DRAWINGS
[0059] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort.
[0060] Figure 1 A flowchart of an image denoising method provided by an embodiment of the present application;
[0061] Figure 2 A wavelet decomposition diagram provided by an embodiment of the present application;
[0062] Figure 3 A wavelet reconstruction diagram provided by an embodiment of the present application;
[0063] Figure 4 A flowchart of another image denoising method provided by an embodiment of the present application;
[0064] Figure 5 A structural diagram of an electronic device provided by an embodiment of the present application;
[0065] Figure 6 A structural diagram of an image denoising device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0066] The technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of protection of the present application.
[0067] The embodiments of the present application provide an image denoising method, device and equipment and medium, to realize different clustering for images, adopt a more accurate denoising threshold, and perform wavelet high-frequency denoising, so that the image denoising effect is better.
[0068] The method and the device, the equipment and the medium are based on the same application concept. Since the principles of the method and the device, the equipment and the medium for solving problems are similar, the implementation of the device, the equipment, the medium and the method can be referred to each other, and the repeated parts will not be described again.
[0069] The terms "first", "second", and the like (if any) in the specification and claims of the embodiments of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily have to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not have to be limited to only those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0070] The following examples and embodiments will only be understood as illustrative examples. Although the present specification may refer to "a", "one", or "some" example or embodiment in several places, this does not mean that each such reference is related to the same example or embodiment, nor does it mean that the feature is only applicable to a single example or embodiment. Individual features of different embodiments can also be combined to provide other embodiments. In addition, the terms "include" and "contain" should be understood as not limiting the described embodiments to only those features mentioned; such examples and embodiments can also include features, structures, units, modules, etc. that are not specifically mentioned.
[0071] The various embodiments of the present application will be described in detail below in conjunction with the drawings of the specification. It should be noted that the order of display of the embodiments of the present application only represents the order of the embodiments, and does not represent the advantages and disadvantages of the technical solutions provided by the embodiments.
[0072] Reference is made to Figure 1The image denoising method provided in the embodiments of the present application can accurately denoise the noise in the camera snapshot image, for example, and achieve the best denoising processing effect. The method comprises the following steps:
[0073] In S101, a to-be-denoised image is obtained, and wavelet decomposition is performed on the to-be-denoised image to obtain a wavelet decomposition result, which comprises a low-frequency component and a high-frequency component.
[0074] For example, referring to Figure 2 If two-level wavelet decomposition is performed, the obtained wavelet decomposition result comprises:
[0075] Low-frequency component: LL1 and LL2.
[0076] High-frequency component: HH1, LH1, HL1, HH2, LH2, and HL2.
[0077] In S102, pixel clustering is performed on the to-be-denoised image to obtain at least one cluster.
[0078] The cluster can also be understood as a partition, that is, the to-be-denoised image is partitioned, and each partition comprises a plurality of pixels.
[0079] In S103, for each cluster, a corresponding relationship between the luminance value (for example, the low-frequency component) of at least one pixel in the cluster and the noise estimation value (for example, the average value of the plurality of high-frequency components) is determined based on the wavelet decomposition result; a denoising threshold (that is, the best denoising threshold) corresponding to the cluster is determined based on the pixel value of each pixel in the cluster (for example, the value range of the denoising threshold of the cluster) and the corresponding relationship; and the high-frequency components of the pixels in the cluster are denoised by using the denoising threshold corresponding to the cluster.
[0080] For example, for M clusters of the to-be-denoised image of the current frame, M denoising thresholds t can be calculated, and each cluster corresponds to a best denoising threshold t.
[0081] For each pixel in each cluster, the noise estimation value corresponding to the pixel can be determined according to the luminance value of the pixel and the above-mentioned corresponding relationship. Furthermore, the pixel value of each pixel in the cluster can be used as the value range of the denoising threshold of the cluster, and the best denoising threshold of the cluster can be determined from the value range by using the noise estimation value corresponding to each pixel in the cluster.
[0082] It can be seen that, in the embodiments of the present application, the image pixel clustering and the partition noise estimation (i.e., noise estimation is performed for pixels in different clusters respectively) are adopted to improve the accuracy of the noise reduction threshold estimation, to obtain the optimal noise reduction threshold of each partition, and thus to realize the partition noise reduction based on the optimal noise reduction threshold of each partition, to improve the image noise reduction effect, and to obtain the image after the noise reduction processing with better quality.
[0083] S104, wavelet reconstruction is performed based on the low-frequency component of each cluster and the high-frequency component after the noise reduction processing, to obtain the image after the noise reduction processing.
[0084] The wavelet reconstruction of step S104 corresponds to the wavelet decomposition of step S101, i.e., the same wavelet is used.
[0085] For example, referring to the wavelet reconstruction process shown in FIG. 2, it is equivalent to the inverse process of the wavelet decomposition process shown in FIG. 1. Figure 3 Figure 2 For example, referring to the wavelet reconstruction process shown in FIG. 2, it is equivalent to the inverse process of the wavelet decomposition process shown in FIG. 1.
[0086] In some embodiments, for each cluster, a corresponding relationship between the luminance value and the noise estimation value of at least one pixel point of the cluster is determined based on the wavelet decomposition result, including:
[0087] For each pixel point of each cluster, the low-frequency component of the pixel point is taken as the luminance value of the pixel point, and the average value of the plurality of high-frequency components corresponding to the pixel point is taken as the noise estimation value of the pixel point, to establish the corresponding relationship between the luminance value and the noise estimation value of the pixel point.
[0088] In some embodiments, for each pixel point of each cluster, the low-frequency component of the pixel point is taken as the luminance value of the pixel point, and the average value of the plurality of high-frequency components corresponding to the pixel point is taken as the noise estimation value of the pixel point, to establish the corresponding relationship between the luminance value and the noise estimation value of the pixel point, including:
[0089] For each pixel point i of each cluster:
[0090] The element corresponding to the pixel point i of the value vector V (i.e., the element i of the value vector V) is determined by using the following formula:
[0091] V(LL(i)) = V(LL(i)) + |HL(i)| + |LH(i)| + |HH(i)|
[0092] V(LL(i)) represents the cumulative value of the absolute values of all high-frequency components of the pixel point i;
[0093] HL(i) represents the value of the horizontal high-frequency component HL of the pixel point i;
[0094] LH(i) represents a value of a vertical high frequency component LH of the pixel point i;
[0095] HH(i) represents a value of a diagonal high frequency component HH of the pixel point i;
[0096] An element corresponding to the pixel point i of the number vector S is determined by using the following formula:
[0097] S(LL(i)) = S(LL(i)) + 3
[0098] S(LL(i)) represents a cumulative number of high frequency components of the pixel point i;
[0099] A vector VS is established by using the value vector V and the number vector S, and an element i of the vector VS corresponding to the pixel point i represents a corresponding relationship between a luminance value and a noise estimation value of the pixel point i.
[0100] In some embodiments, the vector VS is established by using the value vector V and the number vector S, including:
[0101] An element corresponding to the pixel point i of the number vector S is added by a preset value greater than zero (for example, 0.01) to obtain a non-zero value (as a denominator to avoid a denominator of 0); and an element corresponding to the pixel point i of the value vector V is divided by the non-zero value to obtain an element i of the vector VS corresponding to the pixel point i, that is, an element i of the vector VS.
[0102] In some embodiments, for each of the clusters, a noise reduction threshold corresponding to the cluster is determined based on a pixel value of each pixel point of the cluster and the corresponding relationship, including:
[0103] For each of the clusters:
[0104] A number d of pixel points of the cluster and a pixel value of each pixel point in the cluster are determined;
[0105] For each pixel point i of the cluster, a noise estimation value of the pixel point i is determined based on a luminance value of the pixel point i and the corresponding relationship, and a noise variance of the pixel point i is determined based on the noise estimation value of the pixel point i;
[0106] The pixel value of each pixel point in the cluster is taken as a value range of the noise reduction threshold, and a loss function estimation value of d noise reduction thresholds is determined based on the number d of pixel points, the value range of the noise reduction threshold and a preset loss function;
[0107] A noise reduction threshold corresponding to a minimum value in the loss function estimation value of the d noise reduction thresholds is determined as the noise reduction threshold corresponding to the cluster.
[0108] In some implementations, the loss function is formulated as follows (where E on the left side of the equal sign can also be expressed as E2 in subsequent embodiments):
[0109]
[0110] in, This represents the noise variance of pixel i; that is, the variance of the noise estimate determined by finding element i in the vector VS mentioned above.
[0111] The corresponding g of pixel i t (y i ) and g′ t (y i They respectively satisfy the following formulas (the subscript i is omitted in the formulas):
[0112]
[0113] Where y represents the noisy high-frequency component; for example, the noisy high-frequency component of pixel i is y. i .
[0114] t represents the noise reduction threshold. For example, for pixel i, the corresponding g is determined using the above formula. t (y i ) and g′ t (y i When ), the noise reduction threshold used is the pixel value of pixel i.
[0115] In some implementations, the noise reduction threshold is taken from the minimum value among the d pixels, increasing incrementally until it reaches the maximum value among the d pixels. Alternatively, the pixel values may not be sorted in ascending order when calculating the loss function estimate.
[0116] In some implementations, for each cluster, noise reduction processing is performed on the high-frequency components of each pixel in the cluster using the noise reduction threshold corresponding to that cluster, including:
[0117] For each cluster, the high-frequency components of each pixel in the cluster are denoised using the following formula:
[0118]
[0119] Where t represents the noise reduction threshold corresponding to the cluster (i.e., the optimal noise reduction threshold for the cluster determined in the above manner);
[0120] y represents the noisy high-frequency component of the current pixel in this cluster; for example, the noisy high-frequency component of the current pixel i is y. i ;
[0121] denotes the high frequency component of the current pixel point of the cluster after noise reduction processing.
[0122] Another embodiment is illustrated below.
[0123] Referring to Figure 4 The image noise reduction method provided by the embodiment of the present application comprises:
[0124] S201, wavelet decomposition;
[0125] S202, image pixel clustering;
[0126] S203, partition noise estimation;
[0127] S204, partition noise reduction threshold calculation;
[0128] S205, image partition noise reduction;
[0129] S206, wavelet reconstruction.
[0130] Further illustrations are given below for each of the above steps.
[0131] First, the noise reduction threshold estimation method provided by the embodiment of the present application is illustrated.
[0132] In some embodiments, the noise reduction threshold estimation method is as follows:
[0133] The noise model can be expressed as follows, where y is the image pixel value collected by the embodiment of the present application, x is the true value without noise pollution, and n is the Gaussian noise. Wherein x and n are independent of each other.
[0134] y = x + n Formula 1
[0135] The wavelet soft threshold method is used for noise reduction, which is expressed as follows:
[0136]
[0137] Wherein, is the estimation of the true value x, that is, the noise reduction result.
[0138] y is the high frequency component with noise, g t (y) is a de-noising formula, and the noise estimation in the embodiment of the present application is to estimate the best t, so that the de-noising effect is better, and the de-noised The edge is better preserved.
[0139] t is the wavelet soft threshold, that is, the noise reduction threshold.
[0140] In some embodiments, gt (y) can be expressed as:
[0141]
[0142] wherein the noise reduction threshold t is used to control the strength of noise reduction, the greater the noise n, the greater t needs to be set, but the loss of the signal will also be greater. The noise reduction threshold estimation method is to adaptively estimate the value of t according to the information of the image. Assuming that all pixel points are contaminated by Gaussian noise of equal intensity, obeying a mean of 0 and a noise variance of σ 2 The estimation loss function of the noise reduction threshold t can be expressed as:
[0143]
[0144] wherein d is the number of pixel points used for noise reduction threshold estimation, for example, if it is a range of 3x3, d is 9. The pixel values of the d pixel points are sorted from small to large to obtain {y1 y2…y d}.
[0145] Using the above formula four and g t (y), t is sequentially taken from {y1 y2…y d} in order from small to large, and d E1 is calculated.
[0146] wherein the y value that makes E1 minimum is determined as the value of the noise reduction threshold t.
[0147] However, the above noise reduction threshold estimation method needs to pre-set the field range, that is, the number of pixel points used for noise reduction threshold estimation, and simultaneously assumes that all pixel points are contaminated by Gaussian white noise of equal intensity. Therefore, in order to improve the accuracy of noise reduction threshold estimation, the number of pixel points used for noise reduction threshold estimation can be increased. However, in actual use, the intensity of noise interference on different pixel points of a real image will be different. Therefore, the accuracy of noise reduction threshold estimation cannot be improved by simply increasing the number of pixel points used for noise reduction threshold estimation.
[0148] Therefore, in some embodiments, the above formula four can be adjusted as follows.
[0149] E||y-x|| 2 term can be expanded into a scalar form, becoming:
[0150]
[0151] Since the intensity of noise interference on each pixel point is different, the present application adjusts this term to:
[0152]
[0153] Similarly, E(y-x) T g t (y) term is adjusted to:
[0154]
[0155] Therefore, the loss function is adjusted to:
[0156]
[0157] That is, according to formula eight, each pixel point i has its own
[0158] Regarding the wavelet decomposition of step S201:
[0159] For example, using wavelet to decompose the image, the 2-level wavelet transform can be expressed as Figure 2 as shown. Among them, LL is the low-frequency signal (i.e. the low-frequency component in the wavelet decomposition result), HL, LH and HH are respectively the horizontal detail component, the vertical detail component and the diagonal detail component, also known as the horizontal high-frequency component, the vertical high-frequency component and the diagonal high-frequency component (i.e. HL, LH and HH are high-frequency components in the wavelet decomposition result), and the subscripts 1 and 2 represent 1-level and 2-level respectively. Then, HH1 is the 1-level diagonal high-frequency component, and HH2 is the 2-level diagonal high-frequency component.
[0160] There are many kinds of wavelets that can be used for noise reduction, and the present application does not limit the specific wavelet. The method of wavelet transform can be expressed in the form of matrix as follows:
[0161] C = w x I x w T Formula nine;
[0162] Among them, I is the original image, C is the wavelet after transformation, which contains low-frequency and high-frequency. w is the wavelet transform matrix. For the low-frequency in I, use the above formula again, and the 2-level wavelet transform is realized.
[0163] In the present application, the above formula two can be used to reduce the noise of each high-frequency component obtained by wavelet decomposition.
[0164] In the present application, the improved loss function is used, that is, formula eight obtained by adjusting formula four:
[0165]
[0166] Among them, for each pixel point i, it satisfies:
[0167]
[0168]
[0169] y is a high-frequency component of the pixel point i with noise, and t is a noise reduction threshold of the pixel point i.
[0170] The biggest difference between E2 obtained by formula eight and E1 obtained by formula four is that the noise of each pixel value is different. The third term in formula eight, that is, E1 Assuming that the noise variance σ of all pixel points is the same, and the third term in E2 indicates that the noise variance σ of each pixel point affected by noise pollution is i different. In fact, even if the noise variance of all pixel points affected by noise pollution is the same, the size of the noise received by the pixel points is also different.
[0171] In theory, as long as the value of the noise interference received by each pixel point is known, the perfect noise reduction effect can be achieved by subtracting the interference value. However, in fact, the noise interference value received by each pixel point cannot be obtained. Therefore, the pixel clustering and partition noise estimation method is used to calculate the noise of the same type of pixels with the same texture structure and similar brightness, and to reduce the noise of the same type of pixels, that is, to reduce the noise in the partition.
[0172] Regarding the image pixel clustering (i.e. image partitioning, for example, dividing pixels with the same or similar brightness values into a partition) of the above step S202:
[0173] For example, the meanshift method can be used for image pixel clustering. The meanshift method can be simply described as follows: a single-channel image is regarded as a 3-dimensional space point, the single-channel gray value is a dimension, and the length and width of the image are dimensions. An initial point is set, the density function in a field of the initial point is calculated, the moving coordinates are calculated according to the density function, and the coordinates are moved to the new starting point. The density function is recalculated and moved with the new starting point until it is stable. The stable point is a clustering point. All image pixels are the initial starting points, and such clustering points are found. The clustering of the image is completed. Each clustering point is a cluster. The clusters close to each other can be merged into one cluster.
[0174] In addition, the Kmeans method, the mixed Gaussian clustering method and the like can be used for image pixel clustering. The mixed Gaussian clustering method adopts a method of training first and using later, and the calculation amount of training is large, but the calculation amount is relatively small when the image clustering is performed.
[0175] Suppose that the image is clustered into M classes by the embodiment of the application, which is represented as {L1 L2…L M}.
[0176] The number of clusters is not limited in the embodiments of the present application. For example, 64 clusters are used in actual use of the embodiments of the present application.
[0177] It should be noted that in some embodiments, the original image, i.e., the original image to be denoised before wavelet transform, can be clustered. When the clustering result is needed in subsequent steps, the clustering result of the original image can be reduced in proportion to the size of LL1 and LL2. For example, referring to FIG. 3, the clustering result of the original image is reduced by a factor of 2 if applied to LH1, because the wavelet transform is a one-time transform and the size is reduced by a factor of 2. Figure 2
[0178] In some embodiments, the wavelet decomposition result can also be clustered, for example, LL1 and LL2 shown in FIG. 3 are clustered respectively. When the clustering result is needed in subsequent steps, for example, the denoising threshold is calculated for HL1, LH1 and HH1, the clustering result of LL1 is used, and for HL2, LH2 and HH2, the clustering result of LL2 is used. Figure 2
[0179] The meanshift and kmeans are based on spatial position, and the density function is calculated to cluster the image pixels, without using the texture structure information around the pixels. The block matching and the mixed Gaussian clustering can effectively use the texture structure information for clustering, and thus are more stable. There are many clustering methods, and the embodiments of the present application do not limit the specific clustering method.
[0180] The image pixel clustering described in the embodiments of the present application is equivalent to partitioning the image. For example, in the final clustering result, the pixels in the same cluster (or the same partition) have the same brightness (or similar, i.e., the difference between the brightness values of different pixels in the same cluster is within a preset range).
[0181] Regarding the partition noise estimation of step S203 described above:
[0182] In the embodiments of the present application, the target of the partition noise estimation is to determine the corresponding relationship between the brightness of the image partition and the noise estimation value, rather than to calculate the noise size of each pixel. For example, the brightness values of the pixels in the same partition are the same, and the corresponding noise estimation values are also the same.
[0183] It should be noted that the embodiments of the present application can perform noise estimation for each partition respectively, and of course, noise estimation can also be performed for the entire image.
[0184] In some embodiments, regarding the brightness of the image, the embodiments of the present application use the low-frequency component LL after wavelet transform as the brightness of the image. Assuming that the input image to be denoised is 8bit, the range of the brightness of the image is 0-255.
[0185] In some embodiments, regarding the noise value of the image, for example, the embodiments of the present application use the absolute values of HL, LH and HH to perform statistics. The statistical method is, for example:
[0186] First, two one-dimensional vectors are established, and the length of the vectors is 256. One vector is named as a value vector V, and the other vector is named as a number vector S. The initial vectors of the two vectors are all 0. The length of the vector is 256, which means that 256 levels are divided, that is, 256 brightnesses, and each brightness corresponds to a noise estimation value.
[0187] Then, all the pixel points on HL, LH and HH are traversed, and the values of the pixel points on HL, LH and HH are accumulated into the value vector V according to the value on the corresponding LL position, for example, as shown in the following formula twelve, and the number of the corresponding position of the number vector S is increased, for example, as shown in the following formula thirteen.
[0188] V(LL(i))=V(LL(i))+|HL(i)|+|LH(i)|+|HH(i)| Formula twelve;
[0189] S(LL(i))=S(LL(i))+3 Formula thirteen;
[0190] Wherein, i represents any pixel point; i specifically embodies the coordinate position of the pixel point i, which is a two-dimensional coordinate.
[0191] V(LL(i)) represents the cumulative value of the absolute values of all high-frequency components of the pixel point i;
[0192] HL(i) represents the value of HL of the pixel point i;
[0193] LH(i) represents the value of LH of the pixel point i;
[0194] HH(i) represents the value of HH of the pixel point i.
[0195] S(LL(i)) represents the cumulative number of high-frequency components of the pixel point i.
[0196] In the embodiments of the present application, the average value of all high-frequency components of the pixel point i position is used as the noise estimation value of the pixel point i position, which is represented as a vector VS, for example:
[0197]
[0198] In the formula, the division of the vector V and the vector S is a vector operation, i.e. the corresponding vector elements are divided, i.e. according to the above formula fourteen, the V(LL(i)) determined by the above formula twelve is divided by the sum of the S(LL(i)) determined by the above formula thirteen and a preset value (for example, 0.01), and the obtained result is taken as the element i of the vector VS, so that the corresponding relationship between the brightness and the noise value of the image can be determined.
[0199] S+0.01 is to prevent the divisor from being 0, and therefore, the constant 0.01 in it can also be other preset values.
[0200] That is, in this step, the result calculated by the formula fourteen can determine the value of the parameter σ in the formula eight, for example, the element i in the VS vector includes the corresponding relationship between the brightness value of the pixel point i and the noise estimation value of the pixel point i, so that the noise estimation value of the pixel point i can be determined by the brightness value of the pixel point i, and thus the noise variance of the pixel point i can be determined.
[0201] Regarding the partition noise reduction threshold calculation of the above step S204 (i.e. for the M clusters of the current frame to be denoised image, M noise reduction thresholds t are calculated):
[0202] This step is to use the loss function (for example, the above formulas eight, ten, and eleven) and the noise estimation value (for example, the vector VS obtained by the above formula fourteen) obtained in step S203 to calculate the optimal noise reduction threshold of each cluster, respectively, for the M clusters {L1 L2…L M} calculated in step S202. The application embodiment provides a noise reduction threshold calculation process, for example:
[0203] For the calculation of the corresponding noise reduction threshold of any cluster, it is assumed that the cluster contains d pixel points. Since the bit width of the image pixel is known in advance in the application embodiment, for example, 8 bits, the application embodiment only needs to find the minimum value and the maximum value of the pixel values of the d pixel points, and set t from the minimum value, and calculate the E2 value through the above formulas eight, ten, and eleven (wherein The noise estimation value of the pixel point i is determined by the corresponding relationship in the above step S203 and the brightness value of the pixel point i, and the variance of the noise estimation value of the pixel point i is ), and then the value of t is increased each time, and the E2 value is calculated through the above formulas eight, ten, and eleven, and so on, until t becomes the maximum value. Each time the value of t is taken, the above formulas ten and eleven determine a g t (y) and a g′ t(y), thus, finally, the values of d E2 can be calculated by the above-mentioned formulas eight, ten and eleven. The value of t that makes E2 minimum is the final determined optimal denoising threshold t corresponding to the cluster.
[0204] From the loss function shown in formula eight, with the noise estimate value, clustering should not be needed any more. But in fact, the real noise contaminated intensity of each pixel point cannot be known, thus, the noise value of the same brightness pixel point is calculated by the statistical method in the embodiments of the present application. And from the wavelet soft threshold denoising, it can be known that if the noise interference amount of each pixel point is closer, the denoising effect will be better. Thus, in the embodiments of the present application, the same class of pixel points (i.e. the same or close brightness) are clustered to estimate the denoising threshold, and the calculated denoising threshold will be more accurate.
[0205] Regarding the image denoising of step S205:
[0206] After the denoising threshold t of each cluster is calculated by step S204, the actual denoising can be performed by the above-mentioned formulas two and three:
[0207]
[0208] In the embodiments of the present application, for each pixel point in each cluster, the pixel points that need to be denoised by the above-mentioned formulas two and three include all the pixel points of HL, LH and HH levels, i.e. the pixel points of each high frequency component obtained by wavelet decomposition are denoised by the above-mentioned formulas two and three.
[0209] Regarding the wavelet reconstruction of step S206:
[0210] In the embodiments of the present application, as shown in formula 7, the wavelet reconstruction method corresponds to the wavelet decomposition, i.e. the same wavelet is used. Figure 3
[0211] In the embodiments of the present application, the wavelet reconstruction method using the matrix method can be expressed as:
[0212]
[0213] wherein is the 2-level wavelet coefficient, is the denoised 1-level low frequency. w is the wavelet transform matrix. Thus, the 2-level wavelet reconstruction is completed. The same method is used to complete the 1-level wavelet reconstruction, and the complete wavelet reconstruction is realized, i.e. the denoised image I is obtained.
[0214] It should be noted that the wavelet decomposition and reconstruction exemplified in the embodiments of the present application are both two-level decomposition and two-level reconstruction. However, the technical solutions provided in the embodiments of the present application can be applied to wavelet decomposition and reconstruction of any level. The symbols used in the above process only serve as a representative and can be replaced by any other mathematical symbol.
[0215] The device or apparatus provided in the embodiments of the present application will be described below. The explanation or illustration of the same or corresponding technical features described in the above method will not be repeated hereinafter.
[0216] The electronic device provided in the embodiments of the present application can be any network-side server device or terminal device, for example. Referring to Figure 5 The electronic device provided in the embodiments of the present application can include, for example:
[0217] The processor 600 is configured to read the program in the memory 620 and perform the following processes.
[0218] Obtaining a to-be-noise-reduced image, and performing wavelet decomposition on the to-be-noise-reduced image to obtain a wavelet decomposition result, wherein the wavelet decomposition result includes a low-frequency component and a high-frequency component;
[0219] Performing pixel clustering on the to-be-noise-reduced image to obtain at least one cluster.
[0220] For each of the clusters:
[0221] Based on the wavelet decomposition result, determining a corresponding relationship between the luminance value and the noise estimation value of at least one pixel in the cluster;
[0222] Based on the pixel value of each pixel in the cluster and the corresponding relationship, determining a noise reduction threshold corresponding to the cluster;
[0223] Using the noise reduction threshold corresponding to the cluster to perform noise reduction processing on the high-frequency component of each pixel in the cluster.
[0224] Based on the low-frequency component and the noise reduction processed high-frequency component of each of the clusters, performing wavelet reconstruction to obtain a noise reduction processed image.
[0225] In some embodiments, for each of the clusters, based on the wavelet decomposition result, determining a corresponding relationship between the luminance value and the noise estimation value of at least one pixel in the cluster includes:
[0226] For each pixel in each of the clusters: taking the low-frequency component of the pixel as the luminance value of the pixel, and taking the average value of the multiple high-frequency components corresponding to the pixel as the noise estimation value of the pixel, to establish a corresponding relationship between the luminance value and the noise estimation value of the pixel.
[0227] In some embodiments, for each pixel point of each of the clusters, a corresponding relationship between a luminance value and a noise estimation value of the pixel point is established, including:
[0228] For each pixel point i of each of the clusters:
[0229] An element corresponding to the pixel point i of the value vector V is determined by using the following formula:
[0230] V(LL(i))=V(LL(i))+|HL(i)|+|LH(i)|+|HH(i)|
[0231] wherein, V(LL(i)) represents an accumulated value of absolute values of all high frequency components of the pixel point i;
[0232] HL(i) represents a value of a horizontal high frequency component HL of the pixel point i;
[0233] LH(i) represents a value of a vertical high frequency component LH of the pixel point i;
[0234] HH(i) represents a value of a diagonal high frequency component HH of the pixel point i;
[0235] An element corresponding to the pixel point i of the number vector S is determined by using the following formula:
[0236] S(LL(i))=S(LL(i))+3
[0237] wherein, S(LL(i)) represents a cumulative number of high frequency components of the pixel point i;
[0238] The value vector V and the number vector S are used to establish a vector VS, and an element corresponding to the pixel point i in the vector VS represents the corresponding relationship between the luminance value and the noise estimation value of the pixel point i.
[0239] In some embodiments, the value vector V and the number vector S are used to establish the vector VS, including:
[0240] An element corresponding to the pixel point i of the number vector S is added by a preset value greater than zero to obtain a non-zero value, and an element corresponding to the pixel point i of the value vector V is divided by the non-zero value to obtain an element corresponding to the pixel point i of the vector VS.
[0241] In some embodiments, for each of the clusters, a denoising threshold corresponding to the cluster is determined based on pixel values of each pixel point of the cluster and the corresponding relationship, including:
[0242] For each of the clusters:
[0243] determine the number of pixels d of the cluster, and pixel values of each pixel in the cluster;
[0244] For each pixel i of the cluster, determine the noise estimate value of the pixel i based on the brightness value of the pixel i and the corresponding relationship, and determine the noise variance of the pixel i based on the noise estimate value of the pixel i;
[0245] take the pixel values of each pixel in the cluster as the value range of the denoising threshold, and based on the number of pixels d, the value range of the denoising threshold, and a preset loss function, determine the loss function estimate value of the d denoising thresholds;
[0246] determine the denoising threshold corresponding to the minimum value in the d denoising threshold loss function estimate values as the denoising threshold corresponding to the cluster.
[0247] In some embodiments, the formula of the loss function is as follows:
[0248]
[0249] wherein, denotes the noise variance of the pixel i;
[0250] g t (y i ) and g′ t (y i ) satisfy:
[0251]
[0252] wherein, y represents the high-frequency component with noise;
[0253] t represents the denoising threshold.
[0254] In some embodiments, the denoising threshold is taken from the minimum value of the pixel values of the d pixels, and is incremented each time until the maximum value of the pixel values of the d pixels is reached.
[0255] In some embodiments, for each cluster, the high-frequency components of each pixel of the cluster are denoised using the denoising threshold corresponding to the cluster, including:
[0256] For each cluster, the high-frequency components of each pixel of the cluster are denoised using the following formula:
[0257]
[0258] wherein, t represents the denoising threshold corresponding to the cluster.
[0259] y represents the noisy high-frequency component of the current pixel in this cluster;
[0260] This represents the high-frequency component of the current pixel in the cluster after noise reduction.
[0261] Transceiver 610 is used to receive and send data under the control of processor 600.
[0262] Among them, Figure 5 In this context, the bus architecture can include any number of interconnected buses and bridges, specifically linking various circuits of one or more processors represented by processor 600 and memory represented by memory 620 together. The bus architecture can also link various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. The bus interface provides an interface. The transceiver 610 can be multiple components, including transmitters and receivers, providing a unit for communicating with various other devices over a transmission medium, including wireless channels, wired channels, optical fibers, etc. For different user equipment, the user interface 630 can also be an interface capable of connecting external or internal devices, including but not limited to keypads, displays, speakers, microphones, joysticks, etc.
[0263] The processor 600 is responsible for managing the bus architecture and general processing, while the memory 620 can store the data used by the processor 600 when performing operations.
[0264] In some implementations, the processor 600 may be a CPU (Central Processing Unit), an ASIC (Application Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array), or a CPLD (Complex Programmable Logic Device), and the processor may also employ a multi-core architecture.
[0265] The processor executes any of the methods described in the embodiments of this application according to the obtained executable instructions by calling a computer program stored in memory. The processor and memory may also be physically separated.
[0266] It should be noted that the apparatus provided in this application embodiment can implement all the method steps implemented in the above method embodiment and can achieve the same technical effect. Here, the parts that are the same as those in the method embodiment and the beneficial effects will not be described in detail.
[0267] Referring to Figure 6 The embodiment of the present application provides an image denoising device, which comprises:
[0268] A wavelet decomposition unit 11 is configured to obtain a to-be-denoised image and perform wavelet decomposition on the to-be-denoised image to obtain a wavelet decomposition result, wherein the wavelet decomposition result comprises a low-frequency component and a high-frequency component;
[0269] A clustering unit 12 is configured to perform pixel clustering on the to-be-denoised image to obtain at least one cluster;
[0270] A partition denoising unit 13 is configured to determine, for each cluster:
[0271] a corresponding relationship between a luminance value and a noise estimation value of at least one pixel in the cluster based on the wavelet decomposition result;
[0272] determine a denoising threshold corresponding to the cluster based on a pixel value of each pixel in the cluster and the corresponding relationship;
[0273] perform denoising processing on the high-frequency component of each pixel in the cluster by using the denoising threshold corresponding to the cluster;
[0274] A wavelet reconstruction unit 14 is configured to perform wavelet reconstruction based on the low-frequency component and the denoising-processed high-frequency component of each cluster to obtain a denoising-processed image.
[0275] In some embodiments, for each cluster, the corresponding relationship between the luminance value and the noise estimation value of at least one pixel in the cluster is determined based on the wavelet decomposition result, comprising:
[0276] for each pixel in each cluster, the low-frequency component of the pixel is taken as the luminance value of the pixel, and the average value of a plurality of high-frequency components corresponding to the pixel is taken as the noise estimation value of the pixel, so as to establish the corresponding relationship between the luminance value and the noise estimation value of the pixel.
[0277] In some embodiments, for each pixel in each cluster, the low-frequency component of the pixel is taken as the luminance value of the pixel, and the average value of a plurality of high-frequency components corresponding to the pixel is taken as the noise estimation value of the pixel, so as to establish the corresponding relationship between the luminance value and the noise estimation value of the pixel, comprising:
[0278] for each pixel i in each cluster:
[0279] the element corresponding to the pixel i in the value vector V is determined by using the following formula:
[0280] V(LL(i)) = V(LL(i)) + |HL(i)| + |LH(i)| + |HH(i)|
[0281] wherein V(LL(i)) represents the cumulative value of the absolute values of all high frequency components of pixel point i;
[0282] HL(i) represents the value of the horizontal high frequency component HL of pixel point i;
[0283] LH(i) represents the value of the vertical high frequency component LH of pixel point i;
[0284] HH(i) represents the value of the diagonal high frequency component HH of pixel point i;
[0285] The element corresponding to pixel point i of the number vector S is determined by using the following formula:
[0286] S(LL(i)) = S(LL(i)) + 3
[0287] wherein S(LL(i)) represents the cumulative number of high frequency components of pixel point i;
[0288] The vector VS is established by using the value vector V and the number vector S, and the element corresponding to pixel point i of the vector VS represents the corresponding relationship between the brightness value and the noise estimation value of pixel point i.
[0289] In some embodiments, the vector VS is established by using the value vector V and the number vector S, including:
[0290] The element corresponding to pixel point i of the number vector S is added by a preset value greater than zero to obtain a non-zero value, and the element corresponding to pixel point i of the value vector V is divided by the non-zero value to obtain the element corresponding to pixel point i of the vector VS.
[0291] In some embodiments, for each of the clusters, based on the pixel value of each pixel point of the cluster and the corresponding relationship, a denoising threshold corresponding to the cluster is determined, including:
[0292] For each of the clusters:
[0293] The number d of pixel points of the cluster and the pixel value of each pixel point in the cluster are determined;
[0294] For each pixel point i of the cluster, based on the brightness value of the pixel point i and the corresponding relationship, a noise estimation value of the pixel point i is determined, and based on the noise estimation value of the pixel point i, a noise variance of the pixel point i is determined;
[0295] The pixel values of the pixels in the cluster are taken as a value range of the denoising threshold, and based on the number d of the pixels, the value range of the denoising threshold, and a preset loss function, an estimated value of the loss function of the d denoising thresholds is determined.
[0296] A denoising threshold corresponding to a minimum value in the estimated values of the loss function of the d denoising thresholds is determined as the denoising threshold corresponding to the cluster.
[0297] In some embodiments, the loss function has the following formula:
[0298]
[0299] wherein, represents a noise variance of the pixel i;
[0300] The g t (y i ) and g′ t (y i ) satisfy:
[0301]
[0302] wherein, y represents a high-frequency component with noise;
[0303] t represents a denoising threshold.
[0304] In some embodiments, the denoising threshold is taken from a minimum value in the pixel values of the d pixels, and is increased each time until a maximum value in the pixel values of the d pixels is reached.
[0305] In some embodiments, for each cluster, the high-frequency components of the pixels in the cluster are denoised using the denoising threshold corresponding to the cluster, including:
[0306] For each cluster, the high-frequency components of the pixels in the cluster are denoised using the following formula:
[0307]
[0308] wherein, t represents the denoising threshold corresponding to the cluster;
[0309] y represents a high-frequency component with noise of a current pixel in the cluster;
[0310] represents a denoised high-frequency component of the current pixel in the cluster.
[0311] It should be noted that the division of the unit in the embodiments of the present application is illustrative, and is only a logical function division. In actual implementation, another division manner can be used. In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0312] When the integrated unit is realized in the form of a software functional unit and sold or used as an independent product, the integrated unit can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform all or part of the steps of the methods described in each embodiment of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0313] Any of the devices or apparatuses provided in the embodiments of the present application can be specifically a desktop computer, a portable computer, a smart phone, a tablet computer, a personal digital assistant (PDA), etc. The devices or apparatuses can include a central processing unit (CPU), a memory, an input / output device, etc. The input device can include a keyboard, a mouse, a touch screen, etc. The output device can include a display device, such as a liquid crystal display (LCD), a cathode ray tube (CRT), etc.
[0314] The memory can include a read-only memory (ROM) and a random access memory (RAM), and provide the processor with program instructions and data stored in the memory. In the embodiments of the present application, the memory can be used to store the programs of any of the methods provided in the embodiments of the present application.
[0315] The processor calls the program instructions stored in the memory. The processor is used to execute any of the methods provided in the embodiments of the present application according to the obtained program instructions.
[0316] The embodiments of the present application further provide a computer program product or computer program, which comprises computer instructions stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to enable the computer device to perform any of the methods described in the above embodiments. The program product can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium may, for example, be but is not limited to an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination of the above. More specific examples (non-exhaustive list) of the readable storage medium include an electrical connection having one or more wires, a portable disc, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0317] The embodiments of the present application provide a computer readable storage medium for storing computer program instructions for the apparatus provided in the above embodiments of the present application, which contains programs for executing any of the methods provided in the above embodiments of the present application. The computer readable storage medium can be a non-transitory computer readable medium.
[0318] The computer readable storage medium can be any available medium or data storage device that can be accessed by a computer, including but not limited to a magnetic storage (such as a floppy disk, a hard disk, a magnetic tape, a magneto-optical disk (MO), etc.), an optical storage (such as a CD, a DVD, a BD, a HVD, etc.), and a semiconductor storage (such as a ROM, an EPROM, an EEPROM, a non-volatile memory (NAND FLASH), a solid state disk (SSD)), etc.
[0319] It should be understood that:
[0320] The access technology via which entities in a communication network communicate traffic to and from each other can be any suitable current or future technology, such as WLAN (Wireless Local Access Network), WiMAX (Worldwide Interoperability for Microwave Access), LTE, LTE-A, 5G, Bluetooth, infrared, etc. can be used; in addition, embodiments can also apply wired technologies, for example, IP-based access technologies, such as wired networks or fixed lines.
[0321] Embodiments suitable for being implemented as software code or part of it and being run using a processor or processing functionality are independent of the software code and can be specified using any known or future developed programming language, such as a high-level programming language, such as objective-C, C, C++, C#, Java, Python, Javascript, other scripting languages, etc., or a low-level programming language, such as a machine language or assembler.
[0322] Embodiments are independent of hardware and can be implemented using any known or future developed hardware technology or any hybrid of these, such as a microprocessor or CPU (Central Processing Unit), MOS (Metal Oxide Semiconductor), CMOS (Complementary MOS), BiMOS (Bipolar MOS), BiCMOS (Bipolar CMOS), ECL (Emitter Coupled Logic), and / or TTL (Transistor-Transistor Logic).
[0323] Embodiments can be implemented as a single device, apparatus, unit, component or function, or in a distributed manner as e.g. one or more processors or processing functionality can be used or shared in processing, or one or more processing segments or processing portions can be used and shared in processing, wherein one physical processor or more than one physical processor can be used for implementing one or more processing portions dedicated to specific processing as described.
[0324] An apparatus can be implemented by a semiconductor chip, a chipset, or a (hardware) module including such chip or chipset.
[0325] Embodiments can also be implemented as any combination of hardware and software, such as an ASIC (Application Specific IC (Integrated Circuit)) component, a FPGA (Field-Programmable Gate Array) or CPLD (Complex Programmable Logic Device) component or a DSP (Digital Signal Processor) component.
[0326] Embodiments can also be implemented as a computer program product comprising a computer usable medium having a computer readable program code embodied therein, the computer readable program code adapted to be executed by a computer to perform processes as described in embodiments, wherein the computer usable medium can be a non-transitory medium.
[0327] Those skilled in the art will appreciate that embodiments of the present application can be supplied as a method, a system, or a computer program product. Accordingly, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application can take the form of a computer program product on one or more computer readable storage media (including, but not limited to, magnetic disks or optical storage) embodying computer readable program code, for example.
[0328] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flow or blocks. Figure 1 one or more flow or blocks.
[0329] These computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture including instructions which implement the function specified in the flowchart block or blocks. Figure 1 one or more flow or blocks. Figure 1 one or more flow or blocks.
[0330] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flow or blocks. Figure 1 one or more flow or blocks.
[0331] Obviously, numerous modifications and variations of the present application are possible in light of the above teachings. It is therefore to be understood that within the scope of the appended claims and their equivalents, the application can be practiced otherwise than as specifically described.
Claims
1. A method of image denoising, characterized in that, The method comprises: obtaining an image to be denoised, and performing wavelet decomposition on the image to be denoised to obtain a wavelet decomposition result, wherein the wavelet decomposition result comprises a low-frequency component and a high-frequency component; performing pixel point clustering on the image to be denoised to obtain at least one cluster; for each cluster: based on the wavelet decomposition result, determining a corresponding relationship between a luminance value and a noise estimation value of at least one pixel point of the cluster; based on a pixel value of each pixel point of the cluster and the corresponding relationship, determining a denoising threshold corresponding to the cluster; using the denoising threshold corresponding to the cluster, performing denoising processing on the high-frequency component of each pixel point of the cluster; based on the low-frequency component and the denoised high-frequency component of each cluster, performing wavelet reconstruction to obtain a denoised image.
2. The method of claim 1, wherein, For each cluster, based on the wavelet decomposition result, the corresponding relationship between the luminance value and the noise estimation value of at least one pixel point of the cluster comprises: for each pixel point of each cluster: taking the low-frequency component of the pixel point as the luminance value of the pixel point, and taking the average value of a plurality of high-frequency components corresponding to the pixel point as the noise estimation value of the pixel point, to establish the corresponding relationship between the luminance value and the noise estimation value of the pixel point.
3. The method of claim 2, wherein, For each pixel point of each cluster: taking the low-frequency component of the pixel point as the luminance value of the pixel point, and taking the average value of a plurality of high-frequency components corresponding to the pixel point as the noise estimation value of the pixel point, to establish the corresponding relationship between the luminance value and the noise estimation value of the pixel point, comprising: for each pixel point i of each cluster: determining the element corresponding to the pixel point i of the value vector V by using the following formula: V(LL(i))=V(LL(i))+|HL(i)|+|LH(i)|+|HH(i)| wherein V(LL(i)) represents the cumulative value of the absolute values of all high-frequency components of the pixel point i; HL(i) represents the value of the horizontal high-frequency component HL of the pixel point i; LH(i) represents the value of the vertical high-frequency component LH of the pixel point i; HH(i) represents the value of the diagonal high-frequency component HH of the pixel point i; determining the element corresponding to the pixel point i of the number vector S by using the following formula: S(LL(i))=S(LL(i))+3 wherein S(LL(i)) represents the cumulative number of high-frequency components of the pixel point i; using the value vector V and the number vector S to establish a vector VS, wherein the element corresponding to the pixel point i in the vector VS represents the corresponding relationship between the luminance value and the noise estimation value of the pixel point i.
4. The method of claim 3, wherein, Using the value vector V and the number vector S to establish a vector VS comprises: adding the element corresponding to the pixel point i of the number vector S to a preset value greater than zero to obtain a non-zero value; and dividing the element corresponding to the pixel point i of the value vector V by the non-zero value to obtain the element corresponding to the pixel point i of the vector VS.
5. The method of claim 1, wherein, For each cluster, based on the pixel value of each pixel point of the cluster and the corresponding relationship, determining the denoising threshold corresponding to the cluster comprises: for each cluster: determining the number d of pixel points of the cluster, and the pixel value of each pixel point in the cluster; For each pixel point i in the cluster, based on the brightness value of the pixel point i and the correspondence, a noise estimate value of the pixel point i is determined, and based on the noise estimate value of the pixel point i, a noise variance of the pixel point i is determined; The pixel values of the pixel points in the cluster are taken as a value range of the denoising threshold, and based on the number d of the pixel points, the value range of the denoising threshold, and a preset loss function, a loss function estimate value of the d denoising thresholds is determined; The denoising threshold corresponding to the minimum value in the loss function estimate value of the d denoising thresholds is determined as the denoising threshold corresponding to the cluster.
6. The method of claim 5, wherein, The formula of the loss function is as follows: wherein, denotes the noise variance of the pixel point i; The pixel point i corresponds to g t (y i ) and g′ t (y i ) respectively satisfy: Wherein, y represents a high-frequency component with noise; t represents a denoising threshold.
7. The method of claim 1, wherein, For each of the clusters, the high-frequency components of the pixel points in the cluster are denoised by using the denoising threshold corresponding to the cluster, including: For each of the clusters, the high-frequency components of the pixel points in the cluster are denoised by using the following formula: Wherein, t represents the denoising threshold corresponding to the cluster; y represents the high-frequency component with noise of the current pixel point in the cluster. denotes the high frequency component of the current pixel point of the cluster after the noise reduction processing.
8. An image noise reduction apparatus, characterized by comprising: The device comprises: A wavelet decomposition unit configured to obtain a to-be-denoised image and perform wavelet decomposition on the to-be-denoised image to obtain a wavelet decomposition result, wherein the wavelet decomposition result comprises a low-frequency component and a high-frequency component; A clustering unit configured to perform pixel point clustering on the to-be-denoised image to obtain at least one cluster; A partition denoising unit configured to, for each of the clusters: Based on the wavelet decomposition result, determine a correspondence between the brightness value and the noise estimate value of at least one pixel point in the cluster; Based on the pixel value of each pixel point in the cluster and the correspondence, determine the denoising threshold corresponding to the cluster; Denoise the high-frequency components of the pixel points in the cluster by using the denoising threshold corresponding to the cluster; A wavelet reconstruction unit configured to perform wavelet reconstruction based on the low-frequency component and the denoised high-frequency component of each of the clusters to obtain a denoised image.
9. An electronic device, comprising: Comprise: A memory configured to store program instructions; A processor configured to invoke the program instructions stored in the memory to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer executable instructions for causing the computer to execute the method according to any one of claims 1 to 7.