I have pictures, taken with a microscope, of biological samples that exhibit a periodic pattern. Previously, I have used ImageJ to manually rotate the image perpendicular to the pattern and plot its grey value profile. Doing FFT in MATLAB I can determine the distance between two peaks of that pattern via its spatial frequency. But this all depends on how (well) I rotate the sample. So my goal is to actually use
fft2 in MATLAB to directly transform the image regardless of sample angle. Somewhere I have read about calculating the rotational average (after
fftshift) of the resulting spectrum, but I don't know how.
- Is this the right approach anyway?
- Or is there an easier way to calculate the (average) distance between two units of a periodic pattern in an image without having to adjust the angle beforehand?