I try to obtain the angle of the periodic waves that you can see below.
I am using the FourierTransformation to get it:
direin = StringJoin[NotebookDirectory[], "Eingang\\"];
diraus = StringJoin[NotebookDirectory[], "Ausgang\\"];
SetDirectory[direin]; files = FileNames[{"*.png"}, FileNameJoin[{Directory[]}]]
img = Import /@ FileNames[files[[1]]];
img = img[[1]];
img = ColorConvert[img, "Grayscale"];
(*sauberer FIltern*)
noBorder = ImagePad[img, -BorderDimensions[img]];
{w, h} = ImageDimensions[noBorder];
wnd = Outer[Times, Array[HammingWindow, h, {-.5, .5}], Array[HammingWindow, w, {-.5, .5}]];
rawPixels = ImageData[noBorder][[All, All, 1]];
imgTimesWnd = (rawPixels - Mean[Flatten[rawPixels]])*wnd;
(*Fourier*)
ft = Fourier[imgTimesWnd];
center = Floor[Dimensions[ft]/2];
ft = RotateRight[ft, center];
(*Winkel*)
brightestOffset = First[Position[Abs[ft], Max[Abs[ft]]]] - center;
maxAngle = ArcTan @@ N[brightestOffset/{h, w}];
getDeg = 180 / \[Pi]*maxAngle
It worked very well for a picture you can see here: Angle between two areas of an image of a 2D FFT
But for the picture you can see above i receive an image like this:
As you can see there are too many periodic reflections, so the code can't work.
My idea is to use a filter to get the interesting areas, marked as the area between the red circles in the image below.
Actually I tried a bandpass Filter and a Mask function... not very successful, do you have any other ideas?





gof1is justgof - π/2. – ybeltukov Nov 25 '15 at 01:26anglewithTan[angle]. In factTan[121 Degree] == -1.66– Dr. belisarius Nov 26 '15 at 14:26