【问题标题】:Hand Detection using EmguCV使用 EmguCV 进行手部检测
【发布时间】:2015-11-06 00:56:14
【问题描述】:

我是 emguCV 的新手。我需要访问网络摄像头并检测手。然后我需要识别手的标志并根据手的标志添加一些控件。首先,我需要从网络摄像头流中检测手。我不知道如何开始这个过程。我从研究论文中得到了一些想法。我知道我需要训练图像,但找不到任何合适的过程。这个主题下有教程吗??有些教程对用户不友好且不完整。

【问题讨论】:

    标签: c# image-processing emgucv haar-classifier


    【解决方案1】:

    对于 emguCV 中的任何类型的检测,您首先需要一个名为 haarcascade 的 xml 文件,该文件用于实际检测面部/上身/手等。有关更多信息,请 google。您可以在此处获取此类用于手部检测的文件: http://www.andol.info/hci/1830.htm

    以下是检测代码示例:

    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;
    

    【讨论】:

    • 感谢您的任何帮助
    • 链接已损坏并被带到一些可疑的网站
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-09-23
    • 2012-02-28
    • 1970-01-01
    • 1970-01-01
    • 2016-08-21
    • 1970-01-01
    • 2016-04-01
    相关资源
    最近更新 更多