1
$\begingroup$

I understand why we shift the Fourier transform such that the 0-frequency is centered for visualization. In the shifted DFT(u,v) of an M*N 2-dimensional image,

  • the top-left corner of the 4th quadrant is (0,0) frequency or (low u, low v)
  • the bottom-left corner of the 1st quadrant, (M-1,0) or (high u, low v);
  • the bottom-right corner of the 2nd quadrant, (M-1,N-1) or (high u, high v); and
  • the top-right corner of the 3rd quadrant, (0,N-1) or (low u, high v).

Now, when we apply filters (centered again) on the centered DFT, aren't we changing both low and high frequencies closer/further to/from the center?

For example, the centered Gaussian high-pass filter is centered at M/2 and N/2, and supposed to attenuate only low frequencies (is it?). However, applying this filter to the shifted DFT will attenuate not only low frequencies, but also high frequencies in the 1st, 2nd, and 3rd quadrants.

I did a little experiment and can confirm this effect. Applying the centered Gaussian high-pass filter to a centered DFT was not equivalent to applying the non-centered Gaussian high-pass filter to the same non-centered DFT. I had to apply the filter three more times at each corner of the non-centered DFT to get the same result.

I couldn't find any good explanations why this (high-pass filter changing high frequencies around the center or low-pass filter changing low frequencies) is acceptable.

To simplify this question, let's take a one-dimensional image as example. The non-shifted DFT has the 0-frequency on the left edge while the M-1 frequency on the right edge. The shifted DFT has the 0-frequency at the center and the M-1 frequency right next to it on the left side. Attenuating this center in effect changes both the 0 and M-1 frequencies. This is different from attenuating the 0-frequency on the non-shifted DFT.

Thanks in advance!

$\endgroup$
6
  • 1
    $\begingroup$ It's not acceptable. If you shift the frequency-domain representation of the signal, then you must do the same to the filter in order to get the desired result. $\endgroup$
    – Jason R
    Mar 22, 2019 at 14:19
  • $\begingroup$ However, doesn't doing that change both low and high frequencies around the center (1st-3rd quadrants)? That was my question. $\endgroup$
    – Huidae Cho
    Mar 22, 2019 at 14:32
  • $\begingroup$ If you apply the same shift to the signal and the filter, then the overall effect is the same as if you didn't apply any shifts at all (you're still multiplying the same pairs of values together). $\endgroup$
    – Jason R
    Mar 22, 2019 at 15:10
  • $\begingroup$ If I don't apply any shifts at all, I would have to apply the filter four times at the four corners of the FFT to make the output FFT conjugate symmetric (as @hotpaw2 mentioned below). Or maybe, just make the unshifted filter symmetric. Thanks. $\endgroup$
    – Huidae Cho
    Mar 23, 2019 at 3:58
  • $\begingroup$ If you do an fftshift, all 4 opposing corners end up in the middle, and only need to be frequency domain filtered by one (centered symmetricly in the frequency domain) filter pass. $\endgroup$
    – hotpaw2
    Mar 23, 2019 at 4:38

1 Answer 1

1
$\begingroup$

Note that an FFT of strictly real data is conjugate symmetric.

For a length M FFT of strictly real data, the data in FFT result bin M-1 has the same magnitude as in bin 1 (for a low frequency), but complex conjugated. So to maintain symmetry after filtering, which is necessary for the IFFT-ed image to remain strictly real, a filter has to modify bin(M-i) by the same ratio as bin(i).

$\endgroup$
1
  • $\begingroup$ Ah! We need to filter the FFT such that its result is still conjugate symmetric to maintain the IFFT-ed image strictly real. I got it. What happens if the IFFT-ed image is not strictly real? Some information is in the imaginary part and displaying only the real part causes information losses, I guess? Thanks. $\endgroup$
    – Huidae Cho
    Mar 23, 2019 at 3:50

Your Answer

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

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