Unit 3
Unit 3
UNIT-III
Dr.V.Angayarkanni
Image degradation
• The purpose of image restoration is to restore a degraded / distorted image to
its original content and quality
Dr.V.Angayarkanni
Image degradation model
• The objective of restoration is to get an estimate f^(x,y) of the original image from g(x,y),
the noise term η(x,y) and the degradation function H
• The closeness of the restored image to the original image mainly depends on H & η
Dr.V.Angayarkanni
Dr.V.Angayarkanni
• If H is a linear and position invariant process, then the degraded image in the
spatial domain is given by
Dr.V.Angayarkanni
g(x,y) = h(x,y) * f(x,y) + η(x,y)
• original image
• Noise
• Eventhough we may not know the original image, some information such as
power spectral density (PSD) and autocorreletion function (ACF) are easy to
model.
Dr.V.Angayarkanni
Discrete degradation
model
• Let f(x) & h(x) be arrays of dimension A & B respectively for a digital image,
sampled uniformly
Dr.V.Angayarkanni
• For the extended function the convolution expression is
For x = 0,1,2,…..,M-1
and
Dr.V.Angayarkanni
• And H is the M x M matrix given by
Dr.V.Angayarkanni
• Here the rows are related by a circular shift to the right
• i.e. the ith row element can be obtained from the i-1th row by shifting the
Dr.V.Angayarkanni
Enhancement vs Restoration
Image Enhancement
Image Restoration
• Better visual
representation
• Subjective
• No quantitative
measure
Dr.V.Angayarkanni
Noise Models
• The main sources of noise in digital images
arise during image acquisition (digitization) and / or
transmission
Dr.V.Angayarkanni
Dr.V.Angayarkanni
Blurred Image Blurred Image + Additive Noise
Dr.V.Angayarkanni
Gaussian White Noise
Dr.V.Angayarkanni
Noise Probability Density
Functions
Dr.V.Angayarkanni
• Gaussian Noise
for z > a
0 for z < a
&
for z > 0
0 for z < 0
&
Dr.V.Angayarkanni
• Exponential Noise
for z > 0
0 for z < 0
&
Dr.V.Angayarkanni
• Uniform Noise
If a < z <
b
0 for z < 0
&
Dr.V.Angayarkanni
• Impulse (Salt & pepper) Noise
for z = a
for z = b
0 otherwise
Dr.V.Angayarkanni
Dr.V.Angayarkanni
• If either P or P is zero, the impulse noise is called
Unipolar
a b
Dr.V.Angayarkanni
• The negative impulses appear as black points (pepper) and
positive impulses appear as white points (salt), in an image
Dr.V.Angayarkanni
• The Rayleigh density is helpful in characterizing noise
phenomena in range imaging
Dr.V.Angayarkanni
Periodic Noise
Dr.V.Angayarkanni
Estimation of Noise parameters
Dr.V.Angayarkanni
Gaussian Rayleigh Gamma
Images & Histograms resDur.lVt.iAnnggayfarrokamnnidifferent noise to the image
Exponential Uniform Salt & Pepper
Dr.V.Angayarkanni
Consider a strip or subimage denoted by S
&
Dr.V.Angayarkanni
• The shape of the histogram identifies the closest PDF match
• These two factors, mean & variance completely specify the PDF
• The heights of the peaks that corresponds to black and white pixels are the
estimates of Pa & Pb
Dr.V.Angayarkanni
Restoration with only noise
spatial parameters
• When the only gradation present in an image is noise, then
• In the case of periodic noise, we can estimate N(u,v) from the spectrum G(u,v)
• In that case N(u,v) can be subtracted from G(u,v), but it is not easily achieved
Dr.V.Angayarkanni
Mean Filters
Arithmetic Mean Filter
Dr.V.Angayarkanni
Geometric Mean Filter
Dr.V.Angayarkanni
Harmonic Mean Filter
• The Harmonic mean filter works well for salt noise & Gaussian noise but
fails for the pepper noise
Dr.V.Angayarkanni
Contra Harmonic Mean Filter
• The Contra Harmonic Mean filtering is given by the
expression
pepper noise
• If Q is positive, it eliminates the pepper noise & If Q is negative, it
eliminates the salt noise, but not simultaneously
Dr.V.Angayarkanni
• The Contra Harmonic Mean filter reduces to the
arithmetic mean filter if Q = 0 & to the harmonic mean filter if
Q = -1
Dr.V.Angayarkanni
Order-Statistics Filters
• The response is based on ordering or the ranking of the pixels contained in the
• The response of the filter at any point is determined by the ranking result
Dr.V.Angayarkanni
Median Filter
• It replaces the value of a pixel by the median of the gray
levels in the neighborhood of the pixel
Dr.V.Angayarkanni
Max Filters
Dr.V.Angayarkanni
Min Filters
Dr.V.Angayarkanni
Midpoint Filter
• This filter computes the midpoint between the maximum &
minimum values in the area encompassed by the filter
Dr.V.Angayarkanni
Alpha trimmed mean
filter
• This filter deletes the d/2 lowest & the d/2 highest gray level values in
the neighborhood Sxy
Dr.V.Angayarkanni
Adaptive Filters
Dr.V.Angayarkanni
Adaptive local noise reduction
filter
• The Mean & Variance are two simple statistical measures of a random variable
Dr.V.Angayarkanni
• Let the selected local region be S
xy
• The response of the filter at any point (x,y) on which the region is
Dr.V.Angayarkanni
• The expected behavior of the filter is
2
1. If ση is zero, the filter should return the value of g(x,y)
2. If the local variance is high relative to σ 2, the filter should return a value close to g(x,y).
η
High local variance indicate the edges & they should be preserved
3. if the two variances are equal, it must return the mean value of the pixels in Sxy
Dr.V.Angayarkanni
• The adaptive expression for obtaining
based on the
above assumptions is
2
• But very rarely only we get the value of ση
2 2 2 2
• Hence ση / σL is set to 1, whenever ση > σL
• H(u,v) =
1 otherwise
Dr.V.Angayarkanni
• Butterworth Band Reject Filters
Dr.V.Angayarkanni
• Band Reject Filtering is used for noise removal in the
applications, where the approx location of the noise in the
frequency domain is known
Dr.V.Angayarkanni
• Even small details & textures are restored effectively
• It will not be possible to get similar results by a direct
spatial domain approach using convolution masks
Dr.V.Angayarkanni
Dr.V.Angayarkanni
Band Pass Filters
Dr.V.Angayarkanni
Notch filter
Purpose
Image restoration : Image having added with noise and degraded is to be restored with its original shape
Dr.V.Angayarkanni
Dr.V.Angayarkanni
Dr.V.Angayarkanni
Dr.V.Angayarkanni
Optimum notch filter
o The interference patterns have been simple to identify and characterize in the frequency domain, leading to the
specification of notch filter transfer functions that also are simple to define heuristically.
o When several interference components are present, heuristic specifications of filter transfer functions are not
always acceptable because they may remove too much image information in the filtering process (a highly
undesirable feature when images are unique and/or expensive to acquire).
o In addition, the interference components generally are not single-frequency bursts and It tend to have broad skirts
that carry information about the interference pattern. which are not always easily detectable from the normal
transform background.
o Alternative filtering methods that reduce the effect of these degradations are quite useful in practice.
o Hence the requirement of is optimum notch filter, in the sense that it minimizes local variances of the restored
estimate.
Dr.V.Angayarkanni
Dr.V.Angayarkanni
Dr.V.Angayarkanni
Dr.V.Angayarkanni
Dr.V.Angayarkanni
Degradation Model
n(x,y)
Dr.V.Angayarkanni
Restoration Model
Degradation Restoration
f(x,y) f(x,y)
Model Filter
Dr.V.Angayarkanni
f(x,y)
Approach
Build
g = h*f + n
degradation model
Analyze using g = Hf + n
algebraic techniques
W -1 g = DW -1 f + W -1 n
Formulate
restoration algorithms f = H -1 g
Implement using
Fourier transforms F(u,v) = G(u,v)/H(u,v)
f(x,y)
Dr.V.Angayarkanni
Estimating the degradation function
• There are three ways to estimate the degradation function, for use in image restoration
• Observation
• Experimentation
• Mathematical modeling
Dr.V.Angayarkanni
Inverse Filtering
• The simple method to restoration is direct inverse filtering
Dr.V.Angayarkanni
• since
• i.e. even if we know the degradation function, we cannot recover the un-degraded
image exactly as N(u,v) is a random function whose Fourier transform is not known
Dr.V.Angayarkanni
• At (u,v), H(u,v) ≈ 0
Dr.V.Angayarkanni
• One method to find the zero or small value problem is to limit the filter frequencies
to values near the origin
• Thus by limiting the analysis to frequencies near the origin, there is less possibility of
facing zero values
Dr.V.Angayarkanni
Inverse Filtering Examples
0.2x
Dr.V.Angayarkanni
Inverse Filtering
Dr.V.Angayarkanni
Wiener Filtering
• It is also called as Minimum Mean Square Error filtering
Dr.V.Angayarkanni
Wiener Estimator
x(t) h(t)
s(t) y(t)
n(t)
Dr.V.Angayarkanni
• Given the degraded image g, the Wiener filter is an optimal filter h such
win
2
that E{|| f – hwing|| } is minimized.
• Assume that f and η are uncorrelated zero mean stationary 2D random
sequences with known power spectrum Sf and Sn. Thus,
Dr.V.Angayarkanni
Dr.V.Angayarkanni
Dr.V.Angayarkanni
• It is assumed that the noise & the image are uncorrelated
and that they have zero mean
Dr.V.Angayarkanni
• where
• The restored image in the spatial domain is given by the Inverse Fourier transform of the
frequency domain estimate F^(u,v)
Dr.V.Angayarkanni
Weiner Generalization
η(x,y)
Degradation Restoration
Dr.V.Angayarkanni
Weiner FiltDer.Vr.AnCgahyarakarnnai
• If the noise is zero, then the noise power spectrum
vanishes & it becomes the Inverse Filter
Dr.V.Angayarkanni
Dr.V.Angayarkanni
Wiener Filtering vs. Inverse Filtering
Dr.V.Angayarkanni
Corrupted by Image Inverse Filtering WinerFiltering
Filtering - comparison
Dr.V.Angayarkanni