I have to capture skin colour independent of illumination. I used the following criteria(using hsv and rgb) but it ain't working:
int h = get_hue(...);
int s = get_saturation(...);
int r = get_red_component(...);
int g = get_green_component(...);
int b = get_blue_component(...);
if ((h<38)&&(h>6)&&(s>0.23)&&(s<0.68)){
// skin color
}
else if ((r>95) && (g>40) && (b>20) &&
((maximum(r,g,b)-minimum(r,g,b))>15) &&
(abs(r-g)>15)&&(r>g)&&(r>b)){
// also skin color
}
It works in the morning when my skin is illuminated but by evening it does not work.
Any Help will be appreciated. Thanks in Advance. (PS -my skin ain't white.)