Re: 2-D Fourier Transform?
- To: mathgroup at smc.vnet.net
- Subject: [mg113769] Re: 2-D Fourier Transform?
- From: Matthias Odisio <matthias at wolfram.com>
- Date: Thu, 11 Nov 2010 06:10:48 -0500 (EST)
Dear Hadi Motamedi, On 11/10/10 5:29 AM, hadi motamedi wrote: > Dear All > Can you please let me know how can I obtain 2-D Fourier transform of a > 2-D signal say an saved image ? > Thank you Fourier and InverseFourier works with 1D, 2D, ... arrays. When working with images, be aware that the data after Fourier transform does not have its lower frequencies at the center of the array, but in the corners. It is usually annoying. You may want to use the following work-around (Gonzalez and Woods, DIP 3e, Chapter 4): CenteredFourier[img_] := Module[{data = ImageData[img], dim}, dim = Dimensions[data]; Fourier[data*(-1)^Table[i + j, {i, First[dim]}, {j, Last[dim]}]] ]; CenteredInverseFourier[F_] := Module[{dim}, dim = Dimensions[F]; Image[Re[ InverseFourier[F]*(-1)^ Table[i + j, {i, First[dim]}, {j, Last[dim]}]]] ]; Matthias Odisio Wolfram Research