Ask Your Question
0

Hand detection by skin color matching

asked 2015-08-09 06:05:59 -0500

prinambiar gravatar image

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?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-08-09 06:24:42 -0500

There is a nice tutorial that covers that problem:

http://docs.opencv.org/doc/tutorials/...

edit flag offensive delete link more

Comments

Thank you. Is there a python version for this tutorial (or example code)

prinambiar gravatar imageprinambiar ( 2015-08-10 13:32:19 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2015-08-09 06:05:59 -0500

Seen: 5,144 times

Last updated: Aug 09 '15