DIP Ques
DIP Ques
Section A
Q1. (a) Give an example to represent a binary image, a gray image, and a color image (10)
using numerical array.
(b) What is wavelet? Explain how wavelet transform is used to decompose image with (12)
the help of the block diagram.
(c) How much resolution of an image is enough? Explain your thoughts. (08)
0 0 0 0
𝑓(𝑥, 𝑦) = 0 1 0 0
0 0 1 0
0 0 0 0
Q3. (a) Perform the 2D convolution, where the input image and the kernel matrices are (15)
given below:
1 3 5 1 2 1
𝐼= 2 5 7 , 𝐾𝑒𝑟𝑛𝑒𝑙 = 2 4 2
3 7 9 1 2 1
(b) Perform the same of Q. 3(a) using separable convolution technique. (15)
Section B
Q4. (a) Mention the application of histogram equalization. Equalize the following (17)
histogram.
Grey level 0 1 2 3 4 5 6 7
No. 790 1023 850 656 329 245 122 81
of PixelI I I I I I I I I
Page 1 of 2
(b) Mention the properties of dialation. Perform the opening operation for the (13)
following image using the structuring element.
1 1 1 0 1 1 1
1 1 1 1 1 1 1
I I I I I I I I
1 1
(i)
1 0 1
Image
1 1
~
1 1 1
1 1 1
1 1 1
(ii) Structural element
Q5. (a) Consider a 3×3 neighbourhood in the following image, Use backward difference (18)
method and comment whether there is a corner or not if the threshold is 2300.
0 0 50 50 50
0 0 50 50 50
0 0 50 50 50 y
0 0 0 0 0
0 0 0 0 0 x
(b) Find the 1-D slant transformation and also calculate the total energy compaction for (12)
the following sequence.
1
2
3
4
Q6. (a) Why compression is required? Consider the string “ENGINEERING”. Find- (18)
i. The total no. of bit to represent the string using Huffman coding
ii. Entropy
iii. Compression ratio.
(b) How can you measure the quality of an image? The input and output of encoder (12)
and decoder is given below:
Input 12 20 39
Output 10 20 40
Calculate MSB, SNR, PSNR.
Page 2 of 2
.,
nd
H. Sc. ;ngineering 41? Year 2 1 em1 (Regular) ~xaminntion. 201
Department of Llectricnl nd l:.lcctronic · n ineerin '
l I· 2 5
Digital Imngc Pro e sing
Time: 1 hour-. Full larks: 210
N.B.: (i) Answer•\ \ IHREE questions from Cf!Ch ction in paratc scripts
(ii) Figures in the right margin indicate full marks.
Section i\
QI. (a) Whal is an image? Explain digital image mathematically . Show the key stages in (I 0)
digital image processing.
,@y Define psedo-coloring. Mention the important pomt in colour image processing. (07)
(c) Two images are given below (10)
5
A= ( 255
100)
0 '
B = (25 200)
60 255
(i) Perform the multiplication between A & B images.
(ii) Perfonn the blend between A & B, where the bending ratio is 0.6.
(d)
[QI = 0.596
0.211
0.587 l
The transfonnation from RGB to YIQ can be performed as follows:
Y'] [0.299 0.114 [R']
-0.274 -0.322 G'
-0.523 0.311 B'
(08)
Q2. 61 Define Image sampling and quantization. Draw and explain the structure of human (11)
eye and discuss human vision system.
(b) A square has vertices P1 = G),P2 = (i), P3 = (D, and P4 = G) (lO)
Determine new verticies of the square after the concatenation of transformations
translation (-2, 5 and then rotation (-n/3).
(c) Explain CMYK and HSI color models in a nutshell. (08)
(d) (i) When an object is illuminated with light, the object appears yellow. In what (06)
color this object will appear if it is illuminated with magenta light?
(ii) When cyan ink and yellow ink are deposited on a white paper, in what color
will it appear if it is illuminated by yellow light?
Q3. (a) What is Kernel? What ar. their applications? For the following operation, write (10)
do,:vn the Kernel matrix:
(i) Edge detection. (ii) Sharpen. (iii) Box blur, (iv) Gaussian blur 3x3 , (iv)
-moothing.
(b) Find the 2D coll\oluted output for the input image I and impulse response (kernel) (15)
h.
C, !)· l=G
5 2
h = O 0
6 5
7 3
3 9 D
1det the p. ,t,km of m
(10
lt 1£ I~ tl
11 n.
I n I t I
f(x,y) = (~ ! ~)
1 2 1
Section B
Q5. (a) What do you mean by histogram and histogram equalization? Mention the (13)
application of histogram equalization. Equalize the to1lowing histogram.
Grey level 0 1 2 3 4 5 6 7
No. 790 1023 850 656 329 245 122 81
of Pixel
(b) What are the features of an image? Mention the causes of edge. Detect edge using (12)
Prewitt operator for the following image usmg centre pixel.
(c)
Ilo 1H Ii!
What do you mean by bit plane slicing and intensity level slicing? For the given 8- (10)
bit image below, perform
(i) bit plane slicing, and
(ii) intensity level slicing with background R1 =3 and R2 = 5.
0 1 2 3
4 5 6 7
8 9 10 11
12 13 14 15
Q6. (a) Define morphology. Mention the characteristics of erosion. For the following (13)
image and structuring element, perform opening and closing operations.
Image Structuring element
@
[~~ ~ ~1
1 0 0 0
11 kJ H1 I
\\'hat is image ~egmcnl.3tion? E.xplain edge based imag~ segmentation. (12)
( ) Use the folltming 2x2 S-bit imoge as the input for lhe problem: (10)
P-00 250]
boo so
W}uu u 1he res Jun una e iflhe dither ~tn is •
(c)
rn
In this problem we will use the following dictionary: (11)
Code String
1 C
2 D
\
3 E
4 F
s G
If the input to the LZW decode are I 6 2 3 7 9, then find the output string.
Section A
Q1. (a) What do you mean by digital image processing? Describe the fundamental steps for digital (11)
image processing.
(b) Explain Sampling and Quantization in image processing. (08)
(c) Mention the differences between spatial and tonal resolution. (06)
(d) Obtain De (p,q), D4 (p,q), D8 (p,q), and Dm (p,q), for the following image. (10)
0 1 2 3 4 5
0 3 4 6 6 7 6 x
1 6 4 7 7 6 4
2 2 3 4 5 5 3
3 7 1 0 3 7 7
4 6 5 4 0 4 3
5 6 4 3 0 0 4
y
Assume V = {3,4} and p = (0,0); q = (5,5).
Q2. (a) What do you mean by energy compaction? Mention the properties of slant transform. (08)
(b) Determine the median output for the following 1-D function if 𝑦(𝑚) = {2,3,8,4,2} and (08)
windows are (i) 𝑤 = {−1,0,1}
(ii) 𝑤 = {−1,0,1,2}
(c) Explain different distance measurement criteria and m-connectivity of digital image. For the (13)
following arrangement of pixels, what is the value of chessboard and city-block distance
between the circled two points and justify that whether they are m-connected or not.
0 0 0 0 0
0
0
0
1
1
0
0
1
0
1
1
𝐼=
0
0
0 1
1
1
0
0
0
0
0
0 1 0 0 0
(d) Write down the application of 2D Fourier transform and 2D z-transform. (06)
Q3. (a) Explain sampling theorem for image. Find the 2D Discrete Fourier Transform for the following (08)
4 8
image matrix: .
3 5
(b) Define zooming and shrinking of image. For the following image, apply zooming using Nearest (08)
neighbor interpolation and Bilinear interpolation technique.
Page 1 of 3
75 49 30
𝐼 = 50 11 121
55 12 232
(c) Find 2D z-transform for the following: (08)
1, 𝑛 ≥ 0, 𝑛 ≤ 0.
𝑢(𝑛 , 𝑛 ) =
0, else
Also, find ROC for this sequence. For the following binary sequence:
0 0 1 1 0 0 1 0
Shift 2 bits to the right and 2 bits to the left. Also, find the decimal number.
(d) What is noise of an image? Mention the causes of noise and explain how it is estimated? (07)
Q4. (a) Mention the design criteria of Gaussian Kernels. “Faithful Gaussian Kernel cannot be built (08)
using 33 mask”—Justify the statement.
(b) Mention the advantages of slant transform. Find 1D slant transform for the following sequence: (07)
1
3
5 . Also, calculate total energy compaction.
7
(c) Show that, for unitary transform, the determinant has unit magnitude and the eigen values also (08)
have unit magnitude.
(d) Find the transformed output image matrix using K–L transform for the following given image (12)
matrix.
2 5 3 2 4 3
𝑈=
2 5 4 3 3 4
Section B
Q5. (a) Why compression is needed for digital image processing? What are the different techniques of (07)
image representation? Calculate file size of a binary, gray level, and color image whose
resolution is 1200600.
(b) Define the terms for an image: (i) Brightness (ii) Contrast (iii) Dithering. Write down the (10)
elaboration of the popular file formats: (i) GIF (ii) JPEG (iii) PNG (iv) TIFF (v) EXIF (vi) PDF.
(c) What is entropy of a system? Define lossless and lossy data compression techniques. For the (08)
given sequence find the run-length and savings of Bits using run-length coding.
1111111111111111000000011111101010000001010111111100001
(d) Construct the codeword and calculate entropy for “ELECTRICAL” using Huffman coding. (10)
Q6. (a) What is histogram equalization? Why this is needed? For the following image, equalize the (12)
histogram.
5 2 3 7
3 3 1 1
5 2 8 7
2 2 3 1
(b) Mention the specifications of histogram equalization. Write down the properties of erosion and (06)
dilation with proper definition.
Page 2 of 3
(c) Define Hit or Miss transform of an image. For two images, (08)
1 1 1 1
1 0
𝐴 = 0 1 0 0 and 𝐵 = , what will be the transformed image using Hit and Miss
0 0 1 1 0 0
0 0 0 1
transform?
(d) For the following image and structuring element, perform opening and closing operations. (09)
Image Structural element
0 0 0 1
0 0 1 0 1 1 1
0 1 0 0
1 0 0 0
Q7. (a) What are the features of an image? Mention the causes of edge. Detect edge using Prewitt (12)
operator for the following image using center pixel.
0 30 60
5 32 62
10 38 64
(b) Determine the edges using minimum cost method for the following image. Assuming that edge (11)
start in the first row and end in the last row. 5 6 1
6 7 0
7 1 3
(c) What do you mean by bit plane slicing and intensity level slicing? For the given 3-bit image (12)
below perform- (i) bit plane slicing and (ii) intensity level slicing with background R1 = 3 and R2
= 5. 6 2 3 2
1 5 0 7
4 3 2 1
2 5 7 6
Q8. (a) Define morphology. What are the different types of morphological operations? Mention the (07)
characteristics of erosion.
(b) Why image segmentation is useful? Write down the significant issues of region growing, also (12)
write down its applications.
(c) Consider the following sub image: (08)
0 0 50 50 50
r-------------------, y
0 0 50 50 50
0 0 50 50 I 50
I
0 0 0 0 0
I
IL ___________________ JI
x
0 0 0 0 0
Consider a 33 neighborhood. Using backward difference, compute the eigen values for a corner
detector. If the threshold is 1500, will it be considered as a corner?
(d) Find the resulting dithered binary image of the dither matrix (08)
0 8 2 10
12 4 14 6 , and the 22, 8 bit gray level image as the input is 200 250 .
3 11 1 9 100 50
15 7 13 5
Page 3 of 3
Khulna University of Engineering & Technology
B.Sc. Engineering 41h Year 2nJ Term (Regular) Examination, 2017
Deportment of Elcctricnl and Electronic Engineering
EE 4235
Digital Image Processing
Full Marks: 210
Time: 3 hours
N.B.: (i} Answer ANY THREE questions from ench section in separate scripts.
(ii) Figures in the right margin il\dicate lull marks.
(iii) Necessary table for AC coefficients will be supplied on request.
(iv) Assume any data if missing.
~cction A
1
QI. (rt) Whut do yu11111111111 hy ,ll1.111111 lnlllijll 1111d dll(hnl ili111!ll.l 111·1111L•~Ml11u', Explain lhe (10)
procedure ol' h11ug1.1 J'ormutlon,
(b) 1\vo images arc given bdow: (15)
A= CII@QJ B= 25 200
[filITJ 60 255
(i) What would be the resultant pixel grey values at all locations in the enhanced
image when a NAN,0 and a NQ!Uogical operation will be perfom1ed?
__
(ii) Perfonn the,,,,.multi2lication
............ ~
between
. ... A & B images.
(iii) Perfonn blend between A & B, where the blending ratio is 0.4.
(c) Consider the two image subsets, s, and Si as shown below. For V = {l}, (10)
detennine whether these two subsets are (i) 4-adjacent, (ii) ~-adja~:_nt and (iii)
--
m-adjaeent.
0
s,
0 0 0 0
··--·-··-·-
0 0 1 I 0
0 0 1 0 0 1 0 0 1
0 0 1 0 I I 0 0 0
0 0 I 1 l 0 0 0 0 0
0 0111 00111
Q2. (a) Define resolution. Classify different types of image with examples and also (10)
calculate their file size to store an image with resolution 640x480.
(b) Asquarehasverticesp1 = (i), p 2 = (i), p3 = (D, andp4 = (;).Detennine (l 2 )
the new vertices of the square · after the concatenation of transfonnations
Translation (-2, 5) and then Rotation (-7tl3).
(c) Determine the center of moment and first Hu moment (rotation invariant (13)
moment) for the following small image, I.
2 4 2
I= 4 16 4
2 4 2
Q3. (a) "Median filter is a non-linear filter" - Justify the statement. (OS)
(h) Find the 2D convoluted output for the input image / and impulse response (10)
(kernel) h.
Two images are given below:
1 2 3 1 5 2 3
h= 0 0 0 Jc 8 7 3 6
6 5 4 3 3 9 I
Puijc I of4
Q4. (a)' What do you mean by basis image? Consider the following image U and (13)
transfonnA.
u= G !l 1
/\ = ../2 1 1
[1 11
What is the transformed output? Also, find the basis image.
(b) For the following image, calculate the equalized histogram and scale the intensity (12)
II I i J •I '
U "i)~, l1 6 6 '/ 6
16~7764
2 2 3-··4, S S 3
3 7 I 0 '•3.. 7 7
4 6 S 4 0 '•4---J
5 6 4 3 0 0 @q
X
Assume V = (3,4).
Section B
QS. ~ a t do you wean by edge? Mention lthe causes of ed ge\ What are the (16)
performance indices of edge detector? Consider the following sub-image:
~~ 7~2 7~2 ~] • .
0 0 36 0 0
0 0 0 0 0
Using the centre difference method, calculate the edge strength and normal at the
centre pixel using raooy edge detector. Assume any[-D Gaussian mask. \
(b) What do you mean by threshold vulue? Consider the following sub-image of3x3
neighbourhood: ·
0 0 so so 501
o ro !fo-·so\ so
o /o so so so
0 i.O _ 0 . _Q . 10
0 0 0 0 0
Using backward difference, compute two eigenvalues Ai and Az for a comer
detector. If the threshold is 3000, will it be considered as a comer?
@ The quantized OCT coefficients are given in Fig. QS(c). (09)
Page 2 of4
•
Scanned with CamScanner
(i) i\l'pl)' Zli:,nll ~,~mminll nml nml thu m11put. .
(ii) Hm•11,l\l tlw i\C 1:l1~1nd1•11t~ h)' 11~11111 Ihm Le1111tli l '111111111, shuw11 ht l'l1A,
Q$(l'),
Quunllt.cd DC'!' cocniclcnts
32 6 _, 0 0 0 0.0
-I 0 0 0 0 0 0 0
-1 0 I O O O O 0
-1 0 0 0 0 0 0 0
00000000
00000000
o o o o o o ·o o
00000000
Fig. for QS(c).
~p . (09)
~ \\'hs.t isiffia1:e segmentation? Explain edge based image s~gmentallon.
(b) S~--c:i(v the application of region split and merges techmq_1,1es. Als~, apply the (17)
l"~gion Sflit~J merge tcclmique on t1,1e following image and determine the final
----.,,--....,.;.
image,
--- .
5 6 6 6 7 7 6 6
6 7 6 7 5 5 4 7
6 I 6 4 4 3 2 5 6
5 4 5 4 2 3 4 6
~ ~
0 I3 2 .J .J 2 4 7
0 0 0 0 2 2 5 6
1 I 0 I 0 3 4 4
I 0 I 0 2 3 5 4
0 7 3 I
3 6 4 6
2 4 2 2
i I 2 s- 3
As..<ume threshold~ 4 for thresholding ;:ind for clipping the limit is 2 to 5.
Q7. ~ a t are the major steps inYoh·ed in~ a g e compression? Draw tile block (10)
~fined;iliFf
d.iaQJa.'TI of JPEG encoder.
~~:]t;.) ?<2,.8 bit_grey-level image as the inpu; as follows: ( (09)
100 50 f
What is the resulting dithered binary image if the dithered matrix is as follows:
2 1
1°2 : 14 6°]
[ 3 11 1 9
15 7 13 5 .
(c} Mcntlnn th!! 1m111r j uf tlill'rrcnt lus~k.s~ roding techni1_wsJ1. Consld~r n s1111rn• (11}
havlnl( Llucc sytnhuls 11ilh-CT1c1r prliliiiflTITiT~~ us follm1 s:
S)mbols
--
Probabilities
a1 0.4
a2 0.5
11J 0.1
-
Generate tag for the sequence of a2, a2, a2 and 3J using arithmetic coding.
(d) D~tennine whether the follo\\fog frame sequences are possible or not. (05)
(i) OPP, (ii) JUI, (iii) IlBB, (iv) IBBI and (v) BBBB
Page 3 of 4
. c!"'.o-('
~9
r~~ @
0
(10)
QS. (ll) \Vhnt is mnthcmnlicnl morrhology? Explain different morphological operators
with thciriiiiiiiicinniicnl ·exp;~s; ions.
(b) Whnt do you menn by structuring element? For the following image and (12)
structuring clement, perfonn opening nnd closing operation.
I 0 0 0 0 I d5 I
0 I 0 0 0
0 0 l 0 0
0 0 0 . I 0
0 0 0 0 I
Section A
Q1. (a) What do you mean by digital image processing? Explain the fundamental steps in digital image (11)
processing.
(b) Explain the image formation technique clearly. Also write down the main problem during (10)
image acquizition.
(c) Write down the properties of Hadamard transform. Consider the image (U) and transform (A) (14)
as follows:
[ ] and [ ].
√
What is the transformed output? And also find the basis image.
Q2. (a) Show that the 2D discrete Fourier transform and its inverse are periodic functions. Mention the (10)
dc and ac value of the transform.
(b) Explain the seperability properties of DFT formula. What is its advantages? Prove that (10)
( ) ( ) where the symbols have their usual meanings.
(c) For draw the waveforms of cosine basis function. Assume 1D DCT. (15)
Q3. (a) Write down the following operations mathematically. Assume image resolution in MN. (15)
(i) Compute per element sum of two arrays Aij and Bij, (ii) Compute per element difference
between two arrays Aij and Bij, (iii) Compute per element product of two arrays Aij and Bij, (iv)
Perform per element division of array Aij and Bij, (v) Transpose of an image Aij, (vi) Flip an
image Aij horizontally, (vii) Flip an image Aij vertically, (viii) Calculate average array elements
of Bij, (ix) Return trace of an array Aij, (x) Calculate absolute difference between two arrays Cij
and Dij.
[ ]
Find (i) average, (ii) standard deviation, (iii) coefficient of variation, (iv) mode, (v) signal-to-
noise ratio, and (vi) median.
(c) Explain the following geometrical operations of an image: (08)
(i) Scaling, (ii) Rotation, (iii) Translation, and (iv) affine transform.
Q4. (a) What are the different color space models? Mention their classifications with applications. (08)
Page 1 of 3
(c) The input image and the kernel are given below. Find the convoluted output image at position (15)
(0,0), (1,1), and (2,2). Use 2D convolation.
[ ] [ ]
input kernel
Section B
Q5. (a) What do you mean by histogram and histogram equalization? Write down the application of (08)
color look up table.
(b) Explain different types of images with examples. Also calculate the file size of different kind of (11)
images in Kbyte.
(c) Use the following 22 8 bit gray-level image as the input for this problem: (08)
[ ]
[ ].
(d) Write an equation for saturate salt and pepper noise. A saturated salt and pepper noise has L = (08)
0.975. The average gray level of an image without noise is 100. Estimate the mean and variance
of the noise.
Q6. (a) What do you mean by edge? Mention the causes of edge. What are the performance indicators of (09)
edge detector.
(b) What do you mean by threshold value? Consider the following sub-image (12)
0 0 50 50 50 y
r-------------------,
0 0 50 50 50
0 0 50 50 50
0 I 0 0 0
___________________ I 0 x
0 0 0 0 0
Consider a 33 neighborhood. Using backward difference, compute the two eigen values λ1 and
λ2 for a corner detector. If the threshold is 3000, will it be considered as a corner?
0 0 0 0 0
0 0 0 0 0
0 0 72 72 0
0 0 36 0 0
0 0 0 0 0
Use the centre difference method, calculate the edge strength and edge normal at the centre pixel
using canny edge detector. Assume any 1-D Gaussian mask if required.
Q7. (a) What do you mean by a non-linear filter? Compare the performance of the Gaussian and median (09)
filter. What filter do you think would be effective to remove noise and why?
Page 2 of 3
(b) Let us consider the string as "ENGINEERING" and we would like to individually encode each (12)
character. (i) Construct the Huffman coding tree, (ii) Show the Huffman code table, (iii) What is
the resulting code for the given string? and (iv) What is the entropy of this string.
(c) In this problem, we will use the following dictionary (or string table) (14)
Code String
1 C
2 D
3 E
4 F
5 G
(i) What are the output codes if the input to the LZW encoder is CEFGCEFGECEF
(ii) What is the output string if the input codes to the LZW decoder are 162379.
Q8. (a) What do you mean by chroma sub-sampling? Show the scheme 4:4:4, 4:2:2, 4:1:1 and 4:2:0 (08)
used in image and video coding research.
(b) Explain why compression is required. Draw the block diagram of encoder and show the major (08)
steps in JPEG compression.
(c) For the following two local patches: (06)
and
Calculate (i) normalized cross correlation (NC), (ii) SSD, and (iii) SAD.
(d) Let us simplify the hierarchical JPEG by considering only 2 layers as follows: (13)
Assume that the input is a 44 image as
[ ]
and the quantization matrices for Encoder 1/Decoder 1 and Encoder 2/Decoder 2 are as follows:
Quantization matrix for Encoder 2/Decoder 2 is [ ] and Quantization matrix for Encoder
1/Decoder 1 is [ ].
(ii) What is the MSE between the original image and the reconstructed image ̃ ?
(iii) What is the resulting reconstructed image ̃ ?
f2 F2
2 Encoder 2 Decoder 2 ̃
Decoder 2
̃ 2
2
(̃)
(̃) f
- ̃
D1
f + Encoder 1 Decoder 1 + ̃
+
̃ ̃ (̃)
Encoder Decoder