I am quite confused whether the following numerical differences i find are just severe round off errors made by matlab, or something i am doing wrong. The following happened when trying to see what a low pass filter looks like in the spatial domain.
By mathematics, the inverse fourier transform of a real symmetric image ($I(x,y) = I(-x,-y)$, where $I$ gives the value of the image at the given pixel) should again be real-valued.
However, when starting out with a low pass filter I defined as a disc of ones centered around the origin, surrounded by zeroes, the matlab command ifft2(ifftshift(I)) gave an image with pretty nontrivial complex component.
When explicitly telling Matlab to utilize the symmetry, the command ifft2(ifftshift(I),'symmetric') did indeed give a matrix with only real entries. However, the numerical difference between the two commands was pretty big compared to what i expected: Letting $I$ be our symmetric image in the frequency domain, i entered the following commands:
J = ifft2( ifftshift(I) );
K = ifft2( ifftshift(I), 'symmetric' );
mean(mean(abs(real(J) - K)))
as you see, the difference between the real part of J and K is not that big per se, but it is big compared to the mean values of K. So it is quite nontrivial.
Questions: 1. Why do these complex components show up in J? Are they really round off errors made by Matlab? 2. Where does this numerical difference come from when i use this 'symmetric' command? Again just round of errors? 3. In practice, when dealing with symmetric real matrices (or more generally conjugate symmetric matrices), is it advisable to use the 'symmetric' command?
Thanks a lot!