Assume that the color point in L*a*b* has the value L, a, and b, is it
correct that HUE angle is computed by HUE_angle=arctan(a/b) ?
Thanks
Atan2() is approximately equivalent to hue, and the saturation is related to
the length of the vector in the ab plane . When I do this I the atan() of
pure red so it has a hue angle of zero, to match the RGB based HSB
calculation. The other colors - G, B, C, M, and Y are only very roughly the
same as in HSB, within 20 or 30 degrees
The nice thing about this hue angle is that it is a true trigonometric
calculation. It is more stable as brightness changes than the one computed
for HSB, and it does not have the flat spots at the extreme ends of the
hexcone vertices that is characteristic of HSB.
--
Mike Russell - www.curvemeister.com
> the saturation
there is no saturation correlate in CIELAB because there is no associated
chromaticity diagram, you would have to use CIELUV for this
--
Dale http://www.vedantasite.org
see website for real email address
The "saturation" correlate for both CIELAB and CIELUV is called Chroma,
and is computed in a very similar fashion.
Graeme Gill.
Thanks
Ha huy Thanh
Hi Mike, I think to match Hue in the HSB/HSL (HUE angle=0 for pure
RED), in CIE L*a*b*, Hue_angle should be computed by atan(b/a), not
atan(a/b) as the original poster wrote. Am I missing any point?
Thanks
Ha Huy Thanh
> Mike Russell -www.curvemeister.com
If only the (almost) two-quadrant pocket calculator (atan)
should be available, then it is possible to emulate atan2,
like here on p.8:
http://www.fho-emden.de/~hoffmann/euler26112001.pdf
A singularity happens only for abs(x)+abs(y)<eps.
This is the same situation as for atan2(y,x).
Best regards --Gernot Hoffmann
On Jul 4, 10:56 am, Gernot Hoffmann <hoffm...@fho-emden.de> wrote:
> HA HUY THANHschrieb:> Hi guys,
Yes and no.
If we have to find the angle a for z=tan(a), then the only
solution is a=atan(z). This function is defined for
a=-90°+eps to a=+90°-eps.
It's the inverse function of z=tan(a), but without the
ambiguity of a geometrically inverted tangent function.
The ugly truth is, that using a=atan(z) for z=y/x
delivers in 50% of all cases wrong values.
Wrong by projecting the solution into the range as
explained above.
And the calculation fails for x near to zero.
It's an entirely different task to find the angle for the
coordinate pair y,x (or n,d in my doc, numerator and
denominator).
Intel <=286 didn't have atan2 in the floating point unit
or coprocessor. One had to emulate this function.
Since Intel 386, atan2 is established in the FPU.
In fact, atan2 is the solution for a geometrical task,
solved without an explicit division y/x, given the
pair x,y.
About CIELab:
http://www.fho-emden.de/~hoffmann/cielab03022003.pdf
Best regards --Gernot Hoffmann
My apologies, if this post should appear more than once.
Yes, hue=atan2(b*,a*) is a generic interpretation,
following common CIELab diagrams.
Then, the CIELab hue requires an offset by degrees
so, that Red is at hue=0°, for a comparison with
(ugly) HSB or (much better) HLS.
Best regards --Gernot Hoffmann
> The "saturation" correlate for both CIELAB and CIELUV is called Chroma,
> and is computed in a very similar fashion.
"chroma" equals saturation in CIELUV, because there is a "chroma"ticity
diagram (u'v') in which the distance in hues is always linear, there is
NO associated "chroma"ticity diagram for CIELAB, there is no (a',b')
The term does have a long history of being misused and abused but the proper
definition is given above.
Danny
"Dale Kelly" <THIS_IS_A...@vedantasite.org> wrote in message
news:468c392d$1...@newsgate.x-privat.org...