# How to realize the contribution of each row in the Fourier Transform of an image?

Let me first show you what I have done so far.

img1 = RemoveAlphaChannel[
ColorConvert[ExampleData[{"TestImage", "Lena"}], "Grayscale"]];
data = ImageData[img];
{nRow, nCol} = Dimensions[data];
d = data;
d = d*(-1)^Table[i + j, {i, nRow}, {j, nCol}];
ft = Fourier[d];
ftAbs = Abs[ft];
ftArg = Arg[ft];


This will give me the information about the image in the Fourier domain. Now let's make a copy of this information.

tempAbs = ftAbs;
tempArg = ftArg;


To look at the contribution for each row in the Fourier domain to the image

Manipulate[
tempAbs[[All, All]] = 0;
tempArg[[All, All]] = 0;
tempAbs[[All, n]] = ftAbs[[All, n]];
tempArg[[All, n]] = ftArg[[All, n]];
{n, 1, nCol, 1}
]


And to check the cumulative contribution

Manipulate[
tempAbs[[All, All]] = 0;
tempArg[[All, All]] = 0;
Table[{tempAbs[[All, i]] = ftAbs[[All, i]];
tempArg[[All, i]] = ftArg[[All, i]];}, {i, 1, n}];

If I take the individual contributions for the first m rows (say, 5), I will get 5 different images (say, I1,I2,I3,I4andI5). And if I take the cumulative contribution up to the fifth row, I will get another image (say, I15).
My question is what is the relation between I15 and I1,I2,I3,I4andI5? To be more precise, how can I combine these five images to get I15?
• You probably want Re[InverseFourier[... instead of Abs[InverseFourier[.... Then I15 should be the sum of I1..I5. Fourier transform is linear, so Fourier[I1]+Fourier[I2]+Fourier[I3] = Fourier[I1+I2+I3] – Niki Estner Dec 6 '17 at 16:52
• @nikie I want to use Abs instead of Re. I know Fourier Transform is linear but I am not sure whether they contribute linearly or not. Are you saying that the relation should be I15=I1+I2+I3+I4+I5? – Majis Dec 6 '17 at 17:00
• Not if you use Abs. Abs[Exp[I*x]+Exp[I*y]] != Abs[Exp[I*x]]+Abs[Exp[I*y]] – Niki Estner Dec 6 '17 at 17:02