Google Answers Logo
View Question
 
Q: RGB to HSV ( Answered 4 out of 5 stars,   0 Comments )
Question  
Subject: RGB to HSV
Category: Computers > Graphics
Asked by: eksolutions-ga
List Price: $2.00
Posted: 24 Sep 2002 11:42 PDT
Expires: 24 Oct 2002 11:42 PDT
Question ID: 68501
Convert the following RGB triplets to HSV:
(0.2, 0.3, 0.4), (0.2, 0.4, 0.6), (0.6, 0.1, 0.6), (0.2, 0.4, 0.4)
Answer  
Subject: Re: RGB to HSV
Answered By: omnivorous-ga on 24 Sep 2002 13:07 PDT
Rated:4 out of 5 stars
 
There are a number of applets that convert color types on the
Internet.  This "Color Space Conversion Applet" at Rochester Institute
of Technology's site handles RGB, HSV, CIE and YIQ:
http://www.cs.rit.edu/~ncs/color/a_spaces.html

You'll need to convert the decimal RGB values to a 0-245 (not the
standard 0-255 scale for RGB) scale but here's what you get:

(0.2,0.3,0.4) = (0.58,0.50,0.38)
(0.2,0.4,0.6) = (0.58,0.66,0.57)
(0.6, 0.1, 0.6) = (0.83,0.83,0.57)
(0.2, 0.4, 0.4) = (0.50,0.50,0.38)

Best regards,

Omnivorous-GA

Request for Answer Clarification by eksolutions-ga on 24 Sep 2002 14:37 PDT
Do you know how to convert RGB to HSV mathematically?

Clarification of Answer by omnivorous-ga on 24 Sep 2002 15:34 PDT
(Note that the same resources are posted on the HSV-RGB conversion
question . . .)

The most-concise definition of HSV as a function of RGB is at the
Exeter School of Engineering and Computer Science site, which notes
that "there is no simple formula" for the conversion of RGB to HSV. 
Instead, hue-saturation-   can be expressed this way, according the
the presentation, "Graphics Standards," (January, 2002):

V = max (r,g,b)
S = (max (r,g,b)) - min (r,g,b)/max (r,g,b)
H = depends on which of r,g,b is the maximum

The Association for Computing machinery RGB-HSV and HSV-RGB
conversions (written in C) are in this paper "The HSV-RGB Transform
Pair" (undated):
http://www.acm.org/jgt/papers/SmithLyons96/hsv_rgb.html


Compaq/DEC have similar routines on this color definition page written
by Stolfi (March, 1988)
http://research.compaq.com/SRC/m3sources/html/color/src/Color.i3.html


EFG Computer labs model has yet a third C code routine for going from
HSV-to-RGB or RGB-to-HSV:
http://plum.ia.polsl.gliwice.pl/~DIP/efg/Graphics/Colors/HSV.htm

Good luck!

Omnivorous-GA

Clarification of Answer by omnivorous-ga on 24 Sep 2002 15:43 PDT
EK -- The Exeter presentation that I referenced, "Graphics Standards,"
(January, 2002) is here:
http://www.dcs.ex.ac.uk/~wmilne/graphics/standards.pdf

Clarification of Answer by omnivorous-ga on 21 Oct 2002 20:04 PDT
Google and its researchers rely on ratings for a sense of how we're
performing.  Please take the time to rate your question, giving it 5*
if it met your needs!
eksolutions-ga rated this answer:4 out of 5 stars

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy