NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur
Digital Image Processing
Assignment- Week 2
TYPE OF QUESTION: MCQ/MSQ
Number of questions: 10 Total mark: 10 X 2 = 20
______________________________________________________________________________
QUESTION 1:
A physical Image of dimension 1.5 𝑖𝑛𝑐ℎ𝑒𝑠 × 2 𝑖𝑛𝑐ℎ𝑒𝑠 is scanned at 400 PPI (Pixel per inch) in
grayscale mode. If every pixel is digitized using 8 bits and the digital image pixel array with data
compression ratio of 2/1 is to be transmitted over a communication channel in 0.5 second, what
is the minimum bandwidth requirement of the channel?
Hint: Data compression ratio is defined as the ratio between the uncompressed size and
compressed size: Thus, a representation that compresses a file's storage size from 10 MB to 2
MB has a compression ratio of 10/2 = 5/1
a) 5.12 Gbps
b) 3.84 Gbps
c) 1.92 Gbps
d) 1.48 Gbps
Correct Answer: b
Detailed Solution:
First we need to convert continuous signal into discrete signal by the process of sampling and
then digitize using digital bits.
Therefore, size of pixel at a rate of [(1.5 × 400) × (2 × 400)] × 8 𝑏𝑖𝑡𝑠 = 3.84 𝐺𝑏
Size of compressed data = Uncompressed data/Compression ratio = 3.84/2 = 1.92 𝐺𝑏
Bandwidth of Channel = 1.92/0.5 = 3.84 𝐺𝑏𝑝𝑠
____________________________________________________________________________
QUESTION 2:
Which of the following option is true?
1) Q ∈ N4 (P) 2) Q ∈ N8 (P) 3) Q ∈ ND (P)
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur
a) only 1
b) only 3
c) both 2 and 3
d) all 1,2,3
Correct Answer: c
Detailed Solution:
From the definition of 8-connectedness and diagonal connectedness, Q ∈ N8 (P)and Q ∈ ND (P).
______________________________________________________________________________
QUESTION 3:
Which of the following is always True?
a) Chessboard distance > City block distance > Euclidean
b) Chessboard distance < City block distance < Euclidean
c) Chessboard distance < Euclidean < City block distance
d) 𝑁𝑜𝑛𝑒 𝑜𝑓 𝑎𝑏𝑜𝑣𝑒
Correct Answer: d
Detailed Solution:
Given points (𝑥, 𝑦) and (𝑢, 𝑣)
City block distance (D1) =|x-u|+|y-v|
Euclidean distance (D2) =√(𝑥 − 𝑢)2 + (𝑦 − 𝑣)2
Chessboard distance (D3) =max (|x-u|, |y-v|)
D2 ≥ D3; (D2=D3 when 𝑦 = 𝑣 𝑜𝑟 𝑥 = 𝑢 𝑜𝑟 𝑏𝑜𝑡ℎ)
D1 ≥ D2; (By triangle inequality, D2 is hypotenuse to right angles with sides |x-u| and |y-v| )
Thus D1 ≥ D2≥ D3, Option C is special case which is not always True.
______________________________________________________________________________
QUESTION 4:
Consider an 2-D point [2, 4]T. Perform a scaling operation (S) in x-axis by 0.5 units and in y-
axis by 2 units. What will be the output?
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur
a) [4, 2]𝑇
b) [1, 3]𝑇
c) [1, 8]𝑇
d) [3, 2]𝑇
Correct Answer: C.
Detailed Solution:
For given transformation we use the scaling matrix in homogenous system as
𝑋′ 0.5 0 0 2
[𝑌′ ] = [ 0 2 0] [4]
1 0 0 1 1
On solving we get,
𝑋 ′ = 1, and 𝑌′ = 8.
______________________________________________________________________________
QUESTION 5:
What does the following matrix do?
1 0 0 0
0 −1 0 0
𝑇=[ ]
0 0 1 0
0 0 0 1
a) Reflects a point over mirror placed at xz-plane
b) Reflects a point over mirror placed at yz-plane
c) Rotation of a point about y-axis
d) None of above
Correct Answer: a
Detailed Solution:
For this we can use matrix in homogenous system and solve for transformation
𝑋′ 1 0 0 0 𝑥
′ 0 −1 0 0 𝑦
[𝑌′ ] = [ ] [ ].
𝑍 0 0 1 0 𝑧
1 0 0 0 1 1
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur
Therefore
𝑋′ 𝑥
′ −𝑦
[𝑌′ ] = [ ]
𝑍 𝑧
1 1
Which is a reflection over xz-plane.
______________________________________________________________________________
QUESTION 6:
Consider the following two binary images
1 0 0 1 0 0
f1 = (1 1 0) and f2 = (0 1 0).
1 1 1 0 0 1
The Boolean operation OR and AND of images are given by f1 ⊕ f2 and f1 ∙ f2 . Assume both
the images are of the 8-bit integer type.
1 0 0 1 0 0
a. f1 ⊕ f2 = (1 1 0) and f1 ∙ f2 = (1 1 0)
1 1 1 1 1 1
1 0 0 1 0 0
b. f1 ⊕ f2 = (1 1 0) and f1 ∙ f2 = (0 1 0)
1 1 1 0 0 1
1 0 0 1 0 0
c. f1 ⊕ f2 = (0 1 0) and f1 ∙ f2 = (1 1 0)
0 0 0 1 1 1
0 0 0 1 1 1
d. f1 ⊕ f2 = (0 0 0) and f1 ∙ f2 = (1 1 1)
0 0 0 1 1 1
Correct Answer: b
Detailed Solution:
As we performing simple pixel to pixel OR and AND therefore,
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur
1 0 0 1 0 0
f1 ⊕ f2 = (1 1 0) and f1 ∙ f2 = (0 1 0)
1 1 1 0 0 1
______________________________________________________________________________
QUESTION 7:
Perform only first pass of connected component labelling algorithm considering 4-connected
component labelling in following image and choose the correct option. (labelling starts from
label index=1)
1 1 1
1 1
1 1 1
4 4 4
4 4
4 4 4
b
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur
3 3 3
3 3
3 3 3
4 5 6
7 8
9 10 11
d 1
4 5 6
6 6
6 6 6
Correct Answer: a
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur
Solution:
1
1 1 1
1 1
1 1 1
Let (m,n) denote row and column index of pixel, L(m,n) is label of pixel. We scan from left to
right and top to bottom. At (0,0) we encounter pixel with binary value 1. Since there aren’t any 4-
neighbor at top and left, so we assign it the very first available label that we have,
L(0,0)=1
1
Now the second pixel with binary value 1 is encountered at (1,1). Again we don’t have any 4-
neighbour at top (i.e. (0,1)) and left (i.e. (1,0)) of this pixel having binary value 1 and is already
labeled, there fore this pixel gets a new label 2
L(1,1)=2
1
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur
Similarly L(2,2)=3., and L(3,1)=4
1
However at (3,2), Top 4-neighbor label is L(2,2)=3 and left 4-neighbor L(3,1)=4. So we record
similarity of labels in label similarity list, Label_similarity_list = {(3==4)} and the pixel (3,2)
inherits label 4
L(3,2)=4
1
4 4
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur
Similarly pixel (3,3) inherits its label from its left 4-neighbor pixel (3,2)
L(3,3)=4
1
4 4 4
Pixel (4,2) inherits its label from its top 4-neighbor pixel (3,2)
L(4,2)=4
1
4 4 4
Pixel (4,3) inherits its label from its left 4-neighbor pixel (4,2)
L(4,3)=4
1
3
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur
4 4 4
4 4
Pixel (5,3) inherits its label from its top 4-neighbor pixel (4,3)
L(5,3)=4
1
4 4 4
4 4
Pixel (5,4) inherits its label from its left 4-neighbor pixel (5,3)
L(5,3)=4
1
4 4 4
4 4
4 4
Pixel (5,5) inherits its label from its left 4-neighbor pixel (5,4)
L(5,5)=4
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur
4 4 4
4 4
4 4 4
Thus correct answer
1
4 4 4
4 4
4 4 4
______________________________________________________________________________
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur
QUESTION 8:
Consider a 2D point [1,1]T in a continuous image. The point is rotated by 45 o in clockwise
direction and scaled by 2 both in x-direction and y-direction. The transformed point is given by
a) [0, √2]T
b) [0, 2]T
c) [2√2, 0]T
d) [1, √2]T
Correct Answer: c
Detailed Solution:
Rotation matrix in homogenous coordinate system for clockwise direction is given as
cosθ sinθ 0
𝑅(𝜃) = [-sinθ cosθ 0].
0 0 1
Scaling matrix α in x direction and β in y-direction is given by
α 0 0
𝑆 = [0 β 0].
0 0 1
𝑥′ 2 0 0 cos450 sin450 0 1
[𝑦′] = [0 2 0] [-sin450 cos450 0] [1].
1 0 0 1 0 0 1 1
On solving this equation, we get 𝑥 ′ = 2√2 and 𝑦 ′ = 0.
______________________________________________________________________________
QUESTION 9:
Consider the following transformation matrix T:
αcosθ -αsinθ 0
𝑇 = [ βsinθ βcosθ 0]
0 0 1
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur
a) T rotates point clockwise by angle θ about x axis, scales x-axis by α and y-axis by
β
b) T rotates point anticlockwise by angle θ about x axis, scales x-axis by α and y-axis
by β
c) T rotates point clockwise by angle θ about x axis, scales x-axis by β and y-axis by
α
d) T rotates point anticlockwise by angle θ about x axis, scales x-axis by β and y-axis
by α
Correct Answer: b
Detailed Solution:
𝑇 = 𝑆 𝑅(θ)
𝑅(θ) = Rotation Matrix 𝑖𝑛 𝑎𝑛𝑡𝑖𝑐𝑙𝑜𝑐𝑘𝑤𝑖𝑠𝑒 𝑑𝑖𝑟𝑒𝑐𝑡𝑖𝑜𝑛
𝑆 = Scaling Matrix
α 0 0 cosθ -sinθ 0
𝑇 = [0 β 0] [ sinθ cosθ 0]
0 0 1 0 0 1
______________________________________________________________________________
QUESTION 10:
The output of an image sensor takes values between 0.0 and 10.0. If it is quantized by a uniform
quantizer with 256 levels, what will be the transition (𝑡𝑘 ) and reconstruction level (𝑟𝑘 )?
10(𝑘+1) 5
a) 𝑡𝑘 = , 𝑘 = 1,2,3, . . . . ,257; 𝑟𝑘 = 𝑡𝑘 + 256 , 𝑘 = 1,2,3, . . . . ,256
256
10(𝑘+1) 10
b) 𝑡𝑘 = , 𝑘 = 1,2,3, . . . . ,257; 𝑟𝑘 = 𝑡𝑘 + 256 , 𝑘 = 1,2,3, . . . . ,256
256
10(𝑘) 5
c) 𝑡𝑘 = , 𝑘 = 1,2,3, . . . . ,257; 𝑟𝑘 = 𝑡𝑘 + 256 , 𝑘 = 1,2,3, . . . . ,256
256
10(𝑘−1) 5
d) 𝑡𝑘 = , 𝑘 = 1,2,3, . . . . ,257; 𝑟𝑘 = 𝑡𝑘 + 256 , 𝑘 = 1,2,3, . . . . ,256
256
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur
Correct Answer: d
Detailed Solution:
Using the uniform quantizer design, transition and reconstruction levels can be defined as
10(𝑘−1) 5
𝑡𝑘 = 256 , 𝑘 = 1,2,3, . . . . ,257; 𝑟𝑘 = 𝑡𝑘 + 256 , 𝑘 = 1,2,3, . . . . ,256.
______________________________________________________________________________
______________________________________________________________________________
************END*******