# Wavelet thresholding

What is the difference between soft thresholding and hard thresholding. Where we use soft and hard thresholding in image for denoising. I understand that in hard thresholding, the coefficients below threshold value are set to zero and the value above the threshold is set to one. Please explain me about soft threshold. Please explain whether the threshold value is the intensity value of the image. For example if the intensity value ranges between 0 to 255. In case of hard thresholding if the threshold value is considered as 100 then the values below 100 is set to 0.The value above 100 are retained. Is this correct? Please correct me.

• Google search finds this paper: fceia.unr.edu.ar/~jcgomez/wavelets/Donoho_1995.pdf You should try reading it and coming back with more specific questions. Apr 7, 2014 at 16:51
• Hard thresholding what you are saying is only correct for the set to zero while the other coefficients are left unajusted. In soft thresholding coefficients are all adjusted based on based on MAD and other elements of the equation. May 23, 2015 at 9:25

For a given threshold $\lambda$ (that can be dependent on resolution level), and value of wavelet coefficient $d$, hard thresholding is defined as:

$D^H(d|\lambda)=\begin{cases} 0,& \text{for } |d| \leq \lambda\\ d,& \text{for } |d| > \lambda \end{cases}$

whereas soft thresholding is governed by following equation:

$D^S(d|\lambda)=\begin{cases} 0,& \text{for } |d| \leq \lambda\\ d-\lambda,& \text{for } d > \lambda \\ d+\lambda,& \text{for } d < -\lambda \\ \end{cases}$

Figure below depicts both cases:

The soft thresholding is also called wavelet shrinkage, as values for both positive and negative coefficients are being "shrinked" towards zero, in contrary to hard thresholding which either keeps or removes values of coefficients.

In case of image de-noising, you are not working strictly on "intensity values", but wavelet coefficients. You probably remember that you can decompose your image into wavelet levels, like in case of lovely Lena. Assuming that wavelet transform gives sparse coefficients, mostly close to zero, and noise level is lower than wavelet coefficients, you can simply threshold these. Although if you wish, you can perform hard/soft thresholding on each decomposition level with a different value of $\lambda$. When it is done, then you just have to reconstruct your image from all decomposition levels and voila, noise should be removed!

Below you have two examples of de-noised image via hard and soft thresholding respectively (same $\lambda$). Obviously soft thresholding gives more smooth image- if you can notice that with such a poor resolution ;) Courtesy of MATLAB.