Frage

If i understand the concept correctly, we apply a windowing function to the FFT of a signal to eliminate unwanted frequencies/noise.

How does one apply it to images since they are 2D matrices?

img = imread('file.png');
w = hann(512);
y = fft2(img);

where does one go from here? how do i take the FFT of an image with the hann function, for instance?

i was thinking maybe the pwelch method, but it won't work since y is not a vector

[spectra, freq] = pwelch(y, w, 0.5, 512, 512);
War es hilfreich?

Lösung

Usually a Hanning window is not applied to the results of the FFT, but to the data prior to the FFT. For the two dimensional case, you'll need to create a two dimensional Hanning window first. Please see this thread at matlab central for further details.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top