First, I have a few improvement suggestions for your Fourier code:
The bright vertical and horizontal lines you see in your Fourier image are the sharp gradients at the borders of the image (because the Fourier transform assumes a periodic image). So you should get rid of the black border at the bottom:
img = Import["https://i.stack.imgur.com/bIUkE.png"];
noBorder = ImagePad[img, -BorderDimensions[img]];
and multiply your image with a window function:
{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;
ft = Fourier[imgTimesWnd];
center = Floor[Dimensions[ft]/2];
ft = RotateRight[ft, center];
Image[Rescale[Log[Abs[ft] + 10^-3]]]

Much cleaner.
The next step is to find offset of the brightest point from the center:
brightestOffset = First[Position[Abs[ft], Max[Abs[ft]]]] - center
(Note: I had to replace RotateLeft
with RotateRight
above so this works nicely. You can try for yourself that even if you use e.g. center=Floor[Dimensions[ft]/2]-2
above, the brightestOffset
will still be the same.)
and calculate the angle to the center:
maxAngle = ArcTan @@ N[brightestOffset / {h, w}]
Actually, this is not the angle you've drawn in you image: That would be ArcTan@@N[brightestOffset]
. But I'm guessing you're really after an angle in the original image, rather than an angle in the unscaled Fourier transform image:
Module[{center = 0.5 {w, h},
dir = {Cos[maxAngle], Sin[maxAngle]}*100,
norm = {Cos[maxAngle + \[Pi]/2], Sin[maxAngle + \[Pi]/2]}*1/
Norm[brightestOffset/{h, w}]},
Show[noBorder, Graphics[{Red,
Table[
Line[{center - dir + i*norm, center + dir + i*norm}],
{i, -10, 10}]}]]]

Which is the angle of the sine wave you would get if you filtered only this single frequency:
Image[Rescale@
Re[InverseFourier[
Fourier[imgTimesWnd]*
SparseArray[{brightestOffset + 1 -> 1}, {h, w}]]]]
