DIP - Assignment 4 Solution
DIP - Assignment 4 Solution
QUESTION 1:
An image of size 9 × 9 is given below. What will be the intensity at location (5.4, 5.6) using a
modified linear interpolation?
Y 0 1 2 3 4 5 6 7 8
X
0 20 22 15 18 25 32 16 18 20
1 22 25 28 25 35 32 20 17 15
2 45 35 16 23 44 11 18 24 18
3 35 32 26 46 24 13 25 24 25
4 32 45 23 34 45 43 42 24 16
5 34 45 42 36 27 34 25 27 19
6 43 46 47 34 13 13 24 17 20
7 43 54 34 22 21 35 27 43 29
8 32 43 26 25 27 36 23 56 34
a) 25.0
b) 25.82
c) 27.60
d) None of the above
Correct Answer: a
Detailed Solution:
Since we are doing interpolation in 2 dimensions, we can convert this to one dimension by first
interpolation along the columns and then along a row.
As we are using linear interpolation, so the region of support would be two pixels (left-right or
top-bottom).
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur
Here we first interpolate along columns to find the values of A and B. Recall from linear
interpolation equation,
𝑡, 0≤𝑡<1
𝐵0,2 (𝑡) = { 2 − 𝑡, 1≤𝑡<2
0, otherwise
Therefore due to shift invariance property,
𝑡 − (𝑖 − 1), 0 ≤ 𝑡 − (𝑖 − 1) < 1
𝐵𝑖−1,2 (𝑡) = 𝐵0,2 (𝑡 − (𝑖 − 1)) = {2 − (𝑡 − (𝑖 − 1)), 1 ≤ 𝑡 − (𝑖 − 1) < 2,
0, otherwise
On simplifying,
𝑡 − 𝑖 + 1, 𝑖-1 ≤ 𝑡 < 𝑖
𝐵𝑖−1,2 (𝑡) = {𝑖 + 1 − 𝑡, 𝑖 ≤ 𝑡 < 𝑖 + 1,
0, otherwise
Now for A contribution will come only from control points f(5,5) and f(6,5),
𝑡 − 5 + 1, 5-1 ≤ 𝑡 < 5
𝐹𝑜𝑟 𝑖 = 5; 𝐵𝑖−1,2 (𝑡) = {5 + 1 − 𝑡, 5 ≤ 𝑡 < 5 + 1,
0, otherwise
𝑡 − 4, 4 ≤ 𝑡 < 5
𝐵𝑖−1,2 (𝑡) = {6 − 𝑡, 5 ≤ 𝑡 < 6,
0, otherwise
Similarly,
𝑡 − 5, 5 ≤ 𝑡 < 6
𝑓𝑜𝑟 𝑖 = 6; 𝐵𝑖−1,2 (𝑡) = {7 − 𝑡, 6 ≤ 𝑡 < 7,
0, otherwise
Notice that calculation for point B is exactly same as point A with only change being in
control points f(5,6)=25 and f(6,6)=24.
____________________________________________________________________________
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur
QUESTION 2:
A one-dimensional function f(t) is given below. What will be the value at location t = 6.3 using
modified cubic interpolation?
t 1 2 3 4 5 6 7 8 9 10
f(t) 1.5 2.5 3 2.5 3 2.4 3 2.5 1 2.4
a) 2.65
b) 2.34
c) 2.95
d) 2.58
Correct Answer: a
Detailed Solution:
t3
; 0 t 1
6
3 2
3t 12 t 12 t 4 ; 1 t 2
6
B0, 4 (t ) 3 2
3t 2t 60 t 44
; 2t 3
6
4 t 3
; 3t 4
6
0; otherwise
Since we have to interpolate f(6.3), we can shift this function by 4.3 so that peak of cubic
function lie on 6.3. By doing this we get the contribution of known pixels for location t = 6.3.
The modified function can be written as,
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur
t 4.33
; 4.3 t 5.3
6
3t 4.3 12 t 4.3 12 t 4.3 4 ;
3 2
5.3 t 6.3
6
B4.3, 4 (t )
3 t 4.3 2t 4.32 60 t 4.3 44
3
; 6.3 t 7.3
6
4 t 4.33
; 7.3 t 8.3
6
0; otherwise
Substituting the values at t=5,6,7 and 8 (values are known at these locations) in proper intervals,
we get the coefficient (contribution) that has to be multiplied with intensity values at location,
t= 5,6,7,8.
5 4.33
; 4.3 t 5.3
6
36 4.3 12 6 4.3 12 6 4.3 4 ; 5.3 t 6.3
3 2
6
B4.3, 4 (t )
3 7 4.3 27 4.32 60 7 4.3 44
3
; 6.3 t 7.3
6
4 8 4.33
; 7.3 t 8.3
6
0; otherwise
QUESTION 3:
In what type of Interpolation, the region of support is 1 pixel?
a) Bicubic interpolation
b) Constant interpolation
c) Cubic interpolation
d) Bilinear interpolation
Correct Answer: b
Detailed Solution:
______________________________________________________________________________
QUESTION 4:
Why is Interpolation having order higher than Cubic interpolation not used?
a) Boundary pixels don’t get accurately interpolated since their support from
one side is missing
b) Calculating higher order B-Splines is computationally expensive
c) Using higher order B-Splines negates the principle that interpolation should
use only local pixels
d) All of the above
Correct Answer: d
Detailed Solution:
______________________________________________________________________________
QUESTION 5:
A one-dimensional function f(x) is given below. What will be the value at location x = 5.5 using
modified constant interpolation.
X 1 2 3 4 5 6 7 8 9 10
f(x) 1.5 2.5 3 2.5 3 2.4 3 2.5 1 2.4
a) 2.43
b) 2.34
c) 2.40
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur
d) 3.00
Correct Answer: c
Detailed Solution:
For constant interpolation, we substitute the unknown pixel value by nearest known pixel value.
For x=5.5, we consider B-Spline at x=6 since it includes 5.5 whereas B-Spline at x=5 excludes
x=5.5.
Therefore f(5.5) = 2.40.
______________________________________________________________________________
QUESTION 6:
The correct reason for Quadratic Interpolation not having any symmetry is?
a) Quadratic interpolation has region of support of 3 points
b) Quadratic B-Splines are asymmetric from the center of support
c) Quadratic B-Splines are asymmetric with respect to its control points
d) Both a and c
Correct Answer: d
Detailed Solution:
______________________________________________________________________________
QUESTION 7:
This question has Statement 1 and Statement 2. Of the four choices given after the statements,
choose the one that best describes the two statements.
Statement 1: an interpolation function must have Finite Region of Support.
Statement 2: an interpolation function should have Smooth Interpolation.
Correct Answer: c
Detailed Solution:
QUESTION 8:
Which of the following dramatically reduces computation complexity of interpolation with B-
spline functions?
a) Higher order B-Spline functions can be computed from lower order B-Spline
functions through recursion
b) Interpolation function are shift Invariant
c) Interpolation function have local region of support
d) All of above.
Correct Answer: d
Detailed Solution:
Interpolation function via B-Spline must be shift invariant, have local region of support and can
be computed with lower order B-Spline. Each of these properties reduces number of computation
required to do interpolation.
______________________________________________________________________________
QUESTION 9:
What kind of sampling is required for scaling down (Shrinking) of an image?
a) Under sampling
b) Critical sampling
c) Over sampling
d) Nyquist sampling
Correct Answer: a
Detailed Solution:
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur
Scaling down of an image is basically sampling less pixels, for example sampling every other
pixel will scale down image by 2. Therefore shrinking can be viewed as under sampling.
______________________________________________________________________________
QUESTION 10:
The correct reason for modifying B-Spline function ( 𝐵𝑖,1 (𝑡) 𝑡𝑜 𝐵𝑖−0.5,1 (𝑡) 𝑓𝑜𝑟 𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡 𝐵 −
𝑆𝑝𝑙𝑖𝑛𝑒, 𝐵𝑖,2 (𝑡) 𝑡𝑜 𝐵𝑖−1,2 (𝑡) 𝑓𝑜𝑟 𝑙𝑖𝑛𝑒𝑎𝑟 𝐵 − 𝑆𝑝𝑙𝑖𝑛𝑒, 𝐵𝑖,4 (𝑡) 𝑡𝑜 𝐵𝑖−2,4 (𝑡) 𝑓𝑜𝑟 𝐶𝑢𝑏𝑖𝑐 𝐵 −
𝑆𝑝𝑙𝑖𝑛𝑒) for interpolation is :
a) To make them shift invariant
b) To remove the bias of considering left pixel contribution in interpolation
c) To estimate higher order B-Spline function from lower order B-Splines
d) All of the above
Correct Answer: b
Detailed Solution:
B-Spline functions are without any modification shift-invariant and recursively computable.
______________________________________________________________________________
______________________________________________________________________________
************END*******