based on this article skin could be approximatly detected using hsv color space and taking hue range between 6 and 38.
i tried to use some combination of cvThreshold, in particular i thought this could be the right way:
cvThreshold(planeH, planeH, 38, UCHAR_MAX, CV_THRESH_TRUNC);
cvThreshold(planeH, planeH, 6, UCHAR_MAX, CV_THRESH_BINARY_INV);
but it does not work.
some help?
I believe the function you are really after is the cvInRange function. This function allows you to specify multiple intervals simultaneously.
For example,
Where
loS, loV, hiS, hiVare the lower and upper bounds of the S and V channels respectively.Here is another one of my answers using
inRange. If you can use the C++ interface, I would recommend that over the C interface as it has more features and is the actively maintained side of OpenCV going forward.