Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/string/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 在open-cv中,我们能在没有人脸检测的情况下检测眼睛吗_Android_Opencv_Eye Detection - Fatal编程技术网

Android 在open-cv中,我们能在没有人脸检测的情况下检测眼睛吗

Android 在open-cv中,我们能在没有人脸检测的情况下检测眼睛吗,android,opencv,eye-detection,Android,Opencv,Eye Detection,我正在安卓系统中开发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*

我正在安卓系统中开发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;

您可以尝试使用xml作为“眼睛”的haar级联分类器:


<>如果你也愿意考虑其他软件包,你可以试试STASM或FLANDEMAK检测器。 我没有发现haar cascade分类器使用xml进行眼睛识别。如果你能分享这个xml,请原谅。我添加了一个链接,你可以在这里下载xml。我们可以用haar cascade来制作眼球吗?你是什么意思?我链接到哈尔瀑布的眼睛。