How to find pointwise readouts of the amplitude, frequency and phase of the DFT underpinning the FFT image?
Once an image is FFT-ed in ImageJ, placing the cursor over any points on the FFT plot results in an output of values at the bottom of the main menu, as in this example:
According to the documentation it simply outputs the location of the cursor:
If the mouse is over an active frequency domain (FFT) window, its location is displayed in polar coordinates. The angle is expressed in degrees, while the radius is expressed in pixels per cycle (p/c). The radius is expressed in [units] per cycle (e.g. mm/c) if the spatial scale of the image was defined using Analyze/Set Scale.
I don't know if there is any additional information within this line to link to the actual sine (or cosine) wave at this particular point in the Fourier plot:
r = .18 p/c (644), theta = 55.12 deg, value = 121
Some playing with ImageJ has given me some preliminary intuition of what these numbers signify. Picking up extreme positions of the cursor as it hovers over the FFT image or plot (yellow cross on the following images) makes it easier to interpret. First, placing the cursor very close to the bright dot in the center and along the x axis yields the following read-out:
This is the slowest frequency in the image, and corresponds to 1 cycle from side-to-side. The image is 256 x 256, and hence, the frequency is 256 pixels / cycle.
What happens if we move the cursor a tiny bit further away to the left along the x axis:
Right, now the frequency has doubled to 4 cycles from side-to-side, which corresponds to 64 pixels/cycle, which (given enough patience and skepticism) can be proven by magnifying and counting the pixels:
What happens at the Nyquist limit:
The limit is 2 pixels/cycle for 128 cycles.
The direction, naturally can be at any angle around the clock face:
and if we select a darker pixel (as in this case), the value
will consequently be low.
It gets interesting at the corners, where the PT tells us that the maximum number of cycles will be $\frac{\sqrt{256^2+256^2}}{2}=181$:
There ought to be an easier method, but awaiting a formal answer this would possibly get the job done:
The read-out of the information captured on the image may go like this:
At the point with the cross hairs on the frequency space:
$\text{Freq.} = 2.245$ pixels/cycle - on a $256^2$ image, $256/2.245 = 114$ cycles in the direction of...
$\text{Orientation} = \theta = 48.2^\circ$
$\text{Amplitude} = \vert X[k]\vert=\sqrt{X_\text{Re}^2+X_\text{Im}^2}=\sqrt{-244.868^2+456.238^2}=384.95$
$\text{Phase} =\arctan\left(\frac{X_\text{Im}}{X_\text{Re}}\right)=\arctan\left(\frac{456.238}{-244.868}\right)=-61.78^\circ$
whether this is correct, and whether there is an easier way to get this info without having to calculate on the side these values, or having to use several separate, and disjointed (FFT
and Complex
) output windows, justifies keeping the post open.
value
. The DFT phase seems to be a little harder to get to, requiring you to set the "Complex Fourier Transform" option, reading thevalue
off the real (say $x$) and imaginary (say $y$) components in the resulting stack, then computing the phase using $\tan^{-1}(y/x)$. $\endgroup$value
for the exact same pixel on the Re/Im is quite something. Perhaps something that could be made easier with a macro or custom plugin. $\endgroup$