[SciPy-user] shift FFT2D...
fred
fredmfp at gmail.com
Wed May 9 11:19:00 EDT 2007
Francesc Altet a écrit :
> El dc 09 de 05 del 2007 a les 16:40 +0200, en/na fred va escriure:
>
>> 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 ?)
>>
>
> Something like:
>
I was thinking something like this, but I was wondering if there was not
a builtin function for example...
Thanks anyway.
Another question: how can I put a small matrix in a bigger (say (10x10)
centered in (200x200)) ?
Cheers,
--
http://scipy.org/FredericPetit
More information about the SciPy-User
mailing list