0% found this document useful (0 votes)
13 views3 pages

DIP Endsem Answer Key

Uploaded by

preetd.0945
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)
13 views3 pages

DIP Endsem Answer Key

Uploaded by

preetd.0945
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/ 3

BITS Pilani, K K Birla Goa Campus

Digital Image Processing (EEE F435) [IC: Ashish Chittora]


End-Semester Examination, Semester-II (2022-23)
Date: 08/05/2023 Maximum marks: 80
Time: 2 PM-5 PM [Answer key]

Q.1. Write a MATLAB program to create a black grid over a grayscale image. [10]

Q.2. [5+5]

Q.3. (a) Imagine a 64 x 64 image with 2 bits/pixel representation. The normalized gray levels are 0, 1/3,
2/3, 1. Suppose the image distribution is given by Table-Q3a.

(i) Apply histogram equalization and draw the equalized histogram. [5]

rk 0 1 2 3
p(rk) 0 0.44 0.37 0.19
(ii) Apply Huffman encoding on original image to determine variable length codes for each gray level.
Calculate the entropy and compression ratio achieved. [5]

rk 0 1 2 3 Entropy = 1.665 bits/pixel


Fix length 00 01 10 11 2 bits/pixel
Huffman 0 11 101 100 1.75 bits/ pixel
Compression ratio = 2/ 1.75 = 1.143

(b) Use Run-Length Encoding to encode the MSB plane of following 4-bit image Fig-Q3b: [5]

0 0 1 1
0 1 1 1
0 1 1 1
0 0 1 1
Run length code = 2, 2, 1, 3, 1, 3, 2, 2 (as Runs of 0’s) [Other RLE forms are accepted]
Q.4. Given a 10x10 size binary image, whose central 4 x 4 pixels are all 1 and others are 0. Calculate the
gradients of this image using the Sobel operators Hy. Show all the (actual) pixel values. [5]

0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 1 3 4 4 3 1 0 0
0 0 1 3 4 4 3 1 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 -1 -3 -4 -4 -3 -1 0 0
0 0 -1 -3 -4 -4 -3 -1 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0

Q.5. (a) For the following sample vectors: x1 = (4,11)T, x2 = (8,4)T, x3 = (13,5)T and x4 = (7,14)T.

(i) Calculate the mean vector (mX) and Covariance matrix (CX). [5]

4 −11
mx = (8,8.5)T , CX = [ ]
−11 23
(ii) Calculate vectors y, where y is derived from x using Hotelling-transform. [5]

λ1 = 30.3849 , λ2 =6.6151, e1 = (0.5574, -0.8303)T , e2 = (0.8303, 0.5574)T

0.5574 −0.8303
A=[ ]
0.8303 0.5574
Using y = A(x-mx), each y vector can be calculated.

(iii) Covariance matrix of y vectors (CY). [5]

λ1 0 30.3849 0
CY =[ ]= [ ] (from eigenvalues)
0 λ2 0 6.6151
(b) Calculate the Euler number for the following images: [5]
(i) E = 3-3 = 0 (ii) E = 8-12+2 = -2
Q. 6. (b) For the triangle shape boundary as shown in Fig. Q6 and given three boundary points:

(i) Find the Fourier descriptors (FD) with starting point as O. [5]

(ii) State and verify the FD’s translation property for the translation with ∆xy = 1+2j. [5]

Q.7. (a) Perform the morphological ‘Closing’ operation. [5]

(b) Perform Region (or hole) filling operation on a binary image and write the first four
intermediate images (X1, X2, X3 X4) [5]

You might also like