Login  Register

Re: 1D Fourier transform in macro

Posted by Michael Schmid on Sep 24, 2014; 8:46am
URL: http://imagej.273.s1.nabble.com/1D-Fourier-transform-in-macro-tp5009727p5009741.html

Hi Ludovic,

almost any raw power spectrum in ImageJ will have a single bright pixel at the origin, dominating everything else by more than an order of magnitude. This pixel corresponds to the DC offset, i.e., the average pixel value of the image (it is the square of the average pixel value multiplied by the width of the FFT raised to a power of 4).

To avoid this, you can use a 32-bit image where the average pixel value is zero (subtract the mean pixel value before doing the FFT).
Or adjust Brightness&Contrast - but you may have to move the 'Maximum' slider very much to the left.
Or set that single pixel to zero (e.g. select it with the Wand and use Process>Math>Set) and then use Auto Brightness&Contrast.

Anyhow, I agree that a 1D FFT in the macro would be nice, just that it is a bit of work (one should also have a Windowing function, e.g. selectable between 'none', 'Hamming' and 'Hann'). It would just need someone to do it...

Michael
________________________________________________________________
On Sep 24, 2014, at 10:36, Ludovic Pinier wrote:

> Thanks you Herbie,
>
> I thought about that, but unfortunately it is not sufficient for my need. What I get is a single colored pixel in the raw spectrum window. All the others are perfectly black.
> At the moment, I extract the profile with ImageJ, and then export to QtiPlot or SciDaVis. I would like to have a nicer, more automated tool.
>
> Thanks anyway,
> Ludovic

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html