1
EE 211A
Digital Image Processing I
Fall Quarter, 2011
Handout 9
Instructor: John Villasenor
Computer Assignment 2
IIR filtering, transforms of 2D functions and images
Due: Thursday, 20 October 2011
What to turn in:
1.
Code for implementing the IIR filter of section I. Please only turn in the lines of
code where the actual filtering is performed. Please comment this section of code
well, indicating how you are handling the possibility of negative index values.
2.
Comments (several sentences) on the effect of the IIR filter on the image
panic.gray
(Section I, Part 2).
3.
Statement of stability for the IIR filter for the three cases of a, b in Section I, Part
3.
4.
Comments (several sentences) on the Fourier and discrete cosine transforms
obtained in Section II, Parts 6 and 7.
5.
Compare, in a sentence or two, the results of reconstructing a signal from Fourier
magnitude only or Fourier phase only.
6.
A statement of the number of non-zero pixels in the autocorrelation described in
Section II, Part 9.
I
IIR Filtering
Consider the 2D IIR filter
)
,
(
)
1
,
1
(
)
,
1
(
)
,
(
n
m
x
n
m
by
n
m
ay
n
m
y
+
−
−
+
−
=
In class we determined that the impulse response
)
,
(
n
m
h
of this filter has first quadrant
wedge support. Using
intro.c
as a template, write a program which calculates
)
,
(
n
m
y
for
0,
m
≤
1
−
≤
N
n
.
Be sure to enforce zero boundary conditions by initializing
,
0
)
,
(
=
n
m
y
and by including
provisions in your program for cases where the array index values
1
−
m
or
1
−
n
are less
than 0. In addition, be sure that you choose a valid path for the recursive computation
of
)
,
(
n
m
y
. When your program is ready, run it for the following cases: