Fast fourier transform for images