Autocorrelation using Fourier
Posted by
vischer on
Dec 13, 2010; 10:19pm
URL: http://imagej.273.s1.nabble.com/Autocorrelation-using-Fourier-tp3686185.html
Hello all,
I created a test macro that performs 1D autocorrelation.
It runs well in a few seconds, but I wonder if the speed can be improved by Fourier techniques for larger data sets.
The macro first creates a test image that is randomly covered with white horizontal lines with a mean length of 20 pixels. The image is then periodically multiplied with a horizontally shifted copy, so I get the autocorrelation plot from which I can derive the mean line length. The output looks like this:
Simulated Length = 20.17
Measured Length = 20.06
Later in reality, the white lines will represent the fluorescent duration of molecules, and the data set will be much larger.
I doubt that a native plugin will do the same thing much faster, but has anyone a suggestion how to use Fourier techniques?
My demo macro can be downloaded from:
http://simon.bio.uva.nl/objectj/GenericMacros/AutoCorrelation/AutoCorrelation-2.txt
Norbert Vischer