Note: This page has been translated by MathWorks. Click here to see

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

2-D FIR filter using 1-D window method

`h = fwind1(Hd,win)`

`h = fwind1(Hd,win1,win2)`

`h = fwind1(f1,f2,Hd,___)`

uses a 1-D window specification to design a two-dimensional FIR filter
`h`

= fwind1(`Hd`

,`win`

)`h`

based on the desired frequency response
`Hd`

. `fwind1`

returns `h`

as
a computational molecule, which is the appropriate form to use with
`filter2`

. `fwind1`

uses the one-dimensional
window `win`

to form an approximately circularly symmetric
two-dimensional window using Huang's method.

`fwind1`

works with 1-D windows only; use
`fwind2`

to work with two-dimensional windows.

`fwind1`

takes a one-dimensional window specification and forms an
approximately circularly symmetric two-dimensional window using Huang's method,

$$w({n}_{1},{n}_{2})={w(t)|}_{t=\sqrt{{n}_{{}_{1}}^{2}+{n}_{2}^{2}}},$$

where *w(t)* is the one-dimensional window and
*w(n*_{1}*,n*_{2}*)*
is the resulting two-dimensional window.

Given two windows, `fwind1`

forms a separable two-dimensional
window:

$$w({n}_{1},{n}_{2})={w}_{1}({n}_{1}){w}_{2}({n}_{2}).$$

`fwind1`

calls `fwind2`

with `Hd`

and the two-dimensional window. `fwind2`

computes `h`

using an inverse Fourier transform and multiplication by the two-dimensional
window:

$${h}_{d}({n}_{1},{n}_{2})=\frac{1}{{\left(2\pi \right)}^{2}}{\displaystyle {\int}_{-\pi}^{\pi}{\displaystyle {\int}_{-\pi}^{\pi}{H}_{d}({\omega}_{1},{\omega}_{2}){e}^{j{\omega}_{1}{n}_{1}}{e}^{j{\omega}_{2}{n}_{2}}d{\omega}_{1}d{\omega}_{2}}}$$

$$h({n}_{1},{n}_{2})={h}_{d}({n}_{1},{n}_{2})w({n}_{2},{n}_{2}).$$

[1] Lim, Jae S., *Two-Dimensional Signal and Image
Processing*, Englewood Cliffs, NJ, Prentice Hall, 1990.