You are on page 1of 55

Image Restoration

Noise Removal
Prepared by
Fawezya Rashed
Noha Abd elkareem
1
Image Restoration

 Restoration: recover an image that has


been degraded by using a priori
knowledge of the degradation
phenomenon.
 Image enhancement : subjective
process(making an image look better)
 • Image restoration : objective process
(recovering the original image)
2
Image Restoration

Restoration

3
A Model of the Image
Degradation/Restoration Process

4
Noise Models

 Noise sources:
 Arise during image acquisition and/or
transmission.
 The environmental conditions during
image acquisition.
 The quality of the sensing elements
themselves.

5
Some Important Noise Probability
Density Functions

 Gaussian (Normal) Noise.


 Rayleigh Noise.
 Erlang (Gamma) Noise.
 Exponential Noise.
 Uniform Noise.
 Bipolar impulse noise (salt-and-
pepper).
6
Gaussian (Normal) Noise.

 PDF of a Gaussian random variable z:

 where z represents the


grey level, μ is the mean or
average value of z and is
called the variance of z 7
Rayleigh Noise.

 PDF of Rayleigh noise is given by:

 The mean

 The variance

8
Erlang (Gamma) Noise.

 PDF of Gamma noise is given by:

 The mean

 The variance

9
Exponential Noise.

 PDF of Exponential noise is given by:

 The mean

 The variance

(Erlang noise with b = 1)


10
Uniform Noise.

 PDF of Uniform noise is given by:

 The mean

 The variance

11
Bipolar impulse (salt-and-
pepper) noise

 PDF of impulse noise is given by:

12
Some Important Noise
Probability Density Functions

13
Noise Models Example

Original image

14
Noise Models Example

Original image

15
Periodic Noise
 Typically comes from
electrical and
electromechanical
interference during image
acquisition

 Can be reduced significantly


using frequency domain
filtering
16
Restoration in the Presence of
Noise Only - Spatial Filtering

 When the only degradation is noise, the corrupted


image is:

 Spatial filtering is the method of choice in situation


when only additive random noise is present.

17
Mean Filters

 Arithmetic mean filter

 Noise is reduced as a result of blurring

18
Mean Filters

 Geometric mean filter

 Achieve smoothing comparable to the arithmetic mean


filter, but tends to lose less image detail in the process.

19
Mean Filters

 Harmonic mean filter

 Works well for salt noise, but fails for pepper noise.
 Does well also with other types of noise like Gaussian
noise

20
Mean Filters

 Contraharmonic mean filter

 Q is the order of the filter.


 The filter is well suited for reducing or eliminating the
effect of salt-and-pepper noise.
 For positive values of Q >> it eliminates pepper noise.
 For negative values of Q >> it eliminates salt noise.
21
Mean Filters

 Note that in the contraharmonic filter:


 If Q=0 >> reduces to the arithmetic mean filter.
 If Q=-1 >> reduces to the harmonic mean filter

22
Example

23
Example

24
Example

25
Order Statistics Filters

Spatial filters that are based on ordering the pixel values that
make up the neighbourhood operated on by the filter

Useful spatial filters include:


–Median filter
–Max and min filter
–Midpoint filter
–Alpha trimmed mean filter

26
Order-Statistic Filters

 Median filter

 Particularly effective with bipolar and unipolar impulse


noises
 Excellent at noise removal, without the smoothing effects
that can occur with other smoothing filters

27
Example

28
Order-Statistic Filters

 Max Filter

 Useful for finding the brightest points in an image


 So it reduces the pepper noise.

29
Order-Statistic Filters

 Min Filter

 Useful for finding the darkest points in an image


 So it reduces the salt noise.

30
Example

Image Image
Corrupted Corrupted
By Pepper By Salt
Noise Noise

Result Of Result Of
Filtering Filtering
Above With Above With
A 3*3Max A 3*3 Min
Filter Filter

31
Order-Statistic Filters

 Midpoint Filter

 Note that this filter combines order-statics and averaging.


 It works best for randomly distributed noise like Gaussian
or uniform noise.

32
Order-Statistic Filters

 Alpha-trimmed mean filter

 The value of d can range from 0 to mn-1


 d=0 >> it reduces to the arithmetic mean filter
 D=mn-1 >> it reduces to the median filter
 for other value of d >> it Useful in situation involving multiple types of
noise, such as combination of salt-and-pepper and Gaussian noise
33
Example

34
Adaptive Filters

 Adaptive filter:
 The response of the filter changes according to the local
properties of the image. Used features:

35
Adaptive Filters

 Adaptive median Filters


 Used for:
 Remove salt-and-pepper noise
 Provide smoothing of other noise
 Reduce distortion

36
Adaptive median filter

First examine the following notation:


 zmin = minimum grey level in Sxy
 zmax = maximum grey level in Sxy
 zmed = median of grey levels in Sxy
 zxy = grey level at coordinates (x, y)
 Smax =maximum allowed size of Sxy

37
Median Filter Algorithm

Stage A: A1 = zmed – zmin Satge A is to


A2 = zmed – zmax determine if zmed
If A1 > 0 and A2 < 0, Go to stage B is an impulse
Else increase the window size
If window size ≤ Smax repeat stage A
Else output zmed

Satge B: B1 = zxy – zmin Satge B is to


B2 = zxy – zmax determine if zxy is
If B1 > 0 and B2 < 0, output zxy an impulse
Else output zmed

38
Example

39
Periodic noise reduction by
frequency Domain Filtering

 Band Reject Filters


 Removing periodic noise form an image
involves removing a particular range of
frequencies from that image

40
Example

41
Periodic noise reduction by
frequency Domain Filtering

 Bandpass filter
 Perform the opposite operation of a
bandreject filter.

42
Example

43
Example

44
Periodic noise reduction by
frequency Domain Filtering

 Notch reject filter


 Rejects frequencies in predefined neighborhoods about a
center frequency

45
Periodic noise reduction by
frequency Domain Filtering

 Notch pass filter


is obtained from a notch reject filter by

46
Example

Horizontal
Scan lines

Notch
DFT pass

Notch Notch
pass reject47
Example

48
Example

49
Example

50
Estimating by observation

 Look at a detail of the degraded


image, and construct its estimated
version, Then

51
Estimating by experimentation

 Suppose that equipment similar to the


one used for acquisition be available;
then it is possible to obtain an accurate
estimation of the degradation by
imaging an impulse using the same
system settings. Then,
H(u, v) = G(u, v) / A

52
Estimating by modeling
 Example 1:
degradation model
proposed by Hufnagel
and Stanley [1964]
 Based on the physical
characteristics of
atmospheric turbulence:

53
Estimating the degradation
function

 Estimating by observation
 Estimating by experimentation
 Estimating by modeling

54
Estimation by modeling: example

55

You might also like