Note: This page has been translated by MathWorks. Please click here

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

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

2-D FIR filter using frequency transformation

`h = ftrans2(b,t)`

`h = ftrans2(b)`

produces the two-dimensional FIR filter `h`

= ftrans2(`b`

,`t`

)`h`

that corresponds to the
one-dimensional FIR filter `b`

using the transform
`t`

. `b`

must be a one-dimensional, Type I
(even symmetric, odd-length) filter such as can be returned by
`fir1`

, `fir2`

, or `firpm`

in
the Signal Processing Toolbox software. The transform matrix `t`

contains coefficients that define the frequency transformation to use.

The transformation below defines the frequency response of the two-dimensional filter
returned by `ftrans2`

.

$${{H}_{({\omega}_{1},{\omega}_{2})}=B(\omega )|}_{\mathrm{cos}\omega =T({\omega}_{1},{\omega}_{2})},$$

`b`

:$$B(\omega )={\displaystyle \sum _{n=-N}^{N}b(n){e}^{-j\omega n}}$$

`t`

:$$T({\omega}_{1},{\omega}_{2})={\displaystyle \sum _{{n}_{2}}{\displaystyle \sum _{{n}_{1}}t({n}_{1},{n}_{2}){e}^{-j{\omega}_{1}{n}_{1}}{e}^{-j{\omega}_{2}{n}_{2}}}}.$$

The returned filter `h`

is the inverse Fourier transform of
*H(*ω_{1}*,*ω_{2}*)*:

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

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

Was this topic helpful?