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

Updated DIP UNIT3-2022

Digital Image Processing Unit 3

Uploaded by

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

Updated DIP UNIT3-2022

Digital Image Processing Unit 3

Uploaded by

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

EC8093- DIP UNIT III - IMAGE RESTORATION

UNIT III - IMAGE RESTORATION

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.

PART A-TWO MARKS

1. What is meant by image restoration?


Restoration attempts to reconstruct or recover an image that has been degraded, by using a
clear knowledge of the degrading phenomenon.
The restoration process the degradation images and apply inverse process to that image to
recover the original image.

2. What are the types of noise models?


(a) Gaussian noise
(b) Exponential noise
(c) Rayleigh noise
(d) Uniform noise
(e) Erlang noise
(f) Impulse noise

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.

4. What is periodic noise?


Periodic noise arises typically from electrical or electromechanical interference during image
acquisition.

5. How a degradation process is modeled?


The Image degradation/ restoration model is given as,

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.

6. What is fredholm integral of first kind?


The equation,

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.

7. What is a median filter? What are its properties?


The median filter replaces the value of a pixel by the median of the gray levels in the
neighborhood of that pixel.
Median filter has the following properties:
(a) A median filter smoothens additive white noise
(b) A median filter does not degrade edges
(c) A median filter is effective in removing impulses. (Salt and pepper noise).

8. What is maximum filter and minimum filter?


 The 100th percentile is maximum filter that is a Max filter replaces the value of a pixel
by the maximum value of the gray levels in the neighborhood of that pixel. It is used in
finding brightest points in an image and is effective in removing pepper noise.
 The 0th percentile filter is minimum filter that is a Min filter replaces the value of a
pixel by the minimum value of the gray levels in the neighborhood of that pixel. It is
used in finding darkest points in an image and is effective in removing salt noise.

9. What is geometric mean filtering?


Geometric mean filter achieves smoothing better than the arithmetic mean filter. The amount of
details lost in the geometric mean filtering is lesser.
The filter is given by,

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.

10. What is the need for adaptive median filter?


Though median filter is effective in removing impulse noise, the fine details in the image are
lost since the impulses are replaced with median values. Thus adaptive median filters are used
to overcome this disadvantage of median filter.

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

12. Is 100% restoration possible. Justify.


100% restoration is possible only if the true degradation function is known and the image is
degraded only due to this degradation function. If the image is degraded by additive noise,
100% restoration is not possible.

13. Differentiate image enhancement and image restoration.(May/June 2017)

4
EC8093- DIP UNIT III - IMAGE RESTORATION

14. Write the equation for discrete degradation model?

For x=0 .................M – 1


Y=0………… N-1

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.

16. List the properties involved in degradation model?


(a) Linearity
(b) Additivity
(c) Homogeneity
(d) Position / space invariant

17. Give the noise probability density function?


a) Gaussian noise.
b) Rayleigh noise.
c) Erlang or Gamma noise
d) Exponential noise.
e) Uniform noise.
f) Impulse noise.

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

19. What are the assumptions in Wiener filter?


 Noise and image are uncorrelated and has zero mean.
5
EC8093- DIP UNIT III - IMAGE RESTORATION

 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.

Limitation: - It has no provision for handling noise

21. Define spatial transformation?


Spatial transformation is defined as the rearrangement of the pixels on the image plane.

22. Define gray level interpolation? (June 2010)


It deals with the assignment of gray levels to pixels in the spatially transformed image.

23. What is constrained restoration with Lagrange multiplier?

This quantity must be adjusted, so that the constrained


is satisfied.

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.

25. Difference between Wiener and inverse filtering? (June 2011)


Wiener filtering Inverse filtering
When noise level is increased Wiener With small amount of noise inverse
filter works. filtering works.
It has no zero or small value problem. It has zero or small value problem.
The result obtained is closer to the original The result obtained is not closer to the
image. original image.

6
EC8093- DIP UNIT III - IMAGE RESTORATION

26. Give the transfer function of Wiener filtering? (June 2009)

Where, | H(u, v)|2= H*(u, v) H(u,v)


H*(u, v) – conjugate of H(u, v)
𝑺𝒇 (𝒖, 𝒗) - Power spectrum of original image.
𝑺ŋ(𝒖, 𝒗) - Power spectrum of noise.

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.

28. What is meant by bilinear interpolation? (April 2011)


 Bilinear interpolation is used when we need to know values at random position on a
regular 2D grid. Note that this grid can as well be an image or a texture map.
o Interpolation Techniques:
 1D linear interpolation (elementary algebra)
 2D -2 sequential 1D (divide-and-conquer)
 Directional (adaptive) interpolation.
o Interpolation Applications:
 Digital zooming (resolution enhancement)
 Image imprinting (error concealment)
 Geometric transformations

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

30. Write the equation for continuous degradation model?

31. What is Lagrange multiplier? Where it is used? (nov 2014)


The Lagrange multiplier is a strategy for finding the local maxima and minima of a function
subject to equality constraints. This is mainly used in the image restoration process like image
acquisition, image storage and transmission.

32. Why blur is to be removed from images? (nov 2014)


The blur is caused by lens that is in improper manner, relative motion between camera and
scene and atmospheric turbulence.It will introduce bandwidth reduction and make the image
analysis as complex.To prevent these problems only the blur is removed from images.

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.

34. Why the restoration is called as unconstrained restoration? (May/June 17)


In the absence of any knowledge about the noise ‘n’, a meaningful criterion function is to seek
an f^ such that H f^ approximates of in a least square sense by assuming the noise term is as
small as possible.
Where H = system operator.
f^ = estimated input image.
g = degraded image.

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.

36. How the discontinuity is detected in an image using segmentation? (APR/MAY-18)


The steps used to detect the discontinuity in an image using segmentation are
a) Compute the sum of products of the coefficient with the gray levels contained in the
region encompassed by the mask.
b) The response of the mask at any point in the image is R – W1Z1+W2Z2+W3Z3…..
Z= gray levels of the pixels associated with mass coefficient W
c) The response of the mask is defined with respect to its centre location.
8
EC8093- DIP UNIT III - IMAGE RESTORATION

37. Give the relation for Gamma noise and exponential noise?(NOV/DEC-18)

GAMMA NOISE EXPONENTIAL NOISE


The PDF is The PDF is

Mean, µ = b/a Mean, µ = 1/a


Standard deviation, σ2 = b/a2 Standard deviation, σ2 = 1/a2

38. Give the 3 x 3 mask to detect horizontal line in an image(APR/MAY-19)


Z1 Z2 Z3 -1 -2 -1 -1 0 1
Z4 Z5 Z6 0 0 0 -2 0 2
Z7 Z8 Z9 1 2 1 -1 0 1

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

Total number of pixel


50 100 50
100 100 100
100 100 150

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.

Spatial property of noise:


The noise is independent of spatial co-ordinates. However in some application,it is invalid and
so we deal with spatial dependent.

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.

The PDf of Gaussian noise is,

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 µ – σ, µ+σ.

(ii) Rayleigh noise:

11
EC8093- DIP UNIT III - IMAGE RESTORATION

The PDF of Ray – leigh noise is

P(2)
0.607
√2/b
aa+ √b/2 b

(iii) Gamma noise:


The PDF of gamma noise is given by

P(2)

z
(b-1)/a

(iv) Exponential Noise:


The PDF of exponential noise is given by

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.

2. Explain the various types of mean filters in detail. (NOV/DEC-18)

(i) Arithmetic Mean filters

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.

(ii) Geometric mean filtering:

 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.

(iii) Harmonic mean filter: (Nov 2014)

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

(iv) Contra harmonic mean filter:

It is used to reduce salt and pepper noise. The restored image is given by,

Where q – order of filter.

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.

3. Explain various order-statistic filters:

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,

(i) Median filtering:

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:

 The value of the pixel at ( x , y) is included in the computation of the median.


 Median filters are quite popular because, for certain types of random noise, they
provide excellent noise-reduction capabilities, with considerably less blurring than linear
smoothing filters of similar size.
 Median filters are particularly effective in the presence of both bipolar and
unipolar impulse noise.
 The median filter yields excellent results for images corrupted by this type of
noise.

(ii) Max and min filter:


100th percentile results in the so-called max f i l ter, given by

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 0th percentile filter is the min filter.

(iii) Midpoint filter

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.

(iv) Alpha-trimmed mean filter


 Suppose that we delete the d/ 2 lowest and the d/ 2 highest intensity values of g( s , t ) in
the neighborhood S x y . Let gr(s, t) represent the remaining mn-d pixels.
 A filter formed by averaging these remaining pixels is called an alpha-trimmed mean
filter:

 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.

4. Explain Adaptive filters in detail?OrAdaptive, local noise reduction filter[A/M-


18][A/M 2021]

(i) Adaptive, local noise reduction filter


 The simplest statistical measures of a random variable are its mean and variance.
 These are reasonable parameters on which to base an adaptive filter because they are
quantities closely related to the appearance of an image.

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 .

We want the behavior of the filter to be as follows:

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.

 A tacit assumption in Eq. (5.3-12) is that .


 The noise in our model is additive and position independent, so this is a reasonable
assumption to make because Sxyis a subset of g( x , y). 
 However, we seldom have exact knowledge of σŋ2. Therefore, it is possible for this
condition to be violated in practice.
 For that reason, a test should be built into an implementation of Eq. (5.3-12) so that the

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.

Consider the following notation:

zmin = minimum intensity value in S xy


Zmax= maximum intensity value in Sxv
zmed = median of intensity values in S xy
z x y =intensity value at coordinates ( x, y)
Smax = maximum allowed size of S xy

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

Else increase the window size

If window size ≤Smax repeat stage A


Else output Zmed

Stage B: B1=ZXy- Zmin


B2=ZXy- Zmax
If B1 > 0 AND Bl< 0, output z xy
Else output zmed

 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.

5. Explain Periodic Noise Reduction by Frequency Domain Filtering(or) various types of


filter for periodic noise reduction.[A/M 2021]

 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.

5.1 Bandreject Filters

 One of the principal applications of bandreject filtering is for noise removal in


applications where the general location of the noise component(s) in the frequency domain is
approximately known.
 A good example is an image corrupted by additive periodic noise that can be
approximated as two-dimensional sinusoidal functions.
 It is not difficult to show that the Fourier transform of a sine consists of two impulses
that are mirror images of each other about the origin of the transform.
 The impulses are both imaginary (the real part of the Fourier transform of a sine is zero)
and are complex conjugates of each other.

 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.

5.2 Bandpass Filters

A bandpassfilter performs the opposite operation of a bandreject filter.


We showed in Section 4.10.1 how the transfer function HBP(U,V) of a bandpassfilter is
obtained from a corresponding bandreject filter with transfer function H B R ( u, v) by using the
equation

5.3 Notch filters

 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).

5.4 Optimum Notch Filtering


21
EC8093- DIP UNIT III - IMAGE RESTORATION

 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

 where, as usual, G(u,v),denotes the Fourier transform of the corrupted image.


Formation of H NP (u,v) requires considerable judgment about what is or is not an
interference spike.
 For this reason, the notch pass filter generally is constructed interactively by
observing the spectrum of G (u,v) on a display.
 After a particular filter has been selected, the corresponding pattern in thespatial
domain is obtained from the expression

 Because the corrupted imageisassumed to beformed by the addition ofthe uncorrupted


image f ( x , y) andtheinterference, if ŋ(x,y)wereknowncompletely, subtracting (hepattern
fromg( x, y) toobtainf(x, y) wouldbeasimple matter.
 The problem,of course,is that (hisfiltering procedureusually yields only
anapproximation of the truepattern.The effect of components not present in the estimate
of η(x,y) can be minimized instead of subtracting from g(x,y) a weighted portion of
η(x,y) to obtain tan estimate of f(x,y)

The function w(x,y)is called a weighing function. Consider a neighborhood of size


(2a+1) by (2b+1) about a point (x.y).The local variance of f(x,y) at coordinates (x,y)
can be estimated from the sample as follows

22
EC8093- DIP UNIT III - IMAGE RESTORATION

23
EC8093- DIP UNIT III - IMAGE RESTORATION

6. Explain the image Restoration filters in details with its types.[APR/MAY-18]


1. Inverse filter
2. Wiener filter

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)

Restored image is given by,

To find the original image,

Drawbacks:
Inverse filtering is highly sensitive to noise.

Zero or Small value problem:-


If t he degradation function H(u, v) has zero or small value, then the ratio of
N(u, v)/H(u, v) dominates the value of restored image.
This implies a poor performance of the system and results in best.
Approximation of the original image function. This is known as zero or small value
problem.

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]

Wiener filtering or LMS filter – Least Mean square filtering:


For the restoration of an image, this method considers the degradation function as well as
statistical properties of noise.

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.

Multiply & divide by H (u, v)

26
EC8093- DIP UNIT III - IMAGE RESTORATION

Wiener filtering equation is,

Case 1:
If noise = 0

thesignal-to-noise ratio,approximated using frequency domain quantities such as

The meansquareerrorcan be approximated also in terms a-summation involving the original


and restored images:

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

Advantages of Wiener filtering over inverse filtering:


(i). Wiener filtering has no zero or small value problem.
(ii). The results obtained in Wiener filtering are more closer to the original image than inverse
filtering.
Disadvantages:It requires power spectrum of ungraded image of noise to be known which
makes the implementation more difficult.

13. A blur filter h(m,n) is given by

Find the deblur filter using inverse filtering? (Nov-2013)


Solution:
Find the Fourier transform =(4x4 )DFT kernel *i/p image*DFT (kernel)T
𝟏 −𝟏
𝟏−𝒋
𝟏 𝟏 𝟏𝒋 𝟎. 𝟏 𝟎. 𝟏 𝟎. 𝟏 𝟎 𝟏𝟏 𝟏 𝟏
H(k,l)=| || 𝟎. 𝟏 𝟎. 𝟏 𝟎. 𝟏 𝟎. 𝟏 −𝒋 −𝟏 𝒋 |
| | 𝟏−𝟏
𝟏−𝟏 𝟏 −𝟏 𝟎. 𝟎𝟓 𝟎. 𝟏 𝟎. 𝟏 𝟎. 𝟎 𝟏 −𝟏
𝟓 𝟏
𝟏 𝒋 −𝟏−𝒋 𝟎 𝟎. 𝟎𝟓𝟎. 𝟎𝟓 𝟎 𝟏 𝒋 −𝟏−𝒋

1 −0.2 − 0.2𝑗0 −0.2 + 2𝑗


−0.1 − 0.3𝑗 −0.1𝑗 0 −0.1
H(k,l) =| |
0 −0.1 − 0.1𝑗0−0.1 + 0.1𝑗
−0.1 + 3
𝑗 −0.1 0 0.1𝑗

G(k,l) = 1 is given by inverse filtering


𝐻(𝑘,𝑙)
1 −2.5 + 2.5𝑗∞−2.5 − 2.5𝑗
−1 + 3𝑗 10𝑗 ∞ −10
= | ∞ |
𝑗 ∞ −5 − 5𝑗
−5 + 5
−1 − 3
𝑗 −10 ∞ −10𝑗

14. Compare restoration with image enhancement. (nov 2014) (8 marks)

S.NO IMAGE ENHANCEMENT IMAGE RESTORATION


1. It’s a subjective process. It’s objective is based on sound
mathematical principles.
2. It involves only cosmetic changes in the It requires modeling of the degradations.
brightness and contrast.
3. Often this is trial and error The restoration algorithm is well defined.
28
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

16. Problem 3.2

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.

Image restoration or degradation model:

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

Image degradation / Restoration model

 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.

(b) Additive property:


If k1=K2=1, in equ 1

2
H[f1(x, y)+f2(x, y)] = H[f1(x, y)+H(f2(x, y)]

(c) Homogeneity property:


Consider f2(x, y) =0 in equation 1

H[k1f1(x, y)] = k1H[f1(x, y)] 3

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)]

According to homogeneity principle f(α, β) is independent of 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).

So the degraded image f(x, y) is given by,

(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

Vector matrix form,


G=Hf+ŋ [noise ŋ = 0]
So g= Hf

Block circular matrix:


Mxn matrix,

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

You might also like