I'm a relative newbie to Mathematica
Before you flag me as duplicate, note that I have read and studied "Fourier transform over a custom dimension" as best I can. I cannot understand the answer, it uses a lot of advanced notation. I can't even tell if this is the same question or not.
I have a 2D array generated from an image:
tdomain = ImageData[Import["filename.png"]]
I want to fourier transform this array along only one of the dimensions, the rows. The 2D Fourier also runs transform over the columns, not what I want. Can you please help me to Fourier transform only the rows?
I have tried every which way with the function Fourier. It seems to me that it should support my goal, but I can't get it to do anything useful.
Following the answer in "Fourier transform over a custom dimension", I experimented with the Map function, but the documentation is so terse I can't figure it out.
Finally, I wrote a for loop, which seems to work. Here is a working example:
In[168]:= tdomain = ImageData[Import["filename.jpg"]]
In[169]:= Dimensions[tdomain]
Out[169]= {218, 1012}
In[170]:= fdomain = Array[0 &, {218, 1012}]
In[184]:= For[i = 1, i < 219, i++,
trow = tdomain[[i]];
frow = Fourier[trow];
fdomain[[i]] = frow;
]
(* Then, for fun *)
Image[Re[fdomain]]
There has got to be a better way, right?
Image[Re[Fourier /@ tdomain]]
$\endgroup$