From: Owen D. <owe...@ou...> - 2006-04-07 12:02:00
|
better to use HSI - Hue, Saturation, Intensty (aka IHS or HSB - Hue, Saturation, Brightness). This colour space can be visualised as two cones sandwiched together at their bases. The apex of the bottom cone represents [I min] (black) and the apex of the top cone represents [I max] (white). The line connecting the two represents the greyscale values (I). At each point along this line, H is undefined and S is 0. When I is 0, the horizontal plane of the colour space is greatest, because this is the plane where the bases of both cones meet. Therefore, S max is greater on this plane than anyhwere else in the colour space, thus the most vibrant colours are on this plane. Conversely, as you tend towards full brightness or minimum brightness, S max is reduced, until it eventually reaches 0. This means that as colours become lighter or darker, they automatically become less saturated. Furthermore, Jon's initial gripe with S does not apply, because adjusting saturation has no impact on H or I. This is a much more intutive way of representing colour than HSV. You simply think of it as a slider for brightness, a slider for saturation and one for hue, with brightness being the only variable that alters either of the other two (namely saturation). The Java Advanced Imageing (JAI) API has a class called IHSColorSpace (http://java.sun.com/products/java-media/jai/forDevelopers/jai-apidocs/javax/media/jai/IHSColorSpace.html) which conveniently manages colour space transformation from/to RGB. btw, microsoft and CSS3 use the HSI colour space. apple use HSV. Photoshop etc. use both. Anthony, I think you made a typo on that link because it's broken ;-) owen ----- Original Message ----- From: "Antony Corfield" <an...@sm...> To: <bod...@li...> Sent: Friday, April 07, 2006 11:04 AM Subject: Re: [Bodington-developers] CSS Processing > We will be holding a 3 day seminar in HSV processing here in late June - > to register, click on the link below: > http://www.whatthefeckishetalkingabout.com/ > > On 6 Apr 2006, at 19:37, Jon Maber wrote: > >> I must bow to your superior mathologicity. >> >> Many thanks for taking on this work package, good luck..... >> >> Jon >> >> Sean Mehan wrote: >> >>> Yes, all fine Jon, BUT what about compliance with the critical and >>> well known Hausdorff's Metric Top, you know: >>> >>> Let (S,d) be a metric space, and let X be the collection of all >>> nonempty bounded closed subsets of S. Let f:S * X -> R+ be defined by >>> f(s,B) = inf _(b in B) d(s,b), and let g: X * X -> R+ be given by g >>> (A,B) = sup_(a in A) f(a,B), and let delta(A,B) = max {g(A,B),g (B,A)}. >>> You must concern yourself with (X, delta)! Your method clearly fails >>> here! Pah! >>> >>> And for anyone wanting to quibble with my counterexample, yes, I know, >>> but I couldn't write the vector cross product adequately in this crap >>> test format, so had to resort to *. >>> >>> -s >>> >>> >>> On 6 Apr 2006, at 18:59, Jon Maber wrote: >>> >>>> Nearly all user colour preference work will operate in Hue- >>>> Saturation-Value space, not Red-Green-Blue space. However, the >>>> standard Java HSV colour space (which Bodington currently uses) is >>>> not very good so I've devised a better method. (Probably reinvented >>>> but it only took a couple of days work.) The standard HSV space is >>>> cylindrical where H is the perpendicular distance from the axis to >>>> the colour point, H is the angle of that line from the red plane and >>>> V is the distance up the cylinder. All of the bottom face is black. >>>> (which means that if V=0 then the colour is black regardless of the >>>> values of H or S) However, the top face has white only at the center >>>> and has bright rainbow colours around the edge. This means that if V >>>> is non-zero, V and H are kept constant and S is varied then not only >>>> does the perceived saturation change but the brightness does too. The >>>> method used to map the cube rgb space onto the cylinder is also dodgy >>>> since for certain values of H changing S distorts the perceived hue. >>>> >>>> My method also maps to a cylinder but the top face of the cylinder is >>>> completely white. This means that V==100% always produces white no >>>> matter what the value of H or S. It also means that if H and V are >>>> kept constant and S is varied, the perceived brightness and hue keep >>>> constant. This is acheived by two rotations of the rgb cube so that >>>> the white to black vector lines up with the z axis. Then the shape is >>>> distorted so that vectors which run from the z axis to the cube >>>> surface and which lie parallel to the x,y plane are stretched >>>> uniformly to unit length. The resulting cylinder is squashed down >>>> the z axis to unit length. >>> >>> >>> >> >> >> >> ------------------------------------------------------- >> This SF.Net email is sponsored by xPML, a groundbreaking scripting >> language >> that extends applications into web and mobile media. Attend the live >> webcast >> and join the prime developer group breaking into this new coding >> territory! >> http://sel.as-us.falkag.net/sel? cmd=lnk&kid=110944&bid=241720&dat=121642 >> _______________________________________________ >> Bodington-developers mailing list >> Bod...@li... >> https://lists.sourceforge.net/lists/listinfo/bodington-developers > > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting > language > that extends applications into web and mobile media. Attend the live > webcast > and join the prime developer group breaking into this new coding > territory! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > _______________________________________________ > Bodington-developers mailing list > Bod...@li... > https://lists.sourceforge.net/lists/listinfo/bodington-developers |