1.
2D
filter design.
A
symmetric convolution kernel
with support
{−
(
N
−
1)
, . . . , N
−
1
}
2
is characterized by
N
2
coeﬃcients
h
kl
,
k, l
= 1
, . . . , N.
These coeﬃcients
will be our
variables.
The
corresponding 2D frequency response
(Fourier transform)
H
:
R
2
→
R
is given by
H
(
ω
1
, ω
2
) =
�
h
kl
cos((
k
−
1)
ω
1
) cos((
l
−
1)
ω
2
)
,
k,l
=1
,...,N
where
ω
1
and
ω
2
are the frequency variables.
Evidently we
only need to specify
H
over
the region [0
, π
]
2
, although it is often plotted over the region [
−
π, π
]
2
. (It won’t
matter
in this
problem, but
we should
mention that
the
coeﬃcients
h
kl
above
are
not
exactly
the same as
the impulse response
coeﬃcients of the
filter.)
We will design a 2D
filter (
i.e.
,
find the
coeﬃcients
h
kl
) to satisfy
H
(0
,
0)
= 1 and to
minimize the maximum response
R
in the
rejection region Ω
rej
⊂
[0
, π
]
2
,
R
=
sup

H
(
ω
1
, ω
2
)

.
(
ω
1
,ω
2
)
∈
Ω
rej
(a)
Explain why
this
2D
filter
design problem
is convex.
(b)
Find the optimal filter
for
the
specific
case
with
N
= 5 and
Ω
rej
=
{
(
ω
1
, ω
2
)
∈
[0
, π
]
2

ω
1
2
+
ω
2
2
≥
W
2
}
,
with
W
=
π/
4.
You can approximate
R
by sampling on a grid of frequency values.
Define
ω
(
p
)
=
π
(
p
−
1)
/M,
p
= 1
, . . . , M.
(You can use
M
= 25.)
We
then replace
the
exact
expression for
R
above
with
R
ˆ
=
max
{
H
(
ω
(
p
)
, ω
(
q
)
)
 
p, q
= 1
, . . . , M,
(
ω
(
p
)
, ω
(
q
)
)
∈
Ω
rej
}
.
Give the optimal value of
R
ˆ
. Plot the optimal frequency response using
plot_2D_filt(h)
,
available on the course web site,
where
h
is the
matrix containing the
coeﬃcients
h
kl
.
2