I would like to get a plot of how much each spatial frequency is present in a grayscale image.
I have been told to try np.fft.fft2
but apparently this is not what I need (according to this question). I was then told to look into np.fft.fftfreq
- and while that sounds like what I need it will only take an integer as input, so
np.fft.fftfreq(np.fft.fft2(image))
won't work. Nor does:
np.fft.fftfreq(np.abs(np.fft.fft2(image)))
How else could I try to do this? it seems like a rather trivial task for a fourier transform. It's actually the task of the fourier transform. I don't understand why np.fft.fft2
doesn't have a flag to make the frequency analysis orientation-agnostic.