2.1. Adaptive Threshold Design
In wavelet thresholding denoising, the threshold significantly affects the effectiveness of noise removal. However, it is challenging to distinguish between noise and the signal components to be preserved. To address this, various methods have been proposed, based on statistical properties of the image or noise estimation techniques. Classical approaches include VisuShrink, SureShrink, and BayesShrink.
VisuShrink, introduced by Donoho, is one of the most commonly used methods for threshold selection. Its mathematical equation is as follows:
where
λ represents the threshold,
x_HH denotes the wavelet coefficients containing high-frequency information in both the horizontal and vertical directions, and
M × N is the image size. However, this method applies a relatively fixed threshold, which makes the denoising performance less robust. As demonstrated in subsequent experiments, its effectiveness is often suboptimal. To address this limitation, we employed a regression analysis approach to explore the relationship between the median of wavelet coefficients and the optimal threshold for a more robust denoising performance.
By applying wavelet thresholding denoising with various threshold values, we observed that the relationship between the threshold and PSNR follows an S-curve (
Figure 1). When the denoising performance reaches its optimal limit, increasing the threshold does not improve PSNR; instead, it deteriorates the image by removing more essential details. Based on this observation, we collected the threshold values at which PSNR reaches its peak and no longer exhibits significant variation, considering them as the most appropriate thresholds. This process yielded a set of data pairs consisting of appropriate thresholds and the median of wavelet coefficients. In other words, we systematically tested various thresholds on noisy images and recorded the corresponding PSNR after denoising. When PSNR stabilized without significant improvement, we selected the corresponding threshold as the optimal one.
To refine this process, we generated a large dataset by applying this method to multiple noisy images. Using these data pairs, we applied regression analysis with the least-squares method to derive a regression line that models the relationship between the appropriate threshold and the median of wavelet coefficients. The mathematical formulation is as follows:
where
A is a
n × 2 matrix,
b is a n × 1 vector,
x is a 2 × 1 vector,
represents the median of the wavelet coefficients for the
ith noisy image,
denotes the corresponding optimal threshold,
is the slope of the regression line, and
is the
y-intercept.
By utilizing the least-squares method with n samples, we obtained a regression line for a more accurate estimation of the threshold. In processing images with high noise levels, many conventional methods select excessively large thresholds, which severely degrade image details. In contrast, the developed method in this study, based on appropriate thresholds derived from real samples, better balances between noise removal and the preservation of original image features.
Next, we identified the regression line for images of different sizes and investigated whether the regression line exhibits variations between large and small images. As the image size increased, the slope of the regression line was reduced, which led to a more appropriate threshold. Based on the results, we developed an adaptive thresholding method that adjusts according to image size. The mathematical formulation is as follows:
where
med is a median function, and
M × N represents the size of the wavelet coefficients, meaning that the effective size is one-fourth of the original image size.
This adaptive threshold enables the selection of an appropriate threshold across different conditions. The threshold is used to achieve the highest PSNR. However, PSNR can be lowered with a lower threshold, which helps preserve more image details. We discovered a common limitation shared by many threshold selection methods: when an image is affected by low-level noise, the selected threshold tends to be too high. In such cases, over-thresholding significantly impacts PSNR, even resulting in worse performance than without denoising. Therefore, we refined the developed threshold selection method to determine the optimal threshold even in the presence of low-level noise.
2.2. Improved Threshold Based on Low-Noise Conditions
In low-noise conditions, the threshold tends to be overestimated, significantly reducing the effectiveness of wavelet threshold denoising. To address this, we improved previous methods by introducing a decay factor to adjust the slope of the regression line, ensuring a more appropriate threshold selection. However, a new challenge exists as the slope reduction rate must be decided. To determine this, we replaced the dataset used in the previous regression analysis with a collection of low-noise images and then recomputed the regression line. This allowed us to obtain the precise slope required for low-noise conditions. Once the appropriate slope reduction was determined, we used the median of wavelet coefficients as an indicator of noise magnitude. Based on this estimation, we computed the decay factor accordingly. The final mathematical formulation is as follows:
where
D is the decay factor, and
med is the median function, which is added to the slope of our proposed adaptive threshold to flatten it under low-noise conditions, while the noise level is determined using the median of wavelet coefficients.
When the noisy image contains almost no noise, the median wavelet coefficient approaches 1, causing the decay factor to reduce the slope to nearly zero. As a result, the threshold value also approaches zero, ensuring that when no noise is present, no wavelet coefficients are removed. Second, as the noise level increases, the decay factor gradually decreases, and when the median wavelet coefficient reaches 5.5, the decay factor is set to −2, a value derived from regression analysis. This adjustment helps select the optimal threshold. Third, once the median wavelet coefficient exceeds 5.5, the decay factor rapidly decreases to zero, reverting to the original adaptive threshold formulation. This design allows the threshold to effectively adjust based on noise levels.
2.4. Improved Wavelet Denoising Algorithm
We integrated the improved methods into an algorithm to enhance wavelet threshold denoising. The algorithm enables the selection of the most appropriate threshold for any noise level and effective noise removal while preserving image details. Due to this advantage, the algorithm is well-suited for denoising algorithms, such as block-matching and 3d filtering (BM3D) [
9], BM3D_DWT [
10], and other wavelet-based denoising methods [
11]. This algorithm addresses the issue of inaccurate matching when the image noise is too high.
Figure 2 illustrates the flowchart of this algorithm.
Due to the characteristics of noise, the amount of noise removed from the spatial domain is limited. Therefore, the wavelet transform was employed to convert noisy images into the wavelet domain for processing. Noise and signals exhibit different characteristics. Signal components in the wavelet domain typically have larger coefficients, while noise components, with low correlation with the signal, tend to have smaller coefficients. By applying a threshold to remove small wavelet coefficients and then transforming the processed wavelet coefficients back to the familiar spatial domain, noise can be effectively removed. Therefore, we considered multiple decompositions in the denoising algorithm developed in this study.
The noisy image is transformed into the wavelet domain using two-dimensional discrete wavelet transform (2D-DWT), obtaining the first-level wavelet coefficients: low-frequency component (
x1
_LL), high-frequency component in the horizontal direction (
x1
_LH), high-frequency component in the vertical direction (
x1
_HL), and high-frequency component in both horizontal and vertical directions (
x1
_HH). The first-level low-frequency sub-band,
x1
_LL, is then further decomposed into relatively low-frequency and high-frequency components, generating the second-level wavelet coefficients (
x2
_LL,
x2
_LH,
x2
_HL, and
x2
_HH). This process is recursively applied to further decompose
x2
_LL, fully utilizing the multiresolution property of the wavelet transform. As a result, an appropriate number of decomposition levels is selected, and for each level, an optimal hard threshold is applied to remove noise from the wavelet coefficients. The denoised wavelet coefficients from the (
n + 1)th level are combined to form the low-frequency subband of the
nth level. This process is repeated until the final denoised image is reconstructed (
Figure 1).