Assignment-3. Enhancement

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Bharatiya Vidya Bhavans’

Sardar Patel Institute Of Technology


Munshinagar, Andheri(W), Mumbai-400058
Subject : Foundation of Signal Processing Class : TE Comp

Assignment-3 Topic : Image Enhancement Date : 10-03-2024

( Contrast Stretching Transformation )


Q(1) Obtain the gray level transformation function that stretches gray scale
range [0, 50] into [0, 100], stretches the range [50, 80] into [100, 150] shifts
range [80,130] to [150,200] and compresses the range [130,250] into
[200,250].

`
Q(2) Obtain the equation for Contrast Stretching Transformation Function as
given in figure below. Apply the Contrast Stretching Transformation
Function on the input image F and obtain the output image.

é 7 12 2 3 4 ù 15
ê 10 15 8
ê 1 6 7 úú
F = ê 12 4 6 15 12 ú 4
ê ú
ê 8 2 7 15 2 ú
êë 11 13 3 3 5 úû 0 8 12 15

( Clipping and Thresholding Transformation )

Q(3) Convert the gray image to Binary Image. Select appropriate value of
threshold from the histogram.

F= 0 30 0 10 0
10 70 40 50 20
20 60 60 80 80
70 40 0 10 0
50 60 70 60 50

0
Q(4) Given an image F of size (4 X 4)

(a) If the gray level intensity changes are to be made as shown in figure
given below. Derive the necessary expression for obtaining new pixel
value using slope.
F= 20 50 30 50
30 60 50 30
64 30 50 60 40
20 50 40 50

0 20 60

(b) Obtain the new image by applying the above transformation


function.
(c) Plot Histogram for original image and new image.
(d) Compare the histogram of Input and Output Image.

( LOG Transformation )

F= 20 50 30 50
Q(5) Given an image of size (4 X 4)
30 60 50 30
Determine the output image A(x,y) using 30 50 60 40
20 50 40 50
logarithmic Transformation

A(x,y) = 120. Log10[1+ F(x,y)] .

( Power Law Transformation )

Q(6) Given image F, Determine the output image using Power Law
Transformation S = ( r )2

F= 20 50 30
30 0 50
30 50 64

1
( Intensity Level Slicing Transformation )

Q(7) A detail Enhancement Techniques is performed as per following criteria:

0 1 0 2 1 6
é7 3 £ r £ 5ù 2 3 5 5 1 6
s=ê ú F =
ë r otherwise û 2 4 4 3 2 1
1 3 5 3 0 1
2 1 2 6 6 2
where r and s are the intensities for the input and output image
respectively. Determine the output image when, detail enhancement
techniques is applied on the input image F.

( Thresholding, Intensity Level Slicing, Bit Plane Slicing and Negative Transformation )

Q(8) For the three bit 4x4 size image perform the following operations :-
(a) Threshold T = 4
(b) Intensity Level Slicing with background r1 = 2 and r2 = 5
(c) Bit Plane Slicing for MSB and LSB planes
(d) Nagation

é 4 2 3 0ù
ê 1 3 5 7 úú
F=ê
ê 5 3 2 1ú
ê ú
ë 2 4 6 7û
[[

( Histogram Equalization Transformation )

Q(9) Equalize the given Histogram. What happens when we equalize it twice?
Justify.
Gray Level rk 0 1 2 3
No of Pixel NrK 70 20 7 3

Q(10) Perform Histogram Equalization and draw new equalized Histogram of the
following image data :

F= 0 1 1 2 2 3 4 4
0 1 1 2 2 3 4 4
0 1 1 2 2 3 4 4
0 1 1 2 2 3 4 4

2
( Histogram Specification Transformation )
Q(11) The gray level distribution of an 8-level image of 64 x 64 size is specified
by two histogram A and B as given below.
Modify the histogram A as given in histogram B. Plot the histogram of the
Input and Output Image.
• Input Image Histogram (A) :
Gray Level rk 0 1 2 3 4 5 6 7
No of Pixel NrK 2 3 5 6 9 12 14 13

• Specified Image Histogram (B) :


Gray Level Zk 0 1 2 3 4 5 6 7
No of Pixel NZK 13 12 14 14 11 0 0 0

( Spatial Filtering )

é3 2 1ù
Q(12) Given f ( x, y ) = ê5 2 6ú Find the response of the median filter at the
ê ú
êë7 9 1úû
center location using the following mask.

(a) Mask-1 (b) Mask-2

Z1 Z2 Z3 Z1 Z2 Z3

Z4 * Z6 Z4 Z5 Z6

Z7 Z8 Z9 Z7 Z8 Z9

Q(13) Define the following Spatial filters:


0 1 0 6 7
(a) Median (b) Min (c) Max
Consider the digital Image. 2 0 1 6 5
Calculate the value at point (2,2) = 3 1 1 3 5 6
1 0 6 6 5
2 5 6 7 6

Q(14) Apply the Prewit Mask on the input image F given below and
obtain the output image. Assume virtual Rows and Columns
with repeated border pixel values.
é3 2 5ù
Input Image F = êê4 6 7 úú
êë7 1 3úû

3
Q(15) Given below is 4x4 image. Find the output image pixel value at (2,2)
location by applying Low Pass Filter and High Pass Filter masks.

é 2 3 4 2 ù
ê 5 5 2 4 úú
F =ê
ê 3 6 3 5 ú
ê ú
ë 5 3 5 5 û
Using these outputs verify that Original Image = LPF Image + HPF Image.
In case of discrepancy explain the reasons.

é 4 8 2ù
Q(16) Given F = ê7 5 6ú
ê ú
êë6 3 7 úû

Apply the following filter mask W1, W2 and W3 on the input image F and
obtain the output image. Assume virtual Rows and columns with zero
values.

é0 0 0ù é0 - 1 0 ù é 0 -1 0 ù
W1 = êê- 1 2 - 1úú W2 = êê0 2 0úú W3 = êê- 1 4 - 1úú
êë 0 0 0 úû êë0 - 1 0úû êë 0 - 1 0 úû

Q(17) Apply the following filter mask W1 W2 and W3 on the input image F
given below and obtain the output image pixel value at the center position.

é 4 8 2ù é- 1 0 - 1ù é 0 -1 0 ù é- 1 - 1 - 1ù
F = êê7 5 6úú W1 = êê 0 4 0 úú W2 = êê- 1 4 - 1úú W3 = êê- 1 8 - 1úú
êë6 3 7 úû êë- 1 0 - 1úû êë 0 - 1 0 úû êë- 1 - 1 - 1úû

Q(18) A gray scale image is given below. Find Laplacian Filtered image and
Laplacian High Boost Filtered Image. Assume virtual Rows and columns
with zero values.

é4 8 2ù
Input Image F=ê
ê7 5 6ú
ú
ê
ë6 3 7ú
û

4
Q(19) State whether True or False.
(a) Image can be obtained if histogram is given.
(b) Image Enhancement process does not change the information content of
image.
(c) If all the pixels in an image are shuffled, there will not be any change in
the histogram.
(d) Histogram equalization and Linear contrast stretching always give the
same result.
(e) Second pass of histogram equalization will produce the same result as
the first pass.
(f) For continuous image histogram can be perfectly equalized, but it may
not be so for digital image.
(g) Discrete Histogram Equalization technique will not, in general, yield a
flat histogram.
(h) Histogram is a unique representation of an image.
(i) Low Pass Filter is a smoothing filter.
(j) For digital image having salt paper noise, median filter is the best filter.
(k) Median filter is the best solution to remove salt and pepper noise.
(l) The principal function of median filter is to force points with distinct
intensity to be more like their neighbors.

You might also like