[SciPy-user] fft of an image

lorenzo bolla lbolla at gmail.com
Thu Sep 13 15:20:01 EDT 2007


what about scipy.fftpack.fftshift?
In [7]: x = scipy.arange(25).reshape(5,5)

In [8]: x
Out[8]:
array([[ 0,  1,  2,  3,  4],
       [ 5,  6,  7,  8,  9],
       [10, 11, 12, 13, 14],
       [15, 16, 17, 18, 19],
       [20, 21, 22, 23, 24]])

In [9]: scipy.fftpack.fftshift(x)
Out[9]:
array([[18, 19, 15, 16, 17],
       [23, 24, 20, 21, 22],
       [ 3,  4,  0,  1,  2],
       [ 8,  9,  5,  6,  7],
       [13, 14, 10, 11, 12]])



On 9/13/07, Emanuele Zattin <emanuelez at gmail.com> wrote:
>
> hello,
> i would like to show the magnitude of the fourier transform of an
> image. interesting informations appear in the four corners of the
> resulting image, but i would like to shift the matrix in order to have
> the corners meeting each other in the middle. any hint?
>
> --
> Emanuele Zattin
> ---------------------------------------------------
> -I don't have to know an answer. I don't feel frightened by not
> knowing things; by being lost in a mysterious universe without any
> purpose — which is the way it really is, as far as I can tell,
> possibly. It doesn't frighten me.- Richard Feynman
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20070913/7095cc60/attachment.html>


More information about the SciPy-User mailing list