0% found this document useful (0 votes)
23 views

Week 10

The document discusses periodic noise reduction using frequency domain filtering, focusing on methods such as band-reject and notch filters to isolate and minimize noise in images. It outlines the steps for optimum notch filtering, including extracting frequency components and minimizing local variances to restore images affected by periodic interference. Additionally, it covers the estimation of degradation functions through observation, experimentation, and mathematical modeling to address image blurring caused by various factors.

Uploaded by

dr.tamer.nassef
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views

Week 10

The document discusses periodic noise reduction using frequency domain filtering, focusing on methods such as band-reject and notch filters to isolate and minimize noise in images. It outlines the steps for optimum notch filtering, including extracting frequency components and minimizing local variances to restore images affected by periodic interference. Additionally, it covers the estimation of degradation functions through observation, experimentation, and mathematical modeling to address image blurring caused by various factors.

Uploaded by

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

Periodic Noise Reduction by Frequency Domain

Filtering

The basic idea

Periodic noise appears as concentrated bursts of


energy in the Fourier transform, at locations
corresponding to the frequencies of the periodic
interference
Approach

A selective filter is used to isolate the noise

02/09/2025 1
Perspective Plots of Band-reject Filters

02/09/2025 2
02/09/2025 3
A Butterworth
bandreject filter of
order 4, with the
appropriate radius and
width to enclose
completely the noise
impulses

02/09/2025 4
Perspective Plots of Notch Filters

02/09/2025 5
Perspective Plots of Notch Filters
• Due to the symmetry of the Fourier transform, notch
filters must appear in symmetric pairs about the
origin in order to obtain meaningful results.
• The one exception to this rule is if the notch filter is
located at the origin, in which case it appears by itself.
• Although we show only one pair for illustrative
purposes, the number of pairs of notch filters that can
be implemented is arbitrary.
• The shape of the notch areas also can be arbitrary
(e.g., rectangular).
N (u, v) H NP (u, v)G (u, v)
 ( x, y )  1  H NP (u, v)G (u, v)
02/09/2025 7
Several interference components are present, the methods
discussed in the preceding sections are not always
acceptable because they remove much image information
The components tend to have broad skirts that carry
information about the interference pattern and the skirts are
not always easily detectable.
02/09/2025 8
Optimum Notch Filtering

It minimizes local variances of the restored


estimated
f ( x, y )

Procedure for restoration tasks in multiple periodic


interference

Isolate the principal contributions of the


interference pattern

Subtract a variable, weighted portion of the


pattern from the corrupted image

02/09/2025 9
Optimum Notch Filtering: Step 1

Extract the principal frequency components


of the interference pattern

Place a notch pass filter at the location of each


spike.
N (u, v) H NP (u, v)G (u, v)
 ( x, y )  1  H NP (u, v)G (u, v)

02/09/2025 10
Optimum Notch Filtering: Step 2 (1)

Filtering procedure usually yields only an approximation of the


true pattern. The effect of components not present in the estimate
of  (x, y ) can be minimized instead by subtracting from g ( x, y )
a weighted portion of  (x, y) to obtain an estimate of f ( x, y ):

f ( x, y ) g ( x, y )  w( x, y ) ( x, y )

One approach is to select w( x, y) so that the variance of the estimate f ( x, y )


is minimized over a specified neighborhood of every point ( x, y).

02/09/2025 11
Optimum Notch Filtering: Step 2 (2)

The local variance of f ( x, y):

a b 2
1  f ( x  s, y  t )  f ( x, y ) 
 ( x, y ) 
2
 
(2a  1)(2b  1) s  a t  b  

02/09/2025 12
Assume that w(x,y) remains
essentially constant over
Optimum
the neighborhood Notch
gives the Filtering: Step (3)
approximation
w(x+s,
The localy+t) of f ( x, y ):
= w(x,y)
variance
a b 2
1  f ( x  s, y  t )  f ( x, y ) 
 ( x, y ) 
2
 
(2a  1)(2b  1) s  a t  b  

2
a b  g ( x  s , y  t )  w( x  s , y  t ) ( x  s , y  s )  
1  
   
(2a  1)(2b  1) s  a t  b   g ( x, y )  w( x, y ) ( x, y ) 

   

2
a b  g ( x  s, y  t )  w( x, y ) ( x  s, y  s )  
1  
   

(2a  1)(2b  1) s  a t  b  g ( x, y )  w( x, y ) ( x, y ) 

   

02/09/2025 13
Optimum Notch Filtering: Step (4)

The local variance of f ( x, y ):


2
1 a b g ( x  s, y  t )  w( x, y ) ( x  s, y  s )  
 ( x, y ) 
2
 
(2a  1)(2b  1) s  a t  b   g ( x, y )  w( x, y ) ( x, y ) 

   

 2 ( x, y )
To minimize  2 ( x, y ) , 0
w( x, y )
for w( x, y ), the result is
g ( x, y ) ( x, y )  g ( x, y ) ( x, y )
w( x, y )  2
 ( x, y )   ( x, y )
2

02/09/2025 14
Optimum Notch Filtering: Example

02/09/2025 15
Optimum Notch Filtering: Example

02/09/2025 16
Optimum Notch Filtering: Example

N (u, v) H NP (u, v)G (u, v)

02/09/2025
 ( x, y )  1  H NP (u, v)G (u, v) 17
Optimum Notch Filtering: Example

02/09/2025 18
Linear, Position-Invariant Degradations

g ( x, y )  H  f ( x, y )    ( x, y )

02/09/2025 19
Linear, Position-Invariant Degradations

H is linear
H  af1 ( x, y )  bf 2 ( x, y )  aH  f1 ( x, y )  bH  f 2 ( x, y )
f1 and f 2 are any two input images.

An operator having the input-output relationship


g ( x, y ) H  f ( x, y )  is said to be position invariant
if
H  f ( x   , y   ) g ( x   , y   )
for any f ( x, y ) and any  and  .
02/09/2025 20
Linear, Position-Invariant Degradations
 
f ( x , y )   f ( ,  ) ( x   , y   ) d d 
 
Assume for a moment that  ( x, y) 0
if H is a linear operator,
g ( x, y )  H  f ( x, y ) 
 
H   f ( ,  ) ( x   , y   )d d  
 Superposition
      (or Fredholm)
  integral of the
  H  f ( ,  ) ( x   , y   ) d d 
 
first kind
 
  f ( ,  ) H  ( x   , y   )  d d  Impulse
 
respons
e
02/09/2025 21
Linear, Position-Invariant Degradations

Assume for a moment that  ( x, y) 0


if H is a linear operator and position invariant,
H  ( x   , y   )  h( x   , y   )
g ( x, y )  H  f ( x, y ) 
 
  f ( ,  ) H  ( x   , y   )  d d 
  Convolution
  integral in 2-D
  f ( ,  )h( x   , y   )d d 
 

02/09/2025 22
Linear, Position-Invariant Degradations

In the presence of additive noise,


if H is a linear operator and position invariant,

 
g ( x , y )   f ( ,  )h( x   , y   )d d   ( x, y )
 

h( x, y ) f ( x, y )   ( x, y )

G (u , v) H (u , v) F (u , v)  N (u , v)

02/09/2025 23
Estimating the Degradation Function
► Three principal ways to estimate the degradation
function

1. Observation
For example, if the image is blurred, we can look at a small rectangular section of the image containing
sample structures, like part of an object and the background. In order to reduce the effect of noise, we would
look for an area in which the signal content is strong (e.g., an area of high contrast). The next step would be
to process the subimage to arrive at a result that is as unblurred as possible. For example, we can do this by
sharpening the subimage with a sharpening filter and even by processing small areas by hand.

From the characteristics of this function, we then deduce the complete degradation function H(u, v)

2. Experimentation
obtain the impulse response of the degradation by imaging an impulse (small dot
of light) using the same system settings.

3. Mathematical Modeling
02/09/2025 24
Mathematical Modeling (1)

► Environmental conditions cause degradation

A model about atmospheric turbulence

 k ( u 2 v 2 )5/6
H (u, v) e
k : a constant that depends on
the nature of the turbulence

02/09/2025 25
02/09/2025 26
Mathematical Modeling (2)

► Derive a mathematical model from basic principles

E.g., An image blurred by uniform linear motion


between the image and the sensor during image
acquisition

02/09/2025 27
Mathematical Modeling (3)

Suppose that an image f ( x, y ) undergoes planar motion,


x0 (t ) and y0 (t ) are the time-varying components of motion
in the x- and y -directions, respectively.
The optical imaging process is perfect. T is the duration
of the exposure. The blurred image g ( x, y )
T
g ( x, y )  f  x  x0 (t ), y  y0 (t ) dt
0

02/09/2025 28
Mathematical Modeling (4)
T
g ( x, y )  f  x  x0 (t ), y  y0 (t ) dt
0
 
G (u , v)   g ( x , y )e
 j 2 ( ux vy )
dxdy
 
 
   f  x  x0 (t ), y  y0 (t ) dt  e  j 2 (ux vy ) dxdy
 T

     0 
 
   f  x  x0 (t ), y  y0 (t )  e  j 2 (ux vy ) dxdy  dt

T

0      
T  j 2  ux0 ( t ) vy0 ( t ) 
 F (u, v)e dt
0
T  j 2  ux0 ( t ) vy0 ( t ) 
F (u, v)  e dt
0
02/09/2025 29
Mathematical Modeling (4)

T  j 2  ux0 ( t ) vy0 ( t ) 
H (u , v)  e dt
0

Suppose that the image undergoes uniform linear motion


in the x-direction only, at a rate given by x0 (t ) at / T .
T
H (u , v)  e  j 2 ux0 (t ) dt
0
T
 e  j 2 uat /T dt
0

T  j ua
 sin( ua )e
 ua
02/09/2025 30
Mathematical Modeling (5)

Suppose that the image undergoes uniform linear motion


in the x-direction and y -direction, at a rate given by
x0 (t ) at / T and y0 (t ) bt / T
T  j 2  ux0 ( t ) vy0 ( t ) 
H (u , v)  e dt
0
T
 e  j 2 [ ua  vb ]t / T
dt
0

T
 sin  (ua  vb) e  j (ua vb )
 (ua  vb)

02/09/2025 31
02/09/2025 32
Inverse Filtering

An estimate of the transform of the original image


 G (u , v)
F (u , v ) 
H (u , v)

 F (u , v) H (u, v)  N (u , v)
F (u , v) 
H (u , v)
N (u, v)
F (u , v) 
H (u , v)

02/09/2025 33
Inverse Filtering

 N (u , v)
F (u , v) F (u , v) 
H (u , v)

1. We can't exactly recover the undegraded image


because N (u, v) is not known.
2. If the degradation function has zero or very
small values, then the ratio N (u, v) / H (u, v) could
easily dominate the estimate F  (u, v).

02/09/2025 34
Inverse Filtering

One approach is to limit the filter frequencies to values near the origin.

EXAMPLE

The image in Fig. 5.25(b) was inverse filtered using the


exact inverse of the degradation function that generated
that image. That is, the degradation function is
2 5/6
 k  u  M /2  ( v  N /2)2 
H (u, v) e  

k 0.0025, M  N 480.

02/09/2025 35
The poor
performance of
direct inverse
filtering in general

A Butterworth
lowpass
function of
order 10

02/09/2025 36
Minimum Mean Square Error (Wiener) Filtering

 N. Wiener (1942)

 Objective
Find an estimate of the uncorrupted image such that the mean
square error between them is minimized


e 2 E ( f  f )2 

02/09/2025 37
Minimum Mean Square Error (Wiener) Filtering

The minimum of the error function is given in the frequency domain


by the expression

  H *(u, v) S f (u, v) 
F (u , v)  2  G (u , v)
 S f (u , v) | H (u, v) | S (u, v) 
 H *(u, v) 
 2  G (u , v)
 | H (u, v) | S (u, v) / S f (u, v) 
 1 | H (u , v) |2 
 2  G (u , v )
 H (u , v) | H (u, v) | S (u, v) / S f (u, v) 

02/09/2025 38
Minimum Mean Square Error (Wiener) Filtering

  1 | H (u , v ) | 2 
F (u , v)  2  G (u , v)
 H (u , v) | H (u , v) | S (u , v) / S f (u , v) 

H (u , v) : degradation function
H *(u , v): complex conjugate of H (u, v)
| H (u, v) |2 H *(u, v) H (u, v)
S (u , v) | N (u, v) |2 power spectrum of the noise
S f (u , v) | F (u , v) |2 power spectrum of the undegraded image

02/09/2025 39
Minimum Mean Square Error (Wiener) Filtering

  1 | H (u , v ) | 2

F (u , v)  2  G (u , v)
 H (u , v) | H (u , v) |  K 

K is a specified constant. Generally, the value of K


is chosen interactively to yield the best visual results.

02/09/2025 40
Minimum Mean Square Error (Wiener) Filtering

02/09/2025 41
Left:
degradate
d image

Middle:
inverse
filtering

Right:
Wiener
filtering

02/09/2025 42
Some Measures (1)

Singal-to-Noise Ratio (SNR)


M 1 N1

 | F (u , v ) | 2

SNR  Mu 01 Nv  01
 | N (u
u 0 v 0
, v ) | 2

This ratio gives a measure of the level of information


bearing singal power to the level of noise power.

02/09/2025 43
Some Measures (2)

Mean Square Error (MSE)


M 1 N1 2
1
MSE=
MN
   f ( x, y)  f ( x, y ) 
x 0 y 0

Root-Mean-Sqaure-Error (RMSE)
M 1 N1
f ( x, y ) 2

RMSE  M  1 N  1u 0 v 0
f ( x, y ) |2
 | f
u 0 v 0
( x , y ) 

02/09/2025 44
Constrained Least Squares Filtering

► In Wiener filter, the power spectra of the


undegraded image and noise must be known.
Although a constant estimate is sometimes useful,
it is not always suitable.

► Constrained least squares filtering just requires the


mean and variance of the noise.

02/09/2025 45
Constrained Least Squares Filtering

 H *(u, v) 
F (u , v)  2 
G (u , v)
 | H (u , v) |  | P (u, v) | 
2

P (u , v) is the Fourier transform of the function


 0 1 0
p( x, y )   1 4  1
 0  1 0 
 is a parameter

02/09/2025 46
Examples

02/09/2025 47
Geometric Mean Filter

1 

 H *(u, v)   | H (u , v ) |2 

F (u , v)    G (u , v)
2
 | H (u, v) |   S (u, v) / S f (u , v)  
2
 | H (u , v ) | 

 1: inverse filter


 =0: parametric Wiener filter
 =1/2: geometric mean filter

02/09/2025 48

You might also like