Solutions for Homework 2 - Digital Image Processing | ECE 468, Assignments of Electrical and Electronics Engineering

Material Type: Assignment; Class: DIGITAL IMAGE PROCESSING; Subject: Electrical & Computer Engineer; University: Oregon State University; Term: Unknown 1989;

Typology: Assignments

Pre 2010

Uploaded on 08/30/2009

koofers-user-lhg
koofers-user-lhg 🇺🇸

3

(2)

9 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
ECE468: HOMEWORK 2
due 01/22
1) (20pts) Problems from the textbook: 3.11, 3.27
2) (20pts) Write a MATLAB code for computing an affine transform of an image. The input to your
program is: (i) image, (ii) parameters of the affine transform, and (iii) interpolation method. Your
report should include:
a) M-file with a well commented code;
b) Figure 1 and the caption: Use the image for Problem 2 that is available on the class website
as input, and transform it using the bilinear interpolation and the following spatial transform
x
y
1
=T
x
y
1
,(1)
where
T=
0.3 0.1 0
0.5.9 0
0 0 1
.(2)
c) Figure 2 and the caption: Use the image generated in Figure 1 as input to your code, and
applying the inverse transform T1to Figure 1 and the bilinear interpolation
x′′
y′′
1
=T1
x
y
1
,(3)
d) Figure 3 and the caption: Subtract Figure 2 from the original image used in (b) (pad zeros at
the boundary of Figure 2 in case the images have different sizes); In the caption, explain why
Figure 2 is different from the original image.
(Hint: Use the following MATLAB commands: ’maketform’, ’imtransform’)
pf2

Partial preview of the text

Download Solutions for Homework 2 - Digital Image Processing | ECE 468 and more Assignments Electrical and Electronics Engineering in PDF only on Docsity!

ECE468: HOMEWORK 2

due 01/

  1. (20pts) Problems from the textbook: 3.11, 3.

  2. (20pts) Write a MATLAB code for computing an affine transform of an image. The input to your program is: (i) image, (ii) parameters of the affine transform, and (iii) interpolation method. Your report should include:

a) M-file with a well commented code;

b) Figure 1 and the caption: Use the image for Problem 2 that is available on the class website as input, and transform it using the bilinear interpolation and the following spatial transform 

x′ y′ 1

 = T

x y 1

where

T =

c) Figure 2 and the caption: Use the image generated in Figure 1 as input to your code, and applying the inverse transform T −^1 to Figure 1 and the bilinear interpolation 

x′′ y′′ 1

 = T −^1

x′ y′ 1

d) Figure 3 and the caption: Subtract Figure 2 from the original image used in (b) (pad zeros at the boundary of Figure 2 in case the images have different sizes); In the caption, explain why Figure 2 is different from the original image.

(Hint: Use the following MATLAB commands: ’maketform’, ’imtransform’)

  1. (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. Use the image for Problem 3 that is available on the class website as input. Your report should include:

a) M-file with a well commented code;

b) Figure 4 and the caption: Directly apply the 3 × 3 Laplacian filter with 8 at the center.

c) Figure 5 and the caption: First, smooth the original image by using the 3 × 3 Gaussian filter with σ^2 =. 5 , and then apply the 3 × 3 Laplacian filter with 4 at the center.

d) Figure 6 and the caption: First, smooth the original image by using the 3 × 3 Gaussian filter with σ^2 = 1, and then apply the 3 × 3 Laplacian filter with − 8 at the center.

e) Which sharpening procedure of the above is more visually appealing?

(Hint: Use the following MATLAB commands: ’imfilter’, ’fspecial’)

  1. (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. Use the images for Problem 4 that are available on the class website as input. Your report should include:

a) M-file with a well commented code;

b) Figure 7 showing the correlation and the caption.

c) What are (x, y) coordinates of the maximum correlation?

2 / 2