[SciPy-user] shift FFT2D...

fred fredmfp at gmail.com
Wed May 9 10:40:36 EDT 2007


Hi all,

I use an FFT 2D on a matrix to compute a convolution like this:

a = fft2(input_data)
b = fft2(output_data)
c = real(ifft2(a*b))

The problem is that c should look like this:

c1 | c2
-----------
c3 | c4

but it looks like this:

c4 | c3
-----------
c2 | c1

How  can I get efficiently the right result ? (something like shift ?)

Thanks in advance.


Cheers,

-- 
http://scipy.org/FredericPetit




More information about the SciPy-User mailing list