31 float fR = inRGB[0], fG = inRGB[1], fB = inRGB[2];
32 float fH = 0.0f, fS = 0.0f, fV = 0.0f;
37 if (inRGB[2] < inRGB[1]) {
38 if (inRGB[2] < inRGB[0]) {
40 if (inRGB[0] > inRGB[1]) {
50 if (inRGB[1] < inRGB[0]) {
52 if (inRGB[2] > inRGB[0]) {
71 }
else if (fMax == inRGB[0]) {
72 fH = (fG - fB) * ANGLE_TO_UNIT;
73 }
else if (fMax == inRGB[1]) {
74 fH = (2.0f / 6.0f) + (fB - fR) * ANGLE_TO_UNIT;
76 fH = (4.0f / 6.0f) + (fR - fG) * ANGLE_TO_UNIT;
79 if (fH < 0.0f) fH += 1.0f;
80 if (fH >= 1.0f) fH -= 1.0f;
Storage< float, 3 > F32C3
Functor converts RGB ( R: 0.0f..1.0f, G: 0.0f..1.0f, B: 0.0f..1.0f) to HSV ( H: 0....
visioncpp::pixel::F32C3 operator()(visioncpp::pixel::F32C3 inRGB)