0% found this document useful (0 votes)
89 views6 pages

Mid1 Questionpaper SOLUTION

The document is the question paper for the Fundamentals of Image Processing subject exam containing 7 questions worth 20 marks total. It covers topics like bit plane slicing, thresholding, unsharp masking, image transformations, interpolation techniques, median filtering of salt and pepper noise, and definitions of adjacency and distance between pixels.

Uploaded by

dump mail
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)
89 views6 pages

Mid1 Questionpaper SOLUTION

The document is the question paper for the Fundamentals of Image Processing subject exam containing 7 questions worth 20 marks total. It covers topics like bit plane slicing, thresholding, unsharp masking, image transformations, interpolation techniques, median filtering of salt and pepper noise, and definitions of adjacency and distance between pixels.

Uploaded by

dump mail
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/ 6

Enrollment No.

___________
A. D. PATEL INSTITUTE OF TECHNOLOGY
NEW VALLABH VIDYANAGAR,
AFFILIATED WITH GUJARAT TECHNOLOGICAL UNIVERSITY
BE - SEMESTER– 8, FIRST MID-SEMSTER EXAMINATION, AY: 2019-20
Subject Code: 2181102 Date: 8/2/2020
Subject Name: FUNDAMENTALS OF IMAGE PROCESSING
Time: 10 am to 11 am Total Marks: 20
Instructions:
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.

SOLUTION
Q:1 Answer the following questions. [6]
[A]
1. What is bit plane slicing?
Pixels are digital numbers composed of bits. Instead of highlighting
intensity level ranges, we could highlight the contribution made to total image
appearance by specific bits. Bit plane 1 contain lower order bits and bit plane
8 contain higher order bits.

2. Define the term Thresholding.


It converts gray scale image into binary image. Produce two level (binary)
image. If r value is less than k, s becomes 0 and higher than k becomes 1.

3. What is un-sharp masking?


It is a process of subtracting an unsharp (smoothed) image from the original
image.
- Steps of unsharp masking:
1. blur the original image
2. subtract the blurred image from the original
(the resulting difference is called the mask)
3. add the mask to the original

4. What are the two conditions that a transformation must satisfy?


(a) T(r) is single-valued and monotonically increasing in the interval 0 ≤ r ≤
L-1; and
(b) 0 ≤ T(r) ≤ L-1 for 0 ≤ r ≤ L-1.
(a) Guarantees that it is
- single valued is needed to guarantee that the inverse transformation will exist.
- Monotonically increasing – output intensity values will never be less than
corresponding input values.
(b) Guarantees that it is
- Range of output intensities is the same as the input.
5. T(r) is single-valued and monotonically increasing in the interval
0 ≤ r ≤ L-1; and
(b) 0 ≤ T(r) ≤ L-1 for 0 ≤ r ≤ L-1.
6. What is the need for interpolation techniques?
Image resizing is necessary when you need to increase or decrease the
total number of pixels, whereas remapping can occur under a wider variety of
scenarios: correcting for lens distortion, changing perspective, and rotating an
image.

7. Median filter can remove salt and pepper noise. Explain.


It’s response is based on ordering (ranking) the pixels contained in the
image area encompassed by the filter and then replacing the value of the center
pixel with the value determined by median (5th rank in case of 3 x 3). Salt noise
pixel value is 255 and pepper noise pixel value is 0 which are the extreme
values (255 is maximum and 0 is minimum) so it is always remove in the
median filter ranking.

Q:1 A common measure of transmission for digital data is baud rate, defined as the [2]
[B] number of bits transmitted per second. Generally, transmission is accomplished in
packets consisting of a start bit, a byte (8 bits) of information and a stop bit. Using
these facts, answer the following.
i) How many minutes would it take to transmit a 1024 x 1024 image with 256
intensity levels if we use a 56 K baud modem?

256 intensity level means 8 bits/pixel


Along with these 8 bits, start bit and stop bit so total 8 + 2 = 10 bits
Total number of bits for transmission are: N = 1024 x 1024 x 10
= 10485760 bits
These bits are transmitted at 56 K baud.
𝑁
𝑇𝑖𝑚𝑒 𝑡𝑎𝑘𝑒𝑛 =
56 × 103
= 187.25 sec ≈ 3.1 𝑚𝑖𝑛𝑢𝑡𝑒𝑠
ii) What would be the time required if we use a 750 K baud transmission line?
𝑁
𝑇𝑖𝑚𝑒 𝑡𝑎𝑘𝑒𝑛 𝑡𝑜 𝑡𝑟𝑎𝑛𝑠𝑚𝑖𝑡 𝑡ℎ𝑒 𝑖𝑚𝑎𝑔𝑒 =
750 × 103
= 13.98 sec ≈ 14 𝑠𝑒𝑐
OR

Q:1 In the image shown in figure compute 𝐷4 , 𝐷8 and 𝐷𝑚 distances between pixels 𝑝 [2]
[B] and 𝑞 for 𝑉 = {1, 2, 5}. Assume each pixel placed at unique distance from its
neighbor.

1 2 6 5 2 𝑞
5 3 5 6 5
5 2 5 5 6
7 5 1 7 7
𝑝 2 5 2 3 1
D4: Does not exist

1 2 6 5 2
5 3 5 6 5
5 2 5 5 6
7 5 1 7 7
2 5 2 3 1
D8: 5
1 2 6 5 2
5 3 5 6 5
5 2 5 5 6
7 5 1 7 7
2 5 2 3 1
Dm: 7

1 2 6 5 2
5 3 5 6 5
5 2 5 5 6
7 5 1 7 7
2 5 2 3 1
Q:2 Answer the following questions: (Any THREE) [12]
[A] Define: Adjacency and Distance between the pixels 𝑝 and 𝑞 with the spatial locations
(𝑥, 𝑦) and (𝑠, 𝑡).
Adjacency of pixels
 The pixel p and q having the values are from the set V= {1}.
 4-adjacency:
 the pixels p and q whose values are from V are said to be 4-adjacent if
q is in N4(p).

 8-adjacency:
 the pixels p and q whose values are from V are said to be 8-adjacent if
q is in N8(p).

 m – adjacency:
 Two pixels p and q with values from V are m – adjacent if
 1) q is in N4(p) or
 2) q is in ND(p) and the set N4(p) ∩ N4(q) has no pixels whose
values are from V.
Distance Measurement
 The Euclidean distance between p and q us defined as
De(p,q) = [ (x-s)2 +(y-t)2 ]1/2
 The distance between the 4-neighbors whose values are from V is
D4 = | x-s | + | y-t |
It is also known as city block distance.
 The distance between the 8-neighbors whose values are from V is
D8 = max(| x-s | , | y-t | )
It is also known as chessboard distance.
[B] Apply histogram equalization and sketch the histograms of the original image and
equalized image.
Grey Level 0 1 2 3 4 5 6 7
No. of Pixels 0 0 5 20 20 19 0 0
Total Pixels = M x N = 64,
3 bits/pixel, L-1 = 7
Gray Number of CDF (Running Pr(rk) Sk = Rounded Ps(Sk)
level pixels sum) sk
(rk) (nk)

(k=0,1,2 ….L-1)
0 0 0 0 0 0 0
1 0 0 0 0 0 0
2 5 5 0.079 0.547 1 0.079
3 20 25 0.3125 2.735 3 0.3125
4 20 45 0.3125 4.93 5 0.3125
5 19 64 0.297 7 7 0.297
6 0 64 0 7 7
7 0 64 0 7 7
Histogram
0.35
0.3
0.25
0.2
0.15
0.1
0.05
0
0 1 2 3 4 5 6 7

Original Image Equalized Image


[C] Apply the high pass filter on the image shown below using a 3 x 3 mask by assuming
replicate padding.
20 20 20 20 20
20 30 30 30 20
20 30 60 30 20
20 30 30 30 20
20 20 20 20 20

Mask Mask
0 1 0 1 1 1
1 -4 1 1 -8 1
0 1 0 1 1 1
Output image: Output image:
0 10 10 10 0 10 20 30 20 10
10 -20 20 -20 10 20 -20 0 -20 20
10 20 -120 20 10 30 0 -240 0 30
10 -20 20 -20 10 20 -20 0 -20 20
0 10 10 10 0 10 20 30 20 10

[D] Perform intensity level slicing on the given image. Let 𝑟1 = 3 and 𝑟2 = 6. Draw the
modified image using with background and without background transformation.
3 4 5
6 6 1
1 2 2

With background Without background


s = L - 1 when r1 ≤ r ≤ r2 s = L - 1 when r1 ≤ r ≤ r2
= r otherwise = 0 otherwise
7 7 7 7 7 7
7 7 1 7 7 0
1 2 2 0 0 0
[E] Two images 𝑓(𝑥, 𝑦) and 𝑔(𝑥, 𝑦) have histograms ℎ𝑓 and ℎ𝑔 . Give the conditions
under which you can determine the histograms of
i) 𝑓(𝑥, 𝑦) + 𝑔(𝑥, 𝑦)
ii) 𝑓(𝑥, 𝑦) − 𝑔(𝑥, 𝑦)
iii) 𝑓(𝑥, 𝑦) × 𝑔(𝑥, 𝑦)
iv) 𝑓(𝑥, 𝑦) ÷ 𝑔(𝑥, 𝑦)
In terms of ℎ𝑓 and ℎ𝑔 . Explain how to obtain the histogram in each case. (Assume
that all the pixels in 𝑔(𝑥, 𝑦) have constant value 𝑐.)

(a)We obtain the histogram hsum(uk ) of the sum by letting uk = rk +c, and also hsum(uk)
= hf (rk) for all k . In other words, the values (height) of the components of hsum are
the same as the components of hf, but their locations on the intensity axis are shifted
right by an amount c.
(b) Similarly, the histogram hdiff(uk ) of the difference has the same components as hf
but their locations are moved left by an amount c as a result of the subtraction
operation.
(c) Following the same reasoning, the values (heights) of the components of histogram
hprod(uk) of the product are the same as hf, but their locations are at uk = c ×rk. Note
that while the spacing between components of the resulting histograms in (a) and (b)
was not affected, the spacing between components of hprod(uk ) will be spread out by
an amount c .
(d) Finally, assuming that c _= 0, the components of hdiv(uk ) are the same as those
of hf , but their locations will be at uk = rk /c . Thus, the spacing between components
of hdiv(uk) will be compressed by an amount equal to 1/c.
The preceding solutions are applicable if image f (x, y) is constant also. In this case
the four histograms just discussed would each have only one component. Their
location would be affected as described (a) through (d).

------------- GOOD LUCK -------------

You might also like