【问题标题】:eye coordinates in opencvopencv中的眼睛坐标
【发布时间】:2017-04-14 16:40:38
【问题描述】:

我想知道如何在opencv中获取以像素为单位的眼睛坐标(左眼和右眼)我正在使用这个tutorial

我想获取坐标并打印出来。这是获取眼睛位置的部分:

for( size_t j = 0; j < eyes.size(); j++ )
               {
                 Point center( faces[i].x + eyes[j].x + eyes[j].width*0.5, faces[i].y + eyes[j].y + eyes[j].height*0.5 );

                 int radius = cvRound( (eyes[j].width + eyes[j].height)*0.25 );
                 circle( image, center, radius, Scalar( 255, 0, 0 ), 4, 8, 0 );



               }

【问题讨论】:

    标签: c++ opencv


    【解决方案1】:

    不是直接回答您的问题,而是建议。 1)使用OpenCV检测图像上的人脸(你已经做到了) 2) 使用 dlib 检测检测到的面部上的界标 3) 以适当的指标 36-41 为左眼,42-47 为右眼,并使用它们的坐标计算眼睛坐标

    【讨论】:

    • 谢谢你的回答,但我认为这比我不需要使用 dlib 或任何东西要简单得多,因为眼睛检测器已经在我处理的任何图像中围绕眼睛绘制圆圈,并且给我想要的结果
    猜你喜欢
    • 2013-03-23
    • 2012-03-14
    • 2012-08-27
    • 2018-10-04
    • 2020-08-15
    • 2011-02-16
    • 1970-01-01
    • 2011-08-05
    • 1970-01-01
    相关资源
    最近更新 更多