Image processing method based on improved wavelet threshold function
By combining the improved wavelet threshold function with the image features to dynamically adjust the denoising strategy, the problem of insufficient adaptability of image regional features in the existing technology is solved, and higher quality image processing effects are achieved.
Patent Information
- Application Number
- CN202511320515.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-16
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2045-09-16
AI Technical Summary
Existing wavelet denoising algorithms cannot dynamically adjust according to the noise characteristics and importance of different image regions, resulting in excessive denoising or residual noise, affecting image processing quality.
An improved wavelet threshold function is adopted, combined with the second-order gradient information, noise standard deviation, local variance and local gradient of the image. The wavelet coefficients greater than the threshold are processed by Gaussian attenuation function, and the wavelet coefficients less than the threshold are processed by logarithmic attenuation function. The denoising strategy is dynamically adjusted to improve the image processing quality.
It effectively avoids excessive denoising and residual noise, improves image processing quality, and retains more image details.
Smart Images

Figure CN120833262A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of image processing, and particularly relates to an image processing method based on an improved wavelet threshold function. BACKGROUND
[0002] In the aspect of image processing, because images are susceptible to various harmful noises in the process of transmission, storage and collection, the visual quality of the images is affected, and thus pre-processing operations such as image denoising are required. Existing wavelet denoising algorithms mainly adopt hard threshold functions and soft threshold functions. The hard threshold function sets coefficients less than a threshold value to zero and retains coefficients greater than the threshold value. The soft threshold function performs smoothing processing on coefficients greater than the threshold value and sets coefficients less than the threshold value to zero. However, these methods have the defect that they cannot be dynamically adjusted according to different regions of the image, and different regions of the image can have different noise characteristics and importance, which can lead to over-denoising or noise residue, thereby affecting the image processing quality. SUMMARY
[0003] The purpose of the present application is to provide an image processing method based on an improved wavelet threshold function, which can effectively avoid over-denoising or noise residue and improve the image processing quality.
[0004] The present application is implemented by the following technical solutions: An image processing method based on an improved wavelet threshold function, comprising the following steps: Step S1, performing wavelet processing on a to-be-processed image to obtain wavelet coefficients; Step S2, processing the wavelet coefficients by using an improved wavelet threshold function to obtain new wavelet coefficients, and reconstructing a denoised image according to the new wavelet coefficients, wherein the improved wavelet threshold function involves second-order gradient information of the to-be-processed image, noise standard deviation, local variance and local gradient of the to-be-processed image, and the part of the improved wavelet threshold function processing wavelet coefficients greater than a threshold value adopts a Gaussian decay function, and the part of the improved wavelet threshold function processing wavelet coefficients less than the threshold value adopts a logarithmic decay function.
[0005] Further, in the step S2, the improved wavelet threshold function is expressed as wherein, is the wavelet coefficient obtained in the step S1, i denotes a pixel position in a horizontal direction of the to-be-processed image, j denotes a pixel position in a vertical direction of the to-be-processed image, is the new wavelet coefficient, λ is a set threshold value, sign (.) is a sign function, α is a first adjustment factor for controlling the decay speed, β is a second adjustment factor for controlling the decay flexibility, second order gradient information of the image to be processed, γ third adjustment factor for controlling the influence of the second order gradient information, a Gaussian decay function and a logarithmic decay function, In (.) is a natural logarithm function.
[0006] Further, the first adjustment factor is calculated according to the formula in step S2, wherein , , , M is the number of pixels in the horizontal direction of the image to be processed, N is the number of pixels in the vertical direction of the image to be processed, I i , j is the pixel value of the pixel point i , j in the image to be processed.
[0007] Further, the second adjustment factor is calculated according to the formula in step S2, wherein is the variance of the local area related to the current wavelet coefficient to be processed in the image to be processed.
[0008] Further, the third adjustment factor is calculated according to the formula in step S2, wherein is the local gradient of the image to be processed at the pixel i , j .
[0009] Further, for the local gradient , it contains the horizontal direction gradient i , the vertical direction gradient j , the gradient amplitude and the gradient direction at the pixel , .
[0010] Further, the second order gradient information of the image to be processed is calculated according to the formula in step S2.
[0011] The present application has the following beneficial effects: 1. For wavelet coefficients greater than a threshold, the present invention adopts a Gaussian attenuation function combined with the second-order gradient information of the image to be processed. The edge area of the image usually has a larger gradient, while the gradient of the smooth area is smaller. Therefore, combining the second-order gradient information with the Gaussian attenuation function can smoothly denoise and retain more details. For wavelet coefficients less than the threshold, a logarithmic attenuation function is adopted to avoid setting the wavelet coefficients completely to zero, thereby retaining some details. The parameters of the Gaussian attenuation function and the logarithmic attenuation function are calculated using the noise standard deviation, local variance and local gradient of the image to be processed, which can further effectively avoid excessive denoising or residual noise, thereby improving the image processing quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] The present invention will be further described in detail below with reference to the accompanying drawings.
[0013] Figure Flowchart of the present invention.
[0014] Figure The figure is a comparison of the image processing methods of the present invention and the traditional method. DETAILED DESCRIPTION
[0015] like Figure As shown, the image processing method based on the improved wavelet threshold function includes the following steps: Step S1, performing wavelet processing on the image to be processed to obtain wavelet coefficients, wherein the specific process of wavelet processing is the existing technology; Step S2, using an improved wavelet threshold function to process each wavelet coefficient to obtain a new wavelet coefficient, and reconstructing a denoised image based on the new wavelet coefficient, wherein the improved wavelet threshold function involves second-order gradient information of the image to be processed, the noise standard deviation, the local variance, and the local gradient of the image to be processed, and the improved wavelet threshold function uses a Gaussian attenuation function to process wavelet coefficients greater than the threshold, and uses a logarithmic attenuation function to process wavelet coefficients less than the threshold; Specifically, the improved wavelet threshold function is expressed as ;in, is the wavelet coefficient obtained in step S1, i Refers to the pixel position in the horizontal direction of the image to be processed, j Refers to the pixel position in the vertical direction of the image to be processed; is the new wavelet coefficient; λ is the set threshold, sign (.) is the sign function, which is used to ensure that the direction of the signal remains unchanged; To find the absolute value; It is a Gaussian attenuation function. For wavelet coefficients greater than the threshold, these coefficients are considered to represent the signal of the image, which needs to be denoised smoothly while retaining details. The Gaussian attenuation function is smooth, avoiding the discontinuity problem in the existing technology. The Gaussian attenuation function gradually reduces the influence of the coefficient instead of suddenly changing the coefficient. At the same time, it can also dynamically adjust the attenuation speed according to the noise intensity of the image to be processed (through α and β ), α It is the first adjustment factor to control the attenuation speed, which determines the steepness of Gaussian attenuation. β To control the second adjustment factor of attenuation flexibility, by adjusting β Ability to control the intensity of the entire attenuation process; The second-order gradient information of the image to be processed can effectively reflect the degree of change of the image. The edge area usually has a larger gradient, and the gradient of the smooth area is smaller. By introducing the second-order gradient information, a smaller denoising intensity is applied to the edge area during the denoising process, thereby retaining more details. According to the formula calculate; γ To control the influence of second-order gradient information, the third adjustment factor of Gaussian decay function and logarithmic decay function; In (.) is the natural logarithm function, which can avoid setting the wavelet coefficients to zero completely, thereby retaining some details, and can effectively remove noise without excessively removing important information in the image; α 、 β 、 γ The value range is (0,1).
[0016] More specifically, the first adjustment factor is based on the formula Calculation shows that the stronger the noise (the larger the noise standard deviation), the faster the attenuation speed, thus more effectively removing the noise. For the image to be processed I The standard deviation of the noise, , , M For the image to be processed I The number of pixels in the horizontal direction, N For the image to be processed I The number of pixels in the vertical direction, M × N For the image to be processed I The total number of pixels, I ( i , j ) is the pixel point in the image to be processed ( i , j )’s pixel value.
[0017] Different regions of the image can have different degrees of variation, so the smooth regions and the detail regions of the image should have different attenuation strategies, so the second adjustment factor is calculated according to the formula , which can ensure that smaller attenuation is used in regions with larger variation and larger attenuation is used in smooth regions, so as to better balance noise suppression and detail preservation, wherein, is the local gradient of the image to be processed at the pixel , , , is the average value of the pixel values in the local region R; i μ The third adjustment factor is calculated according to the formula , is the local gradient of the image to be processed at the pixel i , j , a stronger gradient represents an edge or a detail region of the image, and a weaker gradient represents a smooth region, in order to ensure that more information is retained in the detail region, the third adjustment factor should be smaller in the region with a larger gradient, so as to avoid excessive denoising and ensure that details are not lost; for the local gradient , which includes the horizontal direction gradient i , the vertical direction gradient j , the gradient amplitude , and the gradient direction .
[0018] Table 1 As shown in Table 1, the performance of the original image after processing by the traditional method and by the present application is compared, wherein, SSIM is an index for measuring the similarity of two images, and its range is [-1, 1], when the two images are identical, SSIM = 1, the larger the PSNR, the less the noise in the signal, that is, the better the image denoising effect; generally, the smaller the MSE value, the smaller the difference between the reconstructed image and the original image, and the better the image quality, it can be seen that, compared with the traditional method, the image after processing by the present application is more similar to the original image, has a better denoising effect, and has better image quality. Figure Figure
[0019] The above merely describes preferred embodiments of the present application, and therefore cannot limit the scope of the present application, i.e. equivalent changes and modifications made according to the patent application scope and content of the present application should still be within the scope of the present application.
Claims
1. An image processing method based on an improved wavelet threshold function, characterized in that: The method comprises the following steps: Step S1, wavelet processing is performed on the image to be processed to obtain wavelet coefficients; Step S2, the wavelet coefficients are processed by using an improved wavelet threshold function to obtain new wavelet coefficients, and a denoised image is reconstructed according to the new wavelet coefficients, wherein the improved wavelet threshold function involves second-order gradient information of the image to be processed, noise standard deviation of the image to be processed, local variance and local gradient, and the improved wavelet threshold function uses a Gaussian attenuation function to process a part of the wavelet coefficients greater than a threshold value and uses a logarithmic attenuation function to process a part of the wavelet coefficients less than the threshold value.
2. The image processing method based on improved wavelet threshold function according to claim 1, characterized in that: In step S2, the improved wavelet threshold function is expressed as ,in, is the wavelet coefficient obtained in step S1, i Refers to the pixel position in the horizontal direction of the image to be processed, j Refers to the pixel position in the vertical direction of the image to be processed, are the new wavelet coefficients, λ is the set threshold, sign (.) is the sign function, α is the first adjustment factor to control the decay speed, β The second adjustment factor for controlling the attenuation flexibility is is the second-order gradient information of the image to be processed, γ To control the influence of the second-order gradient information, the third adjustment factor of the Gaussian decay function and the logarithmic decay function, In (.) is the natural logarithm function.
3. The image processing method based on improved wavelet threshold function according to claim 2, characterized in that: The step S2, the first adjustment factor according to formula Calculate, wherein , , , M The pixel number of the horizontal direction of the image to be processed, N The pixel number of the vertical direction of the image to be processed, I ( i , j ) is the pixel value of the pixel point ( i , j ) in the image to be processed.
4. The image processing method based on improved wavelet threshold function according to claim 2 or 3, characterized in that: The second adjustment factor is calculated according to the formula wherein is the variance of the local region in the image to be processed that is associated with the currently processed wavelet coefficient .
5. The image processing method based on improved wavelet threshold function according to claim 2 or 3, characterized in that: The third adjustment factor is calculated according to the formula , is the local gradient of the image to be processed at the pixel i , j ).
6. The image processing method based on improved wavelet threshold function according to claim 5, characterized in that: for the local gradient comprising a horizontal gradient i , j a vertical gradient , a gradient magnitude , and a gradient direction at a pixel .
7. The image processing method based on the improved wavelet threshold function according to claim 2 or 3, characterized in that: Second order gradient information of the image to be processed According to the formula is calculated.
8. The image processing method based on improved wavelet threshold function according to claim 2 or 3, characterized in that: The α , β , γ each range from (0, 1).
Citation Information
Patent Citations
Algorithm for inhibiting mixed noise of images based on wavelet threshold function and improved median filtering fusion
CN106530254A
Image denoising method based on improved wavelet threshold function
CN108596848A
Image denoising method for improving wavelet threshold and threshold function
CN117593210A
Wavelet total variation denoising method based on high resolution
CN118781011A
Denoising method and apparatus
WO2005032122A1