Boost logo

Boost :

From: John Femiani (JOHN.FEMIANI_at_[hidden])
Date: 2007-05-01 14:20:54

I have had the same problem on (internal) code and I use hsv::hue (the
'hue' class is an inner class).


-----Original Message-----
From: boost-bounces_at_[hidden]
[mailto:boost-bounces_at_[hidden]] On Behalf Of Christian Henning
Sent: Monday, April 30, 2007 7:45 PM
To: boost_at_[hidden]
Subject: Re: [boost] [gil] added hsl color space to gil

Hi Lubomir, just added hsv color space. If you want to check the
formulars just use the hsl.cpp test code. It generates some color
plates that show the formulars seems working.

> One suggestion: It is trivial to make it work for any HSB channel (not
> just bits32f).
> Simply channel_convert from the source to your intermediate format
> (bits32f) and then channel_convert the result back to the destination.
> For improved performance, in the future we can add specializations for
> concrete channel types that could use shortcut formulas, but for now
> converting to/from float should be fine.

I was sticking to bits32f for now since I don't know how to handle the
hue value correctly. I would like to add some algorithms where the hue
value is represented in degrees, you know like 60 ( can't find the
small circle on my keyboard ;-) ). So, such a value doesn't quite fit
in 0...255 but in 0...359. Any ideas are welcome.

I actually stumpled on an "interesting" problem with defining the
channel names. Both the hsl and the hsv spaces share the same hue_t
and saturation_t structs. Please review my solution and write me what
you think.

The more I work with the more I like it. I learn quite a bit I can tell
you. ;-)

Unsubscribe & other changes:

Boost list run by bdawes at, gregod at, cpdaniel at, john at