Hand detection by skin color matching
I am trying to detect a hand after face detection. I have managed to detect the face using the following code:
img = cv2.imread("test.jpg",1)
img_hsv = cv2.cvtColor(img,cv2.COLOR_BGR2HSV)
hc1 = cv2.CascadeClassifier("/home/max/haarcascade_frontalface_alt.xml")
faces1 = hc1.detectMultiScale(img)
for (x,y,w,h) in faces1:
cv2.rectangle(img, (x,y), (x+w,y+h), 255)
crop_img = img[y+2:y+w, x+2:x+h]
I also have an approximate bounding box for the hand (based on depth data). I would now like to detect the hand in that bounding box based on skin color matching ( skin color obtained from face).
What would be the best way to do this?