I am thinking of writing a small library to guess the color name (RGB value) from a predefined list of candidates.
My first attempt was based solely on the Pythagorean distance in the three-dimensional RGB color space - it was not massively successful, since most of the named color points were at the edges of the space (for example, Blue at 0, 0, 255), so for most colors in the middle of the space the named color that was closest was pretty arbitrary.
So, I think about the best approaches and came up with several candidates.
The cylindrical distance within the HSV color space, which may have similar problems with the above, however, HSV seems more significant in the human sense than RGB, which can be useful.
Any of the above, but with each specified point, the colors are weighed with an arbitrary value, which indicates the strength of its attraction to points in the surrounding space. Is there a name for such a model? I understand that this is a bit vague, but to me it seems like a pretty intuitive idea.
A Bayesian network that examines the HSV color properties and returns the most likely color name (I imagine nodes similar to, for example, P (Black | Saturation <10), P (Red | Hue = 0). However, this seems less ideal - for example The probability that a given color is red is proportional to how close its hue is to 0, and not a discrete value. Is there a way to adapt Bayesian networks to solve with probabilities that are continuous for the variable being tested?
, , - HSV RGB, , , - , , , .
, - - - , ? - ( - ), .
!
, , , , RGB HSL, , - .
script , , , RGB, HSL. , , " ", .
, ?
. , , , , . "" .
, . , :
1) , , , . , , , , . ( , , IIRC.)
2) Kohonen . , , , , , . , , -, "", "" , "-".
3) , . , , .