Subgradient optimization-based frequency domain image denoising method, device, medium and product

By employing a subgradient-optimized frequency domain image denoising method, and utilizing structural similarity index and dynamic step size adjustment, a target two-dimensional filter is designed. This solves the problem that traditional methods struggle to balance denoising performance and image quality in complex images, achieving efficient image denoising and detail preservation.

CN120198319BActive Publication Date: 2025-11-25DIANGUANG EXPLOSION PROTECTION TECH CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510269910.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-07
Publication Date
2025-11-25
Estimated Expiration
2045-03-07

AI Technical Summary

Technical Problem

Traditional image denoising methods struggle to balance denoising effectiveness with image quality when dealing with images containing complex textures and edge information, especially at high noise levels, which can easily lead to blurred and distorted image details.

Method used

A frequency domain image denoising method based on subgradient optimization is adopted. By initializing two-dimensional frequency domain amplitude sample values, structural similarity index prediction values, and a subgradient algorithm with dynamic step size adjustment, the frequency domain sampling points are optimized, a target two-dimensional filter is designed, and image denoising is performed.

Benefits of technology

It improves filter design efficiency, enhances algorithm convergence speed and stability, improves image denoising quality, effectively preserves image details and structural information, and achieves high-quality image denoising results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120198319B_ABST
    Figure CN120198319B_ABST
Patent Text Reader

Abstract

The application discloses a frequency domain image denoising method and device based on sub-gradient optimization, a medium and a product, and relates to the field of image data processing. The method comprises the following steps: initializing a frequency domain amplitude sample value according to the passband and stopband cutoff frequency of a two-dimensional low-pass filter to obtain an initial frequency domain amplitude sample value; converting the initial frequency domain amplitude sample value into a time domain coefficient matrix, and obtaining a current structural similarity index value after convolution processing of the time domain coefficient matrix and a noise image; determining an estimated value based on the current and historical structural similarity index values, and adjusting the iteration step of a sub-gradient algorithm according to the current value, the estimated value and a gradient; iteratively updating and optimizing the frequency domain amplitude sample value according to the gradient and a dynamic step; converting the optimized value into a time domain coefficient matrix to obtain a target two-dimensional filter; and performing spatial convolution processing on the noise image through the target filter to realize image denoising. The application optimizes frequency domain sampling points through a sub-gradient algorithm, improves the filter design efficiency, and ensures the denoising effect and image quality.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image processing, and particularly relates to a frequency domain image denoising method, device, medium and product based on sub-gradient optimization. BACKGROUND

[0002] Traditional image denoising methods mainly rely on spatial domain filters such as mean filtering and median filtering, which can remove noise to some extent, but for complex noise types and high noise level images, the effect is often poor, and image details are easily blurred and distorted.

[0003] A two-dimensional FIR (Finite Impulse Response) filter can accurately identify and separate noise frequency components and image useful information frequency components by performing frequency domain analysis on image signals, then suppress noise in the frequency domain, and finally restore the filtered signal to the spatial domain through inverse transformation, thereby realizing image denoising.

[0004] However, the traditional two-dimensional FIR filter design method has certain limitations in the frequency domain sampling and optimization process, and the performance of the filter is difficult to achieve optimality, especially when processing images with complex textures and edge information, the balance between denoising effect and image quality is difficult to consider. SUMMARY

[0005] In view of the above technical problems and defects, the purpose of the present application is to provide a frequency domain image denoising method, device, medium and product based on sub-gradient optimization, which optimizes the frequency domain sampling points through a sub-gradient algorithm, improves the filter design efficiency, and effectively ensures the denoising effect and image quality.

[0006] To achieve the above object, in a first aspect, the application provides a frequency domain image denoising method based on subgradient optimization, comprising: initializing two-dimensional frequency domain amplitude sample values according to a passband cutoff frequency and a stopband cutoff frequency of a two-dimensional low-pass filter to obtain initial frequency domain amplitude sample values; converting the initial frequency domain amplitude sample values into a time domain coefficient matrix through inverse discrete Fourier transform; performing convolution processing on the time domain coefficient matrix and a noise image to obtain a current structural similarity index value; determining a structural similarity index estimate value based on the current structural similarity index value and a historical structural similarity index value; adjusting an iteration step length of a subgradient algorithm according to the current structural similarity index, the structural similarity index estimate value and a two-dimensional frequency domain amplitude sample value gradient to obtain a dynamic step length, the two-dimensional frequency domain amplitude sample value gradient being calculated according to the current structural similarity index value; performing iterative updating on the two-dimensional frequency domain amplitude sample values according to the two-dimensional frequency domain amplitude sample value gradient and the dynamic step length to obtain frequency domain amplitude sample optimization values; performing time domain coefficient matrix conversion processing on the frequency domain amplitude sample optimization values to obtain a target two-dimensional filter; and performing spatial convolution processing on the noise image through the target two-dimensional filter to perform image denoising.

[0007] The application can provide a reasonable starting point for filter design by initializing two-dimensional frequency domain amplitude sample values according to a passband cutoff frequency and a stopband cutoff frequency of a two-dimensional low-pass filter, so that the initial state is closer to an optimal solution. The initial frequency domain amplitude sample values are converted into a time domain coefficient matrix, and convolution processing is performed on the time domain coefficient matrix and a noise image to obtain a current structural similarity index value, so that the denoising performance of the filter in the current state can be effectively evaluated. The determination of an estimate value based on current and historical structural similarity index values and the adjustment of an iteration step length of a subgradient algorithm according to these values can make the algorithm more flexible to adapt to changes in filter performance during iteration, accelerate the convergence speed and improve the stability. The frequency domain amplitude sample values are iteratively updated, and a target two-dimensional filter is finally obtained. The subgradient algorithm with a dynamic step length is used for a relatively simple frequency sampling design method, which improves the filter design efficiency while maintaining the simplicity of the algorithm, realizes efficient denoising processing of the noise image, improves the clarity and quality of the image, retains important details and structural information of the image, takes into account the denoising effect and image quality, and meets the demand for high-quality image denoising.

[0008] Optionally, in some embodiments of the first aspect, initializing two-dimensional frequency domain amplitude sample values according to a passband cutoff frequency and a stopband cutoff frequency of a two-dimensional low-pass filter to obtain initial frequency domain amplitude sample values comprises:

[0009] The initial frequency domain amplitude sample values are defined based on an initial amplitude definition function, and the initial amplitude definition function comprises:

[0010]

[0011] wherein H ∧ represents the initial frequency domain amplitude sample value corresponding to the two-dimensional matrix, specifically the upper right corner part of the matrix H, is an independent sample value to be optimized, and the matrix H represents the two-dimensional frequency domain amplitude sample value; ω1 and ω2 are frequency values of the discrete sample points taken in the frequency domain space, ω p is the passband cutoff frequency, and ω s is the stopband cutoff frequency.

[0012] The technical scheme of the above embodiment sets the initial frequency domain amplitude sample value based on the initial amplitude definition function, which can more accurately initialize the process according to the passband and stopband cutoff frequencies of the filter. This method fully utilizes the frequency characteristics of the filter, so that the initial frequency domain amplitude sample value is closer to the actual demand, thereby providing a better starting point for the subsequent optimization process. Compared with the traditional random initialization method, the present application can significantly improve the efficiency and accuracy of filter design, reduce the number of iterations in the optimization process, speed up the convergence speed of the algorithm, and ultimately achieve higher quality image denoising effect.

[0013] Optionally, in some embodiments of the first aspect, the two-dimensional frequency domain amplitude sample value gradient is calculated according to the current structural similarity index value, including: calculating the two-dimensional frequency domain amplitude sample value gradient through a preset frequency domain sample gradient formula, and the frequency domain sample gradient formula includes:

[0014]

[0015] wherein ∇ x is the two-dimensional frequency domain amplitude sample value gradient, x is the one-dimensional flattening vector corresponding to H ∧ , Δx represents the perturbation, P represents the noisy image, and O represents the noise-free image; and SSIM represents the structural similarity index.

[0016] The technical scheme of the above embodiment calculates the two-dimensional frequency domain amplitude sample value gradient through the preset frequency domain sample gradient formula, which can accurately reflect the trend of the current structural similarity index value. This method calculates the gradient based on the current structural similarity index value and uses the perturbation to calculate the gradient, which can more sensitively capture the changes in filter performance. Compared with the traditional gradient calculation method, the convergence speed of the algorithm is improved, the design efficiency of the filter is improved, the details and structural information of the image can be better preserved, and the quality of image denoising is improved.

[0017] Optionally, in some embodiments of the first aspect, the step of adjusting the iteration step size of the subgradient algorithm according to the current structural similarity index, the structural similarity index estimate and the gradient of the two-dimensional frequency domain amplitude sample values to obtain a dynamic step size comprises: calculating the dynamic step size by a preset dynamic step size adjustment formula, the dynamic step size adjustment formula comprising:

[0018]

[0019] wherein S k is the dynamic step size, k represents the iteration number in the subgradient algorithm, represents the structural similarity index estimate, x k represents a one-dimensional flattened vector of x at the kth iteration, represents the x k corresponding to the current structural similarity index, is the x k corresponding to the gradient of the two-dimensional frequency domain amplitude sample values.

[0020] By calculating the dynamic step size by a preset dynamic step size adjustment formula, the iteration step size of the subgradient algorithm can be adaptively adjusted according to the current structural similarity index, the structural similarity index estimate and the gradient of the two-dimensional frequency domain amplitude sample values. This method can dynamically adjust the step size according to the actual situation in the optimization process, avoiding the problem of slow or unstable convergence caused by fixed step size. Compared with the traditional fixed step size method, this method can significantly improve the convergence speed and stability of the algorithm, making the filter reach the optimal state faster, thereby achieving more efficient image denoising effect.

[0021] Optionally, in some embodiments of the first aspect, is obtained from the optimal structural similarity index estimate in the history record, and the estimation method based on the historical optimal structural similarity index comprises: wherein, is the historical optimal structural similarity index, θ k is the adjustment parameter at the kth iteration, used to increase the target expectation.

[0022] By determining the structural similarity index estimate by the estimation method based on the historical optimal structural similarity index, the performance improvement trend of the filter can be more accurately reflected. This method dynamically adjusts the estimate value by using the optimal structural similarity index in the history record and combining the adjustment parameter. Compared with the traditional fixed estimate value method, this method can better adapt to changes in the optimization process and provide more reasonable estimate value, thereby guiding the optimization algorithm to more effectively perform iteration update. This not only improves the convergence speed of the algorithm, but also better preserves the details and structural information of the image, improving the quality of image denoising.

[0023] Optionally, in some embodiments of the first aspect, the calculation formula of θ k includes:

[0024]

[0025] wherein θ k+1 is the adjustment parameter at the k+1th iteration, λ is an adjustment parameter greater than or equal to 1, β is an adjustment parameter less than 1, is a positive parameter, represents the structural similarity index at the k+1th iteration, represents the historical optimal structural similarity index.

[0026] By using the technical solutions of the above embodiments, the adjustment parameter θ k is updated through a specific calculation formula, which can dynamically adjust the adjustment parameter according to the current iteration state, thereby better controlling the change of the structural similarity index estimate. This method combines the comparison results of the current structural similarity index and the historical optimal value to adaptively adjust the size of θ k . Compared with the traditional fixed adjustment parameter method, this method can more flexibly adapt to changes in the optimization process, provide a more reasonable adjustment parameter, and thereby guide the optimization algorithm to more effectively perform iteration updates. This not only improves the convergence speed of the algorithm, but also better preserves the details and structural information of the image, improving the quality of image denoising.

[0027] Optionally, in some embodiments of the first aspect, the two-dimensional frequency domain amplitude sample values are iteratively updated according to the gradient of the two-dimensional frequency domain amplitude sample values and the dynamic step size to obtain the optimized frequency domain amplitude sample values, including: updating the two-dimensional frequency domain amplitude sample values based on an iterative update formula; when the change amount of the two-dimensional frequency domain amplitude sample values is less than a set threshold value or the number of iterations reaches a set upper limit value, determining an optimal one-dimensional flattening vector; and performing matrix reconstruction according to the optimal one-dimensional flattening vector to obtain the optimized frequency domain amplitude sample values.

[0028] By using the technical solutions of the above embodiments, the two-dimensional frequency domain amplitude sample values are iteratively updated based on a preset iterative update formula, and the optimal structural similarity index is determined when a specific condition is met, which can ensure the stability and efficiency of the optimization process. This method continuously updates the frequency domain amplitude sample values during the iteration process until the change amount is less than the set threshold value or the number of iterations reaches the upper limit, thereby ensuring the convergence of the algorithm. Compared with the traditional iterative update method, this method can more effectively utilize the information of each iteration, improve the optimization efficiency, and ultimately achieve a higher quality image denoising effect.

[0029] In a second aspect, an embodiment of the present application provides an electronic device, comprising: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is configured to store computer program codes, the computer program codes comprise computer instructions, the one or more processors invoke the computer instructions to enable the electronic device to perform the method described in the first aspect or the second aspect, and any possible implementation manner of the first aspect or the second aspect.

[0030] In a third aspect, the present application provides a computer-readable storage medium comprising instructions that, when executed on the electronic device, cause the electronic device to perform the method described in the first aspect or the second aspect, and any possible implementation manner of the first aspect or the second aspect.

[0031] In a fourth aspect, the present application provides a computer program product comprising instructions that, when executed on the electronic device, cause the electronic device to perform the method described in the first aspect or the second aspect, and any possible implementation manner of the first aspect or the second aspect.

[0032] It can be understood that the electronic device provided by the second aspect, the storage medium provided by the third aspect, and the computer program product provided by the fourth aspect are all used to execute the method provided by the present application. Therefore, the beneficial effects that can be achieved are referred to the beneficial effects in the corresponding method, which will not be repeated here.

[0033] The one or more technical solutions provided by the present application have at least the following technical effects or advantages:

[0034] 1. Improve the efficiency of filter design: the present application provides a reasonable starting point for filter design by initializing the two-dimensional frequency domain amplitude sample values according to the passband cutoff frequency and the stopband cutoff frequency of the two-dimensional low-pass filter. This makes the initial frequency domain amplitude sample values closer to the optimal solution, reduces the number of iterations in the optimization process, and significantly improves the efficiency of filter design. In addition, by converting the initial frequency domain amplitude sample values into a time domain coefficient matrix and performing convolution processing with a noise image to obtain the current structural similarity index value, the performance of the filter can be quickly evaluated, further guiding the optimization process and speeding up the filter design.

[0035] 2. Enhancing the convergence speed and stability of the algorithm: The present application determines the structure similarity index estimate value based on the current structure similarity index value and the historical structure similarity index value, and adjusts the iteration step size of the subgradient algorithm according to these values, so that the algorithm can more flexibly adapt to the changes in filter performance during iteration. This dynamic step size adjustment mechanism can significantly improve the convergence speed of the algorithm, making the filter reach the optimal state faster. At the same time, by continuously updating the frequency domain amplitude sample value during iteration and determining the optimal structure similarity index when certain conditions are met, the stability of the optimization process can be ensured, avoiding the convergence problems caused by too large or too small step size.

[0036] 3. Improving image denoising quality: The present application iteratively updates the frequency domain amplitude sample value according to the two-dimensional frequency domain amplitude sample value gradient and the dynamic step size, and finally obtains the target two-dimensional filter. This filter can effectively perform spatial convolution processing on noisy images, achieving high-quality image denoising effect. During denoising, not only can the noise component in the image be significantly reduced, but also the details and structure information of the image can be well preserved, avoiding the common problems of detail blur and distortion in traditional denoising methods. In addition, by optimizing and selecting the filter with the optimal SSIM comprehensive result as the final design result, the generalization ability of the filter is further improved, so that it can maintain good denoising effect when processing different types of images. BRIEF DESCRIPTION OF DRAWINGS

[0037] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the application. It is clear that the drawings described below are only some embodiments of the present application, and other drawings can be obtained from these drawings without creative labor for those skilled in the art. In the drawings:

[0038] Figure 1 is a flowchart of a frequency domain image denoising method based on subgradient optimization according to an embodiment of the present application;

[0039] Figure 2 is a noisy image denoising effect display diagram according to an embodiment of the present application;

[0040] Figure 3 is a data diagram of SSIM and iteration number according to an embodiment of the present application;

[0041] Figure 4 is a multi-noisy image denoising effect display diagram according to an embodiment of the present application;

[0042] Figure 5 is another noisy image denoising effect display diagram according to an embodiment of the present application;

[0043] Figure 6 Figure 1 is a schematic diagram of an architecture of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0044] The terminology used in the following description of the embodiments of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the description of the application, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and / or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0045] Hereinafter, the terms "first", "second", "third", "fourth", "fifth", "sixth", "seventh" and "eighth" are used only for the purpose of description, and are not intended to indicate relative importance or imply that the indicated technical features are limited to a certain number. Thus, the features defined with "first", "second", "third", "fourth", "fifth", "sixth", "seventh" and "eighth" can explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, the meaning of "a plurality of" is two or more, unless otherwise specified.

[0046] It should also be noted that, unless otherwise explicitly specified and limited, the terms "set", "connected", and the like in the embodiments of the present application should be understood in a broad sense. For example, "connected" can be fixed connection, or detachable connection, or integrally connected; can be mechanical connection, or electrical connection; can be direct connection, or indirect connection through an intermediate medium, can be the internal communication of two elements; can be wired communication connection, or wireless communication connection. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances. The embodiments of the present application will be specifically described below.

[0047] The embodiments of the present application provide a frequency domain image denoising method based on subgradient optimization, as shown in Figure 1 The method comprises the following steps:

[0048] In step 201, the two-dimensional frequency domain amplitude sample value is initialized according to the passband cutoff frequency and the stopband cutoff frequency of the two-dimensional low-pass filter, and the initial frequency domain amplitude sample value is obtained.

[0049] The passband cutoff frequency refers to the upper limit of the signal frequency range allowed to pass through the filter. Below this frequency, the amplitude of the signal remains essentially unchanged and can pass through the filter smoothly. The stopband cutoff frequency refers to the lower limit of the frequency range at which the filter begins to attenuate the signal. Above this frequency, the amplitude of the signal will be greatly attenuated, thereby effectively suppressing high-frequency noise.

[0050] Specifically, for each discrete point (ω1, ω2) in the frequency domain, if both ω1 and ω2 are less than or equal to ωp, the corresponding amplitude sample value is set to 1, indicating that these frequency components are completely passed; if both ω1 and ω2 are greater than ωp but less than ωs, the amplitude sample value is set to 0.5, indicating that these frequency components are partially passed; if either ω1 or ω2 is greater than the stopband cutoff frequency ωs, the amplitude sample value is set to 0, indicating that these frequency components are completely suppressed.

[0051] In this way, the initial two-dimensional frequency domain amplitude sample values can be obtained, providing a basis for subsequent filter design and optimization.

[0052] Step 202, converting the initial frequency domain amplitude sample values to a time domain coefficient matrix through inverse discrete Fourier transform.

[0053] Specifically, the frequency domain amplitude sample values are combined with a pre-set linear phase characteristic (such as zero phase or symmetric phase) to form a complete complex frequency domain matrix; then a two-dimensional IDFT (inverse discrete Fourier transform) calculation is performed on the entire frequency domain matrix to obtain the time domain coefficient matrix h(m, n). For example, this process can be directly implemented in Matlab through the fsamp2 function. The physical meaning of the time domain coefficient matrix is the impulse response of the filter in the spatial domain, and its dimension is consistent with the frequency domain sample matrix (such as 9x9). The process of inverse discrete Fourier transform is actually an inverse transformation of the frequency domain signal, which converts it into a time domain signal for convolution operation in the time domain.

[0054] Through this step, the frequency domain design is mapped to an actual spatial domain filter.

[0055] Step 203, convolving the time domain coefficient matrix with the noise image to obtain the current structural similarity index value.

[0056] Specifically, the time domain coefficient matrix h is convolved with the noise image P to obtain the filtered image Q. The process of convolution is to perform pixel-by-pixel convolution operation between the time domain coefficient matrix h of the filter and the noise image P, thereby realizing the filtering of the image. The result Q of the convolution operation is the filtered image, in which the noise components are suppressed and the details and structural information of the image are preserved.

[0057] Subsequently, the structural similarity index value (SSIM) between the filtered image Q and the original noise-free image O is calculated. SSIM is an index for measuring image quality, which evaluates the similarity between two images from three aspects of brightness, contrast and structure. By calculating the SSIM value, the de-noising effect of the filter can be quantitatively evaluated, and the closer the SSIM value is to 1, the more similar the filtered image is to the original noise-free image, and the better the de-noising effect is.

[0058] In step 204, the structural similarity index estimate value is determined based on the current structural similarity index value and the historical structural similarity index value.

[0059] Specifically, by comparing the structural similarity index value (SSIM) calculated in the current iteration process with the optimal historical structural similarity index value recorded in the previous iteration, the performance improvement trend of the filter can be evaluated. If the current SSIM value is higher than the optimal value in the historical record, it indicates that the performance of the filter is improving, and it can be expected that the SSIM value will continue to increase in future iterations, thereby setting a higher estimate value. On the contrary, if the current SSIM value fails to exceed the historical optimal value, it may mean that the performance improvement of the filter has encountered a bottleneck, and the estimate value should be kept cautious to avoid overly optimistic expectations.

[0060] In this way, the structural similarity index estimate value can dynamically reflect the performance improvement trend of the filter, providing guidance for subsequent iteration optimization.

[0061] In step 205, the iteration step size of the sub-gradient algorithm is adjusted according to the current structural similarity index, the structural similarity index estimate value and the two-dimensional frequency domain amplitude sample value gradient, and a dynamic step size is obtained.

[0062] The two-dimensional frequency domain amplitude sample value gradient is calculated according to the current structural similarity index value. The sub-gradient algorithm is an iterative optimization method for optimizing non-smooth (i.e. non-differentiable) functions, which uses the sub-gradient (i.e. generalized gradient at non-differentiable points) of the objective function to guide the search direction, thereby gradually approaching the optimal solution. The step size refers to the moving distance used to update the variable in each iteration process according to the gradient or sub-gradient information, which controls the update amplitude in the optimization process and affects the convergence speed and stability of the algorithm.

[0063] The current SSIM value (i.e. the current structural similarity index) reflects the denoising effect of the filter in the current iteration state, while the estimated value is a prediction of the future SSIM value based on historical information. The gradient of the two-dimensional frequency domain amplitude sample value indicates the direction in which the SSIM value changes most rapidly. By comprehensively considering these three factors, the step size can be dynamically adjusted: if the gap between the current SSIM value and the estimated value is large, it indicates that the potential for performance improvement of the filter is large, and the step size can be appropriately increased to speed up the convergence; on the contrary, when the gap is small, it indicates that the performance of the filter is close to optimal, and the step size should be reduced to fine-tune. At the same time, the size of the gradient also affects the adjustment of the step size, when the gradient is large, the step size can be relatively large, to fully utilize the rapid change trend; when the gradient is small, the step size should be appropriately reduced, to avoid excessive adjustment.

[0064] Through this dynamic adjustment mechanism, the convergence speed of the algorithm and the performance of the filter can be improved while ensuring the stability of the algorithm.

[0065] In step 206, the two-dimensional frequency domain amplitude sample value is iteratively updated according to the gradient of the two-dimensional frequency domain amplitude sample value and the dynamic step size, to obtain an optimized frequency domain amplitude sample value.

[0066] Specifically, the gradient indicates the change direction of the objective function (such as the structural similarity index SSIM) at the current point, and the dynamic step size controls the amplitude of the update. By multiplying the gradient and the step size, the update amount of the frequency domain amplitude sample value can be obtained. This update amount is added to the current frequency domain amplitude sample value, to obtain the optimized frequency domain amplitude sample value. This process is actually optimizing the amplitude response of the filter in the frequency domain, to improve the denoising performance of the filter.

[0067] In step 207, the optimized frequency domain amplitude sample value is converted into a time domain coefficient matrix, to obtain a target two-dimensional filter.

[0068] Specifically, the optimized frequency domain amplitude sample value is converted into a time domain coefficient matrix through inverse discrete Fourier transform (IDFT). This time domain coefficient matrix describes the impulse response of the filter in the time domain, i.e. the response characteristics of the filter to the input signal. Through this conversion, the specific representation of the filter in the time domain can be obtained, and this filter is the target two-dimensional filter, which provides the basis for subsequent convolution processing. The target two-dimensional filter is a two-dimensional FIR filter.

[0069] To ensure physical realizability, the time domain coefficients need to be truncated and normalized. For example, the main coefficients in the central region (such as 9x9) are retained, and energy normalization is performed on them (to make the filter gain 1). The generated target two-dimensional filter has optimized passband flatness and stopband attenuation characteristics in the frequency domain, and exhibits a smooth convolution kernel in the spatial domain, which can effectively separate noise and image details.

[0070] It should be noted that steps 201-207 in this embodiment are the optimization training of the denoising filter based on the SSIM index in a single image. To make the designed target two-dimensional filter applicable to the same type of image, multi-image optimization training is required, and steps 201-207 are repeated. The filter that makes the SSIM comprehensive result relatively optimal is selected as the final design result.

[0071] In step 208, the spatial domain convolution processing of the noise image is performed by the target two-dimensional filter to perform image denoising.

[0072] Specifically, the time domain coefficient matrix (target two-dimensional filter) is convolved with the noise image to obtain the filtered image. The process of convolution operation is to slide the time domain coefficient matrix of the filter on the image pixel by pixel, calculate the convolution sum at each position, and thus obtain the filtered image. This process is actually a filtering process for the image, which removes the noise components in the image while retaining the details and structural information of the image. Through this processing, a high-quality denoised image can be obtained.

[0073] In the specific operation of this embodiment, convolution operation is performed on each pixel neighborhood (matching the filter size) of the image to suppress high-frequency noise components while retaining image edge and texture information. The verification of the denoising effect is completed by the SSIM improvement value, visual contrast, and peak signal-to-noise ratio (PSNR) indicators. For example, for a Gaussian noise contaminated Lena image, the SSIM can be improved from 0.67 to 0.89. In addition, this method supports the suppression of multiple noise types (such as salt and pepper noise, fogging noise), which reflects its generalization ability.

[0074] This embodiment adopts the above steps, and by using the sub-gradient optimization algorithm, the iteration step size can be dynamically adjusted, and the frequency domain amplitude sample value of the filter is accurately updated according to the current structural similarity index (SSIM) value and the estimated value, and the gradient of the frequency domain amplitude sample value. This method not only improves the flexibility and adaptability of the filter design, improves the efficiency of the filter design, but also can more accurately identify and separate the noise frequency components and the useful information frequency components of the image in the frequency domain, thereby effectively suppressing the noise while retaining the details and structural information of the image. In addition, the present application selects the filter with the optimal SSIM comprehensive result as the final design result through multi-image optimization training, which further improves the performance and generalization ability of the filter. Therefore, the present application can balance the denoising effect and image quality when processing images with complex texture and edge information, and improve the quality and effect of image denoising.

[0075] The embodiment of the application is to accelerate the design of a two-dimensional denoising filter and ensure the denoising effect, and a subgradient algorithm is designed for sample points in a frequency sampling design method with SSIM as an optimization target. With SSIM as the target, the overall denoising performance can be ensured from the aspects of brightness, contrast and structure; in the subgradient algorithm, a dynamic step is realized based on the current SSIM and the optimal SSIM estimation, and the frequency domain sample points can be quickly iterated and updated for optimization.

[0076] The beneficial effects of the embodiment of the application mainly include:

[0077] 1) Simplify the optimization process: the application does not directly use a complex optimization algorithm such as a planning algorithm for time domain coefficients, but uses a dynamic step subgradient algorithm for a relatively simple frequency sampling design method. This method significantly improves the design efficiency while maintaining the simplicity of the algorithm.

[0078] 2) Dynamic step adjustment: based on the difference between the current SSIM value and the estimated optimal SSIM value, the step is dynamically adjusted. This dynamic adjustment mechanism is consistent with the actual distance between the current solution and the optimal solution in iterative design, and can significantly improve the convergence speed of the algorithm.

[0079] 3) Improve denoising quality: by continuously optimizing the SSIM value, the denoising quality of the filter is ensured. The optimization of SSIM not only considers the brightness and contrast of the image, but also considers the structural information, so that the details and structural information of the image are better preserved while removing noise.

[0080] The following will describe the method of the embodiment in combination with a specific algorithm, which specifically includes the following steps:

[0081] S1, set the initial frequency domain amplitude sample value based on the initial amplitude definition function, and the initial amplitude definition function includes:

[0082]

[0083] H ∧ represents a two-dimensional matrix corresponding to the initial frequency domain amplitude sample value, specifically the upper right corner part of the matrix H, which is an independent sample to be optimized, and the matrix H represents the two-dimensional frequency domain amplitude sample value; ω1 and ω2 are frequency values of the discrete sample points in the frequency domain space, respectively, and ω p is the passband cutoff frequency, and ω s is the stopband cutoff frequency.

[0084] In this embodiment, a two-dimensional filter with a size of (2M+1) x (2M+1) is considered, that is, the size of its time-domain coefficient matrix h and the size of its frequency-domain sample matrix H are both (2M+1) x (2M+1), where M represents half of the filter size. The frequency values (ω1, ω2) of the discrete samples taken in the frequency domain space correspond to [-M:1:M]·2π / N. By using the symmetry property, that is, h(k1, k2) = h(-k1, k2) = h(k1, -k2) and H(ω1, ω2) = H(-ω1, ω2) = H(ω1, -ω2), the number of samples to be optimized is reduced to (M+1) x (M+1). In this embodiment, the upper right corner part of the H matrix is taken as the independent sample to be optimized (denoted as H ∧ ).

[0085] When the frequencies ω1 and ω2 are both less than or equal to the passband cutoff frequency ω p , the amplitude value is set to 1, indicating that these frequency components pass through the filter completely.

[0086] When the frequencies ω1 and ω2 are both greater than the passband cutoff frequency ω p and less than the stopband cutoff frequency ω s , the amplitude value is set to 0.5, indicating that these frequency components pass through the filter partially.

[0087] When the frequency ω1 or ω2 is greater than the stopband cutoff frequency ω s , the amplitude value is set to 0, indicating that these frequency components are completely suppressed.

[0088] In this way, the frequency-domain amplitude sample values can be initialized according to the passband and stopband cutoff frequencies of the filter, providing a basis for subsequent filter design and optimization.

[0089] S2, convert the initial frequency-domain amplitude sample values to a time-domain coefficient matrix through inverse discrete Fourier transform.

[0090] Specifically, the initial frequency-domain amplitude sample values H ∧ are a two-dimensional matrix, representing the amplitude response of the filter in the frequency domain. The size of this two-dimensional matrix is (M+1) x (M+1), where M is half of the filter size.

[0091] Convert H ∧ to a time-domain coefficient matrix h by using inverse discrete Fourier transform (IDFT). The mathematical expression of IDFT is:

[0092]

[0093] where H(ω1, ω2) is the frequency-domain amplitude sample value, h(k1, k2) is the time-domain coefficient matrix, and j is the imaginary unit.

[0094] Due to the symmetry of the filter, H ∧ is extended to a complete frequency-domain matrix H, and then IDFT is performed. In this way, the time-domain coefficient matrix h can have a linear phase characteristic.

[0095] The final time-domain coefficient matrix h is a (2M+1) x (2M+1) matrix, representing the impulse response of the filter in the time domain.

[0096] S3, the time-domain coefficient matrix is convolved with the noise image to obtain the current structural similarity index value.

[0097] Specifically, first, the time-domain coefficient matrix h is convolved with the noise image P to obtain the filtered image Q, and the mathematical expression of the convolution operation is:

[0098]

[0099] where Q(i, j) is the pixel value of the filtered image, and P(i, j) is the pixel value of the noise image.

[0100] During the convolution process, for the boundary pixels, zero padding or circular boundary conditions can be used to handle the boundary effect, ensuring the correctness of the convolution operation.

[0101] The structural similarity index (SSIM) between the filtered image Q and the noise-free original image O is calculated. The calculation formula of SSIM is:

[0102]

[0103] where μ O and μ Q are the average values of the original image O and the filtered image Q, respectively, and are the variances of the original image O and the filtered image Q, respectively, σ OQ is the covariance of the original image O and the filtered image Q, and C1 and C2 are constants to avoid zero denominator.

[0104] The final SSIM value is used to evaluate the denoising effect of the filter. The closer the SSIM value is to 1, the more similar the filtered image is to the noise-free original image, and the better the denoising effect.

[0105] In this embodiment, after the current SSIM value is calculated, the two-dimensional frequency domain amplitude sample value gradient can be calculated according to the current structural similarity index value, and the calculation specifically includes:

[0106] The two-dimensional frequency domain amplitude sample value gradient is calculated through a preset frequency domain sample gradient formula, and the frequency domain sample gradient formula includes:

[0107]

[0108] Wherein, ∇ x is the two-dimensional frequency domain amplitude sample value gradient, x is H ∧ The corresponding one-dimensional flattening vector is the sample value of the filter frequency domain amplitude response; Δx represents the perturbation amount, P represents the noise image, and O represents the noise-free image; SSIM represents the structural similarity index.

[0109] The convolution operation is represented; in this embodiment, Specifically, it means that the frequency domain matrix H is reconstructed from the one-dimensional flattening vector x, and inverse discrete Fourier transform is performed to convert it into a time domain coefficient matrix h, and the time domain coefficient matrix h is then convolved with the image P.

[0110] Forward perturbation: calculation That is, a small perturbation Δx is added to the current filter x, and then the SSIM value after the new filter is applied to the image is calculated.

[0111] Reverse perturbation: calculation That is, a small perturbation Δx is reduced from the current filter x, and then the SSIM value after the new filter is applied to the image is calculated.

[0112] Gradient calculation: divide the difference between the two SSIM values by 2Δx to obtain an approximate value of the gradient.

[0113] In this way, the gradient information about the filter frequency domain amplitude sample value can be obtained, and then this gradient is used to update the coefficients of the filter to maximize the SSIM value, thereby achieving the image denoising effect.

[0114] S4, based on the current structural similarity index value and the historical structural similarity index value, determine the structural similarity index estimate value.

[0115] Reference is made to step 204, which will not be repeated here.

[0116] S5, according to the current structural similarity index, the structural similarity index estimate value and the two-dimensional frequency domain amplitude sample value gradient, adjusting the iteration step length of the sub-gradient algorithm to obtain a dynamic step length.

[0117] Specifically, a dynamic step size is calculated by a preset dynamic step size adjustment formula, and the dynamic step size adjustment formula comprises:

[0118]

[0119] wherein S k is the dynamic step size of the kth iteration, by dividing the numerator (performance gap) by the denominator (square of the modulus of the gradient), it can be ensured that the step size s k can not only reflect the gap between the current filter and the optimal filter, but also dynamically adjust according to the change rate of the objective function. When the gradient is large, the step size will be relatively small, avoiding excessive adjustment; when the gradient is small, the step size will be relatively large, accelerating the convergence speed.

[0120] k represents the iteration number in the subgradient algorithm.

[0121] represents the structural similarity index prediction value;

[0122] x k represents a one-dimensional flattened vector of x at the kth iteration;

[0123] represents the one-dimensional flattened vector x k corresponding to the current structural similarity index, specifically the one-dimensional flattened vector x k The result after being applied to the noisy image P and the SSIM value between the non-noise original image O. Wherein, first by the one-dimensional flattened vector x k reconstructs the frequency domain matrix H k , and performs inverse discrete Fourier transform to convert into a time domain coefficient matrix h k , the time domain coefficient matrix h k is obtained by convolution operation with the image P, and then the non-noise original image O is calculated to obtain the SSIM value.

[0124] is the gradient of the two-dimensional frequency domain amplitude sample value corresponding to x k .

[0125] is the L2 norm square of the gradient vector , indicating the square of the modulus of the gradient.

[0126] By calculating the difference between the current estimated optimal SSIM value and the actual SSIM value, and combining the square of the modulus of the gradient, the step size S k is dynamically adjusted to ensure that the subgradient algorithm can quickly and stably converge to the optimal solution.

[0127] In some embodiments, the present application further provides another possible implementation, specifically, the dynamic step size can be further optimized based on a momentum optimization method. The momentum optimization formula is as follows:

[0128]

[0129] wherein sk: the step size of the kth iteration.

[0130] a: momentum coefficient, used to control the influence of historical step size on current step size.

[0131] s k-1 : the step size of the (k-1)th iteration.

[0132] b: learning rate, used to control the influence of gradient on step size.

[0133] ▽xk: gradient vector of the kth iteration.

[0134] c: coefficient for controlling the influence of target function value change rate.

[0135] f(x k ): target function value (structural similarity index SSIM) of the kth iteration.

[0136] f(x k-1 ): target function value of the (k-1)th iteration.

[0137] d: a constant, specifically a very small constant, used to prevent the denominator from being zero.

[0138] g: coefficient for controlling the influence of gradient change rate.

[0139] j: a constant, specifically a very small constant, used to prevent the denominator from being zero. The present embodiment introduces the idea of momentum optimization, combining historical step size and current gradient. Through the momentum term γs k-1 , the step size can be made continuous to some extent, thereby accelerating the convergence speed; at the same time, through the gradient term , the step size can be adjusted in the gradient direction to better adapt to the change of s k .

[0140] In the formula, is the target function value change rate part, which adjusts the dynamic step size through the change rate of the target function value. When the target function value changes greatly, the dynamic step size will be appropriately increased to accelerate the convergence speed.

[0141] is the gradient change rate part, which adjusts the dynamic step size through the change rate of the gradient. When the gradient changes greatly, the dynamic step size will be appropriately reduced to avoid over-adjustment.

[0142] The formula of the embodiment comprehensively considers various factors, can more flexibly adjust the step size, improve the convergence speed and stability of the algorithm, and better adapt to the change of the target function.

[0143] In some embodiments, is estimated from the optimal structure similarity index in the history record, and the estimation method based on the historical optimal structure similarity index includes:

[0144]

[0145] wherein, is the historical optimal structure similarity index, θ k is the adjustment parameter at the kth iteration, used to increase the target expectation.

[0146] x best represents the optimal one-dimensional flattening vector that makes the SSIM optimal.

[0147] is used to set a target value to guide the iterative optimization process of the subgradient algorithm, helping the algorithm adjust the step size in subsequent iterations, thereby more effectively approaching the optimal solution.

[0148] In some embodiments, θ k The calculation formula of θ

[0149]

[0150] wherein, θ k+1 is the adjustment parameter at the k+1th iteration, used to increase the target expectation;

[0151] λ is an adjustment parameter greater than or equal to 1, used to increase θ k when the current SSIM value is better than the historical optimal SSIM value;

[0152] β is an adjustment parameter less than 1, used to decrease θ k when the current SSIM value is not better than the historical optimal SSIM value;

[0153] is a positive parameter, a sufficiently small positive number, to ensure that θ k will not be reduced to a too small value;

[0154] represents the structure similarity index at the k+1th iteration, and x k+1 represents the one-dimensional flattening vector used at the k+1th iteration. k+1 reconstructs the frequency domain matrix H k+1 , and performs inverse discrete Fourier transform to convert it into a time domain coefficient matrix hk+1 After the convolution operation with the noise-affected image P, the SSIM value between the filtered result and the noise-free original image O is obtained.

[0155] representing the use of the optimal one-dimensional flattening vector x best Reconstruct the frequency domain matrix H best and perform inverse discrete Fourier transform to convert it into the time domain coefficient matrix h best The time domain coefficient matrix h best After the convolution operation with the noise-affected image P, the SSIM value between the filtered result and the noise-free original image O is obtained.

[0156] x k+1 is the one-dimensional flattening vector at the current iteration k+1.

[0157] If is greater than the historical optimal SSIM value then θ k is increased by λ.

[0158] If is less than or equal to the historical optimal SSIM value then θ k is decreased by β, but will not be less than

[0159] By comparing the current SSIM value with the historical optimal SSIM value, the adjustment parameter θ k is dynamically adjusted to control the change of the step size s k , ensuring that the algorithm can stably converge when approaching the optimal solution.

[0160] S6, based on the preset iterative update formula, updating the two-dimensional frequency domain amplitude sample value.

[0161] Specifically, the iterative update formula includes, wherein x k+1 represents the one-dimensional flattening vector x at the k+1 iteration;

[0162] By multiplying the gradient with the step size, the update amount is obtained, and it is added to the current frequency domain amplitude sample value, thereby obtaining the updated two-dimensional frequency domain amplitude sample value.

[0163] S7, when the change amount of the two-dimensional frequency domain amplitude sample value is less than the set threshold value, or the iteration number reaches the set upper limit value, the optimal one-dimensional flattening vector is determined.

[0164] During the iteration process, the variation of the two-dimensional frequency domain amplitude sample values is continuously monitored. If the variation is less than a set threshold value, it indicates that the frequency domain amplitude sample values have tended to be stable, and further iteration will not significantly improve the results, at which point it can be considered that the optimal state has been reached. In addition, if the number of iterations reaches a set upper limit value, iteration is also stopped to prevent excessive calculation.

[0165] At this time, the one-dimensional flattening vector corresponding to the current frequency domain amplitude sample value is determined as the optimal one-dimensional flattening vector. The optimal one-dimensional flattening vector contains the optimized frequency domain amplitude sample value, providing a basis for subsequent matrix reconstruction.

[0166] Specifically, the condition for stopping iteration is ||s k ·▽ x ||2<αor k=I max .

[0167] Wherein, α is a preset threshold value for judging whether the gradient is small enough.

[0168] I max is the preset upper limit of the number of iterations.

[0169] ||s k ·▽ x ||2 represents the L2 norm of the update, that is, the length of the update.

[0170] If the L2 norm of the update is less than the preset threshold value α, it indicates that the change of the frequency domain amplitude sample value is very small, and further iteration will not improve the results, so iteration is stopped.

[0171] If the number of iterations k reaches the preset upper limit value I max , iteration is also stopped. This is to prevent the algorithm from falling into an infinite loop and ensure that the algorithm is completed within a reasonable time.

[0172] When iteration is stopped, the current structural similarity index (SSIM) value is recorded as the optimal structural similarity index. This step ensures that the algorithm reaches the optimal solution within a reasonable time, avoiding resource waste caused by excessive iteration.

[0173] The x best in the history record can be considered as the optimal result of SSIM. Further, by x best , H ∧ and H, the two-dimensional frequency domain sample value can be obtained, and the time domain coefficient matrix h can be obtained by inverse transforming H.

[0174] To ensure that the designed two-dimensional filter is effective for the same type of image, multiple rounds of optimization training (i.e., repeating the above steps S1 to S7) under the same type of image will also be performed, and the filter that makes the SSIM comprehensive result relatively optimal is selected as the final design result.

[0175] S8, matrix reconstruction is performed according to the optimal one-dimensional flattening vector to obtain the optimized frequency domain amplitude sample value.

[0176] Specifically, since the two-dimensional FIR filter has symmetry, that is, the frequency domain amplitude sample matrix H of the filter has a symmetric structure, the one-dimensional flattening vector x can be reconstructed into a two-dimensional matrix H. This process takes advantage of the symmetry of the filter to fill the elements in the one-dimensional vector into the two-dimensional matrix according to the symmetry rule, thereby obtaining the complete frequency domain amplitude sample matrix.

[0177] Based on the above principle, the optimal one-dimensional flattening vector x best reconstructs the two-dimensional matrix H best This two-dimensional matrix H best is the optimized frequency domain amplitude sample value. The optimized frequency domain amplitude sample value contains the optimized frequency domain amplitude sample value, which reflects the optimal amplitude response of the filter in the frequency domain.

[0178] Through this reconstruction method, the symmetry can be effectively utilized to reduce the amount of calculation and improve the efficiency of the algorithm, while ensuring the linear phase characteristic of the filter, thereby achieving a high-quality image denoising effect.

[0179] S9, the optimized frequency domain amplitude sample value is processed by time domain coefficient matrix conversion to obtain the target two-dimensional filter.

[0180] This step refers to step 207, which will not be described here.

[0181] S10, the noise image is processed by spatial convolution with the target two-dimensional filter to perform image denoising. This step refers to step 208, which will not be described here.

[0182] Through the above steps, this embodiment utilizes the DFT / IDFT relationship between the time-domain coefficients of the two-dimensional filter and the frequency-domain sample points to achieve two-dimensional filter design through optimization of the frequency-domain sample points, thereby realizing noise filtering in the spatial domain. This embodiment introduces a more efficient algorithm in the frequency-domain sampling and optimization process, improving the filter design effect and ensuring the filter's denoising performance, better preserving image details and structural information, and meeting the demand for high-quality denoising effects in the field of image processing. The method of this embodiment uses a subgradient algorithm with dynamically variable step size to iteratively optimize the filter's frequency-domain sample points with SSIM as the optimization target. In the implementation of the subgradient algorithm, the gradient inverse is calculated for SSIM, and the step size is updated using the estimated optimal SSIM, which can achieve faster algorithm convergence, find the frequency-domain sample value result that achieves the optimal SSIM, and realize effective image denoising.

[0183] The following is in conjunction with the appendix Figures 2-5 The embodiments of the present invention will be further described below.

[0184] In the appendix Figure 2 and attached Figure 3 In this paper, the design method is verified for the 256×256 8-bit grayscale image Lena.

[0185] The two-dimensional FIR filter used is 9×9 in size. In the subgradient algorithm, the parameter values ​​are: β = 0.99, λ = 1.5. And the initial values ​​of θ are θ0 = 0.02, α = 0.001, and I. max =500. Figure 2 The image shows the denoising effect of the two-dimensional filter obtained using the subgradient algorithm. Figure 2 In the image, (a) shows the grayscale image Lena before denoising, which is the original noisy image; (b) shows the grayscale image Lena after denoising. Figure 2 The Gaussian noise in part (a) was effectively removed, increasing the SSIM from 0.6749 to 0.8967. The improvement process is as follows: Figure 3 As shown. Figure 3 The subgradient gradient algorithm does not continuously improve upon the steepest gradient algorithm; it undergoes a degradation process. This is a significant difference between the subgradient algorithm and the steepest gradient algorithm, but the overall trend is an effective improvement over the subgradient gradient algorithm. Therefore, Figure 2 and Figure 3 The changes demonstrate the effectiveness of the method in this embodiment.

[0186] Figure 4 In the image, the four image parts in the top row (Lena, Girlface, Zelda, Cameraman) are the original noisy images, and the four image parts in the bottom row are the corresponding denoised images.

[0187] The test results are referenced in Table 1; Table 1 shows the SSIM of the images before and after denoising.

[0188] Image portion SSIM before denoising SSIM after denoising Lena 0.6749 0.8967 Girlface 0.6408 0.8882 Zelda 0.6793 0.9216 Cameraman 0.6864 0.8413

[0189] Table 1

[0190] Further combined Figure 4 By Figure 4 By comparing the before and after denoising, it can be seen that the two-dimensional filter designed in the embodiment of the application can effectively remove noise.

[0191] Further, in Figure 5 In the embodiment, tests are conducted on the gray-scale image Zelda under other different types of noise, including salt and pepper noise and fogging noise. The upper row is the noise image, and the lower row is the denoised image after filtering. Moreover, Table 2 below shows the SSIM of the images before and after denoising.

[0192] Noise type SSIM before denoising SSIM after denoising Salt and pepper noise 0.6336 0.8651 Spray noise 0.6781 0.765

[0193] Table 2

[0194] Joint Figure 4 And Figure 5 By comparison, it can be seen that the two-dimensional filter designed in the application can effectively remove noise, can process various types of noise, and can maintain good denoising effect on different image contents.

[0195] The frequency domain image denoising method based on sub-gradient optimization provided by the embodiment of the application improves the image denoising effect and algorithm efficiency through the combination of frequency domain design and dynamic optimization. The specific technical effects are reflected in the following aspects:

[0196] First, the frequency domain sample value initialization based on the passband and stopband cutoff frequency (such as setting the passband amplitude to 1 and the stopband to 0) ensures the low-pass characteristics of the filter, which can effectively separate the image details and noise frequency components.

[0197] Second, the frequency domain sample values are converted into a time domain coefficient matrix through inverse discrete Fourier transform, and the structural similarity index (SSIM) is calculated by combining the spatial domain convolution operation of the noise image, which provides a quantitative target for the optimization process, so that the denoising effect is comprehensively evaluated in terms of brightness, contrast and structural information.

[0198] Further, the dynamic step adjustment mechanism (such as calculating the step based on the difference between the historical optimal SSIM estimate value and the current value) breaks through the limitations of traditional fixed step, uses a larger step to quickly approach the optimal solution in the early stage of iteration, and reduces the step size when approaching convergence to improve accuracy, significantly improving the convergence speed and stability of the sub-gradient algorithm.

[0199] In addition, the iterative update of the frequency domain sample value (by the joint correction of the gradient direction and the dynamic step size) directly optimizes the frequency domain response characteristics of the filter, so that the image details are maximized while the noise is suppressed, for example, the SSIM is improved from 0.67 to 0.89 in the Lena image test. The generated target two-dimensional filter is realized by spatial domain convolution, and the passband flatness and stopband attenuation characteristics are optimized, which can be applied to Gaussian noise, salt and pepper noise and fogging noise and other scenes, and overfitting is avoided through multi-image training (such as statistical average SSIM of similar images), ensuring the universality of the filter for similar images.

[0200] The overall method of the embodiment takes frequency domain design as the core, combines the closed-loop mechanism of dynamic optimization, considers the algorithm efficiency and denoising quality, and provides an efficient and adaptive solution for image processing in a complex noise environment.

[0201] The method provided by the above embodiment can be executed by an electronic device. The electronic device in the embodiment of the application is described from the perspective of hardware processing. Please refer to Figure 6 , which is a schematic diagram of an entity device structure of the electronic device in the embodiment of the application.

[0202] It should be noted that, Figure 6 The structure of the electronic device shown is only an example, and should not limit the functions and use range of the embodiment of the application.

[0203] As Figure 6 shown, the electronic device includes a central processing unit (CPU) 401, which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 402 or programs loaded from a storage portion 408 to a random access memory (RAM) 403, for example, the method described in the above embodiment. In the random access memory (RAM) 403, various programs and data required for system operation are also stored. The central processing unit (CPU) 401, the read-only memory (ROM) 402, and the random access memory (RAM) 403 are connected to each other through a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0204] The following components are connected to the input / output (I / O) interface 405: an input section 406 including an audio input device, a button switch, and the like; an output section 407 including a display, an audio output device, an indicator, and the like; a storage section 408 including a hard disk and the like; and a communication section 409 including a network interface card such as a LAN (Local Area Network) card, a modem, and the like. The communication section 409 performs communication processing via a network such as the Internet. A drive 410 is also connected to the input / output (I / O) interface 405 as necessary. A removable media 411 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, and the like is attached to the drive 410 as necessary, so that a computer program read out therefrom is installed in the storage section 408 as necessary.

[0205] In particular, the processes described above with reference to the flowcharts can be implemented as a computer software program according to embodiments of the present application. For example, an embodiment of the present application includes a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing a computer program for executing the method shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network by the communication section 409, and / or installed from the removable media 411. When the computer program is executed by the central processing unit (CPU) 401, various functions defined in the present application are executed.

[0206] Note that specific examples of the computer-readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any appropriate combination thereof. In the present application, the computer-readable storage medium can be any tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device.

[0207] The computer program product of the present application can be a computer program embodied on a non-transitory computer readable medium. When the program is executed by a computer, it can achieve the objectives of the present application as discussed above. Accordingly, the present application is not limited to any specific combination of hardware circuitry and software but can be implemented in any desired way.

[0208] In particular, the electronic device of the embodiment includes a processor and a memory coupled with the one or more processors, the memory configured to store computer program code comprising computer instructions to be invoked by the one or more processors to cause the electronic device to perform the method provided by the above embodiment.

[0209] As another aspect, the present application also provides a computer readable storage medium, which can be included in the electronic device described in the above embodiment, or can exist separately and not be assembled into the electronic device. The storage medium carries one or more computer programs, which, when executed by a processor of the electronic device, cause the electronic device to implement the method provided in the above embodiment.

[0210] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than limit them; even though the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that modifications can still be made to the technical solutions recorded in the foregoing embodiments, or some technical features can be replaced equivalently; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

[0211] In the above embodiments, according to the context, the term "when" can be interpreted as meaning "if" or "after" or "in response to determining" or "in response to detecting". Similarly, according to the context, the phrase "on determining" or "if detecting (the stated condition or event)" can be interpreted as meaning "if determining" or "in response to determining" or "on detecting (the stated condition or event)" or "in response to detecting (the stated condition or event)".

[0212] Those skilled in the art can understand that all or part of the processes in the above-mentioned method embodiments can be implemented by a computer program instructing relevant hardware to complete, the program can be stored in a computer readable storage medium, and the program can include the processes of the above-mentioned method embodiments when executed. The aforementioned storage medium includes ROM or random storage memory RAM, magnetic disc or optical disc and various storage code medium.

Claims

1. A method for frequency domain image denoising based on subgradient optimization, characterized in that, The method comprises the following steps: initializing a two-dimensional frequency domain amplitude sample value according to a passband cutoff frequency and a stopband cutoff frequency of a two-dimensional low-pass filter to obtain an initial frequency domain amplitude sample value; converting the initial frequency domain amplitude sample value into a time domain coefficient matrix through inverse discrete Fourier transform; performing convolution processing on the time domain coefficient matrix and a noise image to obtain a current structural similarity index value; determining a structural similarity index estimate value based on the current structural similarity index value and a historical structural similarity index value; adjusting an iteration step length of a subgradient algorithm according to the current structural similarity index, the structural similarity index estimate value and a two-dimensional frequency domain amplitude sample value gradient to obtain a dynamic step length, wherein the two-dimensional frequency domain amplitude sample value gradient is calculated according to the current structural similarity index value; performing iterative updating on the two-dimensional frequency domain amplitude sample value according to the two-dimensional frequency domain amplitude sample value gradient and the dynamic step length to obtain an optimized frequency domain amplitude sample value; performing time domain coefficient matrix conversion processing on the optimized frequency domain amplitude sample value to obtain a target two-dimensional filter; performing spatial convolution processing on the noise image through the target two-dimensional filter to perform image denoising.

2. The method of claim 1, wherein, The initializing a two-dimensional frequency domain amplitude sample value according to a passband cutoff frequency and a stopband cutoff frequency of a two-dimensional low-pass filter to obtain an initial frequency domain amplitude sample value comprises: defining the initial frequency domain amplitude sample value based on an initial amplitude definition function, wherein the initial amplitude definition function comprises: wherein H ∧ represents a two-dimensional matrix corresponding to the initial frequency domain amplitude sample values, specifically the upper right corner part of matrix H, is an independent sample value to be optimized, and the matrix H represents the two-dimensional frequency domain amplitude sample values; ω1 and ω2 are frequency values of the discrete sample points in the frequency domain space, ω p is the passband cutoff frequency, and ω s is the stopband cutoff frequency.

3. The method of claim 2, wherein, The calculating the two-dimensional frequency domain amplitude sample value gradient according to the current structural similarity index value comprises: calculating the two-dimensional frequency domain amplitude sample value gradient through a preset frequency domain sample gradient formula, wherein the frequency domain sample gradient formula comprises: wherein, is the two-dimensional frequency domain amplitude sample value gradient, x is the H ∧ is the corresponding one-dimensional flattened vector; Δx represents a perturbation, P represents the noisy image, O represents the noise-free image; SSIM represents the structural similarity index, represents a convolution operation.

4. The method of claim 3, wherein, The adjusting an iteration step length of a subgradient algorithm according to the current structural similarity index, the structural similarity index estimate value and a two-dimensional frequency domain amplitude sample value gradient to obtain a dynamic step length comprises: calculating the dynamic step length through a preset dynamic step length adjustment formula, wherein the dynamic step length adjustment formula comprises: where S k is the dynamic step size, k denotes the iteration number in the sub-gradient algorithm, represents the structure similarity index prediction, x k represents a one-dimensional flattened vector of x at the kth iteration, represents x k the corresponding current structure similarity index, is x k the corresponding two-dimensional frequency domain amplitude sample value gradient.

5. The method of claim 4, wherein, The is estimated from the optimal structure similarity index in the history record, and the estimation method based on the optimal structure similarity index in the history includes: wherein, is the historical optimal structural similarity index, θ k is the adjustment parameter at the kth iteration, for increasing the target expectation; x best denotes the optimal one-dimensional flattening vector that makes the SSIM the optimal result.

6. The method of claim 5, wherein, θ k The calculation formulas include: where θ k+1 is the adjustment parameter at the k+1 iteration, λ is an adjustment parameter greater than or equal to 1, β is an adjustment parameter less than 1, is a positive parameter, represents the structural similarity index at the k+1 iteration, represents the historical optimal structural similarity index.

7. The method according to any one of claims 1 to 6, characterized in that, The performing iterative updating on the two-dimensional frequency domain amplitude sample value according to the two-dimensional frequency domain amplitude sample value gradient and the dynamic step length to obtain an optimized frequency domain amplitude sample value comprises: updating the two-dimensional frequency domain amplitude sample value based on a preset iterative updating formula; determining an optimal one-dimensional flattening vector when a change amount of the two-dimensional frequency domain amplitude sample value is less than a set threshold value or an iteration number reaches a set upper limit value; performing matrix reconstruction according to the optimal one-dimensional flattening vector to obtain the optimized frequency domain amplitude sample value.

8. An electronic device, comprising: The electronic device comprises one or more processors and a memory; the memory is coupled to the one or more processors, and the memory is configured to store computer program codes, the computer program codes comprising computer instructions, and the one or more processors are configured to invoke the computer instructions to enable the electronic device to perform the method according to any one of claims 1-7.

9. A computer readable storage medium storing computer instructions, characterized in that, When the computer instructions run on the electronic device, the computer instructions enable the electronic device to perform the method according to any one of claims 1-7.

10. A computer program product, characterised in that, The computer program product, when run on an electronic device, causes the electronic device to perform the method of any one of claims 1-7.

Citation Information

Patent Citations

  • Image denoising method and device, equipment and storage medium

    CN118505554A