Posted by
Herbie-3 on
Jul 28, 2013; 1:54pm
URL: http://imagej.273.s1.nabble.com/FFT-Power-Spectrum-Question-RGB-vs-8-bit-stack-tp5004177p5004193.html
Good day Jack,
as Gabriel suggested, it is a good idea to have a look at the source code...
In doing so you might find that "getBrightness()" is the routine in
question which in turn calls "Color.RGBtoHSB()".
If you do an "RGB to HSB"-conversion (e.g. by using the plug-in "Color
Transformer") and take the brightness channel for the ImageJ
logPower-spectra generation, then the results are identical to the
direct logPower-spectra generation from the RGB-image, at least for me.
(HSB is also known as HSV.)
In essence and as expected in my first reply, the difference is due to
the kind of RGB to gray-value conversion. There are endless ways of
doing this.
Finally, I understand that you may need logPower-spectra but you should
be aware that the differences that you've found are in fact really small
when considering the Power-spectra per se.
Best
Herbie
_________________________________________
On 28.07.13 10:48, Gabriel Landini wrote:
> On Sunday 28 Jul 2013 09:33:59Jack Hogan wrote:
>> Thanks, your suggestion seemed promising. I produced both the FFT of the
>> quadrature sum of the R,G and B values and the quadrature sum of the
>> individual channels' Power Spectrum. The Power Spectrum obtained by IJ's
>> FFT function directly on the RGB image looks closest to the latter (see the
>> rightmost column in the FFT Moduli image), but alas nowhere near the same
>> as you can see in the two attachments.
>>
>> Getting closer but not quite there yet. Any other ideas?
>
> I would stop experimenting and look in the source code. Even if it looks very
> close, you will not be sure that what you do is what the code does.
>
> Cheers
> Gabriel
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html>
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html