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

Module 3

Uploaded by

abdul.azeez
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

Module 3

Uploaded by

abdul.azeez
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

Digital Image Processing

MODULE 3

Image Restoration
Digital Image Processing

MODULE 3
RBT Level:-
• Restoration: Noise models, L1, L2, L3 in the
Restoration
Presence of Noise Only using Spatial Filtering
and Frequency Domain Filtering, Linear,
Position Invariant Degradations, Estimating
the Degradation Function, Inverse Filtering,
Minimum Mean Square Error (Wiener)
Filtering, Constrained Least Squares Filtering.
[Text: Chapter 5: Sections 5.2, to 5.9]
Digital Image Processing

Image Restoration - 1
Outline

• Image enhancement vs. restoration


• Degradation model
– Noise only
– Linear, space-invariant

• General approaches
– Inverse filters
– Wiener filters
Digital Image Processing

Image Restoration - 1
Image enhancement vs. restoration

• Image enhancement : process image so that


the result is more suitable for a specific
application, is largely a subjective process.
• Image restoration : recover image from
distortions to its original image, is largely an
objective
process.
Digital Image Processing
Image Restoration - 1
General approaches

• Model the degradation


• Apply the inverse process to recover the
original image
Digital Image Processing
Image Restoration - 1
Degradation models : noise only
g ( x, y)  f ( x, y)   ( x, y)
G(u, v)  F (u, v)  N (u, v)
• Noise models
– Spatial characteristics (independent or dependent)
– Intensity ( distribution, spectrum)
• Uniform, Gaussian, Rayleigh, Gamma (Erlang),
Exponential, impulse
– Correlation with the image (additive, multiplicative)

• De-noising
– Spatial filtering
– Frequency domain filtering
Digital Image Processing

5.2 Noise models


Digital Image Processing

Image Restoration - 1
Noise models – examples
Digital Image Processing

Image Restoration - 1
Noise models – periodic noise
Digital Image Processing
De-noising
Image Restoration
5.3 RESTORATION IN THE PRESENCE OF NOISE ONLY ------
SPATIAL FILTERING

• Estimation of noise parameters


– By spectrum inspection: for periodic noise
– By test image: mean, variance and histogram shape, if imaging system is
available
– By small patches, if only image is available

• De-noising
– Spatial filtering ( for additive noise)
• Mean filters
• Order-statistics filters
• Adaptive filters
– Frequency domain filtering (for periodic noise)
Image Restoration
Digital Image Processing

Arithmetic mean filter


ˆf ( x, y)  1
 g ( s, t )
mn ( s ,t )S xy

Geometric mean filter


1
  mn
ˆf ( x, y )  
 g ( s, t ) 
( s ,t )S xy 
Digital Image Processing

Image Restoration - 1
De-noising – Salt & Pepper noise example
Digital Image Processing

Image Restoration - 1
De-noising – Periodic noise example
Digital Image Processing
Image Restoration - 1
De-noising – evaluation

• PSNR
  S 
M N 2
1
MSE  
'

MN i 1 j 1
ij S ij

 255 2 
PSNR  10  log 10 
 MSE  
 

• Visual perception
Digital Image Processing
Image Restoration - 1
De-noising – evaluation example
Digital Image Processing
Image Restoration
Degradation models: linear vs. non-linear
5.3 RESTORATION IN THE PRESENCE OF NOISE ONLY ------
FREQUENCY FILTERING

• Many types of degradation can be


approximated by linear, space invariant
processes
– Can take advantages of the mature techniques developed for linear systems

• Non-linear and space variant models are more


accurate
– Difficult to solve
– Unsolvable
Digital Image Processing

BAND REJECT FILTERS


Digital Image Processing
Digital Image Processing

BAND PASS FILTERS


Digital Image Processing

NOTCH FILTERS
Digital Image Processing

NOTCH FILTERS
Digital Image Processing

OPTIMUM NOTCH FILTERING


Digital Image Processing

Image Restoration
5.5 Linear, space-invariant degradations

Sampling theorem -->

f ( x, y )   f ( ,  ) ( x   , y   )dd
g ( x, y )  H  f ( x, y )    ( x, y )
H  f ( ,  ) ( x   , y   )dd   ( x, y)
  H  f ( ,  ) ( x   , y   )dd   ( x, y )
Linearity, additivity -->
  f ( ,  ) H  ( x   , y   )dd   ( x, y )
  f ( ,  )h( x,  , y,  )dd   ( x, y )
Linearity, homogeneity -->
  f ( ,  )h( x   , y   )dd   ( x, y )

Space-invariant -->
(convolution integral)
Digital Image Processing

Image Restoration
Linear, space-invariant degradations (cont’)

Point Spread Function: h ( x,  , y ,  )

Linear, space-invariant degradation model:


g ( x, y)  f ( x, y)  h( x, y)   ( x, y)
G(u, v)  F (u, v) H (u, v)  N (u, v)
Digital Image Processing
Image Restoration
Estimating degradation function - 1

• Estimation by image observation


– Degradation system H is completely characterized by its impulse
response
– Select a small section from the degraded imageg s ( x, y )
– Reconstruct an unblurred image of the same size ˆ
f s ( x, y )
– The degradation function can be estimated by

Gs (u, v )
H s ( u, v ) 
Fˆs (u, v )
Digital Image Processing
Image Restoration
5.6 Estimating degradation function - 2
• Estimation by experimentation
– Point spread function (PSF) G (u, v )
H (u, v ) 
• Used in optics A
• The impulse becomes a point of light
• The impulse response is commonly referred to as the
PSF
Digital Image Processing
Image Restoration - 1
Estimating degradation function - 3

• Estimation by modeling – atmospheric turbulence

 k ( u 2  v 2 )5 / 6
H (u, v)  e
Digital Image Processing
Image Restoration - 1
Estimating degradation function - 3

• Estimation by modeling – linear motion blurring

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


T
H ( u, v ) 
 (ua  vb)
Digital Image Processing
Image Restoration - 1
Different approaches

• Classical approaches
– Inverse filter
– Weiner filter

• Algebraic approaches
• The regularization theory
Digital Image Processing
Image Restoration
5.7 Inverse filtering

• Degradation model
g ( x, y)  f ( x, y)  h( x, y)   ( x, y)
G(u, v)  F (u, v) H (u, v)  N (u, v)

• Inverse filter
G (u , v) N (u , v)
ˆ
F (u , v)  
H (u , v) H (u , v)
N (u , v)
 F (u , v) 
H (u , v)
Digital Image Processing

Image Restoration - 1
Inverse filtering - examples

 k ( u 2  v 2 )5 / 6
H (u, v)  e
Digital Image Processing
Image Restoration
5.8 MMSE / Wiener filtering

• In most images, adjacent pixels are highly correlated, while the gray
level of widely separated pixels are only loosely correlated.
• Therefore, the autocorrelation function of typical images generally
decreases away from the origin.
• Power spectrum of an image is the Fourier transform of its
autocorrelation function, therefore we can argue that the power
spectrum of an image generally decreases with frequency.
• Typical noise sources have either a flat power spectrum or one that
decreases with frequency more slowly than typical image power
spectrum.
• Therefore, the expected situation is for the signal to dominate the
spectrum at low frequencies, while the noise dominates the high
frequencies.
Digital Image Processing
Image Restoration - 1
Wiener filtering (cont’)

• Degradation model
g ( x, y)  f ( x, y)  h( x, y)   ( x, y)
G(u, v)  F (u, v) H (u, v)  N (u, v)

• Wiener filter 2
1 H (u, v)
Fˆ (u, v)  G (u, v)
H (u, v) H (u, v)  Pn (u, v) / Pf (u, v)
2

2
1 H (u, v)
 G (u, v)
H (u, v) H (u, v)  K
2
Digital Image Processing

Image Restoration - 1
Wiener filtering - example
Digital Image Processing

Image Restoration - 1
Wiener filtering - example

T
H (u, v)  
 (ua  vb)
sin (ua  vb)e  j (ua vb )
Digital Image Processing
Image Restoration - 1
Wiener filtering - problems

• The power spectra of the undegraded image


and noise must be known.
• Weights all errors equally regardless of their
location in the image, while the eye is
considerably more tolerant of errors in the
dark areas and high-gradient areas in the
image.
• In minimizing the mean square error, Wiener
filter also smooth the image more than the
eye would prefer.
Digital Image Processing

Image Restoration
5.9 Constrained Least Squares Filtering

Only the mean and variance of the noise is required


The degradation model in vector-matrix form
g MN 1  H MN MN f MN 1  ηMN 1
M 1 N 1 2

min C  [
x 0 y 0
2
f ( x, y )]

subject to g  Hf  η
2 2

The objective function


Digital Image Processing

Image Restoration - 1
Constrained Least Squares Filtering

The solution
H * (u, v)
Fˆ (u, v)  G(u, v)
H (u, v)  P(u, v)
2

 0 1 0 
p( x, y )   1 4  1
 
 0  1 0 
Digital Image Processing

Image Restoration - 1
Constrained Least Squares Filtering - example
Digital Image Processing

All Images taken from Gonzalez & Woods, Digital Image Processing (2002)

You might also like