1
votes

do you know how to identify a filter, when we know the mask? Is there any rule which says how to distinguish that is a high pass filter or low pass filter? the mask, for example:

1 0 -1; 
2 0 -2; 
1 0 -1;

Somebody told me to try test it with ESF but I not sure.

I know that this filter is a high pass filter, I know that is a Sobel filter but how to determinate it when we have got different matrix?

1
This question appears to be off-topic because it is about image and signal processing and would be better on dsp instead.Roger Rowland

1 Answers

0
votes

You can implement Fourier transform on the filter kernel and observe the magnitude in frequency domain (in Matlab it is abs(fftshift(fft2(a)));). The magnitude distribution of the sobel kernel is:

1.7321         0    1.7321
6.9282         0    6.9282
1.7321         0    1.7321

No value in the center (corresponding to low frequency components), so it's a high pass filter.

EDIT

Regarding the edge spread function method, you need to extract the edges from the original image first, and then,

e=edge(a);
esf=e(size(e,1)/2,:); %Take the centre line as a profile, e is the edge distributions in the image
lsf=gradient(esf); %The LSF is the derivative of the ESF
f=fft(lsf);
mtf=abs(f);
mtf=mtf(1:end/4); %Get rid of the double-ended spectrum and the long