I am working on a image processing application which uses a discrete fourier transform to implement blurring/sharpening. The application is more or less working, but something about the mechanics is still confusing to me.
In particular, it is how the process of centering the zero frequencies is being done.
The example I have seen preprocesses the input image (of greyscale intensities) by multiplying it with a matrix of size equal to the input image, whose values are $(-1)^{x+y}$, where $x$ is the row, $y$ is the column, so a pattern alternating $1$ and $-1$
According to the notes, this is equivalent of swapping the quadrants of matrix by flipping across the $x$ and $y$ axis.
I understand why this is done, and I would like to stress I understand I have my code/Fourier stuff working, I just don't understand why multiplying the input matrix by 1/-1 ends up centering the zero frequency component around 0.
Thanks
. It's Fourier transform looks like: 
), it results in a single point right at the center of the Fourier transform:
. (Recall we haven't done our rotation yet, so the center of the fourier transform is the high frequencies and the low frequencies are at the corners still.) But this is the "rotation kernel!" Convolving with this rotation kernel moves everything down and to the right (but things that fall off the bottom right rotate into the top left.)
, while convolving the fourier transform image with the rotation kernel (in the frequency domain) gives you:
.
, which has a fourier transform of: