1
$\begingroup$

I was trying to solve the following question:

  1. Calculate the DFT of the given filter impulse response $h(n,m)$.
  2. Based on the result, determine if the given filter is a high-pass or a low-pass filter.

In the solution they proved that: $$ H(k,l)=\sum_{m=-1}^{1}\sum_{n=-1}^{1}h(m,n)e^{-i2\pi\left(\frac{m}{3}k+\frac{n}{3}l\right)}=\frac{1}{9}\left(2\cos\left(\frac{2}{3}\pi k\right)+1\right)\left(2\cos\left(\frac{2}{3}\pi l\right)+1\right) $$ Then for the second part, they said that because $H(0,0)=1$ and $H(\pi,\pi)=0$ we can figure it's a lowpass filter. I'm trying to understand why. I could not find such "definition" online. Mathematically speaking, given filter $h(n,m)$ how can I know if it's a lowpass or highpass filter?

$\endgroup$
1
  • 1
    $\begingroup$ Highpass means "passes high frequencies, blocks low ones". Lowpass means "passes low frequencies, blocks high ones". Does it make sense now? $\endgroup$
    – TimWescott
    Feb 9, 2022 at 23:51

2 Answers 2

2
$\begingroup$

This is more a quick examination test or a rule of thumb than an actual proof that a filter has a "low-pass" or "high-pass" behavior.

For a low-pass filter, it is expected that:

  • a flat or constant signal will be untouched (or keep constant amplitude), hence the sum of filter coefficients should be one (or close to)
  • a maximally-varying zero-mean signal of alternating $-1$ or $1$ (like a checkerboard pattern) should vanish, hence the sum of filter coefficients should be zero (or close to).

This can be understood as follows: for a flat data of value $C$, the average over $K$ values will be $\overline{C}=\frac{1}{K}\sum_{k\in K} S_k =C$ (untouched) while $\overline{D}=\frac{1}{K}\sum_{k\in K} (-1)^k S_k $ is either $0$ or $\pm C/K$, which vanishes as the length or support $K$ increases (the larger the differentiating filter, the larger the attenuation.

And you get the converse statement of high-pass filters. But I think this does not suffice. A globally decreasing behavior in the frequency domain is a plus.

The answer given is just the translation of the above hints in the Fourier domain, because the sum of coefficients is $H(0,0)$ and the same multiplied by alternating signs is $H(\pi,\pi)$.

To start with, a couple of more details is given here: Filter coefficients to know high pass and low pass filter

$\endgroup$
0
$\begingroup$

I think the detail to understand is that the frequencies are given in normalized radian frequencies in units of radians/sample. We can convert frequencies given in Hz or radians/sec to normalized frequency by dividing the frequency by the sampling rate.

Normalized frequency in cycles/samples: $f/f_s$

Normalized frequency in randians/sample: $\omega/f_s$

Where $f$ is the frequency of interest in Hz and $\omega$ is the same frequency of interest in radians/sec.

Thus we have a frequency range from DC to half the sampling rate (Nyquist) as either extending from $0$ to $0.5$ for cycles/sample units, or $0$ to $\pi$ for radians/sample units.

The OP has a 2-dimensional filter (image filter I assume?) where $H[0,0]$ represents the frequency response for an input frequency at DC (f=0), and had a result as "1" meaning it would pass low frequencies, and then $H[\pi,\pi]=0$ meaning it would not pass the Nyquist frequency at $f_s/2$, and thus represents a low pass filter.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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