Rotation and the Fourier Transform

Looking for ways to speed up a particular process, I discovered that it would be much to my advantage if I could rotate an image in fourier space instead of having to rotate the image in real space and then taking the fourier transform again. I convinced myself that the operation of rotation commutes with the fourier transform operation:

Let g(x) (ℜ2→ℜ) represent the image f(x) rotated by an angle Θ. This can be expressed as a simple change of coordinates g(x)=f(R-1x) where R=R(Θ) is the rotation matrix (or, in general, any orthogonal transformation). Let G(k) be the Fourier Transform of g(x). Then G(k)=Integral[g(x)Exp[-2πi⟨k,x⟩dx]. Let k'=Rk and substitute f(R-1x) for g(x), then G(k')=Integral[f(R-1x)Exp[-2πi⟨Rk,x⟩]dx]. Because R (and R-1=RT)is x,k⟩ = ⟨R-1Rx,R-1k⟩ = ⟨x,R-1k⟩. Thus we have G(Rk)=Integral[f(R-1x)Exp[-2πi⟨k,R-1x⟩]dx] Because the integral is over all x, and thus over all R-1x we can perform the change of variable R-1xx to get G(Rk)=Integral[f(x)Exp[-2πi⟨k,x⟩]dx] which is just F(k), the Fourier Transform of f(x). Finally we have G(Rk)=F(k) or G(k)=F(R-1k). Thus we see that a rotation in x-space has the same effect as a rotation in k-space, i.e. Rotation commutes with the Fourier Transform.

Now, let's try it out. Take the following reference image:

reference image

Take the fourier transform, rotate it by 180°, and then take the inverse transform. This is an exact operation, so there will be no problems with interpolation. We expect that F-1{ R( F{reference}, 180°) } = R(reference,180° }. i.e. we expect that the final result will just be the original reference image rotated by 180°. However, the results are kind of weird:

results of rotation of the fourier transform

Note that the magnitude of the result is as expected, but the phase is quite weird. The reference image is entirely real (∀x∈([1,120]x[1,120]), reference(x) ∈ ℜ), so I expect F-1⋅R⋅F(reference) to be real as well. Why does this happen?

One observation about the bizarre phase plot -- the areas where the phase is chaotic are those areas where the magnitude is zero. And when the magnitude is zero, phase is not defined (what is the angle of the zero vector?); so the phase diagram is really not so weird. It seems just that the phase has been skewed somehow.

The next thing to do is to read What FFTW really computes to find out what sort of "Fourier Transform" we are really doing.


Tobin Fricke, Weizmann Institute of Science
$Id: fourier_rotation.html,v 1.1 2002/07/08 16:00:03 tobin Exp tobin $