Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Extract chromaticness/relative chroma from HSV

I am trying to figure out how to get chromaticness out of HSV (alternative RGB). Problem is; I barely know what chromaticness is. According to the small information available on the net it is usually refered to "relative chroma" which is a combination of hue and saturation.

From http://www.huevaluechroma.com/012.php:

Another term for the concept of chroma relative to an assumed maximum is chromaticness from the Swedish NCS system

I do have a the RGB which I have converted to HSV in PHP. I hope there is anyone out there who can provide their expertise in this question because there seems to be very limited information documented. I need it to validate NCS-codes.

Chromaticness calculation this far:

   //$hsv is array(h, s, v), maximum considered to be 10000        
   $chroma = $hsv[1] * $hsv[2];
   $chromaticness = $chroma / 10000;

For instance, the color S 2065-B (#0073B0) gives me chromaticness 69% using the calculation above when it should be 65%. Also, the color S 0580-Y (#FECB00) gives me 99% when it should be 80%?

The HSV in these examples I am getting are:

#0073B0 { 'H' => 200.79545454545, 'S' => 100, 'V' => 69.019607843137 }

#FECB00 { 'H' => 47.952755905512, 'S' => 100, 'V' => 99.607843137255 }

This solution is welcome in any programming language, however I am coding in PHP so it will probably be converted to that.

like image 578
Undrium Avatar asked Apr 10 '14 08:04

Undrium


People also ask

How do I track my HSV value?

To find the HSV values of a color, we can use color space conversion from BGR to HSV. First we define the color value in BGR format as numpy. ndarray and then convert it to HSV space. We can also find the lower and upper limits of HSV value as [H-10, 100, 100] and [H+10, 255, 255] respectively.

What is the difference between HSL and HSV?

The difference between HSL and HSV is that a color with maximum lightness in HSL is pure white, but a color with maximum value/brightness in HSV is analogous to shining a white light on a colored object (e.g. shining a bright white light on a red object causes the object to still appear red, just brighter and more ...

What is the difference between RGB and HSV?

Unlike the RGB color model, which is hardware-oriented, the HSV model is user-oriented, based on the more intuitive appeal of combining hue, saturation, and value elements to create a color.

What does HSV stand for color?

HSV Color Scale: The HSV (which stands for Hue Saturation Value) scale provides a numerical readout of your image that corresponds to the color names contained therein. Hue is measured in degrees from 0 to 360. For instance, cyan falls between 181–240 degrees, and magenta falls between 301–360 degrees.


1 Answers

Chroma is the third attribute of the Munsell system beyond colour-hue and lightness/brightness.

Chroma in general defines colorfulness of the hue in question: i.e. the attribute of color that indicates the degree of departure of the color from the gray of the same lightness. From here Color Space and Its Divisions by Rolf G. Kuehni (amply available at google books)

Chroma and saturation are identical for two colors having the same hue and lightness. Saturation remains constant regardless of brightness or lightness. Chroma, on the other hand, increases as lightness increases.

The coded formulas for Chroma are given here

Until you consider color-gamuts Chroma remains an open-ended quantity - ranging as it does from 0 to infinity.

NCS chromaticness is Chroma specified as a percentage - where 100% corresponds to some finite upper limit, see ISSN-03912051. You will need to chose that finite value to get a good working dynamic range in your computational system.

Trust that helps.

like image 89
GavinBrelstaff Avatar answered Sep 28 '22 01:09

GavinBrelstaff