Endterm IIP Solution
Endterm IIP Solution
Endterm IIP Solution
/EC/PE/2018-19/ODD/ECE4141/IIP
b) What is the output if the starting point of the hole filling algorithm is a point on the
boundary of the object?
Ans: The entire image would be filled with 1s.
c) i) We can reconstruct the original image from its skeletonizing image since the skeleton
is preserved.
Ans: True
ii) The kernel [-1 2 -1] is meant to approximate first order derivative. (True / False)
Ans: False, as 1st order derivative is given by f(x+1) – f(x). Similarly, for y axis. So,
matrix will be [0 -1 1]
d) Rotate P(x,y) by an angle θ clockwise with respect to the reference point R(u,v). The
resulting position is: P’( cosθ(x-u)-sinθ(y-v)+u, sinθ(x-u)+cosθ(y-v)+v ). (True/ False)
Ans: True
e) What is the smallest image set to which you can apply the erosion process?
Ans: The smallest set is the image set that contains the structuring element.
Page 1 of 4
LNMIIT/B. Tech./EC/PE/2018-19/ODD/ECE4141/IIP
Ans:
i) Arrange the intensity values of different pixels in the ascending order:
[ 1 1 2 2 3 4 5 6 7]
As it is given d = 4, so d/2 = 2 pixels from both front and end will be removed,
and finally mean will be calculated for remaining pixels.
Final/center value = mean (2, 2, 3, 4, 5) = 3.2
ii) When Q = 0, it acts as mean/averaging filter.
So, the value will mean (all pixel values) = 3.44
iii) When Q = -1, it acts as harmonic mean filter.
𝑚𝑛 9
𝑔(𝑥, 𝑦) = =
1 1 1 1 1 1 1
∑ [ + + + + + ⋯+ ]
𝑓(𝑥, 𝑦) 1 1 2 2 3 7
Final value = 2.2
iv) Final value = (product (all pixel value))1/9 = 2.78
b) We want to fill all the small cracks and holes in a segment but preserve big holes that can
completely contain a circle of radius greater than n. Write the steps for the task using
mathematical morphological operators, and specify the structure element.
Ans:
c) How can an image be restored when it is affected in presence of noise only?
Ans: When the only degradation present in an image is noise, the degradation image is
given by:
Take a small region from the degraded image which has uniform intensity.
Estimate the noise N(u, v) from the spectrum/ histogram generated from the G(u,
v) of the small region taken in the earlier step.
After estimating the noise, proper filtering technique can be used to remove the
noise. The following are the different filters that can remove different noise.
Page 2 of 4
LNMIIT/B. Tech./EC/PE/2018-19/ODD/ECE4141/IIP
d) Perform Split and merge technique to segment the below given image (Fig. 2)
5 6 6 6 7 7 6 6
6 7 6 7 5 5 4 7
6 6 4 4 3 2 5 6
5 4 5 4 2 3 4 6
0 3 2 3 3 2 4 6 Fig. 2
0 0 0 0 2 2 5 7
1 1 0 1 0 3 4 4
1 0 1 0 2 3 5 4
Suppose that the gray scale is of range [0, 9] for the image given below (Fig. 3).
0 5 7 7 5
7 2 6 2 6
6 9 7 7 0
6 6 1 7 6 Fig. 3
9 6 0 7 8
i) Perform histogram equalization of the above image. Show the resultant image and its
corresponding histogram.
ii) What will happen if we apply histogram equalization to the above result (part i).
iii) Can histogram equalization always provide a better result? State your reasons.
iv) “Histogram matching” is a useful contrast manipulation technique which transforms an
image’s histogram to match the one of another image. Describe clearly how you achieve
it (in steps).
Ans:
Page 3 of 4
LNMIIT/B. Tech./EC/PE/2018-19/ODD/ECE4141/IIP
Q4. [10M]
Perform the skeletonization for the following given image set. (white represents object pixels
and black represents background pixels)
Page 4 of 4