# Determining the type of filter on an image

I have the following mask where the origin is marked in bold text

$$\left[ \frac{-1}{4}~~~{\bf\frac{1}{2}}~~~\frac{-1}{4} \right ]$$

After computing the DFT, the result is:

$$\frac{1}{2} - \frac{1}{2} \cos(\omega)$$

How can I know what type of filter is it? All-pass, Low-pass, Band-pass, High-pass, Band-cut or All-cut? To see the type of filter should I just plot it under the main frequency $[-\pi, \pi]$?

-
Plot it across $-pi$ and $pi$ as you said, and you will see which frequencies are the most attenuated or accentuated. This will tell you if it is LPF, HPF, or BPF. There is no 'strict' definition for them. – Mohammad Nov 20 '12 at 16:19
So just ploting between $[-\pi, \pi]$ is enough to see what type of filter it is? Thanks, I was confused because of the periodicity. – BRabbit27 Nov 20 '12 at 16:35
All the frequency information you need is just between $-pi$ and $+pi$. The repetition is just a repetition of the same frequency information as above, so its redundant. – Mohammad Nov 20 '12 at 19:31
@Mohammad you should write up your comments into an answer :) It might be short, but it is what's the question is asking for. And you did offer a short explanation, so it should definitely be a valid answer – penelope Nov 20 '12 at 19:38
@penelope Good idea... :-) – Mohammad Nov 20 '12 at 19:58

As you said, you can simply plot the frequency response of your filter from $-\pi$ to $+\pi$.

However since this is a filter only has real co-efficients, you can also just plot the frequency response from $0$ to $\pi$, as this will give you all the information you need.

This is because for a real signal, the DFT is conjugate symmetric, meaning that all positive frequencies are mirror images of the negative frequencies. In other words, you do not gain any additional knowledge by looking at both negative and positive frequencies. You just need to look at one of them. (Either negative or positive).

If we do that, we see that your filter looks like so. Here I have shown all positive frequencies, from $0$ to $\pi$. This will give all the information you need.

As you can see, it looks like your filter is a 'graceful high pass filter'. We can clearly see that it passes high frequencies, and clearly see that it nulls low ones, esp DC. In fact, the sum of all your filter co-efficients is 0, meaning we expect it to null out DC completely.

Further judging by context, this appears to be an edge detection filter. Edges are characterized by sharp transitions in space/time, meaning high frequencies in temporal/spatial frequency.

Such a filter would isolate edges.

-