float point HSB?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

float point HSB?

Gabriel Landini
Hi,
Has anybody implemented an RGB to HSB plugin or macro but which results in
floating point images?
I am trying to avoid some discontinuities in the H S and B histograms (mostly
in the H) that happen when converting to HSB (which I think are due to some
rounding).

Thanks

Gabriel
Reply | Threaded
Open this post in threaded view
|

Re: Plugin to transform from RGB to HSB (HSV)

Wayne Rasband
I put this plugin (HSV_Stack) on the ImageJ website at

     http://rsb.info.nih.gov/ij/plugins/color-converters.html

along with Maria's "Luv_Stack" and "Lab_Stack" plugins.

-wayne

On Jun 26, 2007, at 10:35 AM, Maria E. Barilla wrote:

>
> Dear Gabriel,
>
> I have got this pluging. Please, check the reference of the colour
> transformation and let me know any comments you have.
>
> I would like to ask Wayne to put this plugin on the web page of ImageJ.
>
> Kind regards,
>
> Maria
>
>
> --
> Miss Maria E. Barilla
> Digital Systems & Vision Processing Group
> Electronic, Electrical and Computer Engineering School
> The University of Birmingham, UK
> http://postgrad.eee.bham.ac.uk/perezm/
>
>
> On Tue, 26 Jun 2007, Gabriel Landini wrote:
>
>> Hi,
>> Has anybody implemented an RGB to HSB plugin or macro but which
>> results in
>> floating point images?
>> I am trying to avoid some discontinuities in the H S and B histograms
>> (mostly
>> in the H) that happen when converting to HSB (which I think are due
>> to some
>> rounding).
>>
>> Thanks
>>
>> Gabriel
>
Reply | Threaded
Open this post in threaded view
|

Re: Plugin to transform from RGB to HSB (HSV)

Gabriel Landini
On Tuesday 26 June 2007, Wayne Rasband wrote:

> I put this plugin (HSV_Stack) on the ImageJ website at
>      http://rsb.info.nih.gov/ij/plugins/color-converters.html
> along with Maria's "Luv_Stack" and "Lab_Stack" plugins.
> -wayne
>
> On Jun 26, 2007, at 10:35 AM, Maria E. Barilla wrote:
> > Dear Gabriel,
> >
> > I have got this pluging. Please, check the reference of the colour
> > transformation and let me know any comments you have.
> >
> > I would like to ask Wayne to put this plugin on the web page of ImageJ.
> >
> > Kind regards,
> >
> > Maria
> >

Sorry Maria, I never got your message (even we are in the same institution!!)  
I just saw it quoted in Wayne's mail.
Many thanks for sharing this plugin.

I think that there is a problem with the hue ordering because the values
between yellow and blue do not appear in the hue image histogram.
I mailed Wayne about it. and can send you an example (I do not have your email
address).

Regards,

Gabriel
Reply | Threaded
Open this post in threaded view
|

Re: Plugin to transform from RGB to HSB (HSV)

Gabriel Landini
In reply to this post by Wayne Rasband
I found the bug!.
Line 90, it should read:

           if      ( rf == var_Max ) H[q] = del_B - del_G;
           else if ( gf == var_Max ) H[q] = ( 1.0f / 3.0f ) + del_R - del_B;
           else if ( bf == var_Max ) H[q] = ( 2.0f / 3.0f ) + del_G - del_R;


that is all.

Cheers

Gabriel