# fwind1

2-D FIR filter using 1-D window method

## Description

The `fwind1`

function designs 2-D FIR filters using the
window method. `fwind1`

uses a 1-D window specification to design a
2-D FIR filter based on the desired frequency response. `fwind1`

works
with 1-D windows only. Use `fwind2`

to work with 2-D
windows.

You can apply the 2-D FIR filter to images by using the `filter2`

function.

## Examples

## Input Arguments

## Output Arguments

## Algorithms

The `fwind1`

function 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*) is the resulting two-dimensional window.

_{2}Given two windows, the `fwind1`

function forms a separable
two-dimensional window:

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

The `fwind1`

function calls the `fwind2`

with the desired frequency response `Hd`

and
the two-dimensional window. The `fwind2`

function calculates
`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}_{1},{n}_{2})$$

## References

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

## See Also

**Introduced before R2006a**