Re: FFT implementation in ImageJ
Posted by
Michael Schmid on
Jul 09, 2014; 4:48pm
URL: http://imagej.273.s1.nabble.com/FFT-implementation-in-ImageJ-tp5008239p5008653.html
Hi everyone,
in the recent daily builds, Wayne has added two convenient ways to access the built-in 1D FHT of ImageJ.
FHT.transform1D(float[] x)
FHT.inverseTransform1D(float[] fht)
The FHT (Fast Hartley transform) is closely related to the FFT, and it also needs array sizes that are a power of 2.
http://en.wikipedia.org/wiki/Discrete_Hartley_transformActually, it was possible to use the built-in FHT already in previous versions of ImageJ, but that was not so obvious. In the daily build, the 1D FHT also works with array sizes >2^16 (for very large arrays, note that the accuracy is limited to maybe 5 digits or so because it's all 32-bit float, not double-precision arithmetics).
From the FHT, one can easily determine the Fourier (FFT) coefficients for either sine and cosine, or the coefficients of the complex FFT. Of course, you can also get the power spectrum, see the API documentation of FHT.transform1D.
Michael
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html