Posted by
Herbie on
Dec 08, 2019; 1:54pm
URL: http://imagej.273.s1.nabble.com/Fourier-Transform-tp5022753p5022769.html
Dear Sara,
the options mentioned by you mainly depend on what you want to obtain (see
below).
Independently from these options, ImageJ *will* transform images that have
side-lengths that are not a power of two. (Just try it!)
In general and classically, the Fourier-transformation of digitized images
with side-lengths that are not a power of two can be performed following two
approaches:
1. Using the DFT (Discrete Fourier Transformation)
This approach doesn't show the speed profit of the FFT-algorithm (Fast
Fourier Transformation). In other words, it is comparably slow. (The classic
FFT requires images with side-lengths that are a power of two.)
Here
<
https://sites.google.com/site/piotrwendykier/software/parallelfftj>
you find an implementation of the Fourier-transformation for ImageJ (plugin)
that uses the FFT-algorithm for images with side-lengths that are a power of
two and the DFT-algorithm for images with side-lengths that are not a power
of two.
2. Padding (embedding)
Images with side-lengths that are not a power of two are padded to the next
size with side-lengths that are a power of two. In other words, the small
image is embedded in an image support that has side-lengths that are a power
of two. This new support is previously filled with the mean value of the
small image.
As Michael pointed out already, this approach is used by ImageJ.*
(There is a different way of embedding that I prefer. It uses windowing and
embedding in an empty support. If you prefer this common approach, I can
provide a windowing plugin for ImageJ.)
The options you've mentioned (in fact their naming is far from reasonable):
1. FFT window
You get an 8bit result that is the Fourier-Power Spectrum with the spectral
values (gray-values) logarithmically scaled.
2. Raw power spectrum
You get a 32bit result that is the Fourier-Power Spectrum.
3. Fast Hartley Transform
For the time being, forget about this option.
4. Complex Fourier Transform
You get a 32bit stack (consisting of two slices) that represents the
complex-valued Fourier Transform. The first slice is the real part and the
second slice is the imaginary part of the complex-valued Fourier Transform.
The question remains, what you need for your purposes.
Please feel free to ask, if you have further questions.
Regards
Herbie
==========================================
*
ImageJ doesn't centrally embed the small image but puts it at the top left
of the new support. This doesn't make any difference for Power Spectra but
it does introduce a linear phase which has considerable impact on the
complex-valued Fourier spectrum.
If you need the complex-valued Fourier spectrum without this effect you need
to do the correct embedding yourself.
==========================================
Am 08.12.19 um 10:17 schrieb Sara_24:
> Hi Herbie,
>
> would you please tell me which of FFT options do the FFT of images of
> non-power of two size? I use Fiji and as FFT options it has only FFT
> Window,
> Raw power Spectrom, Fast Hartley transform, and complex Fourier transform.
> Which one do the FFT of images of non-power of two size?
>
> Best regards,
> Sara
--
Sent from:
http://imagej.1557.x6.nabble.com/--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html