1
$\begingroup$

I have a filter $\mu[n_1, n_2]$ with taps:

$$ (1/8) (1/4) (1/8)$$ $$ (1/4) (1/2) (1/4)$$ $$ (1/8) (1/4) (1/8)$$

How do I find an analytical expression for $\hat\mu(w_1, w_2) $?

Since it looks so much like a triangle, I feel like it looks something of the form $sinc^2(w)$, but the exact answer I need help with.

$\endgroup$
  • 1
    $\begingroup$ You can try to simplicity the problem by noticing that the filter is separable, and you can start with 1D triangle, then combine them into 2D $\endgroup$ – Laurent Duval Aug 22 at 17:05
  • $\begingroup$ display your effort please... $\endgroup$ – Fat32 Aug 22 at 21:31
  • $\begingroup$ @LaurentDuval So I know that the filter is the product of two triangle filters $\mu(n_1) = (1, 2, 1) = 2Tri(2n_2)$ (?) and $\mu(n_2) = (1/8, 1/4, 1/8)^T = 1/4tri(2n_2)$ (?). Does this mean that $\hat\mu(w_1) = 2 \pi sinc^2(w_1/2)$ and $\hat\mu(w_2) = \pi/2 sinc^2(w_2/2)$ So $\endgroup$ – Nobody Special Aug 23 at 3:55
  • 1
    $\begingroup$ So then $\hat \mu(w_1,w_2) = \mu(w_1) \cdot \mu(w_2)$ ?@Fat32 $\endgroup$ – Nobody Special Aug 23 at 4:02
  • $\begingroup$ Why not try 2d FFT of the filter? $\endgroup$ – Moti Aug 23 at 5:32
1
$\begingroup$

You can use the 2D DFT formula

$$H(\omega_1,\omega_2) = \sum_{n_1} \sum_{n_2} h[n_1,n_2] e^{-j(\omega_1 n_1 + \omega_2 n_2)} $$

and simply the trigonometric algebra to get a closed form analytic expression for the 2D-DTFT. However, as @LaurentDuval has already mentioned, your 3x3 kernel is separable and one set of 1D filters is this

$$f[n_1] = [\frac{1}{4} , \frac{1}{2}, \frac{1}{4}]^T $$ $$g[n_2] = [\frac{1}{2} , 1 , \frac{1}{2}] $$

Then from the Fourier transform we know that

$$ h[n_1,n_2] = f[n_1]g[n_2] \implies H(\omega_1,\omega_2) = F(\omega_1) G(\omega_2) $$

Analytic expressions for 1D-DTFT's can be obtained from $$H(\omega) = \sum_{n}h[n] e^{-j \omega n} $$

Assuming 3x3 kernel has zero phase, then we see that : $$F(\omega_1) = \frac{1}{4} e^{j \omega_1 } + \frac{1}{2} e^{j 0 } + \frac{1}{4} e^{-j \omega_1 } = 0.5 \cos(\omega_1) + 0.5 $$

similarly $$G(\omega_2) = \frac{1}{2} e^{j \omega_2 } + 1 e^{j 0 } + \frac{1}{2} e^{-j \omega_2 } = \cos(\omega_2) + 1 $$

Hence: $$H(\omega_1,\omega_2) = 0.5 \left( \cos(\omega_1) + 1 \right)(\cos(\omega_2) + 1) $$

$\endgroup$
  • $\begingroup$ why do you assume the kernel is zero phase? what does that do? $\endgroup$ – Nobody Special Aug 25 at 11:16
  • $\begingroup$ Just for simplicity, and correct unless otherwise stated... You can consider non-zero phase as well. You will just multiply the frequency response with a complex exponential linear phase term... $\endgroup$ – Fat32 Aug 25 at 11:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.