EE545 Image Processing Course Take-Home Midterm Exam
EE545 Image Processing Course Take-Home Midterm Exam
EE545 Image Processing Course Take-Home Midterm Exam
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
<strong>EE545</strong> <strong>Image</strong> <strong>Processing</strong> <strong>Course</strong><br />
<strong>Take</strong>-<strong>Home</strong> <strong>Midterm</strong> <strong>Exam</strong><br />
Starts: April 16 th , 2011, 14:00 PM, Ends: April 21 st , 2011, 09:45 AM<br />
Question #1 (15 points): In the first row below you see an image (Fig. 1.a) with its<br />
corresponding histogram (Fig. 1.b). Five different look-up tables (Fig. 1.1 through Fig. 1.5)<br />
have been used to transform the image and the resulting histograms after transformation are<br />
shown in Fig. 1.I through Fig. 1.V). For each LUT (1.1-1.5) find its corresponding histogram<br />
(1.I-1.V). Justify your answer. (Fig.1.1 Fig.1.?, Fig.1.2 Fig.1.?, Fig.1.3 Fig.1.?,<br />
Fig.1.4 Fig.1.?, Fig.1.5 Fig.1.?)<br />
Figure 1.a Figure 1.b<br />
Figure 1.1 Figure 1.2
Figure 1.3 Figure 1.4<br />
Figure 1.5<br />
Figure 1.I<br />
Figure 1.II<br />
Figure 1.III<br />
Figure 1.IV
Figure 1.V<br />
Question #2 (15 points): Describe the effect of each of the following filters. In addition,<br />
indicate which filter will cause the most blurring and which, when convolved with a solid<br />
(positive) intensity image, will produce the brightest image and which will produce the<br />
darkest image. Justify your answers.<br />
0.1 0.1 0.1 0 0 1 0 0.2 0 0 -1 0<br />
0.1 0.1 0.1 0 -2 0 0.2 0.4 0.2 0 3 0<br />
0.1 0.1 0.1 1 0 0 0 0.2 0 0 -1 0<br />
(a) (b) (c) (d)<br />
Question #3 (15 points):<br />
a) Read image Fig2.jpg first<br />
(http://web.iyte.edu.tr/~zubeyirunlu/teaching/ee545/Assignments/<strong>Take</strong>_<strong>Home</strong>_<br />
<strong>Midterm</strong>_<strong>Exam</strong>/Fig2.jpg) using<br />
x = imread ('Fig2.jpg');<br />
and plot it. You will see that there are 9 vertical bars in the lower left of the<br />
image. They are 6 pixels wide, 100 pixels high and the separation between<br />
them is 19 pixels long.<br />
b) Now, create 3 different square averaging masks of sizes 23x23, 25x25, and<br />
45x45 and save them to h1, h2, and h3 respectively<br />
h1=;<br />
h2=;<br />
h3=;<br />
c) Then, blur image x using square averaging masks obtained in (b) and save<br />
each result to y1, y2, and y3 respectively<br />
y1=;<br />
y2=;<br />
y3=;<br />
d) Plot each blurred image y1, y2, and y3
e) When we look at the resulting images you’ll see that the vertical bars in the<br />
lower left of the image, in y1 and y3 are blurred, but a clear separation exists<br />
between them. However, the bars have merged in image y2, in spite of the fact<br />
that the kernel that produced the image is significantly smaller than the kernel<br />
that produced image y3. Explain this.<br />
Question #4 (10 points): The Figure 3.a and 3.b below shows an image (original) and its<br />
corresponding frequency spectrum respectively. The following six figures (Figs. 3.1 through<br />
3.6) displays different frequency spectrums of the original image after that some areas have<br />
been nulled (black areas). An inverse Fourier transform of the frequency spectrums end up in<br />
six different images (Figs. 3.I through 3.VI). For each spectrum (3.1-3.6) find its<br />
corresponding inverse Fourier transform image (3.I-3.VI) and justify your answer. (Fig.3.1<br />
Fig.3.?, Fig.3.2 Fig.3.?, Fig.3.3 Fig.3.?, Fig.3.4 Fig.3.?, Fig.3.5 Fig.3.?, Fig.3.6<br />
Fig.3.?)<br />
Figure 3.a Figure 3.b<br />
Figure 3.1 Figure 3.2
Figure 3.3 Figure 3.4<br />
Figure 3.5 Figure 3.6<br />
Figure 3.I<br />
Figure 3.II
Figure 3.III<br />
Figure 3.IV<br />
Figure 3.V<br />
Figure 3.VI<br />
Question #5 (10 points): Please answer following questions shortly but adequately.<br />
a) In what cases is spectral (frequency domain) filtering more appropriate than<br />
spatial one?<br />
b) What is an “ideal low-pass filter”? Is this filter suitable to use in terms of<br />
image processing? If yes, give an example of its application. If no, explain<br />
why.<br />
c) What are the common image point distance measures? Give at least two<br />
examples and explain briefly.<br />
Question #6 (15 points):<br />
a) A discrete approximation of the second derivative<br />
convolving an image I(x, y) with the kernel<br />
1 -2 1<br />
2<br />
∂ I<br />
2<br />
∂x<br />
can be obtained by<br />
Use the given kernel to derive a 3 × 3 kernel that can be used to compute a discrete
approximation to the 2D Laplacian and write it below table.<br />
Apply the Laplacian kernel to the following 3 x 3 image by convolution and fill<br />
out the empty table below.<br />
3 2 1<br />
6 5 4<br />
9 8 7<br />
b) Why is it important to convolve an image with a Gaussian before convolving<br />
with a Laplacian? Motivate your answer by relating to how a Laplacian filter is<br />
defined.<br />
c) Let us assume doing the following two operations:<br />
1) We first convolve an image with a Gaussian and then take the Laplacian,<br />
∇ 2 (G ∗ I)), and<br />
2) We first apply the Laplacian to the Gaussian and then convolve the image,<br />
(∇ 2 G) ∗ I. Will the results be the same? If yes - why? If no - why?<br />
Question #7 (20 points): This question is about manual implementation of histogram<br />
equalization and histogram matching (specification). Please answer the following questions.
•<br />
•<br />
•<br />
•<br />
•<br />
•<br />
•<br />
•<br />
hist.<br />
0 0 0 0 0 0 0 0<br />
1 1 1 1 1 1 1 1<br />
2 2 2 2 2 2 2 2<br />
3 3 3 3 3 3 3 3<br />
4 4 4 4 4 4 4 4<br />
5 5 5 5 5 5 5 5<br />
6 6 6 6 6 6 6 6<br />
7 7 7 7 7 7 7 7<br />
Figure 1: 8x8(px 2 ) 3-bit assingment image.<br />
15<br />
14<br />
13<br />
12<br />
11<br />
10<br />
9<br />
8<br />
7<br />
6<br />
5<br />
4<br />
3<br />
2<br />
1<br />
0<br />
0 1 2 3 4 5 6 7<br />
3-bit gray levels<br />
i 0 1 2 3<br />
hist. 0.125 0.250 0.125 0.0312<br />
i 4 5 6 7<br />
hist. 0.0938 0.250 0.0938 0.0312<br />
(a) Desired histogram plot (not normalized).<br />
(b) Desired histogram table.<br />
Figure 2: Desired histograms<br />
Questions<br />
1. Determine the possible intensity levels appearing in image of figure (1),<br />
that is, find the gray level space of the image.<br />
2. Find the histogram of the image shown in figure (1), and descibe histogram<br />
as in both table form and in the stem plot form as shown in<br />
(2(a)) and (2(b)).<br />
3. Find the cumulative distribution function of the image of figure (1) and<br />
use the same representations done at step (2).<br />
4. Apply histogram equalization to image of figure (1) by using the normalized<br />
CDF obtained at step (3) and draw the stem plot of new<br />
histogram, is histogram changed?.
(a) Empty 8x8 image format (b) Empty 8x8 image format<br />
for the output of histogram for the output of histogram<br />
equalization done at step (4). matching done at step (7).<br />
Figure 3: Empty image boxes. Use them for outputs of the specified tasks.<br />
5. Re-scale the dynamic range of transformed image back in the range of<br />
3-bit gray level space, namely, [0,1,2,· · · ,7] (use truncation instead of<br />
rounding).<br />
6. Show that histogram of figure (2(a)) and histogram of table (2(b)) are<br />
equivalent.<br />
7. Apply histogram specification (histogram matching) to the image of<br />
figure (1) by using the histogram of figure (2(a)) and draw the stem<br />
plot of new histogram. Make a comment about new histogram and<br />
desired one.