A structure-preserving image smoothing algorithm with reweighted data items
By using the similarity weights between pixels in the global optimization algorithm to separate structural information and texture details, and redesign the weights of data items, the problem that existing algorithms are difficult to distinguish structure and texture is solved, and better image smoothing effect and edge preservation performance are achieved.
Patent Information
- Application Number
- CN202211387109.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-07
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2042-11-07
AI Technical Summary
The existing image smoothing algorithm based on global optimization is difficult to effectively distinguish structure information from texture noise when processing natural images, resulting in some weak structure information being discarded, while high-contrast texture information cannot be effectively removed.
By performing bilateral filtering on the input image, compute the similarity weights between pixel points, separate structural information and texture details, redesign the weights of data items, build a new global optimization objective function, and use similarity weights to preserve structural information and improve smoothing effect.
It achieves better image smoothing effect, retains the weak structure information of the original image, and effectively removes texture noise, improving the edge preservation performance of the algorithm.
Smart Images

Figure CN115829862B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a structure-preserving image smoothing algorithm for re-weighted data items. Background Art
[0002] In the information age, people often intuitively grasp the key information in images through vision. However, during the imaging and transmission process, an image is inevitably affected by various external factors, such as non-uniform lighting and noise, which significantly degrades the resulting image quality. Image smoothing aims to eliminate noise from contaminated images while preserving edge structure information. It is one of the most fundamental aspects of digital imaging technology research and the foundation of image processing. Existing image smoothing algorithms can be divided into two categories: those based on weighted average filtering and those based on global optimization modeling. Global optimization algorithms are more popular among researchers because they offer better performance than weighted average optimization algorithms in avoiding artifacts such as gradient reversal and halos.
[0003] The global optimization algorithm usually models the image smoothing task as a global optimization framework, which usually contains a data term and a regularization term, which can be generally expressed as E(u)=S(u,I)+λC(u). Among them, the data term S(u,I) is to ensure the structural similarity of the input / output images, while the regularization term C(u) is a penalty for the gradient of the output image, which controls the smoothness of the output image and contains prior knowledge of the output image. λ is the smoothing parameter for adjusting the image.
[0004] Farbman et al. used a weighted L2 regularization term to penalize the gradient of the output image and proposed a weighted least squares (WLS) smoothing algorithm, whose objective function is as follows:
[0005]
[0006] Where I represents the input image, u represents the output image, and it is assumed that the image size is m×n, the total number of pixels is N=m×n, λ is the smoothing parameter, p is the current pixel, I p and u p Respectively represent the pixel values of the corresponding input / output images, a x,p and a y,p is the weight of the gradient in the two directions. This algorithm has better performance than the local weighted algorithm in detail processing and multi-scale image tones. It can effectively suppress gradient reversal artifacts and halo phenomena and is more robust in image smoothing algorithms.
[0007] Xu et al. used the L0 norm to penalize the gradient of the output image, which can clearly and effectively preserve the edge structure of the image. The objective function is as follows:
[0008]
[0009] Here, C(u) represents the number of pixels in the image with non-zero gradients. It globally controls how many non-zero gradients are generated and approximates significant structures in a sparsely controlled manner. Unlike other edge-preserving smoothing methods, this method can globally locate important edge information while ignoring some local features. However, this method often smooths a small number of important edges with small gradients and has difficulty achieving the desired smoothing effect on natural images with texture noise.
[0010] Sai et al. used the weighted L1 norm to constrain the output image gradient, and their objective function is as follows:
[0011]
[0012] Among them, p is the current pixel point, q is the neighboring pixel point of p, is a weight between the central pixel and its neighboring pixels. This method can usually obtain sparser structural features and produce better smoothing effects, but it cannot remove some texture information with strong contrast in natural images.
[0013] The above algorithm relies solely on penalizing the image's gradient information to achieve smoothing. Given the complex structure of natural images, the data item retains all structural information. High-contrast texture and noise are treated as structure during the global optimization process, while weak structural information is discarded to ensure smoothing quality across the entire image. The inventors of this application discovered through research that existing algorithms typically improve upon the penalty term in the function. However, leveraging the inter-pixel information in the function's data item to enhance smoothing is also a crucial issue. Summary of the Invention
[0014] In view of the technical problem that existing image smoothing algorithms based on global optimization all improve the penalty terms in the function, but do not utilize the inter-pixel information in the function data terms to enhance the smoothing effect, the present invention provides a structure-preserving image smoothing algorithm with reweighted data terms.
[0015] In order to solve the above technical problems, the present invention adopts the following technical solutions:
[0016] A structure-preserving image smoothing algorithm for reweighted data items comprises the following steps:
[0017] S1, perform bilateral filtering on the input image I to obtain the pixel value of the corresponding pixel after bilateral filtering By pixel value To calculate the similarity weight w between pixels p , realize image preprocessing;
[0018] S2, according to the similarity weight w p The characteristics between structural information and non-structural information are reflected in the existing global optimization algorithm. The original data items are divided into two to form new data items. One of the new data items is used to retain the structural information of the image, and the other is used to smooth the texture details in the image. The weights of the two items are set separately.
[0019] S3. Replace the original data item in the existing global optimization algorithm with the new data item, obtain a new objective function from the global optimization algorithm, optimize and solve the new objective function, and obtain the final filtered output image u.
[0020] Furthermore, in step S1, the pixel value after bilateral filtering is calculated by the following formula:
[0021]
[0022] Among them, p represents the current pixel, q is the neighboring pixel of p, ω p is the normalization factor, Gs(||pq||) represents the Gaussian function of spatial information, Gr(|I p -I q |) represents the Gaussian function of color information, I p Represents the pixel value of the original image at point p, I q Represents the neighborhood pixel value of point p.
[0023] Furthermore, in step S1, the similarity weight w between pixels is calculated by the following formula: p :
[0024]
[0025] Among them, σ r Indicates the standard deviation of the range.
[0026] Furthermore, the new data item in step S2 is represented by the following formula:
[0027]
[0028] Among them, u p Represents the pixel value of the output image at point p, I'=h*I, h represents a general image smoothing filter, γ p Indicates that the current pixel p is the weight of the structure point, ψ pIndicates that the current pixel p is the weight of a non-structural point. For the new data term after re-weighting, the first term Still achieving structural information fidelity, the second It can improve the smoothing effect of the algorithm and set ψ p =w p .
[0029] Furthermore, the γ p and ψ p It is presented as a linear relationship in the function γ p =1-ψ p , that is, the more similar the current pixel point p is to the neighboring pixel point q, the p The larger the value of γ is, the more dissimilar the current pixel point p is to the neighboring pixel point q. p The larger the value of .
[0030] Furthermore, the ψ p Use Ψ to represent the corresponding weight matrix, Ψ=diag(ψ1,ψ2,...,ψ N ), where diag(·) represents a diagonal matrix; the γ p The corresponding weight matrix is represented by Γ, Γ = E-Ψ, and E is the unit matrix.
[0031] Furthermore, step S3 specifically includes the following steps:
[0032] First, replace the data item in the original L2 gradient minimization objective function with the new data item proposed in step S2, and rewrite the objective function of the L2 regularized image smoothing algorithm based on the reweighted data item as follows: Among them, λ is the smoothing parameter for adjusting the image, a x,p is the weight of the gradient in the x direction, is the gradient in the x direction, a y,p is the weight of the gradient in the y direction, is the gradient in the y direction;
[0033] Then rewrite the objective function in a matrix way: Among them, u T is the transposed matrix of the output image u, A x and A y is a diagonal matrix, D x and D y is a discrete differential operator, and corresponds to D x and D y The transposed matrix of
[0034] Then, we can differentiate u in the rewritten objective function and set the derivative to zero to obtain the linear system (E+λL)u=(ΓI+ΨI'); where, L is a five-point inhomogeneous Laplacian matrix;
[0035] Finally, the optimal solution is obtained by solving the linear system, and the final filtered output image u is obtained.
[0036] Compared with the prior art, the structure-preserving image smoothing algorithm for reweighted data items provided by the present invention has the following advantages:
[0037] 1. This invention fully utilizes the correlation between pixels to determine the possibility that the pixel point is structural information. It splits the original data item into two items: one to ensure the structural similarity of the input / output images, and the other to improve the local smoothing quality of the output image. Two Gaussian functions are used to calculate the spatial information and color information respectively to design their weights, thereby avoiding the data item from preserving all information, and achieving the preservation of structural information and the smoothing of non-structural information.
[0038] 2. Based on the existing global optimization algorithm, a new global optimization algorithm is proposed. It can produce better smoothing effects than the original algorithm and retain the weak structural information of the original image. The new algorithm no longer relies solely on the smoothing effect of the penalty term and is more sensitive to texture noise, further ensuring the algorithm's edge-preserving smoothing performance.
[0039] 3. The new data item proposed in the present invention can be applied to the existing global optimization algorithm and can improve the smoothing performance of the original algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 It is a flow chart of the structure-preserving image smoothing algorithm for reweighted data items provided by the present invention.
[0041] Figure 2 This is a performance diagram of smoothing and edge preservation of only data items in the algorithm provided by the present invention.
[0042] Figure 3 yes Figure 2 An enlarged view of the boxed area in the rendering.
[0043] Figure 4 This is a diagram showing the smoothing result of a natural image using the algorithm provided by the present invention.
[0044] Figure 5 It corresponds to Figure 4 Zoomed-in display of the smoothing result.
[0045] Figure 6This is a diagram showing the smoothing result of the algorithm provided by the present invention on an image with high-contrast texture.
[0046] Figure 7 It corresponds to Figure 6 Zoomed-in display of the smoothing result.
[0047] Figure 8 This is the PSNR indicator result of each algorithm provided by the present invention running on the BSD300 dataset.
[0048] Figure 9 These are the SSIM index results of the various algorithms provided by the present invention running on the BSD300 dataset.
[0049] exist Figures 4 to 7 In the figure, (a) is the original image, (b) to (f) are the smoothing results corresponding to the RTV, tree filter (TF), bilateral texture filter (BTF), static / dynamic guided filter (SD), and iterative global optimization least squares (G-smooth) algorithms, respectively; (g), (i), and (k) are the smoothing results corresponding to the WLS, L0, and L1 algorithms, respectively; and (h), (j), and (l) are the smoothing results after improvement of the WLS, L0, and L1 algorithms, respectively. DETAILED DESCRIPTION
[0050] In order to make the technical means, creative features, objectives and effects achieved by the present invention easier to understand, the present invention is further described below with reference to specific illustrations.
[0051] Please refer to Figure 1 As shown, the present invention provides a structure-preserving image smoothing algorithm for reweighted data items, comprising the following steps:
[0052] S1, perform bilateral filtering on the input image I to obtain the pixel value of the corresponding pixel after bilateral filtering By pixel value To calculate the similarity weight w between pixels p , realize image preprocessing;
[0053] S2, according to the similarity weight w p The characteristics between structural information and non-structural information are reflected in the existing global optimization algorithm. The original data items are divided into two to form new data items. One of the new data items is used to retain the structural information of the image, and the other is used to smooth the texture details in the image. The weights of the two items are set separately.
[0054] S3. Replace the original data item in the existing global optimization algorithm with the new data item, obtain a new objective function from the global optimization algorithm, optimize and solve the new objective function, and obtain the final filtered output image u.
[0055] As a specific embodiment, the pixel value after bilateral filtering is calculated in step S1 by the following formula:
[0056]
[0057] Among them, p represents the current pixel, q is the neighboring pixel of p, ω p is the normalization factor, Gs(||pq||) represents the Gaussian function of spatial information, Gr(|I p -I q |) represents the Gaussian function of color information, I p Represents the pixel value of the original image at point p, I q Represents the neighborhood pixel value of point p.
[0058] As a specific embodiment, in step S1, the similarity weight w between pixels is calculated by the following formula: p :
[0059]
[0060] Among them, σ r Indicates the standard deviation of the range. By analyzing w p The value of w p When the value of is small, it indicates that the current pixel is very different from the neighboring pixels. At this time, the pixel is likely to be located in the structural area, and the output image should be close to the input image. The data item realizes the fidelity of the image structure information. When w p When the value of is large, it indicates that the current pixel has a small difference with the neighboring pixels. At this time, the pixel is likely to be located in the non-structured area, making the output image close to the filtered image. The data item realizes the texture details and noise information in the smoothed image.
[0061] As a specific embodiment, the new data item in step S2 is represented by the following formula:
[0062]
[0063] Among them, u p Represents the pixel value of the output image at point p, I'=h*I, h represents a general image smoothing filter, such as Gaussian filter or mean filter, etc., γ p Indicates the weight of the current pixel p as a structural point, ψ p Indicates that the current pixel p is the weight of a non-structural point. For the new data term (6) after re-weighting, the first term Still achieving structural information fidelity, the second Can improve the smoothing effect of the algorithm; by analyzing the similarity weight w calculated in step S1 pThe characteristics of p =w p .
[0064] As a specific embodiment, the γ p and ψ p The function presents a linear relationship: the more similar the current pixel is to the neighboring pixel, the p The larger the value of γ is, the more dissimilar the current pixel is to the neighboring pixel. p The larger the value of , the linear relationship can be set as: p =1-ψ p .
[0065] As a specific embodiment, in order to facilitate the subsequent algorithm solution, the ψ p Use Ψ to represent the corresponding weight matrix, Ψ=diag(ψ1,ψ2,...,ψ N ), where diag(·) represents a diagonal matrix; similarly, the γ p The corresponding weight matrix is represented by Γ, Γ = E-Ψ, and E is the unit matrix.
[0066] In fact, when Γ=E, Ψ=0, the objective function will degenerate into the original global optimization algorithm. If the new data item is applied to an existing algorithm, the original global optimization algorithm can be regarded as a special case of the improved algorithm.
[0067] As a specific implementation, the optimization and solution process of the new objective function in step S3 will be described in detail below using three specific global optimization algorithms.
[0068] As a specific embodiment, the global optimization algorithm is a reweighted L2 regularized image smoothing algorithm, and step S3 specifically includes the following steps:
[0069] First, replace the data item in the original L2 gradient minimization objective function with the new data item proposed in step S2, and rewrite the objective function of the L2 regularized image smoothing algorithm based on the reweighted data item as follows:
[0070]
[0071] Among them, λ is the smoothing parameter for adjusting the image, a x,p is the weight of the gradient in the x direction, is the gradient in the x direction, a y,p is the weight of the gradient in the y direction, is the gradient in the y direction;
[0072] Then, we rewrite the objective function (Equation (7)) in a matrix format to obtain:
[0073]
[0074] Among them, u T is the transposed matrix of the output image u, A x and A y is a diagonal matrix, D x and D y is a discrete differential operator, and corresponds to D x and D y The transposed matrix of
[0075] Then, by taking the derivative of the rewritten objective function, i.e., u in equation (8), and setting the derivative to zero, we can obtain the following linear system:
[0076] (E+λL)u=(ΓI+ΨI') Formula (9)
[0077] in, L is a five-point inhomogeneous Laplacian matrix;
[0078] Finally, the optimal solution is obtained by solving the linear system, that is, formula (9), and the final filtered output image u is obtained. The specific process is shown in Algorithm 1 below:
[0079]
[0080] As another specific embodiment, the global optimization algorithm is a reweighted L0 regularized image smoothing algorithm, and step S3 specifically includes the following steps:
[0081] First, replace the data item in the objective function based on L0 gradient minimization with the new data item proposed in step S2, and rewrite the objective function of the reweighted L0 regularized image smoothing algorithm as follows:
[0082]
[0083] The alternating optimization strategy of semi-quadratic splitting is used to solve Equation (10), and the auxiliary variable m is introduced. p and v p and and Correspondingly, the objective function of the reweighted L0 regularized image smoothing algorithm is rewritten as:
[0084]
[0085] in, represents the partial derivative in the x direction, represents the partial derivative in the y direction, β is used to adjust the similarity between the introduced auxiliary variables and the corresponding gradients. When β is large enough, Equation (11) is closer to Equation (10). In the process of solving them, one set of variables is fixed as a constant using the values obtained from the previous iteration, and then the solution of the other set of variables is obtained.
[0086] Solve the minimization of the subproblem corresponding to u:
[0087]
[0088] Thus, a new quadratic function is obtained, and the global minimum is found by iterative method. The derivative operator is diagonalized after the fast Fourier transform (FFT) to improve the solution speed and the value of u is obtained:
[0089]
[0090] Among them, F represents the FFT operator, F() * represents the complex conjugate, and F(1) is the Fourier transform of the delta function.
[0091] Solve the minimization of the subproblem corresponding to (m,v):
[0092]
[0093] Here, C(m,v) returns the number of |m|+|v| that is not equal to zero. Similarly, after decomposing equation (14), we get:
[0094]
[0095] Among them, when |m|+|v|≠0, H(|m p |+|v p |)=1, then for each pixel point p, it can be written separately from equation (15):
[0096]
[0097] Among them, make (m p ,v p ) The following conditions must be met to enable Reached minimum value.
[0098]
[0099] The specific process is shown in Algorithm 2 below:
[0100]
[0101] As another specific embodiment, the global optimization algorithm is a reweighted L1 regularized image smoothing algorithm, and step S3 specifically includes the following steps:
[0102] First, replace the data item in the objective function based on L1 gradient minimization with the new data item proposed in step S2, and rewrite the objective function of the reweighted L1 regularized image smoothing algorithm as follows:
[0103]
[0104] in, is the weight of the current pixel point p and its neighboring pixel point q.
[0105] Assume that the number of pixels in the image is N, then for E l There is m l adjacent pixel pairs. Let u=[u r ,u g ,u b ], u is an N×3 matrix. Similarly, let M={M pq}, M is an m l ×N matrix. When pixel points i and j form a pixel pair of the kth adjacent pixel point, then Then you can put E l Rewritten into the following matrix vector form:
[0106]
[0107] By introducing intermediate variables b and d, the objective function can be expressed as follows using the augmented Lagrange multiplier method:
[0108]
[0109] Solve the minimization of the subproblem corresponding to the u problem:
[0110]
[0111] Rewriting Equation (20) into matrix form yields Equation (21). Further taking the derivative of u in Equation (21) and setting the derivative to zero, we can solve for u k , k represents the number of iteration cycles.
[0112] (E+L)u k =ΓI+ΨI'+βL(d k -b k ) Formula (22)
[0113] Solve the minimization of the subproblem corresponding to problem b:
[0114]
[0115] Thus, a new quadratic function is obtained. Taking the derivative of b in equation (23) and setting the derivative to zero, we can solve b k+1 .
[0116] b k+1 =d k -Lu k Formula (24)
[0117] Solve the minimization of the subproblem corresponding to the d problem:
[0118]
[0119] Thus, a new objective function is obtained, and the approximate solution of d is obtained by solving the subgradient of Equation (25).
[0120]
[0121] Where a=-Lu k -b k ,
[0122] The specific process is shown in Algorithm 3 below:
[0123]
[0124] For the original objective function, when the smoothing parameter is set to a small value, only the data term is effective, and the value of the output image will be close to the input image. For the new data term, even after setting the smoothing parameter λ to 0, the objective function E(u) is optimized and the following solution can be obtained:
[0125] u=ΓI+ΨI' Formula (27)
[0126] Among them, when the pixel point is in the edge area, the value of Γ is large and the structural information is preserved; when the pixel point is in the flat area, the value of Ψ is large and the texture information is smoothed. The improved algorithm can not only smooth the texture noise but also preserve the weak structural information of the image. Through the above analysis, it can be seen that even when the smoothing parameter λ is 0, the proposed data item can not only preserve the structural information but also has a smoothing effect. The specific effect is as follows Figure 2 and Figure 3 shown.
[0127] Figure 4 、 Figure 5 、 Figure 6 and Figure 7 In the results, the first row shows the smoothing results of the original image and other algorithms, and the second row shows the smoothing results of the original WLS, L0 and L1 methods and their corresponding improved algorithms. Figure 4 The filtering results of a natural image with high contrast information obtained by each algorithm are shown. Figure 5 yes Figure 4 A magnified image of the corresponding area in . The experimental results show that the RTV and BTF algorithms are effective for removing texture, while the TF method exhibits significant leakage at the edges of structures. Both from a global and local perspective, the three improved methods achieve superior smoothing results compared to the original algorithm, essentially filtering out high-contrast textures while still preserving key structural information. The improved L0 method, in particular, performs particularly well across all smoothing results. Figure 6 The results of filtering a natural image with strong textures obtained by various algorithms are shown, while ensuring that the main structure in the middle part is not blurred. Figure 7 yes Figure 6 From the experiment, we can see that the existing algorithms are difficult to filter out strong texture information completely. Among them, RTV, TF, BTF and G-smooth methods perform well. However, overall, the smoothing results are not very ideal. Figure 6 and Figure 7 As can be seen from the figure, the three improved algorithms not only retain the main structural information in the middle of the image, but also smooth out the strong texture information. It can be seen that the three improved methods can obtain better edge-preserving smoothing results in various natural images.
[0128] Figure 8 It is the PSNR indicator result of each algorithm running on the BSD300 dataset. Figure 9 is the SSIM indicator result of each algorithm running on the BSD300 dataset. Figure 8 and Figure 9 It can be seen that no matter the quality after filtering or the structural similarity, the smoothing results obtained by replacing the original data items in the three existing algorithms with the new data items proposed by the present invention have been improved to a certain extent, and also have certain advantages over other algorithms.
[0129] Compared with the prior art, the structure-preserving image smoothing algorithm for reweighted data items provided by the present invention has the following advantages:
[0130] 1. This invention fully utilizes the correlation between pixels to determine the possibility that the pixel point is structural information. It splits the original data item into two items: one to ensure the structural similarity of the input / output images, and the other to improve the local smoothing quality of the output image. Two Gaussian functions are used to calculate the spatial information and color information respectively to design their weights, thereby avoiding the data item from preserving all information, and achieving the preservation of structural information and the smoothing of non-structural information.
[0131] 2. Based on the existing global optimization algorithm, a new global optimization algorithm is proposed. It can produce better smoothing effects than the original algorithm and retain the weak structural information of the original image. The new algorithm no longer relies solely on the smoothing effect of the penalty term and is more sensitive to texture noise, further ensuring the algorithm's edge-preserving smoothing performance.
[0132] 3. The new data item proposed in the present invention can be applied to the existing global optimization algorithm and can improve the smoothing performance of the original algorithm.
[0133] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not limiting. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the purpose and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A structure-preserving image smoothing algorithm for reweighted data items, characterized in that The following steps are involved: S1, perform bilateral filtering on the input image I to obtain the pixel value of the corresponding pixel after bilateral filtering By pixel value To calculate the similarity weight w between pixels p , realize image preprocessing; S2, according to the similarity weight w p The characteristics between structural information and non-structural information are reflected in the existing global optimization algorithm. The original data items are divided into two to form new data items. One of the new data items is used to retain the structural information of the image, and the other is used to smooth the texture details in the image. The weights of the two items are set separately. S3. Replace the original data item in the existing global optimization algorithm with the new data item, obtain a new objective function through the global optimization algorithm, optimize and solve the new objective function, and obtain the final filtered output image u; Specifically, the new data item in step S2 is represented by the following formula: Among them, u p Represents the pixel value of the output image at point p, I p Represents the pixel value of the original image at point p, I'=h*I, h represents a general image smoothing filter, γ p Indicates the weight of the current pixel p as a structural point, ψ p Indicates that the current pixel p is the weight of a non-structural point. For the new data term after re-weighting, the first term Still achieving structural information fidelity, the second It can improve the smoothing effect of the algorithm and set ψ p =w p , w p Represents the similarity weight between pixels; The step S3 specifically includes the following steps: First, replace the data item in the original L2 gradient minimization objective function with the new data item proposed in step S2, and rewrite the objective function of the L2 regularized image smoothing algorithm based on the reweighted data item as follows: Among them, λ is the smoothing parameter for adjusting the image, a x,p is the weight of the gradient in the x direction, is the gradient in the x direction, a y,p is the weight of the gradient in the y direction, is the gradient in the y direction; Then rewrite the objective function in a matrix way: Where Г represents γ p The corresponding weight matrix, Ψ represents Ψ p The corresponding weight matrix, u T is the transposed matrix of the output image u, A x and A y is a diagonal matrix, D x and D y is a discrete differential operator, and corresponds to D x and D y The transposed matrix of Then, we can differentiate u in the rewritten objective function and set the derivative to zero to obtain the linear system (E+λL)u=(ΓI+ΨI'); where, L is a five-point inhomogeneous Laplacian matrix; Finally, the optimal solution is obtained by solving the linear system, and the final filtered output image u is obtained.
2. The structure-preserving image smoothing algorithm for reweighted data items according to claim 1, characterized in that In step S1, the pixel value after bilateral filtering is calculated by the following formula: Among them, p represents the current pixel, q is the neighboring pixel of p, ω p is the normalization factor, Gs(||pq||) represents the Gaussian function of spatial information, Gr(|I p -I q |) represents the Gaussian function of color information, I p Represents the pixel value of the original image at point p, I q Represents the neighborhood pixel value of point p.
3. The structure-preserving image smoothing algorithm for reweighted data items according to claim 2, characterized in that In step S1, the similarity weight w between pixels is calculated by the following formula: p : Among them, σ r Indicates the standard deviation of the range.
4. The structure-preserving image smoothing algorithm for reweighted data items according to claim 1, characterized in that The gamma p and ψ p It is presented as a linear relationship in the function γ p =1-ψ p , that is, the more similar the current pixel point p is to the neighboring pixel point q, the p The larger the value of γ is, the more dissimilar the current pixel point p is to the neighboring pixel point q. p The larger the value of .
5. The structure-preserving image smoothing algorithm for reweighted data items according to claim 4, characterized in that The ψ p Use Ψ to represent the corresponding weight matrix, Ψ=diag(ψ1,ψ2,...,ψ N ), where diag(·) represents a diagonal matrix; the γ p The corresponding weight matrix is represented by Γ, Γ = E-Ψ, and E is the unit matrix.