0% found this document useful (0 votes)
92 views7 pages

IIP Midterm Sol

This document is a midterm exam for an Introduction to Image Processing course given on September 27, 2018. It contains 3 sections with 13 multiple choice and written response questions worth a total of 30 marks. The questions cover topics like the effect of rotation on the frequency domain of an image, bit plane slicing, image file size calculation, effects of pixel shuffling on image properties, gamma correction, image digitization steps, shortest paths on graphs, K-L transform image compression, histogram equalization, and image filtering techniques like unsharp masking and high boost filtering.

Uploaded by

Sacky Sack
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)
92 views7 pages

IIP Midterm Sol

This document is a midterm exam for an Introduction to Image Processing course given on September 27, 2018. It contains 3 sections with 13 multiple choice and written response questions worth a total of 30 marks. The questions cover topics like the effect of rotation on the frequency domain of an image, bit plane slicing, image file size calculation, effects of pixel shuffling on image properties, gamma correction, image digitization steps, shortest paths on graphs, K-L transform image compression, histogram equalization, and image filtering techniques like unsharp masking and high boost filtering.

Uploaded by

Sacky Sack
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/ 7

LNMIIT/B. Tech.

/EC/PE/2018-19/ODD/ECE4141/IIP

The LNM Institute of Information Technology


ECE and CCE
ECE4141: Introduction to Image Processing
Mid Term

Time: 90 minutes Date: 27/09/2018 Max. Marks: 30


Instructions: 1) Start each answer on a fresh page of your answer book and highlight your answer number.
2) Check that your Question paper has 3 sections and 13 Questions.

Q1 Answer all questions [6 X 1M = 6M]


a) How will the frequency domain content (DFT) change if the input image is rotated by an
angle of ‘A’ in spatial domain?

Ans: The frequency domain content is also rotated by an angle of ‘A’ (DFT property)
b) Given following 3 x 3 image (Fig. 1) which has 8 intensity levels in it. It is required to do
bit plane slicing of the given image. What is the 2nd bit plane of the image?

5 7 3
0 5 0
1 0 2
Fig. 1

Ans:
0 1 1
0 0 0
0 0 1
c) What is the storage space required to save 512 x 1024 image having 512 intensity levels.

Ans: 512 x 512 x 9

d) If the pixel of an image are shuffled, then which of the following parameters may change?
i) Histogram ii) Mean
iii) Entropy iv) Covariance

Ans: Covariance

e) Small value of gamma (less than 1) will produce ____________ image. (darker/brighter)

Ans: brighter

f) How is an image digitized? Briefly explain the steps.

Ans: Sampling  digitization of the coordinates


Quantization  digitization of the intensity values

Page 1 of 7
LNMIIT/B. Tech./EC/PE/2018-19/ODD/ECE4141/IIP

Q2 Answer any 3 questions [3 x 3M=9M]

a) Let V = {0, 1}. Show the shortest 4-path, 8-path and m-path between ‘p’ and ‘q’ shown in
Fig. 2. Also find the chessboard distance and city-block distance between ‘p’ and ‘q’.

3 1 2 1 q
2 2 0 2
1 2 1 1
p 1 0 1 2

Fig. 2
Ans:

Fig. 1a
Chessboard distance : 3
City block distance : 6

b) Explain how image compression can be achieved through K-L Transform.

Ans:
 The input matrix ‘X’ will be formed by considering each row/column of the given
image.
 Find the mean
 Find covariance from the mean and the input matrix
 Find the eigen values and corresponding eigen vectors from the covariance
 The eigen vectors are arranged in the decreasing order of the eigen values.
 A matrix ‘A’ of the eigen vectors are formed column wise in which the first column of
eigen vector corresponds to highest eigen value and then it is arranged in decreasing
order.

 KLT formula:
 The eigen vectors with highest value has the maximum information of the image. In ‘A’
matrix, we shall remove some insignificant eigen vectors at the end by making it 0. The
new matrix is ‘AT’

 Then we apply inverse KLT formula to achieve the desired compressed


image.

Page 2 of 7
LNMIIT/B. Tech./EC/PE/2018-19/ODD/ECE4141/IIP

c) Consider the histogram (2, 2, 4, 8, 16, 32, 64, 128), where the number of gray levels is 8.
What is the output of histogram equalization? Explain using result how histogram
equalization enhances the contrast of an image.
Ans:
Input No. of Output
PDF CDF
intensity pixels intensity
0 2 0.0078 0.0078 0
1 2 0.0078 0.0156 0
2 4 0.0156 0.0312 0
3 8 0.0313 0.0625 0
4 16 0.0625 0.1250 0
5 32 0.1250 0.2500 1
6 64 0.2500 0.5000 3
7 128 0.5000 1 7
Total: 256

Thus histogram for input and output is given as follows:

140
120
100
no. of pixels

80
60 input
40 output
20
0
0 1 2 3 4 5 6 7
intensity values

Histogram equalization distributes pixel values throughout a range, thus, equalizing and
making the histogram more "normal" shaped. It transform the data/contrast level to spread
through the spectrum of 0-255 equally by using CDF. This process boost the lower contrast of
the darker region thus making parts of an image more 'visible'.

d) In the following image (Fig. 3), all pixels with value ‘1’
constitutes a region.

i. Mark the boundary pixels of the region using 4-


connectivity and 8-connectivity.

ii. Also show the different ‘m’ path possible between pixels
‘p’ and ‘q’.

Fig. 3

Page 3 of 7
LNMIIT/B. Tech./EC/PE/2018-19/ODD/ECE4141/IIP

Ans:
(i)

0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 1 0 0 0 0 0 0 1 0 0 0
0 0 1 1 1 0 0 0 0 1 1 1 0 0
0 1 1 1 1 1 0 0 1 1 1 1 1 0
0 1 1 1 1 0 0 0 1 1 1 1 0 0
0 1 1 1 0 0 0 0 1 1 1 0 0 0
0 1 0 1 0 0 0 0 1 0 1 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0

Using 4 connectivity Using 8-connectivity

(ii)
0 0 0 0 0 0 0
0 0 0 1 0 0 0
0 0 1 1 1 0 0
0 1 1 1 1 1 0
0 1 1 1 1 0 0
0 1 1 1 0 0 0
0 1 0 1 0 0 0
0 0 0 0 0 0 0

M path (2 path has been shown – many such path is possible)

Q3 Answer all questions [3 X 5M =15M]

a) Given following 4 x 4 image (Fig. 4). Show the output of the


image after applying:
i) unsharp masking
(using 3 x 3 median filter for smoothening, apply zero
padding for boundary pixels)

ii) high boost filtering with A = 2 Fig. 4


(can be shown for 1st row only)

Page 4 of 7
LNMIIT/B. Tech./EC/PE/2018-19/ODD/ECE4141/IIP

Ans:

i) Steps:
 Blur the image (done by median filter)
0 3 3 0
3 4 4 3
2 3 3 2
0 1 2 0

 𝑓𝑠ℎ𝑎𝑟𝑝 = 2𝑓(𝑥, 𝑦) − 𝑓𝑏 (𝑥, 𝑦)

16 5 5 10
9 2 2 1
0 7 5 4
4 9 0 4

ii) The high boost filtering mask (A=2) will be:

0 -1 0
-1 6 -1
0 -1 0

Applying it in 1st row, we get


38 9 12 24

b) Perform the intensity level slicing on the following 3 bit image (Fig. 5). Let 𝑟1 = 3, 𝑟2 = 5
and 𝑠 = 7, where 𝑟1 and 𝑟2 are the input intensities and s is the output intensity for input
between 𝑟1 and 𝑟2. Obtain the image:

i) with background transformation


(i.e. background = 0)

ii) without background transformation.

Also show the transformation plots used in this question. Fig. 5

Page 5 of 7
LNMIIT/B. Tech./EC/PE/2018-19/ODD/ECE4141/IIP

Ans:

i) The transformation function is: ii) The transformation function is:

Output image:
Output image:
2 1 2 2 1
0 0 0 0 0 2 7 7 7 2
0 7 7 7 0 6 2 7 6 0
0 0 0 0 0 2 6 6 7 1
0 0 0 7 0 0 7 2 2 1
0 7 0 0 0

c) Determine the 2D DFT of the following image (Fig. 6)

0 1 3 1
1 2 3 2
3 3 2 3
1 2 3 2

Fig. 6
Ans:

First we perform the 1D DFT on the rows: (you may also start with column first)

Page 6 of 7
LNMIIT/B. Tech./EC/PE/2018-19/ODD/ECE4141/IIP

Hence we have an intermediate output:

Next, we find the 1D DFT on the columns of the above matrix:

Similarly it is performed for 3rd and 4th column.

The final result is:

--------------------------------------------------- Good Luck -----------------------------------------------------

Page 7 of 7

You might also like