Login  Register

Fwd: FFT Power Spectrum Question: RGB vs 8-bit stack

Posted by Jack Hogan on Jul 28, 2013; 2:27pm
URL: http://imagej.273.s1.nabble.com/FFT-Power-Spectrum-Question-RGB-vs-8-bit-stack-tp5004177p5004194.html

---------- Forwarded message ----------
From: Jack Hogan <[hidden email]>
Date: Sun, Jul 28, 2013 at 4:26 PM
Subject: Re: FFT Power Spectrum Question: RGB vs 8-bit stack
To: [hidden email]


Thank you Herbie, Jim and Gabriel, being a noob, even if I knew how to look
at the source code I am not sure I would understand what it meant:-)

But with your hints I think I got it, assuming that FFT is run on HSB's
'Brightness': According to Burger and Burge Brightness in 'RGB to HSB'
appears to be computed for each pixel simply by taking the largest value of
R, G or B.  That's quite different from Y, a variation of which I was
erroneously assuming would be the basis for the transform.

Thanks again for your helpful suggestions.
Jack



On Sun, Jul 28, 2013 at 3:54 PM, Herbie <[hidden email]> wrote:

> 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<http://imagej.nih.gov/ij/list.html>
>>
>>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.**html<http://imagej.nih.gov/ij/list.html>
>

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