際際滷

際際滷Share a Scribd company logo
Digital Image
Processing
1
Image Restoration And
Reconstruction
2
Outline
Restoration in the Presence of Noise Only
Spatial Filtering
Mean Filters
Order-Statistic Filters
Model of image degradation/restoration
process
3
2/16/2018 4
Restoration in the Presence of Noise Only
牟 Spatial Filtering
Noise model without degradation
( , ) ( , ) ( , )
and
( , ) ( , ) ( , )
g x y f x y x y
G u v F u v N u v
2/16/2018 5
Spatial Filtering: Mean Filters (1)
Let represent the set of coordinates in a rectangle
subimage window of size , centered at ( , ).
xyS
m n x y
袖
( , )
Arithmetic mean filter
1
( , ) ( , )
xys t S
f x y g s t
mn
2/16/2018 6
Spatial Filtering: Mean Filters (2)
袖
1
( , )
Geometric mean filter
( , ) ( , )
xy
mn
s t S
f x y g s t

 
  
 削 

Generally, a geometric mean filter achieves smoothing
comparable to the arithmetic mean filter, but it tends to lose
less image detail in the process
2/16/2018 7
Spatial Filtering: Mean Filters (3)
袖
( , )
Harmonic mean filter
( , )
1
( , )xys t S
mn
f x y
g s t


It works well for salt noise, but fails for pepper noise.
It does well also with other types of noise like Gaussian noise.
2/16/2018 8
Spatial Filtering: Mean Filters (4)
袖
1
( , )
( , )
Contraharmonic mean filter
( , )
( , )
( , )
xy
xy
Q
s t S
Q
s t S
g s t
f x y
g s t






Q is the order of the filter.
It is well suited for reducing the effects of salt-and-pepper
noise. Q>0 for pepper noise and Q<0 for salt noise.
2/16/2018 9
Spatial Filtering: Example (1)
2/16/2018 10
Spatial Filtering: Example (2)
2/16/2018 11
Spatial Filtering: Example (3)
2/16/2018 12
Spatial Filtering: Order-Statistic Filters (1)
袖  ( , )
Max filter
( , ) max ( , )
xys t S
f x y g s t


袖  ( , )
Median filter
( , ) ( , )
xys t S
f x y median g s t


袖  ( , )
Min filter
( , ) min ( , )
xys t S
f x y g s t
2/16/2018 13
Spatial Filtering: Order-Statistic Filters (2)
袖    ( , )( , )
Midpoint filter
1
( , ) max ( , ) min ( , )
2 xyxy s t Ss t S
f x y g s t g s t

 刻  削
Spatial Filtering: Order-Statistic Filters (3)
袖  
( , )
Alpha-trimmed mean filter
1
( , ) ( , )
xy
r
s t S
f x y g s t
mn d 



2/16/2018 14
We delete the / 2 lowest and the / 2 highest intensity values of
( , ) in the neighborhood . Let ( , ) represent the remaining
- pixels.
xy r
d d
g s t S g s t
mn d
2/16/2018 15
2/16/2018 16
2/16/2018 17
2/16/2018 18
Spatial Filtering: Adaptive Filters (1)
Adaptive filters
The behavior changes based on statistical characteristics of
the image inside the filter region defined by the mn
rectangular window.
The performance is superior to that of the filters discussed
2/16/2018 19
Adaptive Filters:
Adaptive, Local Noise Reduction Filters (1)
2
: local region
The response of the filter at the center point (x,y) of
is based on four quantities:
(a) ( , ), the value of the noisy image at ( , );
(b) , the variance of the noise corrupti
xy
xy
S
S
g x y x y

2
ng ( , )
to form ( , );
(c) , the local mean of the pixels in ;
(d) , the local variance of the pixels in .
L xy
L xy
f x y
g x y
m S
S
2/16/2018 20
Adaptive Filters:
Adaptive, Local Noise Reduction Filters (2)
2
2
The behavior of the filter:
(a) if is zero, the filter should return simply the value
of ( , ).
(b) if the local variance is high relative to ,the filter
should return a value cl
g x y




ose to ( , );
(c) if the two variances are equal, the filter returns the
arithmetic mean value of the pixels in .xy
g x y
S
2/16/2018 21
Adaptive Filters:
Adaptive, Local Noise Reduction Filters (3)
袖
袖  
2
2
An adaptive expression for obtaining ( , )
based on the assumptions:
( , ) ( , ) ( , ) L
L
f x y
f x y g x y g x y m
2/16/2018 22
2/16/2018 23
Adaptive Filters:
Adaptive Median Filters (1)
min
max
med
max
The notation:
minimum intensity value in
maximum intensity value in
median intensity value in
intensity value at coordinates ( , )
maximum all
xy
xy
xy
xy
z S
z S
z S
z x y
S




 owed size of xyS
2/16/2018 24
Adaptive Filters:
Adaptive Median Filters (2)
med min med max
max
The adaptive median-filtering works in two stages:
Stage A:
A1 = ; A2 =
if A1>0 and A2<0, go to stage B
Else increase the window size
if window size , re
z z z z
S
 
 med
min max
med
peat stage A; Else output
Stage B:
B1 = ; B2 =
if B1>0 and B2<0, output ; Else output
xy xy
xy
z
z z z z
z z
2/16/2018 25
Adaptive Filters:
Adaptive Median Filters (2)
med min med max
max
The adaptive median-filtering works in two stages:
Stage A:
A1 = ; A2 =
if A1>0 and A2<0, go to stage B
Else increase the window size
if window size , re
z z z z
S
 
 med
min max
med
peat stage A; Else output
Stage B:
B1 = ; B2 =
if B1>0 and B2<0, output ; Else output
xy xy
xy
z
z z z z
z z
 
The median filter output
is an impulse or not
The processed point is an
impulse or not
2/16/2018 26
Example:
Adaptive Median Filters

More Related Content

Image Restoration And Reconstruction

  • 3. Outline Restoration in the Presence of Noise Only Spatial Filtering Mean Filters Order-Statistic Filters Model of image degradation/restoration process 3
  • 4. 2/16/2018 4 Restoration in the Presence of Noise Only 牟 Spatial Filtering Noise model without degradation ( , ) ( , ) ( , ) and ( , ) ( , ) ( , ) g x y f x y x y G u v F u v N u v
  • 5. 2/16/2018 5 Spatial Filtering: Mean Filters (1) Let represent the set of coordinates in a rectangle subimage window of size , centered at ( , ). xyS m n x y 袖 ( , ) Arithmetic mean filter 1 ( , ) ( , ) xys t S f x y g s t mn
  • 6. 2/16/2018 6 Spatial Filtering: Mean Filters (2) 袖 1 ( , ) Geometric mean filter ( , ) ( , ) xy mn s t S f x y g s t 削 Generally, a geometric mean filter achieves smoothing comparable to the arithmetic mean filter, but it tends to lose less image detail in the process
  • 7. 2/16/2018 7 Spatial Filtering: Mean Filters (3) 袖 ( , ) Harmonic mean filter ( , ) 1 ( , )xys t S mn f x y g s t It works well for salt noise, but fails for pepper noise. It does well also with other types of noise like Gaussian noise.
  • 8. 2/16/2018 8 Spatial Filtering: Mean Filters (4) 袖 1 ( , ) ( , ) Contraharmonic mean filter ( , ) ( , ) ( , ) xy xy Q s t S Q s t S g s t f x y g s t Q is the order of the filter. It is well suited for reducing the effects of salt-and-pepper noise. Q>0 for pepper noise and Q<0 for salt noise.
  • 12. 2/16/2018 12 Spatial Filtering: Order-Statistic Filters (1) 袖 ( , ) Max filter ( , ) max ( , ) xys t S f x y g s t 袖 ( , ) Median filter ( , ) ( , ) xys t S f x y median g s t 袖 ( , ) Min filter ( , ) min ( , ) xys t S f x y g s t
  • 13. 2/16/2018 13 Spatial Filtering: Order-Statistic Filters (2) 袖 ( , )( , ) Midpoint filter 1 ( , ) max ( , ) min ( , ) 2 xyxy s t Ss t S f x y g s t g s t 刻 削
  • 14. Spatial Filtering: Order-Statistic Filters (3) 袖 ( , ) Alpha-trimmed mean filter 1 ( , ) ( , ) xy r s t S f x y g s t mn d 2/16/2018 14 We delete the / 2 lowest and the / 2 highest intensity values of ( , ) in the neighborhood . Let ( , ) represent the remaining - pixels. xy r d d g s t S g s t mn d
  • 18. 2/16/2018 18 Spatial Filtering: Adaptive Filters (1) Adaptive filters The behavior changes based on statistical characteristics of the image inside the filter region defined by the mn rectangular window. The performance is superior to that of the filters discussed
  • 19. 2/16/2018 19 Adaptive Filters: Adaptive, Local Noise Reduction Filters (1) 2 : local region The response of the filter at the center point (x,y) of is based on four quantities: (a) ( , ), the value of the noisy image at ( , ); (b) , the variance of the noise corrupti xy xy S S g x y x y 2 ng ( , ) to form ( , ); (c) , the local mean of the pixels in ; (d) , the local variance of the pixels in . L xy L xy f x y g x y m S S
  • 20. 2/16/2018 20 Adaptive Filters: Adaptive, Local Noise Reduction Filters (2) 2 2 The behavior of the filter: (a) if is zero, the filter should return simply the value of ( , ). (b) if the local variance is high relative to ,the filter should return a value cl g x y ose to ( , ); (c) if the two variances are equal, the filter returns the arithmetic mean value of the pixels in .xy g x y S
  • 21. 2/16/2018 21 Adaptive Filters: Adaptive, Local Noise Reduction Filters (3) 袖 袖 2 2 An adaptive expression for obtaining ( , ) based on the assumptions: ( , ) ( , ) ( , ) L L f x y f x y g x y g x y m
  • 23. 2/16/2018 23 Adaptive Filters: Adaptive Median Filters (1) min max med max The notation: minimum intensity value in maximum intensity value in median intensity value in intensity value at coordinates ( , ) maximum all xy xy xy xy z S z S z S z x y S owed size of xyS
  • 24. 2/16/2018 24 Adaptive Filters: Adaptive Median Filters (2) med min med max max The adaptive median-filtering works in two stages: Stage A: A1 = ; A2 = if A1>0 and A2<0, go to stage B Else increase the window size if window size , re z z z z S med min max med peat stage A; Else output Stage B: B1 = ; B2 = if B1>0 and B2<0, output ; Else output xy xy xy z z z z z z z
  • 25. 2/16/2018 25 Adaptive Filters: Adaptive Median Filters (2) med min med max max The adaptive median-filtering works in two stages: Stage A: A1 = ; A2 = if A1>0 and A2<0, go to stage B Else increase the window size if window size , re z z z z S med min max med peat stage A; Else output Stage B: B1 = ; B2 = if B1>0 and B2<0, output ; Else output xy xy xy z z z z z z z The median filter output is an impulse or not The processed point is an impulse or not