# Why is Prewitt filter High Pass

Prewitt filters are popular filters in image processing for edge detection http://en.wikipedia.org/wiki/Prewitt_operator

Can anyone give a proof on why Perwitt and other edge detecting filters are high pass?

-
Is your question "How do I prove that Prewitt is high-pass?" or "Why is it that all edge-detectors are high-pass filters? – Martin Thompson Dec 17 '12 at 11:55
What about taking Fourier transform of the filter kernel? This will reveal which frequencies are preserved and which are attenuated. – Libor Dec 18 '12 at 1:45
I tried to take fft of the kernel (3x3). Here is what I get. How do I interpret that? 0 0 0 1.5000 - 0.8660i 1.5000 - 0.8660i 1.5000 - 0.8660i 1.5000 + 0.8660i 1.5000 + 0.8660i 1.5000 + 0.8660i – mkuse Dec 18 '12 at 11:20

That depends on the definition of high-pass filter. If you define a high-pass filter as a filter that has high response in the high frequencies in frequency domain, then the easiest way is to take a look at the magnitude of Fourier transform, (by definition).

Applying Fourier transform (in Matlab)

 A = fftshift(abs(fft2(padarray([-1 -1 -1; 0 0 0; 1 1 1],[10 10]))));


results in the following image:

Now the interpretation - The part in the middle is the low frequencies. It has low response. There are 2 high responses, both with zero X frequency and some high Y frequency. That is not surprising since we took a filter that detects edges in Y direction.

Why does it make sense to define high-pass filter in this way?

Because a convolution can be thought as multiplication in Frequency domain. That is, if you have a signal $S$ and filter kernel $f$,

$F[S**f] = F[S] * F[f]$

Or, put in another way:

$S**f = F^{-1} [ F[S] * F[f] ]$

where convolution is denoted by $**$

There is another, more intuitive way, that does not involve Fourier transform. A response to a linear filter is strong when the underlying signal "looks" like the filter itself. Therefore, there should be a strong response to edges.

-

A simple explanation: How would you try to implement a differentiation in circuit design? The prewitt operator is simply a digitalization of discrete differentiation. If it was implemented in a circuital form it would attentuate low frequency signals and only allow high frequency signals to pass through.

Which is precisely the definition of a high-pass filter.

-
I think you meant "diminish", not "accentuate" low frequency signals. – Jim Clay Dec 18 '12 at 14:58
Thanks for checking. I meant 'attenuate' but ended up typing 'accentuate'. – Naresh Dec 19 '12 at 3:59