I am new to Mathematica, and I have read this post to understand how to perform Fourier transform on an image. My mission is to extract information on the typical distance between the black patches in the image I have attached here. The code that I attach here gives me the Fourier transform, but I don't know how to take out from the Fourier transform the values of the wavenumbers.
I have used this piece of code
img = Import["example.jpg"];
Image[img, ImageSize -> 300]
data = ImageData[img];(*get data*)
{nRow, nCol, nChannel} = Dimensions[data];
d = data[[All, All, 2]];
d = d*(-1)^Table[i + j, {i, nRow}, {j, nCol}];
fw = Fourier[d, FourierParameters -> {1, 1}];
(*adjust for better viewing as needed*)
fudgeFactor = 100;
abs = fudgeFactor*Log[1 + Abs@fw];
Labeled[Image[abs/Max[abs], ImageSize -> 300],Style["Magnitude spectrum", 18]]
I have the following image on which I would like to perform this analysis -
fw
contains the values. I.e.fw[[1,1]]
is the value for frequency 0/0,fw[[1,2]]
is the value for frequency 0/1... $\endgroup$d = d*(-1)^Table[i + j, {i, nRow}, {j, nCol}];
which seems to apply some checkerboard pattern to the white background pixels. $\endgroup$