An image processing method based on an improved wavelet threshold function
By combining the second-order gradient information and local features of the image with the improved wavelet threshold function, the denoising intensity is dynamically adjusted, which solves the problems of excessive denoising and noise residue in image processing in the prior art and improves image quality.
Patent Information
- Application Number
- CN202511320515.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-16
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2045-09-16
AI Technical Summary
Existing wavelet denoising algorithms cannot dynamically adjust according to the noise characteristics and importance of different regions of an image, resulting in over-denoising or noise residue, which affects the quality of image processing.
An improved wavelet threshold function is adopted, which combines the second-order gradient information of the image, noise standard deviation, local variance and local gradient. The wavelet coefficients are processed by Gaussian decay function and logarithmic decay function to dynamically adjust the denoising intensity to preserve details and avoid over-denoising and noise residue.
It effectively improves image processing quality by dynamically adjusting the denoising intensity, avoiding excessive denoising and noise residue, and preserving more image details.
Smart Images

Figure CN120833262B_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, the image is prone to be disturbed by various harmful noises in the process of transmission, storage and collection, thereby affecting the visual quality of the image, and thus the image needs to be preprocessed, such as image denoising. The existing wavelet denoising algorithm mainly adopts a hard threshold function and a soft threshold function. The hard threshold function sets the coefficients less than the threshold value to zero and retains the coefficients greater than the threshold value. The soft threshold function performs smoothing processing on the coefficients greater than the threshold value and sets the 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:
[0005] An image processing method based on an improved wavelet threshold function comprises the following steps:
[0006] Step S1: performing wavelet processing on a to-be-processed image to obtain wavelet coefficients;
[0007] 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 the wavelet coefficients greater than the threshold value adopts a Gaussian decay function, and the part of the improved wavelet threshold function processing the wavelet coefficients less than the threshold value adopts a logarithmic decay function.
[0008] 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 the horizontal direction of the to-be-processed image, j denotes a pixel position in the vertical direction of the to-be-processed image, is the new wavelet coefficient, λ is a set threshold value, sign (.) is a sign function, αa first adjusting factor for controlling the attenuation speed, β a second adjusting factor for controlling the attenuation flexibility, second order gradient information of the image to be processed, γ a third adjusting factor for controlling the influence of the second order gradient information, a Gaussian attenuation function and a logarithmic attenuation function, In (.) is a natural logarithm function.
[0009] Further, the first adjusting factor is calculated according to the formula in the 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.
[0010] Further, the second adjusting factor is calculated according to the formula in the step S2, wherein, is the variance of the local area related to the current wavelet coefficient being processed in the image to be processed.
[0011] Further, the third adjusting factor is calculated according to the formula in the step S2, wherein, is the local gradient of the image to be processed at the pixel i , j .
[0012] Further, the local gradient contains the horizontal direction gradient i , j , the vertical direction gradient , , the gradient amplitude and the gradient direction .
[0013] Further, the second order gradient information of the image to be processed is calculated according to the formula in the step S2.
[0014] The present application has the following advantages:
[0015] 1、The present application adopts a Gaussian attenuation function for wavelet coefficients greater than a threshold value, and combines the second-order gradient information of the image to be processed, the edge region of the image generally has a large gradient, and the gradient of the smooth region is smaller, so the second-order gradient information is combined with the Gaussian attenuation function, which can smoothly denoise and retain more details, for wavelet coefficients less than the threshold value, a logarithmic attenuation function is used, which can avoid setting the wavelet coefficients to zero completely, 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 over-denoising or noise residue, thereby improving the image processing quality. BRIEF DESCRIPTION OF DRAWINGS
[0016] The present application will be further described in detail below with reference to the accompanying drawings.
[0017] Figure The flowchart of the present application.
[0018] Figure The comparative diagram after image processing by the present application and the traditional method. DETAILED DESCRIPTION
[0019] As Figure shown, the image processing method based on the improved wavelet threshold function includes the following steps:
[0020] Step S1, wavelet processing is performed on the image to be processed to obtain each wavelet coefficient, wherein the specific process of wavelet processing is prior art;
[0021] Step S2, the improved wavelet threshold function is used to process each wavelet coefficient to obtain new wavelet coefficients, and a denoised image is reconstructed according to the new wavelet coefficients, wherein the improved wavelet threshold function involves the second-order gradient information of the image to be processed, the noise standard deviation, local variance and local gradient of the image to be processed, the part of the improved wavelet threshold function processing wavelet coefficients greater than a threshold value adopts a Gaussian attenuation function, and the part of the improved wavelet threshold function processing wavelet coefficients less than a threshold value adopts a logarithmic attenuation function;
[0022] Specifically, the improved wavelet threshold function is represented as ; wherein, is the wavelet coefficient obtained in step S1, i indicates the pixel position in the horizontal direction of the image to be processed, j indicates the pixel position in the vertical direction of the image to be processed; is the new wavelet coefficient; λ is a set threshold value, sign (.) is a sign function, used to ensure that the direction of the signal is not changed; is an absolute value; The Gaussian decay function, for wavelet coefficients larger than a threshold, is considered to represent the signal of the image and requires smooth denoising while preserving details. The Gaussian decay function is smooth, avoiding the discontinuity problem in existing techniques. Furthermore, the Gaussian decay function gradually reduces the influence of the coefficients rather than abruptly changing them, and it can dynamically adjust the decay rate according to the noise intensity of the image being processed (through...). α and β ), α The first adjustment factor, which controls the decay rate, determines the steepness of the Gaussian decay. β The second adjustment factor for controlling the attenuation flexibility is adjusted by... β It can control the intensity of the entire decay process; This second-order gradient information of the image to be processed effectively reflects the degree of change in the image. Edge regions typically have larger gradients, while smooth regions have smaller gradients. Introducing this second-order gradient information allows for the application of smaller denoising intensities in edge regions during the denoising process, thereby preserving more details. This is based on the formula... calculate; γ A third adjustment factor is used to control the influence of second-order gradient information, the Gaussian decay function, and the logarithmic decay function; In (.) is the natural logarithm function, which can avoid setting the wavelet coefficients to zero completely, thus preserving some details, and can effectively remove noise without over-removing important information in the image; α , β , γ The range of values is (0,1).
[0023] More specifically, the first adjustment factor is based on the formula Calculations show that the stronger the noise (the larger the noise standard deviation), the faster the attenuation rate, thus removing noise more effectively. Image to be processed I The noise standard deviation , , M Image to be processed I The number of pixels in the horizontal direction, N Image to be processed I The number of pixels in the vertical direction. M × N Image to be processed I The total number of pixels, I ( i , j ) represents the pixels in the image to be processed. i , j The pixel value of ).
[0024] Different regions of an image may exhibit varying degrees of change; therefore, smooth and detailed regions of the image should employ different attenuation strategies. Hence, the second adjustment factor is determined according to the formula... This calculation ensures that a smaller attenuation is used in areas of high variation and a larger attenuation is used in smooth areas, thus achieving a better balance between noise suppression and detail preservation. The wavelet coefficients in the image to be processed are the same as those currently being processed. The variance of the relevant local region, which is usually a fixed-size window or sub-image, can be a small square or rectangular area, the size of which can be specified according to the actual situation. For example, if a window of size 3x3 is used, the content within the window is the content of the local region, and the window slides in the image to be processed and performs relevant processing. , , For the local region R, the first i 'pixel value, μ ' is the average value of pixels in the local region R;
[0025] The third regulating factor is based on the formula. calculate, For the image to be processed in pixels ( i , j The local gradient at point () represents the image's edges or detailed regions. Stronger gradients indicate edges or detailed regions, while weaker gradients indicate smooth regions. To ensure more information is preserved in detailed regions, the third adjustment factor should be smaller in areas with larger gradients, thus avoiding over-denoising and ensuring no loss of detail. For this local gradient... It contains pixels ( i , j Horizontal gradient at point ) Vertical gradient Gradient amplitude and gradient direction .
[0026] Table 1
[0027]
[0028] Table 1 shows the effects of using the traditional method and the present invention on the attached material. Figure The performance comparison of the original images after processing is shown. SSIM is an index that measures the similarity between two images, with a range of [-1, 1]. When two images... FigureWhen the two images are identical, SSIM=1, and the greater 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 processed by the present application is more similar to the original image, has better denoising effect, and has better image quality.
[0029] The above is only a preferred embodiment of the present application, and therefore cannot limit the scope of the present application, that is, equivalent changes and modifications made in accordance with the scope of the patent application and the content of the specification 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: Includes the following steps: Step S1: Perform wavelet processing on the image to be processed to obtain the wavelet coefficients; Step S2: Process each wavelet coefficient using the improved wavelet threshold function to obtain new wavelet coefficients, and reconstruct the denoised image based on the new wavelet coefficients. The improved wavelet threshold function involves the second-order gradient information of the image to be processed, the noise standard deviation, local variance, and local gradient of the image to be processed. The improved wavelet threshold function uses a Gaussian decay function to process the wavelet coefficients greater than the threshold and a logarithmic decay function to process the wavelet coefficients less than the threshold. In step S2, the improved wavelet threshold function is expressed as follows: ,in, The wavelet coefficients 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. For the new wavelet coefficients, λ For the set threshold, sign (.) is a sign function. α The first adjustment factor for controlling the decay rate, β The second adjustment factor is used to control the attenuation flexibility. The second-order gradient information of the image to be processed. γ To control the influence of second-order gradient information, a third adjustment factor is needed for the Gaussian decay function and the logarithmic decay function. In (.) is the natural logarithm function.
2. The image processing method based on an improved wavelet threshold function according to claim 1, characterized in that: In step S2, the first adjustment factor is determined according to the formula... Calculate, where, , , , M This represents the number of pixels in the horizontal direction of the image to be processed. N This represents the number of pixels in the vertical direction of the image to be processed. I ( i , j ) represents the pixels in the image to be processed. i , j The pixel value of ).
3. An image processing method based on an improved wavelet threshold function according to claim 1 or 2, characterized in that: The second adjustment factor is based on the formula Calculate, where, The wavelet coefficients in the image to be processed are the same as those currently being processed. The variance of the relevant local region.
4. An image processing method based on an improved wavelet threshold function according to claim 1 or 2, characterized in that: The third regulating factor is based on the formula calculate, For the image to be processed in pixels ( i , j The local gradient at point ().
5. The image processing method based on an improved wavelet threshold function according to claim 4, characterized in that: For the local gradient It contains pixels ( i , j Horizontal gradient at point ) Vertical gradient Gradient amplitude and gradient direction .
6. The image processing method based on an improved wavelet threshold function according to claim 2, characterized in that: The second-order gradient information of the image to be processed According to the formula calculate.
7. An image processing method based on an improved wavelet threshold function according to claim 1 or 2, characterized in that: The α , β , γ The range of values is (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