[go: up one dir, main page]

0% found this document useful (0 votes)
70 views32 pages

Image Restoration: Noise Removal Using Frequency Domain Filters

This document discusses various frequency domain filters for noise removal from images: - The inverse filter performs deconvolution by dividing the degraded image by the degradation function in the frequency domain. However, it can amplify noise and cause artifacts. - The Wiener filter models the restoration error statistically to minimize the mean square error. It behaves like an inverse filter where there is no noise but attenuates the signal in noisy regions. - The constrained least-squares filter can eliminate artifacts caused by other filters by constraining the solution space during deconvolution.

Uploaded by

Duaa Hussein
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
70 views32 pages

Image Restoration: Noise Removal Using Frequency Domain Filters

This document discusses various frequency domain filters for noise removal from images: - The inverse filter performs deconvolution by dividing the degraded image by the degradation function in the frequency domain. However, it can amplify noise and cause artifacts. - The Wiener filter models the restoration error statistically to minimize the mean square error. It behaves like an inverse filter where there is no noise but attenuates the signal in noisy regions. - The constrained least-squares filter can eliminate artifacts caused by other filters by constraining the solution space during deconvolution.

Uploaded by

Duaa Hussein
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 32

Image Restoration

Noise Removal Using


Frequency Domain Filters
Overview

 Frequency domain filters operate by using the Frequency


transform representation of the image.
 The Fourier transform is performed on the following spatial
domain functions:
– The degraded image, d(r,c)
– The degradation function, h(r,c)
– The noise model, n(r,c)
i o n
Fu nc t
ea d
S pr
i n t
Po
S F
P

Send a Point of light through the system and


see what comes out.
Overview

 The specific models used for h(r,c) and n(r,c) are application specific,
and in practice are normally estimated.
 However, there are cases where these models may not be required.
 The noise model can be matched to a typical noise models discussed
before by taking the histogram of noise in the degraded image.

 Most types of degradation function that can be analyzed are some form of
blurring (a point being spread out).
– This type of degradation function is also referred to as point spread
function (PSF).
 How do we find PSF?
– We need to have access to the system and make sure that the condition
under which the image was acquired have not been changed.
Overview

– Send a point of light through the system.


– The output is the PSF, which is h(r,c).
However, it is not always practical to implement a point of light.
A more reliable method is to use sinusoidal inputs at many different
frequencies to determine the overall frequency response H(u,v).

 PSF actually measures the amount and direction of blurring that can
occur to one pixel. The blur can be:
– Linear in one direction (horizontal, vertical, diagonal).
– Circularly symmetric (blur in all direction).
 This blurring is modeled using a PSF mask.
 The PSF mask is then used to model h(r,c).
l ,,,,,
Overview tic a
,v e rt
ta l
r iz on
y h o
n o nl
0 0 0 0 0ectio 0 0 1 0 0
di r
o ne
0 0 ar0in 0 0 0 0 1 0 0
l ine
n b e
ur ca1 1 1 1 1 0 0 4 0 0
Bl
0 0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 1 0 0
Horizontal PSF mask Vertical PSF mask with
with uniform blur center-weighting
Overview

1 0 0 0 0 0 1 1 1 0
0 2 0 0 0 1 2 4 2 1
0 0 4 0 0 1 4 8 4 1
0 0 0 2 0 1 2 4 2 1
0 0 0 0 1 0 1 1 1 0
Diagonal PSF mask Circular PSF mask with
with Gaussian distribution Gaussian distribution
Overview

 After the PSF mask has been selected, the mask must be padded
with zeros up to the size of the image.
 Then the zero-padded mask must be shifted, with wrap-around, so
that the center of the original mask is at the point (0,0) in the image
(at the upper left corner).
 Then Fourier transform is performed.
 The frequency domain filters incorporate information regarding the
noise and the PSF into their model.
– D(u,v) = H(u,v)I(u,v) + N(u,v)
 To obtain the restored image, the general form is as follows:
-1 -
– Î(r,c) = F [Î(u,v)] = F 1[Rtype(u,v)D(u,v)]
– Rtype(u,v) is the frequency domain filter.
Inverse Filter

 The inverse filter uses the typical model with the assumption of no noise
(N(u,v) = 0).
– D(u,v) = H(u,v)I(u,v) + 0
 The fourier transform of the original image can be found as follows:
D(u , v) 1
I (u , v)   D(u , v)
H (u , v) H (u , v)
Inverse Filter
 To get the original image, we take the inverse Fourier transform of
I(u,v):

I ( r , c )  F 1 I ( u , v )   F 1
H (u ,v )
 
D (u ,v )

 F 1 D ( u , v )
H (u ,v )
1

 The inverse filter is the term 1/H(u,v).


– Note that the inversion is point-by-point inversion, and not a matrix
inversion.
 To find 1/H(u,v), we take each term separately and divide it into 1.
Inverse Filter

50 50 25
H (u , v)  20 20 20
20 35 22
 1 1 1 
 50 50 25 
1  1 1 1 
 
H (u , v )  20 20 20 
 1 1 1 
 20 35 22 
Inverse Filter

 In practice, a number of complications can arise when this technique is


applied.
– If any points in H(u,v) are zero, then we have a division by zero, 1/0.
– With the assumption of no noise, D(u,v) can also contain zeros, and
this can lead to an indeterminate ratio, 0/0.
– If the assumption of no noise is not correct, the restored image
would really be distorted by the additive noise.

 One method to deal with this problem is to limit the restoration to a


specific radius about the origin in the spectrum, called the restoration
cutoff frequency.
 For spectral component beyond this radius, we can set the filter gain
to 0 (Î(u,v) = 0) or 1.
 This is equivalent to an ideal lowpass filter, which results in blurring
and ringing (waves around the edges).
Inverse Filter

 Setting the cut-off frequency too low may provide poor result
(blurred).
 Setting it too high may result in the restored image being
overshadowed by noise.
 In practice, the cut-off frequency must be experimentally determined
and highly application specific.
Inverse Filter

Original Image Image blurred with 11x11


Gaussian convolution mask
Inverse Filter

Inverse filter, cutoff frequency = 32 Inverse filter, cutoff frequency = 64


Histogram stretched to show details Histogram stretched to show details
Inverse Filter

Inverse filter, cutoff frequency = 95 Inverse filter, cutoff frequency = 120


Histogram stretched to show details Histogram stretched to show details
Wiener Filter
 The Wiener filter is also called the minimum mean-square estimator.
 It can solve some of the weaknesses of the inverse filter.
– This is done by attempting to model the error in the restored image
using statistical methods.
– After the error is modeled, the average error is mathematically

minimized.
 The Wiener filter is defined as follows:
H * (u, v)
R W (u, v) 
S (u, v) H*(u,v) = complex conjugate of H(u,v)
H(u, v) 2  n Sn(u,v) = |N(u,v)|2 = power spectrum of the noise
S I (u, v)
SI (u,v) = |I(u,v)|2= power spectrum of the original image
Wiener Filter

 If the noise power spectrum is zero, the Wiener filter becomes an


inverse filter. H * (u ,v )
RW ( u , v ) 
0
H (u ,v ) 2 
S I (u ,v )

H * (u ,v ) H * (u ,v ) 1
  
H (u ,v ) 2 H (u ,v ) H * (u ,v ) H (u ,v )

 When the noise spectrum gets larger, the denominators of Wiener filter
increases, thus decreasing the value of RW(u,v) .
 This leads to a desired behavior:
– In portions of the spectrum where there is no noise, we have an
inverse filter.
– In portions of the spectrum heavily corrupted by noise, the filter
attenuates the signal.
Wiener Filter

 In practical applications the original, uncorrupted image is typically


not available.
– Therefore, the power spectrum ratio is replaced by a parameter
K whose optimal value must be experimentally determined.
H * (u ,v )
RW ( u , v ) 
H (u ,v ) 2  K
 K can just be a constant.
 However, making K a function of the frequency domain variables (u,v)
may give some extra benefits.
– Noise typically dominates at high frequencies.
– Making the value K increases as the frequency increases will
cause the filter to attenuates at high frequency, thus reducing the
noise.
Wiener Filter

Original Image Blurred image with added


gaussian noise
Wiener Filter

Result of Wiener filter Result of inverse filter


with cut-off frequency=80 with cut-off frequency=80
Constrained Least-Squares Filter

 This filter can eliminate some of the artifacts caused by other


frequency domain filters.
– Some of the other frequency domain filters cause “waves” to
appear in the image.
– This filter includes a smoothing criterion in the filter derivative that
can eliminate this effect.
 The constrained least-squares filter is defined as follows:
H * (u ,v )
RCLS ( u , v ) 
H (u ,v ) 2  P (u ,v ) 2

 = the adjustment factor


P(u,v) = the Fourier Transform of the smoothness criterion function.
Constrained Least-Squares Filter

 The adjustment factor’s value is experimentally determined and is


application dependent.
 A standard function used for p(r,c) is the laplacian filter mask:
1
 01 4 1
0

 0 1 0

 However, before P(u,v) is calculated, the p(r,c) function must be
zero-padded to the same size as the image.
 P(u,v) is then obtained by applying Fourier transform on p(r,c).
 Once P(u,v) is obtained, then it can be incorporated into RCLS(u,v).
Constrained Least-Squares Filter

Original Image Blurred image with added


gaussian noise
Constrained Least-Squares Filter

Result of CLS filter with Result of Wiener filter


cut-off frequency = 128 with cut-off frequency=80
 = 23000
Geometric Mean Filters

 The geometric filter equation provides a general form for many


of the frequency domain restoration filters.
1
  
 H (u ,v )   H * (u ,v ) 
RGM ( u , v ) 


 
 H (u , v ) 2   H (u , v ) 2   S n (u , v )
S I (u ,v )


 The terms are as previously defined, with γ and α being positive real
constants.
 If α = ½ and γ = 1, then this filter is called a power spectrum equalization
filter (homomorphic filter).
– It is an average between the inverse filter and the Wiener filter (hence
the term geometric mean).
 If α = 0, this filter is called a parametric Wiener filter.
Geometric Mean Filters

– When γ = 1, this filter becomes a standard Wiener filter.


– When γ = 0, this filter becomes an inverse filter.
– As γ is adjusted, the results vary between these two filters, with larger
values providing more of the Wiener effect.
 In general, the frequency domain filters work well for small amount of
blurring and moderate amount of additive noise
 The inverse filter is inadequate with too much noise.
 The Wiener filter has the tendency to cause undesirable artifacts in the
resultant image.
 The constrained least-squares filter helps to minimize the Wiener-type
artifact.
 The parametric Wiener and geometric mean provide additional parameters
for application-specific needs.
Notch Filter
 The filter “notches” out selected frequencies.
 It is useful to restore images that have been corrupted with a sinusoidal
interference pattern.
– Can be seen in poor broadcast television images.
– It is also a common artifact in images that have been obtained where the
imaging device reside on some type of vibrating mechanical system such
as a ship or a satellite.
 The interference pattern appears as high peak in frequency domain.
 Therefore, it can easily be identified and eliminated using notch filter.
 Usually, when high peak is notched out, the image lost some amount of
energy which results in lost of contrast.
– Need to enhance using histogram stretch.
Notch Filter

Original Image
Notch Filter

Image corrupted with


sinusoidal noise
Notch Filter

Restored Image
The end

You might also like