=========================preview======================
(ELEC317)2003_midterm.pdf
Back to ELEC317 Login to download
======================================================
ELEC 317 Midterm Test (Fall 2003) 8 Nov 2003.
Answer all questions. Some questions may be more difficult than the others.
1. (20%) Filtering
Given a length-9 signal X=[20 21 500 23 24 4 3 2 1]. Assume the outside values to be
zero.
a.
(4%) What is the output if you apply a length-3 averaging filter h=[1 1 1]/3?
b.
(4%) Show that h=[1 1 1]/3 is a linear filter.
c.
(4%) What is the output if you apply a length-3 median filter?
d.
(4%) Show that the length-3 median filter is not a linear filter.
e.
(1%) The number 500 in the signal X is actually an impulsive noise. Which filter is more effective in removing the impulsive noise?
f.
(1%) There is an edge at the transition from 24 to 4 in X. Comparing the averaging filter and the median filter, which one preserves the edge?
g.
(2%) If there are two consecutive noise elements, (e.g. 21 500 becomes 510 500), how can you modify the filter in (c) to remove the impulsive noise?
2. (20%) Image transform Let y =Ax where x and y are Nx1 random vectors and A is an NxN matrix. Let R and
x
R be the covariance matrices of x and y respectively.
y
a.
(1%) What is the definition of a unitary transform?
b.
(3%) Suppose matrix A is a unitary transform. Show that energy is conserved under unitary transform.
c.
(1%) What is the definition of covariance matrix R ?
d.
(1%) What is the relationship between the mean vector of x and y?
e.
(3%) Derive the relationship between the covariance matrix, Rx and Ry , of x and y.
f.
(6%) Suppose the elements of x are highly correlated, which is undesirable. Your boss asks you to design the transformation A such that the elements of y are not correlated. How would you design A? Show that the elements of y are indeed uncorrelated.
g.
(5%) Suppose R = [5 3; 3 5] in Matlab notation Find the transformation A you
x
x
designed in part f for this particular R . Find the covariance matrix of y.
x
3. (20%) Halftoning
a. (12%) Given a 2x3 gray-scale image X=[100 104 123; 98 101 99] in Matlab notation. Apply error diffusion using the following kernel.
()= 1 [( .1, j .1) +( .1, j) +e(i .1, j +1) +(, .1)] (3a)
ai, jei ei eij
4 f (i, j) =x(i, j) +a(i, j) (3b)
.255, f (i, j) >127
y(i, j) =. (3c)
.0, f (i, j) 127
e(i, j) =f (i, j) .y(i, j) (3d)
where x(i, j), y(i, j), a(i, j), f (i, j) and e(i, j) are the ijth element of the matrices X, Y, A, F and E respectively. Remember to show the 2x3 matrices A, F, Y and E.
b.
(3%) Suppose the error diffusion output is allowed to have four levels, namely, 0, 85, 170, and 255. How would you modify the equations 3a, 3b, 3c and 3d to achieve this error diffusion using the kernel in part a?
c.
(5%) Your boss asks you to perform inverse halftoning on Y to get X. as an estimate of the
original gray-scale image X. Describe one method to do it. Apply your metho