Progresses in training a classifier for hand gesture recognition is never an easy job, one of the difficulties that needs to overcome is the collection of sample images, both positive and negative. Collecting thousands of sample pictures for each hand gesture is a huge task that requires enormous time and energy on this. Also, inviting so many users to give hand gesture pictures seems a big challenge.
Need a quick and dirty solution?
A easy way
Inspired by cambridge’s hand gesture database, in which there are a series of pictures having very similar hand gestures, My guess is that their sample work probably used video cameras as gestures sample sources. Indeed, it is quick and and easy – suppose one second’s video could generate 25 frames that means, 400 seconds (= 6 minutes 40 seconds) could give 10,000 hand gesture pictures, and the number is still growing.
The automation tool
It is wise to take good and many samples from videos, but is not so smart if doing the sampling work one frame by one frame – this should be done automatically!!!
For this reason, a simple programme was written in couple minutes. Using several basic functions in c++ and opencv 2.4, the source code can be found here – hand gesture sampler, or in download page in http://download.andol.me/hand%20gesture%20sampler.cpp.
This little programme is able to control if taking samples when monitoring the webcam. By taking snapshots from webcam video streams, it makes taking the hand gesture samples much easier.
One Comment On “ Writing a simple hand gesture picture sampler for classifier training”