As part of a homework assignment, I had to take the Fourier transform of the kernel I was using to convolve a signal. The kernel was a constant rectangular function, that was 1 within the square $(-1, -1)$, $(1, 1)$ and 0 everywhere else.

I was wondering what this result really means. What have I gotten once I take the Fourier transform of this function?

  • $\begingroup$ This is a two-dimensional kernel, right? Describable as $$h(x,y)=\begin{cases} 1, &-1 \leq x, y \leq +1,\\0, &\text{otherwise.}\end{cases}$$ and not the one-dimensional kernel in @pichenettes answer? Put another way, what formula (or even MATLAB command) did you use to compute the Fourier Transform of the kernel and what did you obtain? A function $H(\omega_1, \omega_2)$ of two arguments or of one argument $H(\omega)$? $\endgroup$ – Dilip Sarwate Feb 17 '12 at 2:12
  • $\begingroup$ Correct, it is a two dimensional kernel. The formula to compute the FT is integrals in both x and y of $h(x,y)exp(-j2\pi (ux + vy)$ $\endgroup$ – Steve Feb 17 '12 at 2:31
  • $\begingroup$ So you should have gotten the transform to be something like $H(u,v)=\text{sinc}(2u)\text{sinc}(2v)$, right? So do you see how, given any positive $\epsilon$, no matter how small, $|H(u,v)| < \epsilon$ for all $|u|, |v| > M$ for some $M$ (whose value I will not be able to tell you until you have chosen $\epsilon$)? $\endgroup$ – Dilip Sarwate Feb 17 '12 at 2:40
  • $\begingroup$ Sorry, I don't follow this. The magnitude of the Fourier transform is smaller than some value, if I make $u$ and $v$ arbitrarily large? $\endgroup$ – Steve Feb 17 '12 at 2:47
  • $\begingroup$ Yes, as hotpaw2 pointed out to you also, $\text{sinc}(f) = [\sin(\pi x)]/(\pi f)$ decays away as $|f|$ gets large because the numerator is at most $1$ in magnitude while the denominator is increasing without bound. But there is a lot of "ripple" because of the $\sin$ instead of a smooth decaying away to $0$ as $|f|$ increases. $\endgroup$ – Dilip Sarwate Feb 17 '12 at 2:52

Convolving a signal with a kernel is equivalent to applying a filter to it. The kernel is the impulse response of the filter, and the Fourier transform of the kernel is thus the frequency response of the filter.

In your case, the filter's impulse response is a rectangular function of width 2 and centered at 0. You can interpret this filter this way: for any $t$, the filter output $y(t)$ will be the average of the input signal $x(t)$ over the interval $[t - 1, t + 1]$. This is an averaging, low-pass filter, and indeed, the Fourier transform of the kernel is a decreasing function, showing that the higher frequencies are attenuated.

| improve this answer | |
  • $\begingroup$ Thanks for your answer. I'm just trying to visualize all of this. How is it clear that the FT is a decreasing function that attenuates higher frequencies? Thanks again :) $\endgroup$ – Steve Feb 16 '12 at 23:49
  • $\begingroup$ The FT of a rectangular window is a Sinc function, which decays on the order of 1/f, e.g. a low-pass filter with a bunch of ripple in the stop band. $\endgroup$ – hotpaw2 Feb 17 '12 at 1:26
  • $\begingroup$ Very true! Thanks again. Final question for anybody who will answer, what makes this filter an averaging filter? I get that the convolution will sum the elements in the neighbourhood, but I don't see why it would average them.. $\endgroup$ – Steve Feb 17 '12 at 2:03
  • $\begingroup$ Averaging = summing, up to multiplicative constant :) In your case, the output of your filter at point x will be twice the average of the input signal in $[x - 1, x + 1]$. $\endgroup$ – pichenettes Feb 17 '12 at 2:12

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.