A noise suppression method based on spatial transformation and adaptive clustering

Through the noise suppression method based on spatial transformation and adaptive clustering, the details loss and artificial parameter adjustment dependency problems caused by noise suppression in the prior art are solved, and image details are preserved while suppressing noise and improving algorithm universality.

CN115205567BActive Publication Date: 2025-08-15OI-SMART COM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210735627.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-27
Publication Date
2025-08-15
Estimated Expiration
2042-06-27

AI Technical Summary

Technical Problem

The existing image processing algorithms tend to lose detailed features while suppressing noise, and the method that relies on artificial parameter adjustment is less universal.

Method used

Using a noise suppression method based on spatial transformation and adaptive clustering, the extreme values are eliminated by preprocessing, and two independent similarity evaluations and spatial conversion clustering are performed. The weight is calculated based on the variance and mean of the image residuals to obtain the third estimated image.

Benefits of technology

While filtering out noise, it retains more detailed features, reduces the dependence on artificial parameter adjustment and improves the generalization ability of the algorithm.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115205567B_ABST
    Figure CN115205567B_ABST
Patent Text Reader

Abstract

The present invention provides a noise suppression method based on spatial transformation and adaptive clustering. First, the guiding map of the image is obtained; the guiding map is estimated twice independently, each time using two different similarity evaluation indicators. The spatial transformation and clustering are performed with each indicator as a different dimension. The distance to the fixed cluster center is used as the similarity coefficient and the corresponding weight in the original space is calculated. The weighted sum is used as the anchor grayscale value to obtain two estimated images; finally, the variance and mean of the residuals of the first two estimated images are used as parameters to calculate the weights. The grayscale values of the corresponding positions of the two images are used as factors, and the weighted sum of the factors and weights is used as the anchor grayscale value. All pixels on the image are traversed and processed to obtain a third estimated image. Compared with common algorithms such as median filtering and Gaussian filtering, this method can retain more detailed features while filtering out noise; compared with common edge-preserving filtering methods such as BM3D and NLM, it improves the disadvantage of over-reliance on manual parameter adjustment and enhances the generalization ability of the algorithm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to a noise suppression method based on space transformation and adaptive clustering. Background Art

[0002] Images are inevitably affected by noise during acquisition, generation, and transmission. In applications where high image quality is crucial, noise suppression is essential. Common noise sources include salt and pepper, Gaussian, and periodic noise. While filtering out noise, common algorithms like median and Gaussian filters can lose detail. Common edge-preserving filtering methods like BM3D and NLM require a large number of parameters, and only reasonable parameters are required to achieve optimal results, resulting in limited generalizability. Summary of the Invention

[0003] The technical problem to be solved by the present invention is: in order to maintain the edge while suppressing the noise in the image, and at the same time improve the disadvantage of the image relying on manual parameter adjustment, the present invention provides a noise suppression method based on spatial transformation and adaptive clustering.

[0004] The technical solution adopted by the present invention to solve its technical problems is: a noise suppression method based on spatial transformation and adaptive clustering, the main idea of which is: first, preprocessing the image to reduce the influence of extreme values and obtain a guide map; then, performing two independent estimates on the guide map, each estimation using two different similarity evaluation methods, performing spatial transformation with each similarity evaluation index as a different dimension, clustering in the new space, calculating the distance between the cluster of points similar to the fixed cluster center and the cluster center as the similarity coefficient, using the coefficient as a parameter to calculate the weight in the original space, calculating the weighted sum of the grayscale values of each point in the cluster where the fixed cluster center is located as the anchor point grayscale value, and obtaining two estimated images; finally, based on the two estimated images, performing a third estimation, calculating the similarity coefficient of each block, spatial transformation, clustering, and weight calculation process, using the variance of the first two estimated images as a parameter to calculate the weight, using the grayscale value of the corresponding position of the two images as a factor, and taking the weighted sum of the weight and the factor as the grayscale value at the anchor point, using this method to process each pixel on the image to obtain the third estimated image, that is, the final result.

[0005] The specific steps include:

[0006] S1: Image preprocessing

[0007] Use sliding window K to perform Butterworth-geometric mean filtering on the original image S to reduce the influence of extreme values and obtain the guidance map S g .

[0008] S2: First estimate

[0009] For the guide map Sg Two different similarity evaluation methods are used to obtain a similarity evaluation index respectively. Each similarity evaluation index is used as a different dimension for spatial transformation. Clustering is performed in the new space. The distance between the point cluster close to the fixed cluster center and the cluster center is taken as the similarity coefficient. In the original space, the grayscale weight of the point cluster close to the fixed cluster center and the weight of the point cluster close to the fixed cluster center are calculated using the similarity coefficient as a parameter. The weighted sum of the grayscale values of each point in the point cluster where the fixed cluster center is located is taken as the anchor point grayscale value. The guide graph S is traversed and processed. g , get the first estimation result image S e1 .

[0010] S3: Second estimate

[0011] For the guide map S g Two different similarity evaluation methods different from those in step S2 are used to obtain a similarity evaluation index respectively. Each similarity evaluation index is used as a different dimension for space transformation. Clustering is performed in the new space. The distance between the point cluster close to the fixed cluster center and the cluster center is calculated as the similarity coefficient. The grayscale weight of the point cluster close to the fixed cluster center is calculated in the original space using the similarity coefficient as a parameter. The weighted sum of the grayscale values of each point in the point cluster where the fixed cluster center is located is calculated as the anchor point grayscale value. The guide graph S is traversed and processed. g , get the second estimation result image S e2 .

[0012] It should be noted that the two different similarity evaluation methods used in step S3 are different from the two different similarity evaluation methods used in step S2, otherwise the subsequent third estimation cannot be carried out.

[0013] S4: Third estimate

[0014] According to the first estimation result image S e1 And the second estimation result image S e2 , perform the third estimation, calculate the similarity coefficient, spatial transformation, clustering and weight of each block, use the variance and mean of the residual of the previous two estimated images as parameters to calculate the weight, use the grayscale value of the corresponding position of the two images as the factor, and use the weighted sum of the weight and the factor as the grayscale value at the anchor point. Use this method to process each pixel on the image to obtain the third estimated image S e3 , which is the final result.

[0015] Furthermore, the image preprocessing in step S1 specifically includes:

[0016] S1.1: Obtain the original image S and determine the size of the sliding window K to be k×k, where the minimum value of k is 3 and the maximum value is the length of the shortest side of the image S, in units of pix (default k=3).

[0017] S1.2: According to the size of the sliding window K, the original image S is filtered using the Butterworth filtering method to obtain the Butterworth filtered image S W , specifically:

[0018] The anchor point corresponding to the center of the sliding window K is A, and its coordinates are (x A ,y A ), as a preference, the anchor point defaults to the center point of the sliding window K, then any pixel point (x i ,y i The calculation formula of the L2 distance between ) and the anchor point is:

[0019]

[0020] Among them, d i is the pixel point (x i ,y i )L2 distance from the anchor point;

[0021] Then any pixel point (x i ,y i ) weight ω in the area covered by the sliding window K i Expressed as:

[0022]

[0023] Among them, ω i is the weight corresponding to the pixel with index i; i and j are both pixel index values, where i = 1, 2, 3...k 2 , j=1,2,3...k 2 ;d j Any pixel point (x j ,y j ) is the L2 distance from the anchor point.

[0024] The weights of all pixels in the area covered by the sliding window K are obtained according to the pixel weight calculation formula (2); then, the Butterworth mean v at the anchor point in the area covered by the sliding window K is calculated based on the weights of all pixels and the grayscale values of the pixels. W ,but:

[0025]

[0026] Among them, v W is the Butterworth mean at the anchor point in the area covered by the sliding window K; v iis the grayscale value of the pixel indexed by i in the area covered by the sliding window K; i is the pixel index value, i=1,2,3...k 2 .

[0027] It should be noted that the grayscale value, like the coordinates, already exists and can be directly obtained by writing code. There is no need to explain the acquisition process, which will not affect the full disclosure of the technical solution of the present invention.

[0028] Using the Butterworth mean v W Substituting the grayscale value of the anchor point in the covered area of the sliding window K, the original image S is processed according to the processing process of formula (1) to formula (3) to obtain the Butterworth filtered image S W .

[0029] S1.3: According to the size of the sliding window K, the original image S is filtered using the geometric mean filtering method to obtain the geometric mean filtered image S G , specifically:

[0030] Calculate the geometric mean v at the anchor point in the sliding window K covered area according to the gray value of the pixel G ,but:

[0031]

[0032] Among them, v i is the grayscale value of the pixel indexed by i in the area covered by the sliding window K; i is the pixel index value, i=1,2,3...k 2 .

[0033] Using the geometric mean v G Substituting the grayscale value of the anchor point in the covered area of the sliding window K, the original image S is processed according to the processing process of formula (4) to obtain the image S after geometric mean filtering G .

[0034] S1.4: Calculate the image S within the same sliding window K covered area W Gray value v of the middle anchor point W and the gray value v of the anchor point in the original image S S The L1 distance of image S G Gray value v of the middle anchor point G and the gray value v of the anchor point in the original image S S The L1 distance of the two L1 distances is then compared to obtain the weighted sum v of the anchor points within the sliding window K coverage range. A ,but:

[0035]

[0036] Take the pixel value of the anchor point with the closest L1 distance as the pixel value of the original image S in the area covered by the sliding window K, and traverse the original image S and image S according to the size of the sliding window K. W and image S G , and replace the anchor point gray value to obtain the guide map S g .

[0037] The order of S1.2 and S1.3 in the above steps can be adjusted.

[0038] Furthermore, the first estimation in step S2 specifically includes:

[0039] S2.1: Using sliding window K to traverse the guidance graph S g The anchor block K is included A All areas including, calculate the sliding window K traversal processing area and anchor block K A The cosine similarity coefficient u and structural similarity coefficient v (abbreviated as SSIM) are calculated and recorded;

[0040] Among them, the calculation formula of the cosine similarity coefficient u is as follows:

[0041]

[0042] Among them, v Kik Indicates the grayscale value of the ikth pixel within the coverage range of the sliding box K, Indicates the grayscale value of the ikth pixel in the block where the anchor point is located, ik=1, 2, 3..., k 2 , the sliding window is square by default, and k is the side length of the sliding window;

[0043] The calculation formula of the structural similarity coefficient v is as follows:

[0044]

[0045] c1=(k1L) 2

[0046] c2=(k2L) 2

[0047] Among them, μ K and Represents sliding window K and anchor block K respectively A The grayscale mean, c1, c2 are constants used to maintain stability, L is the dynamic range of pixel grayscale values, k1 = 0.01, k2 = 0.03, Represents the image and anchor block K within the sliding window K coverage range A The covariance of is the variance of the image within the sliding window K coverage range, is the variance of the patch where the anchor point A is located;

[0048] S2.2: With the cosine similarity coefficient u as the horizontal coordinate and the structural similarity coefficient v as the vertical coordinate, the guide graph S g Pixel points are converted from xy space to uv space;

[0049] S2.3 performs clustering on the point clusters in the uv space and divides the point clusters in the uv space into points close to the anchor point A. u,v (u A ,v A ) and the point clusters far from the anchor point A u,v (u A ,v A ) point clusters;

[0050] As a preferred method of clustering, the anchor point A u,v (u A ,v A ) is the fixed cluster center of the uv space point cluster, and the non-fixed cluster center R in the uv space is randomly set u,v (u R ,v R ), calculate the distance between each cluster point in the uv space and the fixed cluster center A u,v (u A ,v A ) and non-fixed cluster center R u,v (u R ,v R ) L2 distance, classify each point into the class to which the cluster center with the shorter L2 distance belongs; fix the cluster center A u,v (u A ,v A ) remains stationary, updates the non-fixed cluster center, and repeats the above process until the non-fixed cluster center is no longer updated; at this point, the point clusters in the uv space are divided into u,v (u A ,v A ) and the point clusters far from the anchor point A u,v (u A ,v A ) point clusters to achieve clustering of uv space point clusters.

[0051] S2.4: Calculate the fixed cluster center A u,v (u A ,v A ) and the L2 distances of the same cluster points are recorded as: l u,v,1 、l u,v, 2......l u,v,m , and use this distance as a parameter to calculate the xy space grayscale weighted value. The calculation formula is:

[0052]

[0053] Among them, m is the number of all fixed cluster centers A u,v (u A ,v A ) The number of points in the same cluster; i A is the index value of the cluster point, i A =1,2,3...,m; e represents a natural constant;

[0054] S2.5: Then fix the cluster center A u,v (u A ,v A ) and the same cluster points are converted from uv space back to xy space, and the grayscale weighted sum v is calculated e1,A , and the grayscale weighted sum v e1,A As a guide map S g Upper anchor point A u,v (u A ,v A ) pixel gray value, then the gray weighted sum v e1,A The calculation formula is:

[0055]

[0056] Among them, v e1,A For the guide map S g Upper anchor point A u,v (u A ,v A )’s pixel grayscale value; For the guide map S g Tile K covered by upper sliding window K A The pixel gray value;

[0057] S2.6: Use the method of steps S2.1 to S2.5 to traverse and process the entire guidance map S g , get the first estimation result image S e1 .

[0058] Furthermore, the second estimation in step S3 specifically includes:

[0059] S3.1: Using sliding window K to traverse the guidance graph S g The anchor block K is included A All areas including, calculate the sliding window K traversal processing area and anchor block K A The normalized square difference s and normalized correlation coefficient c of are recorded, where

[0060] The formula for calculating the normalized squared difference is:

[0061]

[0062] The formula for calculating the normalized correlation coefficient is:

[0063]

[0064] Among them, s(x,y) represents the guide graph S g The pixel point with coordinates (x, y) is in K A The normalized square difference calculation results within the area; Δx and Δy are the ... A and the tile S where the anchor point A of the guide map is located g,A The relative movement step length along the x and y directions; K A represents the anchor patch centered at coordinate (x, y); K A (Δx, Δy) represents the anchor patch K A The anchor block S of the guide image is moved relative to the anchor point in the x-axis direction and y-axis direction by Δx and Δy respectively within the coverage range. g,A Gray value on S g,A (Δx+x, Δy+y) represents the tile S where the anchor point A of the guide map is located g,A The gray value of the pixel is reached after moving with step lengths Δx and Δy in the x and y directions with (x, y) as the core; c(x, y) represents the gray value of the pixel in the guide map S g The pixel point with coordinates (x, y) is in K A Normalized correlation coefficient within the region.

[0065] S3.2: With the normalized squared difference s as the horizontal axis and the normalized correlation coefficient c as the vertical axis, the bootstrap graph S g Pixels are converted from xy space to sc space.

[0066] S3.3: Cluster the point clusters in the sc space and divide the point clusters in the sc space into points close to the anchor point A s,c (s A ,c A ) and the point clusters far from the anchor point A s,c (s A ,c A ) point clusters.

[0067] As a preferred method of clustering, the anchor point A s,c (s A ,c A ) is the fixed cluster center of the point cluster in sc space, and the non-fixed cluster center R in sc space is randomly set s,c (s R ,c R ), calculate the distance between each cluster point in the sc space and the fixed cluster center A s,c (s A ,c A) and non-fixed cluster center R s,c (s R ,c R ) L2 distance, classify each point into the class to which the cluster center with the shorter L2 distance belongs; fix the cluster center A s,c (s A ,c A ) remains stationary, updates the non-fixed cluster center, and repeats the above process until the non-fixed cluster center is no longer updated; at this point, the point clusters in the sc space are divided into clusters close to the anchor point A. s,c (s A ,c A ) and the point clusters far from the anchor point A s,c (s A ,c A ) point clusters to achieve clustering of sc space point clusters;

[0068] S3.4: Calculate the fixed cluster center A s,c (s A ,c A ) and the L2 distances of the same cluster points are recorded as: l s,c,1 、l s,c, 2......l s,c,n , and use this distance as a parameter to calculate the grayscale weighted value of sc space. The calculation formula is:

[0069]

[0070] Among them, n is the number of all clusters with a fixed cluster center A s,c (s A ,c A ) The number of points in the same cluster; j A is the index value of the same cluster point, j A =1,2,3,...n; e represents a natural constant;

[0071] S3.5: Fix cluster center A s,c (s A ,c A ) and the same cluster points are converted from sc space back to xy space, and the grayscale weighted sum v is calculated e2,A , and the grayscale weighted sum v e2,A As a guide map S g Upper anchor point A s,c (s A ,c A ) pixel gray value, then the gray weighted sum v e2,A The calculation formula is:

[0072]

[0073] Among them, v e2,A For the guide map S gUpper anchor point A s,c (s A ,c A )’s pixel grayscale value; For the guide map S g Tile K covered by upper sliding window K A The pixel gray value;

[0074] S3.6: Use the method of steps S3.1 to S3.5 to traverse and process the entire guidance map S g , get the second estimation result image S e2 .

[0075] Furthermore, the third estimation in step S4 specifically includes:

[0076] S4.1: Based on the first estimation result image S e1 And the second estimation result image S e2 Calculate the residual image S r , the calculation formula is:

[0077] S r =||S e2 -S e1 || (14)

[0078] S4.2: Use sliding window K to traverse the residual image S r Including anchor tile K A All areas of the sliding window K are covered by the anchor block K. A The variance σ 2 and mean μ, respectively, as anchor point A μ,σ 2 The variance and mean at .

[0079] S4.3: With mean μ as horizontal coordinate and variance σ as horizontal coordinate 2 As the vertical coordinate, the residual image S r Pixels are converted from xy space to μ-σ 2 space.

[0080] S4.4: μ-σ 2 The point clusters in the space are clustered. After clustering, μ-σ 2 The point clusters in space are divided into point clusters close to the anchor point (0, 0) and point clusters far from the anchor point (0, 0), that is, point clusters with large image information differences and point clusters with small image information differences.

[0081] As a preferred method for clustering, the anchor point (0, 0) is used as μ-σ 2 The fixed cluster center of the spatial point cluster is randomly set μ-σ 2 The non-fixed cluster center R in space is calculated respectively for μ-σ 2Each point in the same cluster in space is separated from the fixed cluster center (0, 0) by the L2 distance of R, and each point is classified into the class to which the closest cluster center belongs. The fixed cluster center (0, 0) remains unchanged, and the non-fixed cluster center is updated. The updating method is: find the median of the horizontal and vertical coordinates of all points in the point cluster that belongs to the same class as the non-fixed cluster center, and use it as the horizontal and vertical coordinates of the new cluster center of the point cluster. Repeat the above process until the non-fixed cluster center is no longer updated. At this point, μ-σ 2 The point clusters in space are divided into point clusters close to the anchor point (0, 0) and point clusters far from the anchor point (0, 0), where the points in the point cluster close to the anchor point (0, 0) belong to the same category as the anchor point (0, 0).

[0082] S4.5: Take point A in xy space as the anchor point to determine whether point A is in μ-σ. 2 The corresponding point P in space and μ-σ 2 Whether the point (0, 0) in space belongs to the same type, if the point P is in μ-σ 2 In space, it is close to μ-σ 2 If the point (0, 0) is in the cluster of points in space, then the point P is considered to be in the range of μ-σ. 2 The point (0, 0) in the space belongs to the same type. At this time, point A is placed in the first estimation result image S e1 And the second estimation result image S e2 The arithmetic mean of the grayscale values at the corresponding positions is taken as the third estimated value of point A (i.e., the grayscale value of anchor point A); if point P is between μ-σ 2 If the point is in a cluster far away from (0, 0) in space, it is considered that the point is not of the same type as the anchor point (0, 0), and step S4.6 is entered.

[0083] S4.6: Calculate the first estimation result image S using point A as the anchor point e1 And the second estimation result image S e2 Anchor patch K A Variance and Variance and Calculate the grayscale weighted values for each parameter, and the calculation formula is:

[0084]

[0085]

[0086] in, Represents the first estimation result image S e1 The weight value of the grayscale value at the corresponding position of anchor point A; Represents the second estimation result image S e2 The weight value of the grayscale value at the corresponding position of anchor point A.

[0087] The point is respectively in the first estimation result image S e1 And the second estimation result image S e2 The sum of the product of the pixel value in and the grayscale weighted value is taken as the grayscale value of anchor point A, that is, the third estimated value of point A.

[0088] S4.7: Process the residual image S using a sliding window K according to the method of steps S4.4 to S4.6. r , get the third estimation result image S e3 .

[0089] Furthermore, the clustering method is:

[0090] First, determine the fixed cluster center of the point cluster in the space, randomly set the non-fixed cluster center in the space, calculate the L2 distance of each cluster point from the fixed cluster center and the non-fixed cluster center in the space, and classify each point into the class to which the cluster center with the shorter L2 distance belongs; then, keep the fixed cluster center fixed and update the non-fixed cluster center, and repeat the above process until the non-fixed cluster center is no longer updated; at this point, the point clusters in the space are divided into point clusters close to the fixed cluster center and point clusters far from the fixed cluster center, thus realizing the clustering of the point clusters in the space.

[0091] Furthermore, the updating method of the non-fixed cluster center is: finding the median of the horizontal coordinates and the median of the vertical coordinates of all points in the point cluster that belongs to the same category as the non-fixed cluster center, and using them as the horizontal coordinate and vertical coordinate of the new cluster center of the point cluster respectively.

[0092] In order to fully disclose the technical solution, the following terms are defined:

[0093] The L1 distance is the sum of the distances of the projections of the line segment formed by two points on the axis in the fixed rectangular coordinate system of Euclidean space.

[0094] L2 distance is a distance representation between two points or multiple points, defined in Euclidean space, such as point x(x1,x2...,x n ) and y(y1,y2...,y n ) is expressed as:

[0095]

[0096] Among them, the value range of i and j is 1, 2, ... n.

[0097] The beneficial effects of the present invention are as follows: the noise suppression method based on spatial transformation and adaptive clustering provided by the present invention can retain more detailed features while filtering out noise compared with common algorithms such as median filtering and Gaussian filtering; compared with common edge-preserving filtering methods such as BM3D and NLM, it improves the disadvantage of over-reliance on manual parameter adjustment and enhances the generalization ability of the algorithm. BRIEF DESCRIPTION OF THE DRAWINGS

[0098] The present invention will be further described below with reference to the accompanying drawings and examples.

[0099] Figure 1 It is a flowchart of the invention of a noise suppression method based on spatial transformation and adaptive clustering.

[0100] Figure 2 It is a schematic diagram of the process of image preprocessing in step S1 of the present invention.

[0101] Figure 3 This is a flow chart of the first estimation in step S2 of the present invention.

[0102] Figure 4 It is a flow chart of the second estimation in step S3 of the present invention.

[0103] Figure 5 4 is a flow chart of the third estimation in step S4 of the present invention. DETAILED DESCRIPTION

[0104] The present invention will now be described in detail with reference to the accompanying drawings. This figure is a simplified schematic diagram, which only illustrates the basic structure of the present invention in a schematic manner, and therefore only shows the components related to the present invention.

[0105] like Figure 1 As shown, a noise suppression method based on spatial transformation and adaptive clustering of the present invention includes the following steps:

[0106] S1: Image preprocessing, using sliding window K to perform Butterworth-geometric mean filtering on the original image S to reduce the influence of extreme values and obtain the guide map S g ;

[0107] like Figure 2 As shown, image preprocessing specifically includes the following steps:

[0108] S1.1: Obtain the original image S and determine the size of the sliding window K to be k×k, where the minimum value of k is 3 and the maximum value is the length of the shortest side of the image S, in units of pix (default k=3).

[0109] S1.2: According to the size of the sliding window K, the original image S is filtered using the Butterworth filtering method to obtain the Butterworth filtered image S W, specifically:

[0110] The anchor point corresponding to the center of the sliding window K is A, and its coordinates are (x A ,y A ), as a preference, the anchor point defaults to the center point of the sliding window K, then any pixel point (x i ,y i The calculation formula of the L2 distance between ) and the anchor point is:

[0111]

[0112] Among them, d i is the pixel point (x i ,y i )L2 distance from the anchor point;

[0113] Then any pixel point (x i ,y i ) weight ω in the area covered by the sliding window K i Expressed as:

[0114]

[0115] Among them, ω i is the weight corresponding to the pixel with index i; i and j are both pixel index values, where i = 1, 2, 3...k 2 , j=1,2,3...k 2 ;d j Any pixel point (x j ,y j ) is the L2 distance from the anchor point.

[0116] The weights of all pixels in the area covered by the sliding window K are obtained according to the pixel weight calculation formula (2); then, the Butterworth mean v at the anchor point in the area covered by the sliding window K is calculated based on the weights of all pixels and the grayscale values of the pixels. W ,but:

[0117]

[0118] Among them, v W is the Butterworth mean at the anchor point in the area covered by the sliding window K; v i is the grayscale value of the pixel indexed by i in the area covered by the sliding window K; i is the pixel index value, i=1,2,3...k 2 .

[0119] Using the Butterworth mean v WSubstituting the grayscale value of the anchor point in the covered area of the sliding window K, the original image S is processed according to the processing process of formula (1) to formula (3) to obtain the Butterworth filtered image S W .

[0120] S1.3: According to the size of the sliding window K, the original image S is filtered using the geometric mean filtering method to obtain the geometric mean filtered image S G , specifically:

[0121] Calculate the geometric mean v at the anchor point in the sliding window K covered area according to the gray value of the pixel G ,but:

[0122]

[0123] Among them, v i is the grayscale value of the pixel indexed by i in the area covered by the sliding window K; i is the pixel index value, i=1,2,3...k 2 .

[0124] Using the geometric mean v G Substituting the grayscale value of the anchor point in the covered area of the sliding window K, the original image S is processed according to the processing process of formula (4) to obtain the image S after geometric mean filtering G .

[0125] S1.4: Calculate the image S within the same sliding window K covered area W Gray value v of the middle anchor point W and the gray value v of the anchor point in the original image S S The L1 distance of image S G Gray value v of the middle anchor point G and the gray value v of the anchor point in the original image S S The L1 distance of the two L1 distances is then compared to obtain the weighted sum v of the anchor points within the sliding window K coverage range. A ,but:

[0126]

[0127] Take the pixel value of the anchor point with the closest L1 distance as the pixel value of the original image S in the area covered by the sliding window K, and traverse the original image S and image S according to the size of the sliding window K. W and image S G , and replace the anchor point gray value to obtain the guide map S g .

[0128] The order of S1.2 and S1.3 in the above steps can be adjusted.

[0129] S2: First estimate

[0130] For the guide map S g Two different similarity evaluation methods are used to obtain a similarity evaluation index respectively. Each similarity evaluation index is used as a different dimension for spatial transformation. Clustering is performed in the new space. The distance between the point cluster similar to the fixed cluster center and the cluster center is taken as the similarity coefficient. In the original space, the similarity coefficient is used as a parameter to calculate the grayscale weight of the point cluster close to the fixed cluster center and the weight of the point cluster close to the fixed cluster center. The weighted sum of the grayscale values of each point in the point cluster where the fixed cluster center is located is taken as the anchor point grayscale value. The guide graph S is traversed and processed. g , get the first estimation result image S e1 .

[0131] like Figure 3 As shown, the first estimation specifically includes the following steps:

[0132] S2.1: Using sliding window K to traverse the guidance graph S g The anchor block K is included A All areas including, calculate the sliding window K traversal processing area and anchor block K A The cosine similarity coefficient u and structural similarity coefficient v (abbreviated as SSIM) are calculated and recorded.

[0133] Among them, the calculation formula of the cosine similarity coefficient u is as follows:

[0134]

[0135] Among them, v Kik Indicates the grayscale value of the ikth pixel within the coverage range of the sliding box K, Indicates the grayscale value of the ikth pixel in the block where the anchor point is located, ik=1, 2, 3..., k 2 , the sliding window is square by default, and k is the side length of the sliding window;

[0136] The calculation formula of the structural similarity coefficient v is as follows:

[0137]

[0138] c1=(k1L) 2

[0139] c2=(k2L) 2

[0140] Among them, μ K and Represents sliding window K and anchor block K respectively A The grayscale mean, c1, c2 are constants used to maintain stability, L is the dynamic range of pixel grayscale values, k1 = 0.01, k2 = 0.03, Represents the image and anchor block K within the sliding window K coverage range A The covariance of is the variance of the image within the sliding window K coverage range, is the variance of the patch where the anchor point A is located.

[0141] S2.2: With the cosine similarity coefficient u as the horizontal coordinate and the structural similarity coefficient v as the vertical coordinate, the guide graph S g Pixels are converted from xy space to uv space.

[0142] S2.3: Cluster the point clusters in the uv space and divide the point clusters in the uv space into those close to the anchor point A u,v (u A ,v A ) and the point clusters far from the anchor point A u,v (u A ,v A ), the specific method of clustering processing in this embodiment is: using anchor point A u,v (u A ,v A ) is the fixed cluster center of the uv space point cluster, and the non-fixed cluster center R in the uv space is randomly set u,v (u R ,v R ), calculate the distance between each cluster point in the uv space and the fixed cluster center A u,v (u A ,v A ) and non-fixed cluster center R u,v (u R ,v R ) L2 distance, classify each point into the class to which the cluster center with the shorter L2 distance belongs; fix the cluster center A u,v (u A ,v A ) remains stationary, updates the non-fixed cluster center, and repeats the above process until the non-fixed cluster center is no longer updated; at this point, the point clusters in the uv space are divided into u,v (u A ,v A ) and the point clusters far from the anchor point A u,v (u A ,v A ) point cluster; to realize the clustering of uv space point clusters; among them, the updating method of the non-fixed cluster center is: to find the median of the horizontal and vertical coordinates of all points in the point cluster that belongs to the same category as the non-fixed cluster center, and use them as the horizontal and vertical coordinates of the new cluster center of the point cluster.

[0143] S2.4: Calculate the fixed cluster center A u,v (u A ,v A) and the L2 distances of the same cluster points are recorded as: l u,v,1 、l u,v, 2......l u,v,m , and use this distance as a parameter to calculate the xy space grayscale weighted value. The calculation formula is:

[0144]

[0145] Among them, m is the number of all fixed cluster centers A u,v (u A ,v A ) The number of points in the same cluster; i A is the index value of the cluster point, i A =1,2,3...,m; e represents a natural constant;

[0146] S2.5: Then fix the cluster center A u,v (u A ,v A ) and the same cluster points are converted from uv space back to xy space, and the grayscale weighted sum v is calculated e1,A , and the grayscale weighted sum v e1,A As a guide map S g Upper anchor point A u,v (u A ,v A ) pixel gray value, then the gray weighted sum v e1,A The calculation formula is:

[0147]

[0148] Among them, v e1,A For the guide map S g Upper anchor point A u,v (u A ,v A )’s pixel grayscale value; For the guide map S g Tile K covered by upper sliding window K A The pixel gray value;

[0149] S2.6: Use the method of steps S2.1 to S2.5 to traverse and process the entire guidance map S g , get the first estimation result image S e1 .

[0150] S3: Second estimate

[0151] For the guide map S gTwo different similarity evaluation methods different from those in step S2 are used to obtain a similarity evaluation index respectively. The space transformation is performed with each similarity evaluation index as a different dimension. Clustering is performed in the new space. The distance between the point cluster similar to the fixed cluster center and the cluster center is calculated as the similarity coefficient. The similarity coefficient is used as a parameter in the original space to calculate the grayscale weight of the point cluster close to the fixed cluster center and the weight of the point cluster close to the fixed cluster center. The weighted sum of the grayscale values of each point in the point cluster where the fixed cluster center is located is calculated as the anchor point grayscale value. The guide graph S is traversed and processed. g , get the second estimation result image S e2 It should be noted that the two different similarity evaluation methods used in step S3 are different from the two different similarity evaluation methods used in step S2.

[0152] like Figure 4 As shown, the second estimation specifically includes the following steps:

[0153] S3.1: Using sliding window K to traverse the guidance graph S g The anchor block K is included A All areas including, calculate the sliding window K traversal processing area and anchor block K A The normalized square difference s and normalized correlation coefficient c of are recorded, where

[0154] The formula for calculating the normalized squared difference is:

[0155]

[0156] The formula for calculating the normalized correlation coefficient is:

[0157]

[0158] Among them, s(x,y) represents the guide graph S g The pixel point with coordinates (x, y) is in K A The normalized square difference calculation results within the area; Δx and Δy are the ... A and the tile S where the anchor point A of the guide map is located g,A The relative movement step length along the x and y directions; K A represents the anchor patch centered at coordinate (x, y); K A (Δx, Δy) represents the anchor patch K A The anchor block S of the guide image is moved relative to the anchor point in the x-axis direction and y-axis direction by Δx and Δy respectively within the coverage range. g,A Gray value on S g,A (Δx+x, Δy+y) represents the tile S where the anchor point A of the guide map is located g,AThe gray value of the pixel is reached after moving with step lengths Δx and Δy in the x and y directions with (x, y) as the core; c(x, y) represents the gray value of the pixel in the guide map S g The pixel point with coordinates (x, y) is in K A Normalized correlation coefficient within the region.

[0159] S3.2: With the normalized squared difference s as the horizontal axis and the normalized correlation coefficient c as the vertical axis, the bootstrap graph S g Pixels are converted from xy space to sc space.

[0160] S3.3: Cluster the point clusters in the sc space and divide the point clusters in the sc space into points close to the anchor point A s,c (s A ,c A ) and the point clusters far from the anchor point A s,c (s A ,c A ), the specific method of clustering processing in this embodiment is:

[0161] Anchor point A s,c (s A ,c A ) is the fixed cluster center of the point cluster in sc space, and the non-fixed cluster center R in sc space is randomly set s,c (s R ,c R ), calculate the distance between each cluster point in the sc space and the fixed cluster center A s,c (s A ,c A ) and non-fixed cluster center R s,c (s R ,c R ) L2 distance, classify each point into the class to which the cluster center with the shorter L2 distance belongs; fix the cluster center A s,c (s A ,c A ) remains stationary, updates the non-fixed cluster center, and repeats the above process until the non-fixed cluster center is no longer updated; at this point, the point clusters in the sc space are divided into clusters close to the anchor point A. s,c (s A ,c A ) and the point clusters far from the anchor point A s,c (s A ,c A ) point clusters; to achieve clustering of sc space point clusters. The method for updating the non-fixed cluster center is to find the median of the horizontal and vertical coordinates of all points in the point cluster that belongs to the same category as the non-fixed cluster center, and use it as the horizontal and vertical coordinates of the new cluster center of the point cluster.

[0162] S3.4: Calculate the fixed cluster center A s,c(s A ,c A ) and the L2 distances of the same cluster points are recorded as: l s,c,1 、l s,c, 2......l s,c,n , and use this distance as a parameter to calculate the grayscale weighted value of sc space. The calculation formula is:

[0163]

[0164] Among them, n is the number of all clusters with a fixed cluster center A s,c (s A ,c A ) The number of points in the same cluster; j A is the index value of the same cluster point, j A =1,2,3,...n; e represents a natural constant;

[0165] S3.5: Fix cluster center A s,c (s A ,c A ) and the same cluster points are converted from sc space back to xy space, and the grayscale weighted sum v is calculated e2,A , and the grayscale weighted sum v e2,A As a guide map S g Upper anchor point A s,c (s A ,c A ) pixel gray value, then the gray weighted sum v e2,A The calculation formula is:

[0166]

[0167] Among them, v e2,A For the guide map S g Upper anchor point A s,c (s A ,c A )’s pixel grayscale value; For the guide map S g Tile K covered by upper sliding window K A The pixel gray value;

[0168] S3.6: Use the method of steps S3.1 to S3.5 to traverse and process the entire guidance map S g , get the second estimation result image S e2 .

[0169] S4: Third estimate

[0170] According to the first estimation result image S e1 And the second estimation result image S e2, perform the third estimation, calculate the similarity coefficient, spatial transformation, clustering and weight of each block, use the variance of the first two estimated images as the parameter to calculate the weight, use the grayscale value of the corresponding position of the two images as the factor, and use the weighted sum of the weight and the factor as the grayscale value at the anchor point. Use this method to process each pixel on the image to obtain the third estimated image S e3 , which is the final result.

[0171] like Figure 5 As shown, the third estimation specifically includes the following steps:

[0172] S4.1: Based on the first estimation result image S e1 And the second estimation result image S e2 Calculate the residual image S r , the calculation formula is:

[0173] S r =||S e2 -S e1 || (14)

[0174] S4.2: Use sliding window K to traverse the residual image S r Including anchor tile K A All areas of the sliding window K are covered by the anchor block K. A The variance σ 2 and mean μ, respectively, as anchor point A μ,σ 2 The variance and mean at ;

[0175] S4.3: With mean μ as horizontal coordinate and variance σ as horizontal coordinate 2 As the vertical coordinate, the residual image S r Pixels are converted from xy space to μ-σ 2 space;

[0176] S4.4: μ-σ 2 The point clusters in the space are clustered. After clustering, μ-σ 2 The point clusters in space are divided into point clusters close to the anchor point (0, 0) and point clusters far from the anchor point (0, 0), that is, into point clusters with large image information differences and point clusters with small image information differences. The specific method of clustering processing in this embodiment is as follows:

[0177] Take the anchor point (0, 0) as μ-σ 2 The fixed cluster center of the spatial point cluster is randomly set μ-σ 2 The non-fixed cluster center R in space is calculated respectively for μ-σ 2Each point in the same cluster in space is separated from the fixed cluster center (0, 0) by the L2 distance of R, and each point is classified into the class to which the closest cluster center belongs. The fixed cluster center (0, 0) remains unchanged, and the non-fixed cluster centers are updated. Repeat the above process until the non-fixed cluster centers are no longer updated. At this point, μ-σ 2 Point clusters in space are divided into clusters close to the anchor point (0, 0) and clusters far from the anchor point (0, 0). Points in the cluster close to the anchor point (0, 0) belong to the same category as the anchor point (0, 0). The method for updating the non-fixed cluster center is to find the median of the horizontal and vertical coordinates of all points in the cluster that belong to the same category as the non-fixed cluster center, and use this as the horizontal and vertical coordinates of the new cluster center.

[0178] S4.5: Take point A in xy space as the anchor point to determine whether point A is in μ-σ. 2 The corresponding point P in space and μ-σ 2 Whether the point (0, 0) in space belongs to the same type, if the point P is in μ-σ 2 In space, it is close to μ-σ 2 If the point (0, 0) is in the cluster of points in space, then the point P is considered to be in the range of μ-σ. 2 The point (0, 0) in the space belongs to the same type. At this time, point A is placed in the first estimation result image S e1 And the second estimation result image S e2 The arithmetic mean of the grayscale values at the corresponding positions is taken as the third estimated value of point A; if point P is in μ-σ 2 If the point P is in a cluster far away from (0, 0) in space, it is considered that the point P does not belong to the same type as the anchor point (0, 0), and the process goes to step S4.6;

[0179] S4.6: Calculate the first estimation result image S using point A as the anchor point e1 And the second estimation result image S e2 Anchor patch K A Variance and Variance and Calculate the grayscale weighted values for each parameter, and the calculation formula is:

[0180]

[0181]

[0182] in, Represents the first estimation result image S e1 The weight value of the grayscale value at the corresponding position of anchor point A; Represents the second estimation result image S e2 The weight value of the grayscale value at the corresponding position of anchor point A.

[0183] The point is respectively in the first estimation result image S e1 And the second estimation result image S e2 The sum of the product of the pixel value in and the grayscale weighted value is taken as the grayscale value of anchor point A, that is, the third estimated value of point A.

[0184] S4.7: Process the residual image S using a sliding window K according to the method of steps S4.4 to S4.6. r , get the third estimation result image S e3 .

[0185] With the above-described preferred embodiments of the present invention as inspiration, and with reference to the above description, relevant personnel may make various changes and modifications without departing from the scope of the present invention. The technical scope of this invention is not limited to the contents of the specification, but must be determined according to the scope of the claims.

Claims

1. A noise suppression method based on spatial transformation and adaptive clustering, characterized by: The following steps are involved: S1: Image preprocessing Use sliding window K to perform Butterworth-geometric mean filtering on the original image S to obtain the guide image S g ; S2: First estimate For the guide map S g Two different similarity evaluation methods are used to obtain a similarity evaluation index, namely, using sliding window K to traverse the guide graph S g The anchor block K is included A All areas including, calculate the sliding window K traversal processing area and anchor block K A The cosine similarity coefficient u and the structural similarity coefficient v of the fixed cluster are used; each similarity evaluation index, namely the cosine similarity coefficient u and the structural similarity coefficient v, is used to perform spatial transformation for different dimensions, clustering is performed in the new space, and the distance between the point cluster close to the fixed cluster center and the cluster center is obtained as the similarity coefficient. In the original space, the grayscale weight of the point cluster close to the fixed cluster center and the weight of the point cluster close to the fixed cluster center are calculated using the similarity coefficient as a parameter, and the weighted sum of the grayscale values of each point in the point cluster where the fixed cluster center is located is obtained as the anchor point grayscale value, and the guide graph S is traversed and processed. g , get the first estimation result image S e1 ; S3: Second estimate For the guide map S g Two different similarity evaluation methods are used to obtain a similarity evaluation index respectively, that is, a sliding window K is used to traverse the guide graph S. g The anchor block K is included A All areas including, calculate the sliding window K traversal processing area and anchor block K A The normalized squared difference s and normalized correlation coefficient c; Using the similarity evaluation indexes, namely the normalized square difference s and the normalized correlation coefficient c, to perform spatial transformation for different dimensions, clustering is performed in the new space, and the distance between the point cluster close to the fixed cluster center and the cluster center is calculated as the similarity coefficient. In the original space, the grayscale weight of the point cluster close to the fixed cluster center is calculated using the similarity coefficient as a parameter, and the weighted sum of the grayscale values of each point in the point cluster where the fixed cluster center is located is calculated as the anchor point grayscale value. The guide graph S is traversed and processed. g , get the second estimation result image S e2 ; S4: Third estimate According to the first estimation result image S e1 And the second estimation result image S e2 , perform the third estimation and calculate the similarity coefficient, spatial transformation, clustering and weight of each block, including: According to the first estimation result image S e1 And the second estimation result image S e2 Calculate the residual image S r Then, the sliding window K is used to traverse the residual image S r Including anchor tile K A All areas of the sliding window K are covered by the anchor block K. A The variance σ 2 The variance and mean μ of the two previous estimated image residuals are used as parameters to calculate the weights; the grayscale values of the corresponding positions of the two images are used as factors, and the weighted sum of the weight and the factor is used as the grayscale value at the anchor point. This method is used to process each pixel on the image to obtain the third estimated image S e3 , which is the final result.

2. The noise suppression method based on spatial transformation and adaptive clustering according to claim 1, wherein: The image preprocessing in step S1 specifically includes: S1.1: Obtain the original image S and determine the size of the sliding window K to be k×k, where the minimum value of k is 3 and the maximum value is the length of the shortest side of the image S, in pix. S1.2: According to the size of the sliding window K, the original image S is filtered using the Butterworth filtering method to obtain the Butterworth filtered image S W , specifically: The anchor point corresponding to the center of the sliding window K is A, and its coordinates are (x A ,y A ), then any pixel point (x i ,y i The calculation formula of the L2 distance between ) and the anchor point is: Among them, d i is the pixel point (x i ,y i )L2 distance from the anchor point; Then any pixel point (x i ,y i ) weight ω in the area covered by the sliding window K i Expressed as: Among them, ω i is the weight corresponding to the pixel with index i; i and j are both pixel index values, where i = 1, 2, 3...k 2 , j=1,2,3...k 2 ;d j Any pixel point (x j ,y j )L2 distance from the anchor point; The weights of all pixels in the area covered by the sliding window K are obtained according to the pixel weight calculation formula (2); then, the Butterworth mean v at the anchor point in the area covered by the sliding window K is calculated based on the weights of all pixels and the grayscale values of the pixels. W ,but: Among them, v W is the Butterworth mean at the anchor point in the area covered by the sliding window K; v i is the grayscale value of the pixel indexed as i in the area covered by the sliding window K; i is the pixel index value, i=1,2,3...k 2 ; Using the Butterworth mean v W Substituting the grayscale value of the anchor point in the covered area of the sliding window K, the original image S is processed according to the processing process of formula (1) to formula (3) to obtain the Butterworth filtered image S W ; S1.3: According to the size of the sliding window K, the original image S is filtered using the geometric mean filtering method to obtain the geometric mean filtered image S G , specifically: Calculate the geometric mean v at the anchor point in the sliding window K covered area according to the gray value of the pixel G ,but: Among them, v i is the grayscale value of the pixel indexed by i in the area covered by the sliding window K; i is the pixel index value, i=1,2,3...k 2 ; Using the geometric mean v G Substituting the grayscale value of the anchor point in the covered area of the sliding window K, the original image S is processed according to the processing process of formula (4) to obtain the image S after geometric mean filtering G ; S1.4: Calculate the image S within the same sliding window K covered area W Gray value v of the middle anchor point W and the gray value v of the anchor point in the original image S S The L1 distance of image S G Gray value v of the middle anchor point G and the gray value v of the anchor point in the original image S S The L1 distance of the two L1 distances is then compared to obtain the weighted sum v of the anchor points within the sliding window K coverage range. A ,but: Take the pixel value of the anchor point with the closest L1 distance as the pixel value of the original image S in the area covered by the sliding window K, and traverse the original image S and image S according to the size of the sliding window K. W and image S G , and replace the anchor point gray value to obtain the guide map S g ; The order of S1.2 and S1.3 in the above steps can be adjusted.

3. The noise suppression method based on spatial transformation and adaptive clustering according to claim 1, wherein: The first estimation in step S2 specifically includes: S2.1: Using sliding window K to traverse the guide graph S g The anchor block K is included A All areas including, calculate the sliding window K traversal processing area and anchor block K A The cosine similarity coefficient u and structural similarity coefficient v are calculated and recorded. The calculation formula of the cosine similarity coefficient u is as follows: Among them, v Kik Indicates the grayscale value of the ikth pixel within the coverage range of the sliding box K, Indicates the grayscale value of the ikth pixel in the block where the anchor point is located, ik=1, 2, 3..., k 2 , the sliding window is square by default, and k is the side length of the sliding window; The calculation formula of the structural similarity coefficient v is as follows: c1=(k1L) 2 c2=(k2L) 2 Among them, μ K and Represents sliding window K and anchor block K respectively A The grayscale mean, c1, c2 are constants used to maintain stability, L is the dynamic range of pixel grayscale values, k1 = 0.01, k2 = 0.03, Represents the image and anchor block K within the sliding window K coverage range A The covariance of is the variance of the image within the range covered by the sliding window K, is the variance of the patch where the anchor point A is located; S2.2: With the cosine similarity coefficient u as the horizontal coordinate and the structural similarity coefficient v as the vertical coordinate, the guide graph S g Pixel points are converted from xy space to uv space; S2.3 performs clustering on the point clusters in the uv space and divides the point clusters in the uv space into points close to the anchor point A. u,v (u A ,v A ) and the point clusters far from the anchor point A u,v (u A ,v A ) point clusters; S2.4: Calculate the fixed cluster center A u,v (u A ,v A ) and the L2 distances of the same cluster points are recorded as: l u,v,1 、l u,v,2 ......l u,v,m , and use this distance as a parameter to calculate the xy space grayscale weighted value. The calculation formula is: Among them, m is the number of all fixed cluster centers A u,v (u A ,v A ) The number of points in the same cluster; i A is the index value of the cluster point, i A =1,2,3...,m; e represents a natural constant; S2.5: Then fix the cluster center A u,v (u A ,v A ) and the same cluster points are converted from uv space back to xy space, and the grayscale weighted sum v is calculated e1,A , and the grayscale weighted sum v e1,A As a guide map S g Upper anchor point A u,v (u A ,v A ) pixel gray value, then the gray weighted sum v e1,A The calculation formula is: Among them, v e1,A For the guide map S g Upper anchor point A u,v (u A ,v A )’s pixel grayscale value; For the guide map S g Tile K covered by upper sliding window K A The pixel gray value; S2.6: Use the method of steps S2.1 to S2.5 to traverse and process the entire guidance map S g , get the first estimation result image S e1 .

4. The noise suppression method based on spatial transformation and adaptive clustering according to claim 1, wherein: The second estimation in step S3 specifically includes: S3.1: Using sliding window K to traverse the guidance graph S g The anchor block K is included A All areas including, calculate the sliding window K traversal processing area and anchor block K A The normalized square difference s and normalized correlation coefficient c of are recorded, where The formula for calculating the normalized squared difference is: The formula for calculating the normalized correlation coefficient is: Among them, s(x,y) represents the guide graph S g The pixel point with coordinates (x, y) is in K A The normalized square difference calculation results in the area, Δx, Δy are respectively the anchor block K A and the tile S where the anchor point A of the guide map is located g,A The relative movement step length along the x and y directions, K A represents the anchor patch centered at coordinate (x, y), K A (Δx, Δy) represents the anchor patch K A The anchor block S of the guide image is moved relative to the anchor point in the x-axis direction and y-axis direction by Δx and Δy respectively within the coverage range. g,A Gray value on S g,A (Δx+x, Δy+y) represents the tile S where the anchor point A of the guide map is located g,A The gray value of the pixel is reached after moving with the step length Δx and Δy in the x and y directions with (x, y) as the core, c(x, y) represents the gray value of the pixel in the guide map S. g The pixel point with coordinates (x, y) is in K A Normalized correlation coefficient within the region; S3.2: With the normalized squared difference s as the horizontal axis and the normalized correlation coefficient c as the vertical axis, the bootstrap graph S g Pixel points are converted from xy space to sc space; S3.3: Cluster the point clusters in the sc space and divide the point clusters in the sc space into points close to the anchor point A s,c (s A ,c A ) and the point clusters far from the anchor point A s,c (s A ,c A ) point clusters; S3.4: Calculate the fixed cluster center A s,c (s A ,c A ) and the L2 distances of the same cluster points are recorded as: l s,c,1 、l s,c,2 ......l s,c,n , and use this distance as a parameter to calculate the grayscale weighted value of sc space. The calculation formula is: Among them, n is the number of all clusters with a fixed cluster center A s,c (s A ,c A ) The number of points in the same cluster; j A is the index value of the same cluster point, j A =1,2,3,...n; e represents a natural constant; S3.5: Fix cluster center A s,c (s A ,c A ) and the same cluster points are converted from sc space back to xy space, and the grayscale weighted sum v is calculated e2,A , and the grayscale weighted sum v e2,A As a guide map S g Upper anchor point A s,c (s A ,c A ) pixel gray value, then the gray weighted sum v e2,A The calculation formula is: Among them, v e2,A For the guide map S g Upper anchor point A s,c (s A ,c A )’s pixel grayscale value; For the guide map S g Tile K covered by upper sliding window K A The pixel gray value; S3.6: Use the method of steps S3.1 to S3.5 to traverse and process the entire guidance map S g , get the second estimation result image S e2 .

5. The noise suppression method based on spatial transformation and adaptive clustering according to claim 1, wherein: The third estimation in step S4 specifically includes: S4.1: Based on the first estimation result image S e1 And the second estimation result image S e2 Calculate the residual image S r , the calculation formula is: S r = || S e2 -S e1 || (14) S4.2: Use sliding window K to traverse the residual image S r Including anchor tile K A All areas of the sliding window K are covered by the anchor block K. A The variance σ 2 and mean μ, respectively, as anchor points The variance and mean at ; S4.3: With mean μ as horizontal coordinate and variance σ as horizontal coordinate 2 As the vertical coordinate, the residual image S r Pixels are converted from xy space to μ-σ 2 space; S4.4: μ-σ 2 The point clusters in the space are clustered. After clustering, μ-σ 2 The point clusters in space are divided into point clusters close to the anchor point (0, 0) and point clusters far away from the anchor point (0, 0); S4.5: Take point A in xy space as the anchor point to determine whether point A is in μ-σ. 2 The corresponding point P in space and μ-σ 2 Whether the anchor point (0, 0) in the space belongs to the same type, if the point P is in μ-σ 2 In space, it is close to μ-σ 2 In the point cluster of the anchor point (0, 0) in space, it is considered that the point P is related to μ-σ 2 The anchor point (0, 0) in the space belongs to the same type. At this time, point A is placed in the first estimated result image S e1 And the second estimation result image S e2 The arithmetic mean of the grayscale values at the corresponding positions is taken as the third estimated value of point A; if point P is in μ-σ 2 If the point P is in a cluster far away from the anchor point (0, 0) in space, it is considered that the point P does not belong to the same type as the anchor point (0, 0), and the process goes to step S4.6; S4.6: Calculate the first estimation result image S using point A as the anchor point e1 And the second estimation result image S e2 Anchor patch K A Variance and Variance and Calculate the grayscale weighted values for each parameter, and the calculation formula is: in, Represents the first estimation result image S e1 The weight value of the grayscale value at the corresponding position of anchor point A; Represents the second estimation result image S e2 The weight value of the grayscale value at the corresponding position of anchor point A; The anchor point A is placed in the first estimation result image S e1 And the second estimation result image S e2 The sum of the product of the pixel value and the grayscale weighted value in is taken as the grayscale value of the anchor point A. That is, the third estimated value of point A; S4.7: Process the residual image S using a sliding window K according to the method of steps S4.4 to S4.

6. r , get the third estimation result image S e3 .

6. The noise suppression method based on spatial transformation and adaptive clustering according to any one of claims 3 to 5, characterized in that: The clustering method is: First, determine the fixed cluster center of the point cluster in the space, randomly set the non-fixed cluster center in the space, calculate the L2 distance of each cluster point from the fixed cluster center and the non-fixed cluster center in the space, and classify each point into the class to which the cluster center with the shorter L2 distance belongs; then, keep the fixed cluster center fixed and update the non-fixed cluster center, and repeat the above process until the non-fixed cluster center is no longer updated; at this point, the point clusters in the space are divided into point clusters close to the fixed cluster center and point clusters far from the fixed cluster center, thus realizing the clustering of the point clusters in the space.

7. The noise suppression method based on spatial transformation and adaptive clustering according to claim 6, characterized in that: The updating method of the non-fixed cluster center is: finding the median of the horizontal coordinates and the median of the vertical coordinates of all points in the point cluster that belongs to the same category as the non-fixed cluster center, and taking them as the horizontal coordinate and vertical coordinate of the new cluster center of the point cluster respectively.

Citation Information

Patent Citations

  • Image segmentation method based on superpixel segmentation and EM / MPM processing

    CN106952271A

  • Data characteristic extraction method based on slice point cloud

    CN108805143A