1
$\begingroup$

I kind of expected this to of been asked before, so if this is duplicate please point me in the right direction, however I couldn't find anything.

I am currently experimenting with low pass filtering. I take an image and apply a 2-dimensional fast Fourier transform to the image, next I apply a shift such that the zero frequency component is moved to the center (Using Matlab this is fftshift). Then I zero Fourier co-efficients which are not within some distance $r$ of the center pixel. I apply the inverse of the shift and then an inverse 2-dimensional fast Fourier transform.

Now I end up with a matrix of complex values, but to display an image I want a matrix of real values. With the matrix obtained after applying the IDFT I mapped the pixel values to their real part, imaginary part, magnitude and phase so that I could view the matrix as an image. I found that the real part and the magnitude looked like the original image and taking the imaginary part and phase rendered the image unrecognizeable compared to the original image. I also found that their wasn't a recognizable difference in quality between taking the real value of the transformed image or the absolute value.

My question is, is there advantages or disadvantages between taking the real part of absolute value after filtering (low pass, or in general)?

This is my first question on DSP.SE, so please leave comments on how to improve my question if it's not up to standard

$\endgroup$
2
$\begingroup$

If your processed 2D FFT is conjugate symmetric, then any imaginary components in the complex IFFT result are just numerical noise or rounding errors. Thus using them to compute an absolute value is mostly a waste of CPU cycles.

$\endgroup$
  • $\begingroup$ Am I correct in thinking that a 2D FFT of a real valued matrix will always be conjugate symmetric? So you're saying the imaginary parts are close to zero because they come from noise/errors hence the real and absolute value will be very close to equal with the absolute value being slightly greater in value? I understand that I should use the real part because it's computationally less expensive, that makes sense, thanks. $\endgroup$ – HBeel Apr 21 '15 at 17:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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