How to recognize hand on android devices
Anyone can tell me how to recognize hand exactly in Android System ,better use algorithm to realize.
I write the follow code according to handDetection.cpp,but the result is negative .What's wrong?By the way do you know which functions in opencv-android library can replace the "cvAnd" and "cvOr" functions?
the code :
Scalar hsv_min = new Scalar(0,30,80,0);
Scalar hsv_max = new Scalar(0,30,80,0);
Imgproc.cvtColor(src, hsv_image, Imgproc.COLOR_BGR2HSV);
Core.inRange(hsv_image, hsv_min, hsv_max, hsv_mask);
Utils.matToBitmap(hsv_mask, bmp);
image.setImageBitmap(bmp);
You should first check the color of the hand pixels with given lighting conditions and hsv limits should be set accordingly.
Here is the OpenCV java documentation: http://docs.opencv.org/java/ . The Core class contains bitwise_and and bitwise_or.
I used convexHull and convexityDefects function to find hand convex hull and the convexity defects of it in these day,but i didn't know what should to do for distinguish them yet? By the way,if i want to read the number that the gesture showed,how to realize? I searched in the internet much ,but nothing helpful. Can you help me ? I am a fresher, really appreciate !
There are convexity defects on an open palm. If you find a skin colored objects with convexity defects it can be a hand. For closed palm you can try another Haar classifier: http://www.andol.info/hci/2059.htm. Moreover a similar question appeared here: http://stackoverflow.com/questions/9168785/hand-detection-using-opencv .
They are on youtube, so you could watch if your computer is properly set. You may try to watch it from here: http://www.youtube.com/user/rics5. I have not tried distance calculation. I would use a known object with distinctive colour and I would count the pixels of the object colour (with zeroth moment) on the image from some measured distance during the learning phase. Later I would count the pixels again and interpolate from the previously learned distance table. I do not think it is a really reliable method.
Asked: 2012-12-22 01:24:49 -0600
Seen: 3,891 times
Last updated: Dec 22 '12
Hi Dali I am working on a gesture recognition app for android for touch-free interaction with the phone. I tried to use haar classifier to detect the hand but it gives too many false positives. Is it possible for you to share your code on skin skin color detection? It will be of great help to me!
Convert the source image to the HSV color space, and then use the Core.inRange function to capture a specific color, I set the skin color range from (0,30,20,0) to (40,255,255,0), (I'm not sure whether it is appropriate) the final effect is not ideal, too. Maybe need to do some more complex processing