0% found this document useful (0 votes)
25 views72 pages

Unit-4 Image Restoration

Uploaded by

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

Unit-4 Image Restoration

Uploaded by

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

1

UNIT - 4
Image Restoration
2

Image restoration
 Recover / restore image which has been
degraded by some function or method

 Once know the degradation method only


apply inverse of it to reverse

 Image enhancement is different because


 Does not consider any degradation model
 Not bother about degradation
3

Image restoration

g
Degradation Restoration
Function Function ^𝑓 (𝑥 , 𝑦)
𝑓 (𝑥 , 𝑦) +
H S

noise
4

Image restoration
Degraded Degraded Original Noise
image function Image

DFT DFT DFT DFT


of of of of
Degraded Degraded Original Noise
image function Image
Estimate degradation 5

function
 Three methods

1. By observation

 Give degraded image


 Degradation function H is not known
 Estimate by look into image
E.g. If image is blurred then try to get estimated image
using sharpening
Estimate degradation 6

function
 Three methods

1. By observation
2. By experimentation

 Develop system to get image just like degraded


image
 They must be as closer as possible to given
degraded image
 Now degraded function is known, apply inverse to
get restored image
Estimate degradation 7

function
 Three methods

1. By observation
2. By experimentation
3. By modeling

 Different models can be used to restore image


8

NOISE MODELS
9

Source of Noise
 Principle source of noise in digital images

 During acquisition
 Environmental conditions during image acquisition
 Quality of sensor element

 During transmission
 In wireless network image may be corrupted by
atmospheric disturbance
10

White noise
 Fourier spectrum of noise is constant

White noise image Plot of white noise image


11

IMPORTANT NOISE PDF


12

Different noise
1. Gaussian noise
2. Rayleigh noise
3. Erlang noise (Gamma noise)
4. Exponential noise
5. Uniform noise
6. Impulse noise (salt-and-pepper noise)
13

1. Gaussian noise
 Also called Normal noise
 Tractable in spatial and frequency domain
because of that mostly used in practice
 PDF (probability density function) of
Gaussian random variable z is :

z : Gray level μ : Average value


of z
σ : Standard σ2 : Variance of z
14

2. Rayleigh noise
PDF

Mean

Variance
15

3. Erlang noise
PDF

Mean

Variance

a > 0 and b is positive integer


Also called “ Gamma noise ”
16

4. Exponential noise
PDF

Mean

Variance

a>0
Special case of Gamma noise with b=1
17

5. Uniform noise
PDF

Mean

Variance
18

6. Impulse noise
PDF

b>a
Gray-level b appeared as light dot in image
Gray-level a appeared as dark dot in image
This is bipolar impulse noise
If Pa or Pb is zero then called unipolar
impulse noise
Also called “ salt-and-pepper noise ”
19

PDF of all 6 noise


20

Example

Image
Without noise
21

Example

Images
With
noise

Histogram

Gaussian Rayleigh Gamma


22

Example

Images
With
noise

Histogram

Exponential Uniform Salt & pepper


23

Spatial Domain

RESTORATION IN THE
PRESENCE OF NOISE
24

Spatial domain filters


 When degradation present in an image is
noise then

For frequency domain

 Spatial filter is used when additive noise is


present
25

Spatial domain filters


1. Mean filter
1. Arithmetic mean filter
2. Geometric mean filter
3. Harmonic mean filter
4. Contraharmonic mean filter

2. Order-Statistic filter
1. Median filter
2. Max & Min filter
3. Midpoint filter
4. Alpha-trimmed filter

3. Adaptive filter
1. Local noise reduction filter
2. Median filter
26

1. Mean filter
1. Arithmetic mean filter

 Sxy : rectangular subimage of size m⨯n


 Compute average of corrupted image g(x,y) in
area defined by Sxy
 at any point(x,y) is arithmetic mean
computed using the pixels in the region
defined by Sxy

 Reduce noise as a result of blurring


27

1. Mean filter
2. Geometric mean filter

 Give more smoother image then arithmetic


mean filter
28

1. Mean filter
29

1. Mean filter
3. Harmonic mean filter

 Works well for salt noise


 Fail for pepper noise
 Also works well with other noise like Gaussian
noise
30

1. Mean filter
4. Contraharmonic mean filter

 Where Q is order of filter


 Used to reducing effect of salt-and-pepper
noise
 +ve value of Q eliminate salt noise
 -ve value of Q eliminate pepper noise
31

1. Mean filter
32

1. Mean filter
33

2. Order-Statistic filter
1. Median filter

 Replaces the value of a pixel by the median of


the gray levels in the neighborhood of that
pixel

 Used for certain types of random noise


 Excellent noise reduction with less blurring
than linear smoothing filter
 Effective in presence of both bipolar and
unipolar impulse noise
34

2. Order-Statistic filter
35

2. Order-Statistic filter
2. Max & Min filter

 Used to reduce effect of pepper noise

 Used to reduce effect of salt noise


36

2. Order-Statistic filter
37

2. Order-Statistic filter
3. Midpoint filter

 Works well for randomly distributed noise like


Gaussian and Uniform noise
38

2. Order-Statistic filter
4. Alpha-trimmed filter

 Delete d/2 lowest and d/2 highest gray-level


values of g(s,t) in the neighborhood of Sxy
 gr(s,y) represents the remaining mn-d pixels
 Find averaging of this remaining pixels
 Value of d can be 0 to mn-1
 d=0 (arithmetic mean filter) d=mn-1 (median
filter)
39

2. Order-Statistic filter
4. Alpha-trimmed filter

 d=0
 arithmetic filter

 d=(mn-1)/2
 median filter

 other values of d
 useful when multiple types of noise is present
 like combination of salt-and-pepper and Gaussian
noise
40

2. Order-Statistic filter
41

3. Adaptive Filter
 Behavior of filter changes based on
statistical characteristics of the image
inside the filter region defined by Sxy
42

3. Adaptive Filter
1. Adaptive, Local noise reduction filter

 Mean & Variance : simple statistical measure


of a random variable
 Adaptive filter is based on them
 Mean (m) :
 Measure of average gray level in the region
 Variance (σ) :
 Measure of average contrast in the region
43

3. Adaptive Filter
1. Adaptive, Local noise reduction filter

 Out filter operate on local region Sxy


 : value of noisy image at point (x,y)
 : variance of the noise
 : local mean of pixels in Sxy
 : local variance of pixels in Sxy
44

3. Adaptive Filter
1. Adaptive, Local noise reduction filter
 Filter need to behave as follow:
1. If is zero, the filter should return g(x,y)

2. If local variance is high relative to ,the filter should


return a value closer to g(x,y)

3. If two variance are equal, the filter return the


arithmetic mean value of the pixels in Sxy
45

3. Adaptive Filter
1. Adaptive, Local noise reduction filter
46

3. Adaptive Filter
47

3. Adaptive Filter
2. Adaptive median filter

 Can handle impulse noise in better manner


the above filters
 It seeks to prevent detail while smoothing
nonimpulse noise
 Changes the size of Sxy during filter operation,
depending on certain conditions
48

3. Adaptive Filter
2. Adaptive median filter

 Consider following terms

Zmin : minimum gray level value in Sxy


Zmax : maximum gray level value in Sxy
Zmed : median gray level value in Sxy
Zxy : gray level at coordinate (x,y)
Smax : maximum allowed size of Sxy
49

3. Adaptive Filter
2. Adaptive median filter

 Algorithm works in two levels

Level-A : A1 = Zmed - Zmin


A2 = Zmed - Zmax
if A1>0 and A2<0 , Go to level-B

if window size ≤ Smax repeat level-A


else increase the window size

else output Zxy


50

3. Adaptive Filter
2. Adaptive median filter

 Algorithm works in two levels

Level-B : B1 = Zxy – Zmin


B2 = Zxy – Zmax
if B1 > 0 and B2 < 0 , output Zxy
else output Zmed
51

3. Adaptive Filter
52

Frequency Domain

RESTORATION IN THE
PRESENCE OF NOISE
53

Frequency domain filters


1. Bandreject filter
1. Butterworth bandreject filter
2. Gaussian bandreject filter

2. Bandpass filter

3. Notch filter
1. Butterworth notch filter
2. Gaussian notch filter
54

1. Bandreject filter
 Remove a band of frequencies above the
origin of the Fourier transform

D(u,v) : distance from origin


D0 : radial center
W : width of band
55

1. Bandreject filter
1. Butterworth bandreject filter of order “n”

2. Gaussian band reject filter


56

1. Bandreject filter
57

2. Bandpass filter
 Opposite operation of bandreject filter

 Transfer function of Bandpass filter Hbp(u,v) can


be obtained from corresponding Bandreject filter
transfer function Hbr(u,v)
58

2. Bandpass filter
59

3. Notch filter
 Rejects or passes frequencies in
predefined neighborhoods about a center
frequency

 Due to symmetry in
Fourier transform,
notch filter must
appear in symmetric
pair about the origin
60

3. Notch filter
1. Ideal notch reject filter
 Radius D0
 Centers at (u0,v0) and (-u0,v0)

where

and
61

3. Notch filter
2. Butterworth notch reject filter with order
“n”

3. Gaussian notch reject filter


62

3. Notch filter
 Transfer function for notch pass filter can
be obtain from notch reject filter
63

INVERSE FILTERING
64

Inverse filtering
 Study restoration of image degraded by
degradation function H

 Restoration is direct inverse filtering of the


transform of the original image simply by
dividing the transform of the degraded
image by the degradation function
65

WIENER FILTERING
66
Minimum Mean Square Error
Filtering
 This approach incorporates both
degradation function and statistical
characteristic of noise into restoration
process
 Consider images and noise as random
variable
 Objective to estimate so that mean
square error between and is minimum
 Error given by
67
Minimum Mean Square Error
Filtering
 Assume image and noise are not
correlated

 Minimum mean error function in frequency


domain

 This result is called “Wiener Filter”


68
Minimum Mean Square Error
Filtering
 Commonly called
Minimum mean square error filter
or
Least square error filter
69

Compare results
70

Compare results
71

Compare results
72

END
OF
UNIT-4

You might also like