Image Denoising Using Wavelets Ramji Venkataramanan Raghuram Rangarajan Siddharth Shah.

21
Image Denoising Using Wavelets Ramji Venkataramanan Raghuram Rangarajan Siddharth Shah

Transcript of Image Denoising Using Wavelets Ramji Venkataramanan Raghuram Rangarajan Siddharth Shah.

Page 1: Image Denoising Using Wavelets Ramji Venkataramanan Raghuram Rangarajan Siddharth Shah.

Image Denoising

Using Wavelets

Ramji VenkataramananRaghuram Rangarajan

Siddharth Shah

Page 2: Image Denoising Using Wavelets Ramji Venkataramanan Raghuram Rangarajan Siddharth Shah.

What is Denoising ?

• Aims to remove whatever noise is present regardless of the signal’s frequency content.

• Denoising is not smoothing ! Smoothing removes high frequencies and keeps lower ones.

“ Method of estimating the unknown signal from available noisy data”

• Denoising by Wavelet Thresholding

1. Calculate linear Forward Wavelet Transform. Y=W(X)

2. Threshold wavelets using one of available techniques Non linear, non-parametric step

Z=D(Y,λ)

3. Calculate Inverse Wavelet Transform. Y=W-

1(X)

Page 3: Image Denoising Using Wavelets Ramji Venkataramanan Raghuram Rangarajan Siddharth Shah.

Why should I Threshold ?

Sparsity: Small Coefficients dominated by noise. Large ones by signal.

Why don’t we replace small coefficients by zero ?

or How does one decide this threshold below which we set everything to zero ?

Is this way of thresholding coefficients i.e. “keep or kill” the only way ?

Page 4: Image Denoising Using Wavelets Ramji Venkataramanan Raghuram Rangarajan Siddharth Shah.

How Do I discard wavelet coefficients?

Hard V/s Soft Thresholding

Hard “keep or kill”: Wavelet Coefficient with an absolute value below the threshold λ is replaced by 0.Yj,k = Xj,k if |Xj,k|≥ λ 0 if |Xj,k|<λ

Soft: Set coefficients below λ to zero and shrink those above λ in absolute value.

Yj,k = sgn(Xj,k)(|Xj,k – λ) if |Xj,k| ≥ λ = 0 if |Xj,k| < λ

Page 5: Image Denoising Using Wavelets Ramji Venkataramanan Raghuram Rangarajan Siddharth Shah.

1D Signal Analysis

1.Add white noise to each of these functions with σ=1. 2. Took wavelet transforms using Haar, Daubechies2, Daubechies4 and Daubechies 8 filters.3. Performed hard and soft thresholding using a variety of thresholds from 0 to 5 in steps of 0.24. Compared MSEs for each filter for all 4 types of signals.

Page 6: Image Denoising Using Wavelets Ramji Venkataramanan Raghuram Rangarajan Siddharth Shah.

1D Signal Analysis: Results

Comparision with Universal ThresholdλUNIV is the optimal threshold to minimize MSE in the asymptotic sense(N→∞)

λUNIV=√2log(2048)=3.905 >> optimal thresholds obtained empirically

Page 7: Image Denoising Using Wavelets Ramji Venkataramanan Raghuram Rangarajan Siddharth Shah.

Image DenoisingOUTLINE

Same underlying principle as in 1D signals.

Subbands of the wavelet transform

HH1

HL1

LH1

HH2

HL2

LH2

HH3

HL3

LH3

LL

details

Low resolution residual

Page 8: Image Denoising Using Wavelets Ramji Venkataramanan Raghuram Rangarajan Siddharth Shah.

Types of thresholding

VisuShrink

• Universal Threshold.

• Works asymptotically.

• Denoised image is overly smooth.

SureShrink

• Subband adaptive threshold

• Based on Stein’s unbiased estimator for risk (SURE!)

Mlog2

Goal : Determine thresholds to minimize MSE

Denoising of Images

Page 9: Image Denoising Using Wavelets Ramji Venkataramanan Raghuram Rangarajan Siddharth Shah.

Threshold Selection by SURE Let wavelet coefficients in the jth subband be

{ Xi : i =1,…,d }

SURE proposes method for estimating loss.

For the soft threshold estimator , we have

Select threshold tS by

Does not perform well in Sparse Cases. The Solution ??

Hybrid Scheme

SURE threshold tS for dense cases.

Universal threshold tdF for sparse cases.

2ˆ XX

)(ˆiti XX

2

1

,min:#2);(

d

iii tXtXidXtSURE

);(minarg XtSUREt S

Page 10: Image Denoising Using Wavelets Ramji Venkataramanan Raghuram Rangarajan Siddharth Shah.

BayesShrink

Idea : Wavelet coefficients in each subband ~ Generalized Gaussian Distribution (GGD).

GGD ~ Gaussian for β =2 ; ~ Laplacian for β =1

Find T*(σX , β) that minimizes Bayesian Risk assuming this GGD.

No closed form solution to this threshold !

Set threshold as ; very close to actual minimum!

Intuitive appeal !!

XXBT

2

)(

X

XBT

)(

Page 11: Image Denoising Using Wavelets Ramji Venkataramanan Raghuram Rangarajan Siddharth Shah.

Why is VisuShrink not good? Overly smoothed images

VisuShrink

Page 12: Image Denoising Using Wavelets Ramji Venkataramanan Raghuram Rangarajan Siddharth Shah.

Comparison of BayesShrink vs. SureShrink

Page 13: Image Denoising Using Wavelets Ramji Venkataramanan Raghuram Rangarajan Siddharth Shah.

GGD - A good model for distribution of coefficients in a subband.

Problem: Difficult to design an optimal quantizer for a GGD.

Denoising and Compression Denoising has been done…Can we

compress the denoised coefficients?

Signal – contains redundancies.

Noise-Highly uncorrelated Good compression method can also distinguish between signal and noise.

Question: Can we have a model that facilitates denoising as well as efficient compression of the coefficients ?

Is there a simpler way out ?

Page 14: Image Denoising Using Wavelets Ramji Venkataramanan Raghuram Rangarajan Siddharth Shah.

A Gaussian model For most images, Gaussian distribution is found to be a satisfactory approximation.

Model :

We can denoise as well as compress using this model !

.,...,2,1, ijjjNjNXY

XYXEX j

Y

X

j ˆˆ]/[ˆ 2

2

DENOISINGWe use an MMSE estimator to get an estimate of X from the noisy observations Y .

Page 15: Image Denoising Using Wavelets Ramji Venkataramanan Raghuram Rangarajan Siddharth Shah.

Denoising ˆˆ ,

YX are estimated as before for each detail subband.

Therefore, subband adaptive estimation.

Note the similarity with shrinkage – all coefficients are pulled towards zero!

Page 16: Image Denoising Using Wavelets Ramji Venkataramanan Raghuram Rangarajan Siddharth Shah.

Results for Elaine

Compare with σ2 = 900 !

MSE of the denoised image =123.76 .

Page 17: Image Denoising Using Wavelets Ramji Venkataramanan Raghuram Rangarajan Siddharth Shah.

Compression

Quantization scheme:

• Fix a maximum allowable distortion D.

• Calculate variance of each detail coefficient in the subband. (How?)

• Choose the smallest quantizer to encode each coefficient from a set of available optimal quantizers for a Gaussian distribution, so that the distortion is less than D.

• Repeat for all detail subbands.

Denoised coefficients in each subband are iid as }ˆ{ jX ),0(ˆˆ2

4

Y

XN

Page 18: Image Denoising Using Wavelets Ramji Venkataramanan Raghuram Rangarajan Siddharth Shah.

Compression

• Coefficients in the LL band represent local averages of the signal- Not zero mean.

• So we model the LL band as a uniform pdf .

This cannot be done for the LL subband ! Why?

So what have we done ?

Y Quantize withLocal variance

ˆˆ2

2

Y

X Ŷ YQ

White Noise

XW

Page 19: Image Denoising Using Wavelets Ramji Venkataramanan Raghuram Rangarajan Siddharth Shah.

Results

Page 20: Image Denoising Using Wavelets Ramji Venkataramanan Raghuram Rangarajan Siddharth Shah.

ComparisonsComparisons

Page 21: Image Denoising Using Wavelets Ramji Venkataramanan Raghuram Rangarajan Siddharth Shah.

Conclusions 1. Wavelet shrinkage is an effective method for

denoising. 2. Subband adaptive thresholding performs better

than universal thresholding since it adapts to the characteristics of each subband

3. BayesShrink is found to give the best threshold among those compared for denoising images.

4. Assuming a Gaussian distribution for wavelets enables one to perform

simultaneous denoising and compression using highly tractable

equations.