Uploaded by fajar tanveer

HW2

advertisement
ECE468 / CS519: HOMEWORK 2
due 10/21/2013
1) (20pts) Problems from the textbook:
• 3.27 (10pts)
• 3.28 (10pts)
is
ar stu
ed d
vi y re
aC s
o
ou urc
rs e
eH w
er as
o.
co
m
2) (30pts) Consider the following 4 × 4 image f (x, y) with 3 bits per pixel, i.e., pixel values take
values in {0, 1, 2, . . . , 7}:


1 3 1 2
 2 6 1 3 

(1)
f (x, y) = 
 1 2 3 2 
3 1 4 1
2.1) (10pts) Define transformation g(x, y) = T (f (x, y)) that will equalize the pixel histogram of
f (x, y).
2.2) (10pts) Compute all pixels of 4 × 4 matrix g(x, y). Rescale the range of pixel values of g(x, y)
so that they can be represented by 3 bits.
2.3) (10pts) Find the frequency of occurrence of each pixel value of g(x, y), and use this result to
draw the histogram of pixel intensities of g(x, y) (this may be done by hand). On the plot,
indicate the labels of each axis, and mark the height of each histogram bin.
Th
3) (40pts) Write a MATLAB code for image sharpening using the Laplacian filter. The input to your
program is: (i) image, and (ii) type of the Laplacian filter. As input, use the image for Problem 3
that is available on the class website. Your report should include:
3.1) (5pts) M-file with a well commented code;
sh
3.2) (10pts) Figure 1 and the caption: Image sharpening using the 3 × 3 Laplacian filter with +8
at the center.
3.3) (10pts) Figure 2 and the caption: Image processing in two steps. The input image is first
smoothed with the 3 × 3, σ 2 = .5 Gaussian filter. The resulting image is then sharpened using
the 3 × 3 Laplacian filter with −4 at the center.
This study source was downloaded by 100000817376322 from CourseHero.com on 04-02-2021 18:57:52 GMT -05:00
https://www.coursehero.com/file/8892811/HW2/
3.4) (10pts) Figure 3 and the caption: Image processing in two steps. The input image is first
smoothed with the 3 × 3, σ 2 = 1 Gaussian filter. The resulting image is then sharpened using
the 3 × 3 Laplacian filter with −8 at the center.
3.5) (5pts) Which of the three sharpening procedures is visually more appealing to you?
(Hint: Use the following MATLAB commands: ‘imfilter’, ‘fspecial’)
4) (20pts) Write a MATLAB code for computing the correlation between two images. The input to
your program is: (i) image 1, and (ii) image 2. As input, use the images for Problem 4 that are
available on the class website. Your report should include:
is
ar stu
ed d
vi y re
aC s
o
ou urc
rs e
eH w
er as
o.
co
m
4.1) (5pts) M-file with a well commented code;
4.2) (10pts) Figure 4 showing the correlation and the caption.
4.3) (5pts) What are (x, y) coordinates of the maximum correlation(s)?
sh
Th
IMPORTANT:
In your report, all figures must have captions. Each missing caption will be penalized with 5 points.
2/2
This study source was downloaded by 100000817376322 from CourseHero.com on 04-02-2021 18:57:52 GMT -05:00
https://www.coursehero.com/file/8892811/HW2/
Powered by TCPDF (www.tcpdf.org)
Download