Convert RGB to HSV

Randall Reetz randall at randallreetz.com
Sun Jul 5 16:29:09 EDT 2009


The reason it matters to me has nothing to do with printing.  I am writing AI and part of this needs to learn how to recognize objects (semantically) from photos and video.  The starter functions i am handing to this self learning pattern engine are ways of converting bitmaps into vector objects.  To swim the math of a pixel grid and pull objects out involves knowing where a region of color is person and where it ain't.  That means knowing that a darker part of an arm is still the arm.  That means knowing the difference between hue delta and brightness delta.  Of course this gets harry when the color of the lighting varies accross an image.  But i can parse for and adjust for that.  RGB vals don't in them selves carry the data my object parser needs to determine where an arm ends and where it doesnt.  Actually, i dont need seporate S and V values... just Hue as differenciated from Brightness.

-----Original Message-----
From: "Richmond Mathewson" <richmondmathewson at gmail.com>
To: "How to use Revolution" <use-revolution at lists.runrev.com>
Sent: 7/5/2009 12:33 PM
Subject: Re: Convert RGB to HSV

The Wikipedia article I referenced in an earlier posting in this thread
is really quite comprehensive, including 3-d diagrams of how this
is conceptualised.

I generally find the algorithms on Wikipedia are very useful in
this sort of case, as, am not going to get out my slide-rule and
work out the whole jingbang for myself - this life being too short.

Frankly, as a simple type of chap, who only prints out coloured
stuff rarely, I am perfectly happy with RGB.

I just got piqued when somebody esle was writing about HSV (err, HSB ???)
and so on, and thought "I wonder if I can do that?" as, honestly, had a very
unstimulating few days (went to a funeral, helped in Bulgaria's 
parliamentary
elections . . . need I say more) and felt a need to stretch the mind a spot


More information about the use-livecode mailing list