Updated DIP UNIT3-2022
Updated DIP UNIT3-2022
Image Restoration - degradation model, Properties, Noise models – Mean Filters – Order
Statistics – Adaptive filters – Band reject Filters – Band pass Filters – Notch Filters –
Optimum Notch Filtering – Inverse Filtering – Wiener filtering.
3. What is salt and pepper noise? Suggest a filter to remove salt and pepper noisein
images. [OR] Which filter will be effective in minimizing the impact of salt and pepper
noise in an image? (NOV/DEC-17)
Bipolar impulse noise is called as Salt and Pepper Noise. Median filter is the most suitable
filter to remove salt and pepper noise in images.
2
EC8093- DIP UNIT III - IMAGE RESTORATION
Degradation: A system operator H (degradation function), together with an additive white noise
term η(x, y) operates on an input image f(x, y) to produce a degraded image g(x, y).
Restoration: The restoration filter which is inverse of the degradation function is used to obtain
an estimate of the original image from the degraded image.
which is called the superposition or convolution or fredholm integral of first kind. It states
that if there sponse of H to an impulse is known, the response to any input f (α, β) can be
calculated by means of fredholm integral.
3
EC8093- DIP UNIT III - IMAGE RESTORATION
The product of the pixel values in the defined neighborhood raised to the power of l/mn, gives
the restore pixel value.
11. What are the filters that can be used to remove periodic noise?
Frequency domain filters are to be used to remove periodic noise in images
The commonly used frequency domain filters are,
(a) Notch Filters
(b) Notch Reject filters
(c) Notch Pass filters
(d) Optimum notch filters
4
EC8093- DIP UNIT III - IMAGE RESTORATION
15. What are the forms of degradation? (or) State the causes of degradation in an image.
(Nov/Dec 16)
(a) Sensor noise
(b) Blur due to camera misfocus
(c) Relative object camera motion
(d) Random atmosphere turbulence
(e) Thermal noise etc.
18. Define pseudo inverse filter? (Nov 2008 & Nov 2011)
Stabilized or generalized version of inverse filter.
For linear shift invariant system with frequency response H (u,v) is
Gray levels in the estimate are linear functions of leads in degraded image
20. State the concept of inverse filtering? (or) What is the principle of inverse filtering?
(May-2014)
The inverse filtering divides the transform of the degraded image G(u, v) by the degradation
function H(u, v) and determines an approximation of the transform of the original image.
24. What are the limitations of inverse filtering? (or) Mention the drawbacks of inverse
filtering. (June 2011, Nov-2013)[NOV/DEC-17]
1. Inverse filtering is highly sensitive to noise.
2. It has Zero or small value problem.
If degradation function H (u, v) has zero or small value then the ratio N(u,v) / H(u,v)
dominates the value of restored image.
This implies a poor performance of the system and results in bad approximation of the original
function. This is known as zero or small value problem.
6
EC8093- DIP UNIT III - IMAGE RESTORATION
27. Define rubber sheet transformation. (or) Geometric transformation :(May 2013 &
2015)
Geometric transformation:
It is generally modify spatial relationship between pixels in an image. It is also called as
“Rubber sheet transformation” because they may be viewed as the process of printing the
image on a sheet of rubber.
29. What are the basic transformations that can be applied on the images?
Applying some basic transformation to a uniformly distorted image can correct for a range of
perspective distortions by transforming the measurements from the ideal coordinates to those
actually used. (For example, this is useful in satellite imaging where geometrically correct
ground maps are desired.)
Translation
Scaling
Rotation
Concatenation
7
EC8093- DIP UNIT III - IMAGE RESTORATION
33. Define Wiener filter? (OR )What are the functions of wiener filter? (June 2011)
Wiener filtering is a method of restoring images in the presence of blur and noise.
35. How the derivatives are obtained in edge detection during formulation? (APR/MAY-
18)
The first derivative at any pointin an image is obtainedby using the magnitude of the gradient at
that point.similarly, the second derivatives are obtained by using the laplacian.
37. Give the relation for Gamma noise and exponential noise?(NOV/DEC-18)
39. Compute the restored image pixel value (center pixel only) for the following 3 × 3
grayscale 8 bit image by using arithmetic mean filter.(A/M 2021)
50 100 50
100 150 100
100 100 150
50+100+50+100+150+100+100+100+150 900
Mean value = = = 100
9 9
40. How to achieve restoration by using direct inverse filtering ?(A/M 2021)
However, even if H is known completely, the undegraded image cannot be recovered
exactly due to noise N
F (u,v) = 𝐺(𝑢,𝑣) = F(u,v) + 𝑁(𝑢,𝑣)
𝐻(𝑢,𝑣) 𝐻(𝑢,𝑣)
Evenworse when H has zero or very small values N/H would dominates the estimated
image. One way to get around this problem is to limit the filter frequencies to values near the
origin where H is large in general.
9
EC8093- DIP UNIT III - IMAGE RESTORATION
41. Draw the model of image degradation / restoration process? (Nov 2008
& Nov 2011 & May 2013)
DEGRADED
IMAGE
DEGRADATION RESTORATION
Image
FUNCTION H + FILTERS
F (x, y)
NOISE ŋ(x, y)
RESTORATION
DEGRADATION
FILTERS
10
EC8093- DIP UNIT III - IMAGE RESTORATION
PART-B
1. Explain in detail about noise distributions or noise models? (Apr2010) (A/M 2021)
Noise distribution:
The noise in the digital image arises due to image acquisition or transmission while
image acquisition, the image sensor is affected by environmental factors.
While transmission of images are corrupted due to interference in the channel.
PDF of noise:
(i). Gaussian noise:
The mathematical expression for Gaussian noise is in both spatial of frequency domains. This
models are convenient because they are marginally applicable at best.
Where,
Μ – means of z σ – SD
σ² - variance z – gray level
oP(z)
1/√2πσ
μ – σ μ μ+σ
When Z is described 70% of its value will be in the range of µ – σ, µ+σ.
11
EC8093- DIP UNIT III - IMAGE RESTORATION
P(2)
0.607
√2/b
aa+ √b/2 b
P(2)
z
(b-1)/a
12
EC8093- DIP UNIT III - IMAGE RESTORATION
P(z)
a
z
(v) Uniform Noise: The PDF of uniform noise is given by,
1/ -a
Z
(vi). Impulse noise distribution or Salt & Pepper noise:
If b>a, there will be dark dot in the image and will appear like a black dots.
If a>b, these will be white dots appearing in the image. If either Pa or Pb is zero then the
impulse noise is called as “Unipolar noise”.
13
EC8093- DIP UNIT III - IMAGE RESTORATION
If neither Pa nor Pb is zero, then the noise is called as bipolar noise. It means salt &
pepper granules distributed over the images so the bipolar noise is known as “salt &pepper
noise”.
It is also called as short spike noise. Negative impulse appears in black and positive
impulse appears in white dots.
The arithmetic mean filter computes the average value of the corrupted image g(x,y) in the
area defined by SxrThe value of the restored image f at point (x,y) is simply the arithmetic
mean computed using the pixels in the region defined by Sxy.
The geometric mean filter is performed by restored pixel is by the product of pixel is the
sub image window. It rises to the power of 1/mn.
The image analysis includes measurement of shape, size, texture and color of the objects
present in the image. Here the input is image and produces numerical and graphical information
based on the characteristics of the image data.
Based upon the filter results, the analysis of an image is performed and identify which
pixel need to be improved. These are done based upon the statistical measurements.
It can be used to reduce noise such as salt noise and Gaussian noise, The restored image using
harmonic mean filter is given by,
14
EC8093- DIP UNIT III - IMAGE RESTORATION
It is used to reduce salt and pepper noise. The restored image is given by,
For positive values of Q, it eliminates pepper noise and for negative values of q it eliminates
salt noise.
It can’t do both simultaneously.
If Q=0, then the contra harmonic mean filter reduces to arithmetic mean filter.
If Q=-1, it reduces to harmonic mean filter. Thus it is helpful restore the images.
Order-statistic filters are spatial filters whose response is based on ordering (ranking) the
values of the pixels contained in the image area encompassed by the filter,
The best-known order-statistic filter is the median filter, which, as its name implies, replaces
the value of a pixel by the median of the intensity levels in the neighborhood of that pixel:
15
EC8093- DIP UNIT III - IMAGE RESTORATION
This filter is useful for finding the brightest points in an image. Also, because pepper
noise has very low values, it is reduced by this filter as a result of the
The midpoint filter simply computes the midpoint between the maximum and minimum values
in the area encompassed by the filter:
This filter combines order statistics and averaging. It works best for randomly distributed noise,
like Gaussian or uniform noise.
where the value of d can range from 0 to mn - 1. When d = 0, the alpha-trimmed filter
reduces to the arithmetic mean filter discussed in the previous section. If we choose d = mn - 1,
the filter becomes a median filter.
For other values of d, the alpha-trimmed filter is useful in situations involving multiple
types of noise, such as a combination of salt-and-pepper and Gaussian noise.
16
EC8093- DIP UNIT III - IMAGE RESTORATION
The mean gives a measure of average intensity in the region over which the mean is
computed, and the variance gives a measure of contrast in that region.
Our filter is to operate on a local region, Sxv.
The response of the filter at any point ( x, y) on which the region is centered is to be based on
four quantities:
1. g( x, y), the value of the noisy image at ( x, y);
2. (b)σŋ2, the variance of the noise corrupting f(x, y) to form g( x, y);
3. m L , the local mean of the pixels in Sxv; and
4. σL2, the local variance of the pixels in S x v .
1. If σ ŋ2is zero, the filter should return simply the value of g( x, y).This is the
trivial, zero-noise case in which g( x, y) is equal to f ( x , y).
2. If the local variance is high relative to σŋ 2, thefilter should return a value
close to g( x, y). A high local variance typically is associated with edges, and
these should be preserved.
3. If the two variances are equal, we want the filter to return the arithmetic
mean value of the pixels in S xv .
This condition occurs when the local area
has the same properties as the overall image, and local noise is to be re-
duced simply by averaging.
An adaptive expression for obtaining based on these assumptions may be written as
The only quantity that needs to be known or estimated is the variance of the overall
noise, σŋ2.
The other parameters are computed from the pixels in Sxyat each location ( x, y) on which
the filter window is centered.
ratio is set to 1 if the condition occurs. This makes this filter nonlinear.
17
EC8093- DIP UNIT III - IMAGE RESTORATION
However, it prevents nonsensical results (i.e., negative intensity levels, depending on the
value of m L ) due to a potential lack of knowledge about the variance of the image noise.
Another approach is to allow the negative values to occur, and then rescale the intensity values
at the end. The result then would be a loss of dynamic range in the image.
(ii) Adaptive median filter(OR) Apply suitable filter for the marked pixels in the image
which is corrupted by salt and pepper noise [APR/MAY-19]
The median filter performs well if the spatial density of the impulse noise is not
large (as a rule of thumb, Paand Pbless than 0.2).
An additional benefit of the adaptive median filter is that it seeks to preserve detail
while smoothing nonimpulse noise, something that the "traditional" median filter does not
do.
As in all the filters discussed in the preceding sections, the adaptive median filter
also works in a rectangular window area Sxy.
Unlike those filters, however, the adaptive median filter changes (increases) the
size of Sxvduring filter operation, depending on certain conditions listed in this section.
Keep in mind that the output of the filter is a single value used to replace the value
of the pixel at ( x , y), the point on which the window Sxvis centered at a given tune.
The adaptive median-filtering algorithm works in two stages, denoted stage A and stage B, as
follows:
Staged: A1=Zmed—Zmin
A2 =Zmed—Zmax
If A1>0 AND A2 <0, go to stage B
18
EC8093- DIP UNIT III - IMAGE RESTORATION
The key to understanding the mechanics of this algorithm is to keep in mind that it has
three main purposes: to remove salt-and-pepper (impulse) noise, to provide smoothing of other
noise that may not be impulsive, and to reduce distortion, such as excessive thinning or
thickening of object boundaries.
The values zmin and zmaxare considered statistically by the algorithm to be "impulse-like"
noise components, even if these are not the lowest and highest possible pixel values in the
image.
With these observations in mind, we see that the purpose of stage A is to determine if the
median filter output, zmed, is an impulse (black or white) or not.
If the condition zmin<zmed<zmax holds, then zmed cannot be an impulse for the reason
mentioned in the previous paragraph.
In this case, we go to stage B and test to see if the point in the center of the window,Z xy,
is itself an impulse (recall that zxyis the point being processed).
If the condition B1>0 AND B2 <0 is true, then zmin<zxy<zmax,and zxvcannot be an impulse for
the same reason that zmedwas not.
In this case, the algorithm outputs the unchanged pixel value, zxy.By not changing these
"intermediate-level" points, distortion is reduced in the image.
If the condition B1> 0 AND B2 <0 is false, then either Zxy-Zminor Zxy= Zmax.In
either case, the value of the pixel is an extreme value and the algorithm outputs the median
value zmed, which we know from stage A is not a noise impulse.
The last step is what the standard median filter does. The problem is that the standard
median filter replaces every point in the image by the median of the corresponding
neighborhood. This causes unnecessary loss of detail.
Continuing with the explanation, suppose that stage A does find an impulse (i.e., it fails
the test that would cause it to branch to stage B).
The algorithm then increases the size of the window and repeats stage A. This looping
continues untilthe algorithm either finds a median value that is not an impulse (and branches to
stage B),or the maximum window size is reached.
19
EC8093- DIP UNIT III - IMAGE RESTORATION
If the maximum window size is reached, the algorithm returns the value of z med .Note
that there is no guarantee that this value is not an impulse.
The smaller the noise probabilities Paand/or Pb are, or the larger Smax is allowed to be, the
less likely it is that a premature exit condition will occur.
This is plausible. As the density of the impulses increases, it stands to reason that we
would need a larger window to "clean up" the noise spikes.
Every time the algorithm outputs a value, the window S xv is moved to the next location
in the image.The algorithm then is reinitialized and applied to the pixels in the new location.
The basic idea is that periodic noise appears as concentrated bursts of energy in the
Fourier transform, at locations corresponding to the frequencies of the periodic interference.
The approach is to use a selective filter to isolate the noise.
The three types of selective filters bandreject, bandpass, and notchare used for basic
periodic noise reduction.
Figure 5.16(a), which is the same as Fig. 5.5(a), shows an image heavily corrupted
by sinusoidal noise of various frequencies.
The noise components are easily seen as symmetric pairs of bright dots in the Fourier
spectrum shown in Fig. 5.16(b).
In this example, the components lie on an approximate circle about the origin of the
transform, so a circularly symmetric bandreject filter is a good choice.
Figure 5.16(c) shows a Butterworth bandreject filter of order 4, with the appropriate
radius and width to enclose completely the noise impulses.
20
EC8093- DIP UNIT III - IMAGE RESTORATION
Since it is desirable in general to remove as little as possible from the transform, sharp,
narrow filters are common in bandreject filtering.
The result of filtering Fig. 5.16(a) with this filter is shown in Fig. 5.16(d). The
improvement is quite evident.
Even small details and textures were restored effectively by this simple filtering ap-
proach.
It is worth noting also that it would not be possible to get equivalent results by a direct
spatial domain filtering approach using small convolution masks.
A notch filter rejects (or passes) frequencies in predefined neighborhoods about a center
frequency.
Equations for notch filtering are detailed in Section 4.10.2. Figure 5.18 shows 3-D
plots of ideal, Butterworth, and Gaussian notch (reject) 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). Wecan obtain
notch filters that pass,rather than suppress, the frequencies contained in the notch areas.
Since these filters perform exactly the opposite function as the notch reject filters,
their transfer functions are given by
whereHNP(u,v) is the transfer function of the notch pass filter corresponding to the
notch reject filter with transfer function HNR(u, v).
Alternative filtering methods that reduce the effect ofthese degradations are quite
useful in many applications.
The method discussed here is optimum, in the sense that it minimizes local variances of
the restored estimate f ( x, y).
The procedure consists of first isolating the principal contributions of the interference
pattern and then subtracting a variable, weighted portion of the pattern from the corrupted
image.
Although we develop the procedure in the context of a specific application, the basic
approach is quite general and can be applied to other restoration tasks in which multiple
periodic interference is a problem.
The first step is to extract the principal frequency components of the interference pattern.
As before, this can be done by placing a notch pass filter. H N P ( u, v), at the location
of each spike.
If the filter is constructed to pass only-components associated with the interference
pattern, then the Fourier transform of the interference noise pattern is given by the expression
22
EC8093- DIP UNIT III - IMAGE RESTORATION
23
EC8093- DIP UNIT III - IMAGE RESTORATION
6.1 Explain the image restoration using inverse filtering. What are its limitations? Why
inverse filtering approach fails in the presence of noise? (NOV/DEC-17)
(or)Describe inverse filtering for removal of blur caused by any motion and describe how
it restore the image. (Nov 2010, April 2010, May-2014&May 2015)
Inverse filtering:-
It is the process of recovering the input of a system from its output. They are useful for
recorrecting an input signal in anticipation of the degradation caused by the system such as
correcting a non – linearity of the display.
The inverse filtering divides the transform of the degraded image by the degradation
function.
w.k.t unconstrained restoration,
24
EC8093- DIP UNIT III - IMAGE RESTORATION
We know that, g = Hf + ŋ
G(u, v) = H(u, v) F(u, v) + N(u, v)
Drawbacks:
Inverse filtering is highly sensitive to noise.
The above drawbacks can be overcome by limiting the filter frequencies to only the
values around the origin. This will decrease the probability of zero occurrence value
degradation function.
25
EC8093- DIP UNIT III - IMAGE RESTORATION
6.2. Wiener filter: Explain the function of Wiener filter for image restoration inpresence
of additive noise? (or) Explain the principle of least square filter and state its limitation.
(Nov 2012, June 2011, May 2013, May-2014) (or) minimum mean square error
filtering?(Nov 2014 & May 2015)(May/June 17)[APR/MAY-19][A/M 2021]
Objective:
It is to approximate the original image in such a way the mean square error between
original and approximated image will be minimized.
LMS Value:
Where,
f – Original image.
𝑓̂- Restored image.
Assumptions:
(i). The image of noise are uncorrelated (no relation).
(ii). Either image or the noise has zero mean.
(iii). Approximated gray level for a linear function of degraded gray level.
Approximated image,
Where,
H* (u,v) – conjugate of H (u,v)
Sf (u, v) – Power spectrum of original image.
Sŋ (u,v) – Power density spectrum of noise.
H (u, v) – Linear operator.
26
EC8093- DIP UNIT III - IMAGE RESTORATION
Case 1:
If noise = 0
considers the restored image to be "signal" and the difference between this image and the
original to be noise, signal-to-noise ratio in the spatial domain as
Case 2:
If noise = unknown quantity
27
EC8093- DIP UNIT III - IMAGE RESTORATION
process.Theenchancement procedure is
heuristic.
4. The procedure is very simple. The procedure is complex.
5. It increases the quality of an image. It’s related to image enchancement.
6. Have prior knowledge about the Does not need the prior information.
information.
7. Computation speed is low. Computation speed is high.
8. Identifying and analysing of degraded Difficult.
pixel is easy.
9. Losses are minimum. Losses are high compare to
enchancement.
15. For the given image matrix, compute the new pixel value for the marked pixel using
the following filters (i) Mean of filter, (ii) Max filter, (iii) Min Filter, (iv) Median filter of
size 3x3.
(or)
Apply order statistics filter on the selected pixel in the image(NOV/DEC 16)
29
EC8093- DIP UNIT III - IMAGE RESTORATION
Min filter:
Arrange the pixel in the ascending order
1 2 2 3 3 4 5 6 8
From the above order, min filter value is 1
Min value = 1
Median filter:
Arrange the pixel in the ascending order
1 2 2 3 3 4 5 6 8
Number of pixels n = 9
Median value = n+1 /2 = 10 /2 = 5th value in the order
Median value = 3
30
EC8093- DIP UNIT III - IMAGE RESTORATION
31
EC8093- DIP UNIT III - IMAGE RESTORATION
16. What is image restoration? Explain the degradation model for continuous function in
detail? (Or)Explain the model of image degradation process and discuss its role in image
restoration. (Nov 2010 & Nov 2012)
Introduction:-
The restoration technique is used to reconstruct or recover the image (ie) already
degraded by degradation phenomena.
In restoration process the degradation images and apply inverse process to that image to
recover the original image.
The degradation function together with additive noise operates on an input image f(x, y)
to give a degraded image g(x, y). Then image g(x, y) is given as input to the restoration filter
to produce (𝐹(𝑥, 𝑦).
32
EC8093- DIP UNIT III - IMAGE RESTORATION
The degradation function together with additive noise operates on an input image f(x, y)
to give a degraded image g(x, y). Then image g(x, y) is given as a input to the restoration
filter to produce (𝐹(𝑥, 𝑦).
F(x, y) is similar to(𝐹(𝑥, 𝑦). The equation for restoration is given as a input to the
restoration filter to produce(𝐹(𝑥, 𝑦).
The equation for restoration is given by,
g(x, y) = h(x, y)* f(x, y) + ŋ(x, y)
Write the above equation in Fourier transform we get,
G(u, v) = H(u, v) F(u, v) + N(u, v)
Therefore the restoration process is to reconstruct the image that has been degraded by a
degradation function.
Properties of degradation model:
(a) Linearity property:
If ŋ(x, y) = o,
G(x, y) = h(x, y) f(x, y)
= H[f(x, y)]
If H is linear,
H[k1f1(x, y)+k2f2(x, y)] = k1 H[f1(x, y)+k2H(f2(x, y)] 1
Where,
k1 & k2 – constant
f1(x, y) & f2(x, y) – two input images.
2
H[f1(x, y)+f2(x, y)] = H[f1(x, y)+H(f2(x, y)]
33
EC8093- DIP UNIT III - IMAGE RESTORATION
It states that a response to a constant multiple of any input image is equal to the response
to that input image multiplied by the same constant.
Position invariant or space invariant:-
w.k.t H[f(x, y)] = g(x, y)
H[f(x-α, y-β)] = g(x-α, y-β)
Position invariant indicates that the response at any point in the image depend only on the
value of the input at that point and not on the position of the point.
Degradation in continuous function:
Where,
α, β – constant
S – Impulse function
Wkt, g(x, y) = H[f(x, y)]+ ŋ(x, y)
Consider noise function ŋ(x, y) = 0
So g(x, y) = H[f(x, y)]
H – Linear operator
H[s(x-α, y-β)] = h(x, α, y, β)
= h(x-α, y-β)
It is called as impulse response of H & also it is referred as PSF (Point spread function).
(or)
Advantages:-
(i). Extensive tool for linear system theory.
(ii). Non linear & space variant introduced, difficulties, but restoration focus on linear &
space invariant technique. [So simplification is obtained in result].
Degradation in discrete formulation:
34
EC8093- DIP UNIT III - IMAGE RESTORATION
M≥A+B-1
Definition:
A square matrix in which each row is a circular shift of a proceeding row & the first row
is circular shift of the last row is called as “circular matrix”.
The equ is called as block circular matrix because of block of H subscripted in
circular manner.
35