(ELEC317)midterm2b.pdf

Back to ELEC317 Login to download

======================================================

ELEC 317 Midterm Test (Spring 1998) Apr. 17. 1998.

1. An image x is passed into a system with transfer function T and the output image is y. Let T(i,j; x) represent the output at location (i,j) when the input is x. That is , y(i,j)=T(i,j; x).

a.

(5%) What is the property of T if it is linear?

b.

(5%) What is the property of T if it is shift invariant?

Assume that T is the FIR filter [3 3 3;3 3 3;3 3 3] such that

11

yi j) =3 xi + k, jl)

(, ( + k = C1 l = C1

c.

(10%) Show that this filter is linear.

d.

(10%) Show that this filter is shift invariant.

e.

(10%) Is this a high-pass filter or a low-pass filter? Why?

2. Comparison between averaging filter and median filter

a. (10%) Apply the 3x3 averaging filter f to the 3x3 image a. What is the output?

f= [1 1 1; 1 1 1; 1 1 1]/9;

a=[21 110 24; 22 23 24; 23 21 23];

Assume a(0,i)=a(1,i), a(4,i)=a(3,i), a(i,0)=a(i,1), a(i,4)=a(i,3) for all i.

b.

(10%) Apply a 3x3 median filter to the same image in part (a). What is the output?

c.

(10%) Both the averaging filter and the median filter can enhance a noisy image. What is the advantage and disadvantage of the averaging filter?

d.

(10%) What is the advantage and disadvantage of median filter?

3. Matlab programming

a. (10%) Write a Matlab routine to apply the 2-dimensional FIR filter, filt, to the image x, and then subsample the filtered image by a factor of 2:1 and return the final image.

function y=myfilter(x, filt) Do not worry about edge effects. Here x and filt are matrices of unknown size.

b. (10%) Write a Matlab routine to return the bitwise AND of the 0th and 4rd bit planes of an

image.

function y=bit0and4(x)