Dear Tom,
you are posing some basic questions that show that you are at the very
beginning with FT, DFT and FFT, not to speak of the FHT.
Here are some short replies to some of your questions:
FFT is an optimized algorithm for performing the DFT (discrete FT) that
_requires_, if applied to images, square sized image supports with side
length of a power of two. This condition is just the reason for this
algorithm being fast.
If, for whatever reason (even higher computational speed), the DFT is
computed from the FHT, the same restrictions hold, at least as far as I
know, because I never had a closer look at the FHT.
By having tried out various implementations of the FFT (e.g.
ParallelFFTJ) and the IJ-implementation via the FHT on the same machine,
I found that the execution speed of the IJ-implementation is not much
higher than good direct implementations of the FFT, e.g. ParallelFFTJ.
There are, however, algorithms for spectral transformations that are
said to be even faster than the FFT and are _less_ limited with respect
to the signal format.
You may have a look at the approach favoured by Stephan Preibisch, whom
you may know from his contributions to this list (and from the IJ-2 team
I think), or at:
<www.fftw.org/>
But be aware that such approaches are _not_ algorithms that should be
called FFT.
Best
Herbie
_____________________________________________
On 26.08.12 13:40, Tom Runia wrote:
> Hi everybody,
>
> For a while I have been messing around to find the correct way of
> calculating the FFT of images using the API (I'm building a plug-in).
> First I did this using *IJ.run("FFT")*, but later I changed it to:
>
> *// Fast-Hartley Transform*
> *FHT fht = new FHT(impIn.getProcessor());*
> *fht.transform();*
>
> Now I am not sure whether this is the correct way of calculating the FFT of
> my image. The Fast Harley
> Transform<
http://rsbweb.nih.gov/ij/developer/api/ij/process/FHT.html>is
> just an algorithm to calculate the FFT I assume?
> Can someone confirm that this is the way to implement the FFT using the
> ImageJ API?
>
> One of the problems I have with the FHT is that is requires images which
> are square with size a power of 2 (128, 256, 512 etc). Is there a way to
> work around this requirement or is the only option to use padding or crop
> the image to a size which is a power of 2?
>
> Hopefully someone can answer my questions!
>
> gr,
>
> Tom
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html>
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html