I saw all the SO questions for the HSV color space range for the skin.
But I can only figure it out.
The code -
CvScalar hsv_min = cvScalar(0, 30, 60, 0);
CvScalar hsv_max = cvScalar(20, 150, 255, 0);
//range I am using is { 0,30,60,0 & 20,150,255,0 }
cvCvtColor(src, hsv_image, CV_BGR2HSV);
cvInRangeS (hsv_image, hsv_min, hsv_max, hsv_mask);
cvDilate(hsv_mask,hsv_mask,0,1);
cvErode(hsv_mask,hsv_mask,0,1);
cvSmooth( hsv_mask, hsv_mask, CV_MEDIAN);
The problem with this range ( {0,30,60,0 and 20,150,255,0} ) even detects red color and when you put your hand on a red background, it does not track your skin ...
Please help !!!