Dip 08 09
Dip 08 09
2
5.1 A Model of the Image
Degradation/Restoration Process
3
A Model of the Image
Degradation/Restoration Process
4
A Model of the Image
Degradation/Restoration Process
5
Noise Models
5.2- Noise Models Gaussian noise: electronic circuit noise and sensors noise due
to poor illumination and /or temperature
5.3- Restoration in the Presence
of Noise Only-Spatial Filtering Rayleigh noise: helpful in characterizing noise phenomena in
5.4- Periodic Noise Reduction by ranging image
Frequency Domain Filtering Exponential and gamma noise: application in laser imaging
5.5 - Linear, Position-Invariant
Degradations Impulse noise: found in quick transient such as faulty-
5.6- Estimating the degradation switching ; is the only one that is visually indicative
Function
Uniform noise: basis for random number generator
5.7- Inverse Filtering
5.8- Minimum Mean Square Difficult to differentiate visually between the five image
Error (Wiener) Filtering (Fig 5.4(a) ~Fig5.4(b))
5.9- Constrained Least Square
Filtering
5.10- Geometric Mean Filter
5.11- Image Reconstruction from
Projections
13
Image Degradation with Additive Noise
5.2- Noise Models The parameters of periodic noise are often estimated by
inspection of the Fourier spectrum of the image.
5.3- Restoration in the Presence Periodicity tends to produce frequency spikes that often can
of Noise Only-Spatial Filtering
5.4- Periodic Noise Reduction by be detected even by visual analysis
Frequency Domain Filtering Attempt to infer the periodicity of noise components
5.5 - Linear, Position-Invariant
Degradations
5.6- Estimating the degradation How to identify the noise model?
Function
5.7- Inverse Filtering
Calculate the mean and variance of the gray levels
5.8- Minimum Mean Square
(illustrate with the image strips in Fig. 5.4)
Error (Wiener) Filtering The shape of the histogram identifies the closet PDF
5.9- Constrained Least Square match
Filtering
5.10- Geometric Mean Filter
5.11- Image Reconstruction from
Projections
21
Estimation of Noise Parameters
23
Restoration in the Presence of Noise
Only - Spatial Filtering
Moving
5.4- Periodic Noise Reduction by Degraded Window
Frequency Domain Filtering image
5.5 - Linear, Position-Invariant Sorted
Degradations Salt noise Array
5.6- Estimating the degradation
Function Pepper noise
5.7- Inverse Filtering
Filter output
5.8- Minimum Mean Square
Error (Wiener) Filtering
Normally, impulse noise has high magnitude and is
5.9- Constrained Least Square
Filtering solated. When we sort pixels in the moving window,
5.10- Geometric Mean Filter noise pixels are usually at the ends of the array.
5.11- Image Reconstruction from
Projections Therefore, it’s rare that the noise pixel will be a median value.
39
Median Filter: How it works
5.1- A Model of the Image The response of the filter based on four quantities:
Degradation/Restoration Process
The value of the noise image
5.2- Noise Models
The variance of the noise corrupting f(x,y) to form g(x,y)
5.3- Restoration in the Presence The local means of the pixel in Sxy
of Noise Only-Spatial Filtering
The local variance of the pixels in Sxy
5.4- Periodic Noise Reduction by
Frequency Domain Filtering
The filter can be proceeded as follows:
5.5 - Linear, Position-Invariant
Degradations The variance of the noise sh2 is zero (zero noise):
5.6- Estimating the degradation g(x,y)=f(x,y)
Function
5.7- Inverse Filtering
High local variance (edges) relative to sh2 : edges that
5.8- Minimum Mean Square should be preserved; return a value close to g(x,y)
Error (Wiener) Filtering The two variances are equal: return the arithmetic mean
5.9- Constrained Least Square value of the pixels in Sxy
Filtering
5.10- Geometric Mean Filter
5.11- Image Reconstruction from
Projections
55
Adaptive, Local Noise Reduction
Filters
5.4- Periodic Noise Reduction by 2. If sL2 is high relative to sh2, Edges (should be preserved),
Frequency Domain Filtering the filter should return the value close to g(x,y)
5.5 - Linear, Position-Invariant
Degradations 3. If sL2 = sh2, Areas inside objects
5.6- Estimating the degradation the filter should return the arithmetic mean value mL
Function
5.7- Inverse Filtering
Formula: 2
fˆ ( x, y ) g ( x, y ) 2 g ( x, y ) mL
5.8- Minimum Mean Square
Error (Wiener) Filtering
5.9- Constrained Least Square
L
Filtering
5.10- Geometric Mean Filter
5.11- Image Reconstruction from
Projections
56
Adaptive, Local Noise Reduction
Filters
5.3- Restoration in the Presence Median filter perform well as long as spatial density of the
of Noise Only-Spatial Filtering impulse noise is not vary large (Pa and Pb <0.2 )
5.1- A Model of the Image Purpose: Want to remove impulse noise while preserving edges
Degradation/Restoration Process
5.2- Noise Models Level A: A1= zmedian – zmin
Algorithm:
A2= zmedian – zmax
5.3- Restoration in the Presence If A1 > 0 and A2 < 0, go to level B
of Noise Only-Spatial Filtering Else increase window size
If window size <= Smax
5.4- Periodic Noise Reduction by repeat level A
Frequency Domain Filtering Else return zxy
5.5 - Linear, Position-Invariant Level B: B1= zxy – zmin
Degradations B2= zxy – zmax
5.6- Estimating the degradation If B1 > 0 and B2 < 0, return zxy
Function Else return zmedian
5.7- Inverse Filtering
5.8- Minimum Mean Square where
Error (Wiener) Filtering
5.9- Constrained Least Square zmin = minimum gray level value in Sxy
Filtering zmax = maximum gray level value in Sxy
5.10- Geometric Mean Filter zmedian = median of gray levels in Sxy
5.11- Image Reconstruction from zxy = gray level value at pixel (x,y)
Projections Smax = maximum allowed size of Sxy
61
Adaptive Median Filter: How it works
65
Periodic Noise Reduction by Frequency
Domain Filtering
5.4- Periodic Noise Reduction by -D(u,v) =distance from the origin H (u, v) 1 if D(u, v) D0
W
Frequency Domain Filtering 2
of the centered freq. rectangle W W
0 if D0 D(u, v) D0
5.5 - Linear, Position-Invariant -W =width of the band 2 2
W
Degradations -D0=Radial center of the band. 1 if D(u, v) D0
2
5.6- Estimating the degradation
Function
5.7- Inverse Filtering
5.8- Minimum Mean Square
Error (Wiener) Filtering
5.9- Constrained Least Square
Filtering
5.10- Geometric Mean Filter
5.11- Image Reconstruction from
Projections
67
Bandreject Filters
5.1- A Model of the Image A notch reject filter is used to eliminate some frequency
Degradation/Restoration Process components.
5.2- Noise Models
5.3- Restoration in the Presence Rejects (or passes) frequencies in predefined neighborhoods
of Noise Only-Spatial Filtering about a center frequency.
Ideal
5.4- Periodic Noise Reduction by
Frequency Domain Filtering Must
5.5 - Linear, Position-Invariant
appear in
Degradations symmetri
5.6- Estimating the degradation c pairs
Function
5.7- Inverse Filtering
about the
5.8- Minimum Mean Square origin.
Error (Wiener) Filtering
5.9- Constrained Least Square Butterworth Gaussian
Filtering
5.10- Geometric Mean Filter
5.11- Image Reconstruction from
Projections
70
Notch reject Filter - Example
Degraded
DFT (no shift)
image
5.1- A Model of the Image
Degradation/Restoration Process
5.2- Noise Models
5.3- Restoration in the Presence
of Noise Only-Spatial Filtering
5.5 - Linear, Position-Invariant Several pairs of components are present more than just one
Degradations
5.6- Estimating the degradation sinusoidal component
Function
5.7- Inverse Filtering
5.8- Minimum Mean Square
Error (Wiener) Filtering
5.9- Constrained Least Square
Filtering
5.10- Geometric Mean Filter
5.11- Image Reconstruction from
Projections DFT of noise Noise Restored image
74
5.5 Linear, Position-Invariant
Degradations
75
Linear, Position-invarient
Degradations
• The input-output relationship before the restoration
stage :
g ( x, y ) H [ f ( x, y )] ( x, y )
Let us assume that :
( x, y ) 0
So that :
g ( x, y ) H [ f ( x, y )]
76
Linear, Position-invarient
Degradations–cont
• H is linear if
H [af 1( x, y ) bf 2( x, y )] aH [ f 1( x, y )] bH [ f 2( x, y )]
77
Linear, Position-invarient
Degradations–cont
f(x,y) can be expressed in terms of a continuous impulse
function:
f ( x, y ) f ( , ) ( x , y )dd
g ( x, y ) H [ f ( x, y )] H
f ( , ) ( x , y )dd
f ( , ) H ( x , y )dd
g ( x, y )
H ( x , y ) h( x, , y, )
g ( x, y )
f ( , )h( x, , y, )78
dd
Linear, Position-invarient
Degradations–cont
If H is position invarient, then
H ( x , y ) h( x , y )
g ( x, y ) f ( , )h( x , y )dd
g ( x, y ) f ( , )h( x , y )dd ( x, y )
g ( x, y ) h ( x, y ) f ( x, y ) ( x, y )
G (u , v) H (u , v) F (u , v) N (u , v)
79
Linear, Position-invarient
Degradations–cont
g ( x, y ) h ( x, y ) f ( x, y ) ( x, y )
G (u , v) H (u , v) F (u , v) N (u , v)
80
5.6 Estimating the degradation
Function
81
Estimating the Degradation Function
Degradation model:
g ( x, y ) f ( x, y ) h( x, y ) ( x, y )
5.1- A Model of the Image
Degradation/Restoration Process
5.2- Noise Models
5.3- Restoration in the Presence
or
of Noise Only-Spatial Filtering
5.4- Periodic Noise Reduction by
G ( u, v ) F ( u, v ) H ( u, v ) N ( u, v )
Frequency Domain Filtering
5.5 - Linear, Position-Invariant Purpose: To estimate h(x,y) or H(u,v)
Degradations
5.6- Estimating the degradation Why? If we know exactly h(x,y), regardless of noise, we can do
Function
deconvolution to get f(x,y) back from g(x,y).
5.7- Inverse Filtering
5.8- Minimum Mean Square
Error (Wiener) Filtering
Methods:
5.9- Constrained Least Square
Filtering 1. Estimation by Image Observation
5.10- Geometric Mean Filter
5.11- Image Reconstruction from 2. Estimation by Experiment
Projections
83
3. Estimation by Modeling
Estimation by Image Observation
g(x,y)
5.1- A Model of the Image
Degradation/Restoration Process
f(x,y)*h(x,y)
5.2- Noise Models
5.3- Restoration in the Presence
of Noise Only-Spatial Filtering
5.4- Periodic Noise Reduction by
Frequency Domain Filtering f(x,y) Observation
5.5 - Linear, Position-Invariant Subimage
Degradations DFT
Gs ( u , v )
5.6- Estimating the degradation Estimated Transfer g s ( x, y )
Function
function
Gs (u, v )
5.7- Inverse Filtering H ( u, v ) H s ( u, v ) Restoration
5.8- Minimum Mean Square Fˆs (u, v ) process by
estimation
Error (Wiener) Filtering
5.9- Constrained Least Square
DFT
Fˆs (u, v )
Filtering
5.10- Geometric Mean Filter This case is used when we Reconstructed
5.11- Image Reconstruction from know only g(x,y) and cannot Subimage
Projections
85 repeat the experiment! fˆs ( x, y )
Estimation by Experimentation
Estimation by Experiment
o Used when we have the same equipment set up and can repeat
5.1- A Model of the Image the experiment.
Degradation/Restoration Process Response image from
5.2- Noise Models Input impulse image the system
5.3- Restoration in the Presence
of Noise Only-Spatial Filtering
5.4- Periodic Noise Reduction by
Frequency Domain Filtering
5.5 - Linear, Position-Invariant System
Degradations
H( )
5.6- Estimating the degradation
Function
A ( x , y ) g ( x, y )
5.7- Inverse Filtering
5.8- Minimum Mean Square DFT DFT
Error (Wiener) Filtering
5.9- Constrained Least Square
Filtering DFT A ( x, y ) A G (u, v )
5.10- Geometric Mean Filter
G ( u, v )
5.11- Image Reconstruction from
Projections H ( u, v )
87 A
Estimation by Modeling
g ( x, y )e
j 2 ( ux vy )
5.7- Inverse Filtering G (u, v ) dxdy
5.8- Minimum Mean Square
Error (Wiener) Filtering
T
5.9- Constrained Least Square f ( x x0 (t ), y y0 (t ))dt e j 2 ( ux vy ) dxdy
Filtering
0
5.10- Geometric Mean Filter
5.11- Image Reconstruction from
T
Projections f ( x x0 (t ), y y0 (t ))e j 2 ( ux vy) dxdy dt
90 0
Estimation by Modeling: Motion Blurring
G (u , v) F (u , v)e j 2 ux 0 ( t ) vy 0 ( t ) dt
T
F (u , v) e j 2 ux 0 ( t ) vy 0 ( t ) dt
T
0 0
j 2 ux 0 ( t ) vy 0 ( t )
T
H (u , v ) 0
e dt
G (u , v) H (u , v) F (u , v)
If the motion variables x0(t)and y0(t) are known, the transfer function H(u,v) can
be obtained directly from above equation
91
Motion Blurring - Example
94
Inverse Filtering
5/6
5.1- A Model of the Image k ( u M / 2) 2 ( v N / 2) 2
Degradation/Restoration Process Degradation function H (u , v) e
5.2- Noise Models
5.3- Restoration in the Presence
of Noise Only-Spatial Filtering
5.4- Periodic Noise Reduction by
Frequency Domain Filtering
5.5 - Linear, Position-Invariant
Degradations
5.6- Estimating the degradation
Function
101
Minimum Mean Square Error (Wiener)
Filtering
Fˆ (u , v) H W (u , v)G (u , v)
5.9- Constrained Least Square
Filtering
5.10- Geometric Mean Filter
5.11- Image Reconstruction from
Projections
103
Minimum Mean Square Error (Wiener)
Filtering
108
signal-to-noise ratio in the
frequncy domain
One of most important is the signal-to-noise ratio,
approximated using frequency domain quantities such
as M 1 N 1
F (u, v)
2
SNR u 0 v 0
M 1 N 1
N (u, v)
2
u 0 v 0
ˆ 2
e E ( f f )
2
Can be approximated in terms a summation involving
the original and restored image:
ˆ ( x, y )
M 1 N 1
1
2
MSE f ( x , y ) f
MN x 0 y 0
110
signal-to-noise ratio in the
spatial domain
If one considers the restored image to be “signal” and
the difference between this image and the orginal to be
noise, we can define a signal-to-noise ratio in the
spatial domain
M 1 N 1
x 0 y 0
fˆ ( x, y ) 2
SNR
M 1 N 1
ˆ
f ( x, y ) f ( x, y )
2
x 0 y 0
• The closer f and f̂ are, the larger this ratio will be.
111
5.9 Constrained Least Square
Filtering
112
Constrained Least Squares Filtering
5.1- A Model of the Image Provides a filter that can eliminate some of the artifacts caused by
Degradation/Restoration Process other frequency domain filters
5.2- Noise Models
5.3- Restoration in the Presence
of Noise Only-Spatial Filtering Done by smoothing criterion in the filter derivation
5.4- Periodic Noise Reduction by
Frequency Domain Filtering
5.5 - Linear, Position-Invariant The result does not have undesirable oscillations
Degradations
5.6- Estimating the degradation
Function H * (u , v)
5.7- Inverse Filtering F (u , v) G (u , v)
H (u , v) P (u , v)
2 2
5.8- Minimum Mean Square
Error (Wiener) Filtering
P(u,v) is the fourier transform of the Laplacian operator
5.9- Constrained Least Square
Filtering
Properties
of CLSF:
Prior knowledge
Require knowledge of only mean and variance of the noise.
Can be calculated from a given degraded image
Difference in Criterion
Wiener filter: statistically optimal in an average sense.
New approach: optimal for each image.
Not related to the dynamics of visual perception.
The choice of algorithm is determined by the perceive
visual quality of the resulting images.
115
Constrained Least Squares Filtering
x 0 y 0
Subject to the constraint: ˆ
|| g Hf || || η ||
2 2
ˆ H *
(u, v)
F (u, v) 2
G(u, v)
| H (u, v) | | P(u, v) |
2
0 -1 0
p ( x, y )= -1 4 -1
0 -1 0
𝛾 : adjustable parameter
𝑃(𝑢, 𝑣) : Fourier transform of the Laplacian operator
Constrained Least Squares Filtering
117
Procedure for computing
118
Constrained Least Squares Filtering
Gaussian noise:
mean=0,
variance=650
Variance=65
Variance=0.0065
119
Constrained Least Squares Filtering
Remarks:
Optimum restoration does not necessarily imply “best”
in the visual sense.
Depending on the nature and magnitude of the
degradation and noise, it is best to iteratively
determining the optimum parameters.
Usually, automatic determined filters yield inferior
results to manual adjustment of filter parameters.
Especially for a single, scalar parameter in CLSF.
120
Constrained Least Squares Filtering
122
Geometric Mean Filter
1
5.7- Inverse Filtering
5.8- Minimum Mean Square
Error (Wiener) Filtering
5.9- Constrained Least Square
Filtering
0
5.10- Geometric Mean Filter
1
5.11- Image Reconstruction from
Projections
123