I'm new to emguCV. I need to access web camera and detect the hand.then I need to recognize the sign of the hand and add some controls according to the hand sign. first of all I need to detect hand from web camera stream. I have no idea how to start this process. I have some ideas got from research papers. I know that I need to train images but couldn't find any proper process. Are there any tutorials under this topic?? there were some tutorials which were not user friendly and complete.
Asked
Active
Viewed 2,348 times
1 Answers
1
For any kind of detection in emguCV you first need an xml file called haarcascade, which is used for the actual detection of face/upper body/hand etc. For more info, google it. You can get such a file for hand detection here: http://www.andol.info/hci/1830.htm
Here is an example of the detection code:
Bitmap Source; //your Bitmap
Image<Bgr, byte> ImageFrame = new Image<Bgr, byte>(Source); //image that stores your bitmap
Image<Gray, byte> grayFrame = ImageFrame.Convert<Gray, byte>(); //grayscale of your image
HaarCascade haar = new HaarCascade("yourhaarcascadefile.xml"); //the object used for detection
var faces = grayFrame.DetectHaarCascade(haar, 1.1, 3, HAAR_DETECTION_TYPE.DO_CANNY_PRUNING, new System.Drawing.Size(25, 25))[0]; //variable that stores detection information
foreach (var face in faces)
ImageFrame.Draw(face.rect, new Bgr(System.Drawing.Color.Green), 3); //draws a rectangle on top of your detection
return ImageFrame.toBitmap(); //returns your bitmap with detection applied;

Mat
- 1,440
- 1
- 18
- 38

Andrei Ciurea
- 42
- 9
-
Thank you for any kind of help – gihansalith Aug 14 '15 at 11:27
-
The link is broken and taking to some fishy site – Milind Thakkar Jul 19 '20 at 18:25