2-D FIR filter using 1-D window method
h = fwind1(Hd, win)
h = fwind1(Hd, win1, win2)
h = fwind1(f1, f2, Hd,...)
fwind1 designs two-dimensional FIR filters
using the window method.
fwind1 uses a one-dimensional
window specification to design a two-dimensional FIR filter based
on the desired frequency response
with one-dimensional windows only; use
work with two-dimensional windows.
h = fwind1(Hd, win) designs
a two-dimensional FIR filter
h with frequency response
h as a computational
molecule, which is the appropriate form to use with
the one-dimensional window
win to form an approximately
circularly symmetric two-dimensional window using Huang's method.
You can specify
win using windows from the Signal
Processing Toolbox software, such as
Hd is a matrix containing the desired frequency
response sampled at equally spaced points between -1.0 and 1.0 (in
normalized frequency, where 1.0 corresponds to half the sampling frequency,
or π radians) along the x and y frequency
axes. For accurate results, use frequency points returned by
Hd. (See the entry for
h = fwind1(Hd, win1, win2) uses
the two one-dimensional windows
create a separable two-dimensional window. If
h = fwind1(f1, f2, Hd,...) lets
you specify the desired frequency response
arbitrary frequencies (
along the x- and y-axes.
The frequency vectors
be in the range -1.0 to 1.0, where 1.0 corresponds to half the sampling
frequency, or π radians. The length of the windows controls
the size of the resulting filter, as above.
The input matrix
Hd can be of class
of any integer class. All other inputs to
be of class
double. All outputs are of class
fwind1 to design an approximately circularly
symmetric two-dimensional bandpass filter with passband between 0.1
and 0.5 (normalized frequency, where 1.0 corresponds to half the sampling
frequency, or π radians):
Create a matrix
Hd that contains
the desired bandpass response. Use
create the frequency range vectors
[f1,f2] = freqspace(21,'meshgrid'); Hd = ones(21); r = sqrt(f1.^2 + f2.^2); Hd((r<0.1)|(r>0.5)) = 0; colormap(jet(64)) mesh(f1,f2,Hd)
Design the filter using a one-dimensional Hamming window.
h = fwind1(Hd,hamming(21)); freqz2(h)
fwind1 takes a one-dimensional window specification
and forms an approximately circularly symmetric two-dimensional window
using Huang's method,
where w(t) is the one-dimensional window and w(n1,n2) is the resulting two-dimensional window.
Given two windows,
fwind1 forms a separable
the two-dimensional window.
an inverse Fourier transform and multiplication by the two-dimensional
 Lim, Jae S., Two-Dimensional Signal and Image Processing, Englewood Cliffs, NJ, Prentice Hall, 1990.