【问题标题】:can we detect eye without face detection in open cv我们可以在opencv中检测没有人脸检测的眼睛吗
【发布时间】:2013-12-30 09:31:47
【问题描述】:

我正在开发 android 中的 opencv。谁能告诉我可以在没有人脸检测的情况下检测眼睛吗?我的代码是:

    Rect e = eyesArray[i];
        e.x = area.x + e.x;
        e.y = area.y + e.y;
        Rect eye_only_rectangle = new Rect((int)e.tl().x,(int)( e.tl().y + e.height*0.4),(int)e.width,(int)(e.height*0.6));
        mROI = mGray.submat(eye_only_rectangle);
        Mat vyrez = mRgba.submat(eye_only_rectangle);
        Core.MinMaxLocResult mmG = Core.minMaxLoc(mROI);

        Core.circle(vyrez, mmG.minLoc,2, new Scalar(255, 255, 255, 255),2);
        iris.x = mmG.minLoc.x + eye_only_rectangle.x;
        iris.y = mmG.minLoc.y + eye_only_rectangle.y;
        eye_template = new Rect((int)iris.x-size/2,(int)iris.y-size/2 ,size,size);
        Core.rectangle(mRgba,eye_template.tl(),eye_template.br(),new Scalar(255, 0, 0, 255), 2);
        template = (mGray.submat(eye_template)).clone();
        return template;
    }
     return template;

【问题讨论】:

    标签: android opencv eye-detection


    【解决方案1】:

    您可以尝试使用带有“眼睛”的 xml 的 haar 级联分类器: https://github.com/Itseez/opencv/tree/master/data/haarcascades

    如果您也愿意考虑其他软件包,可以尝试 STASM 或 flandmark 检测器。

    【讨论】:

    • 我没有发现带有 xml 的 haar 级联分类器。如果你分享那个 xml 好吗?
    • 我添加了一个可以下载 xml 的链接。
    • 我们可以为眼球做haar cascade吗?
    • 什么意思?我链接到 haar 级联的眼睛。
    猜你喜欢
    • 2015-04-23
    • 2013-12-26
    • 2014-06-27
    • 2012-08-27
    • 2012-10-19
    • 2016-10-08
    • 2018-10-04
    • 2023-03-25
    • 2011-02-16
    相关资源
    最近更新 更多