OpenCV detectin skin colour invariant with illumination changes 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&lt;38)&amp;&amp;(h&gt;6)&amp;&amp;(s&gt;0.23)&amp;&amp;(s&lt;0.68)){
    // skin color
}
else if ((r&gt;95) &amp;&amp; (g&gt;40) &amp;&amp; (b&gt;20) &amp;&amp; 
         ((maximum(r,g,b)-minimum(r,g,b))&gt;15) &amp;&amp; 
         (abs(r-g)&gt;15)&amp;&amp;(r&gt;g)&amp;&amp;(r&gt;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.)
In my experience best method for this is converting it to Lab color space.
L represents the light, and a and b are light independent.
OpenCV supports Lab color scale conversion.