4

I am trying to detect hand using OpenCV and C++.

I am able to find the contour of the hand (Positive image) with person hand present in the image. Basically I am finding largest contour and consider it as hand contour. Lets say in the given image the hand is not present then I will take any contour and consider it as the hand.

So I started thinking can I use the haar cascade to determine the rectangle of the hand and focus on that area, but I tried searching online for the xml but I think it is not available like face detection.

So given a image how can I determine from the set of contour which one is of hand?

frogatto
  • 28,539
  • 11
  • 83
  • 129
Rahul galgali
  • 775
  • 2
  • 10
  • 26
  • If you want a haar cascade, you will need to train it yourself. Get many positive and negative images (typically 10,000 images of hands, and 10,000,000 negative images, human body, typical background, walls) and train it – DanielHsH Aug 28 '14 at 06:46
  • 1
    you should try some much simpler things first, like binarizing on skin color before findContours. also, you could keep the humoments of some known hand-shapes around, and apply matchShapes() on your filtered contour – berak Aug 28 '14 at 06:51
  • 1
    And hand database http://bosphorus.ee.boun.edu.tr/hand/Home.aspx – Andrey Smorodov Aug 28 '14 at 06:58
  • @AndreySmorodov andol.info/hci/1830.htm this link was broken. – shaik moeed Sep 25 '19 at 11:05

1 Answers1

7

You can find the best trained cascade xml file from the GitHub...

Here it is...

https://github.com/Aravindlivewire/Opencv/blob/master/haarcascade/aGest.xml

Gopal00005
  • 2,061
  • 4
  • 35
  • 54
  • 1
    please dont force for VotUp – Hardik Visa Mar 05 '15 at 08:59
  • aGest.xml seems to work really well with a closed fist, is there something with similar accuracy for an open hand? One that won't identify as an closed fist? – Steven Walton Apr 29 '15 at 22:39
  • Dear @StevenWalton I am already searching that type of cascade xml file. :) – Gopal00005 Apr 30 '15 at 05:52
  • 2
    If it helps, this is the best I found. It has a tendency to miss and sometimes recognize the fist. I don't have access currently to a computer where I could easily train my own cascade. Might bite the bullet though. https://code.google.com/p/wpi-rbe595-2011-machineshop/source/browse/trunk/haar/1256617233-0-cascade-hand-improved.xml?r=7 – Steven Walton Apr 30 '15 at 05:55