# Tag Info

3

I believe that you are not converting your filter properly from the spatial domain to the Fourier domain. The process has three steps: Pad the spatial filter to the size of the padded image Multiply this new matrix by $(-1)^{x+y}$ Compute the DFT In code it would be written like this: spatialToFourier[spatial_, image_] := Module[{padded, centered}, ...

0

Thanks @rewi. I just write down the Wolfram Alpha version, (based on his answer). So I can remember. FourierTrigSeries[Piecewise[{{-Pi, -2 Pi < x <= 0}, {Pi, 0 < x <= 2 Pi}}], x, 3, FourierParameters -> {1, 1/2}] where FourierParameters' second parameter is $\omega = \frac{2\pi}{T}$

1

f[x_] = Piecewise[{{-Pi, -2 Pi < x <= 0}, {Pi, 0 < x <= 2 Pi}}]; T = 4 \[Pi]; fr = FourierTrigSeries[f[x], x, 3, FourierParameters -> {1, 2 \[Pi]/T}] (* 4 Sin[x/2] + 4/3 Sin[(3 x)/2] *)

2

One approach is to locate the black components and then measure some properties of them. Here we locate them using MorphologicalComponents, find the centroids using ComponentMeasurements and then calculate the distance between the centroids using Nearest. img = Import["http://i.stack.imgur.com/hALsH.jpg"]; imgBW = Binarize@ColorConvert[img, "Grayscale"]; ...

2

This is not an answer more of an extended comment... My mission is to extract information on the typical distance between the black patches in the image I have attached here. Do we have to use Fourier transform for this? For example we can get the required estimate with these commands: img = Import["http://i.stack.imgur.com/hALsH.jpg"]; Row[{"Image ...

2

It looks like random blobs, and that's what the FFT suggests... img = Import["http://i.stack.imgur.com/hALsH.jpg"]; imgBW = ImageData@ColorConvert[img, "Grayscale"]; imgZ = imgBW - Mean@Mean[imgBW]; xf = Abs[Fourier[imgZ, FourierParameters -> {1, -1}]]; {d1, d2} = Ceiling[Dimensions[xf]/2]; xCentered = RotateLeft[xf, {d1, d2}]; ArrayPlot[xCentered] ...

Top 50 recent answers are included