Skin detection
From the image below, I want the input (left image) to have an output (right image).
I've tried adaptive threshold, canny, skin detection, blurring, dilating and eroding, finding contours then floodfilling it, and approxPolyDP but still can't get the right output. I can not floodfill right because there are many contours. what am I doing wrong?
Here's a sample of the SkinDetection code:
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
Mat src;
int main(){
src = imread("open_1a.jpg");
if (src.empty())
return -1;
blur( src, src, Size(3,3) );
Mat hsv;
cvtColor(src, hsv, CV_BGR2HSV);
Mat bw;
//inRange(hsv, Scalar(0, 40, 60), Scalar(20, 150, 255), bw);
inRange(hsv, Scalar(0, 10, 60), Scalar(20, 150, 255), bw);
imshow("src", src);
imshow("dst", bw);
waitKey(0);
return 0;
}
here's the input and the output of the code above:
Could you post your output images ? What method are you using for skin segmentation ?
@Tina123 added the output image to the post above.