pupil Detection and cvHoughCircles?

牧云@^-^@ 提交于 2020-01-05 13:43:34

问题


I'm trying to improve my pupil detection (I'm using Javacv). At the moment, I have this method below where I draw rectangle around the found pupil. I want to try to have something like a circle across the iris and a dot on the pupil to make it more accurate. Maybe by finding the iris using (hough circle) -> then find the largest blob within the iris. How do I go about that?

private void drawPupilRect(Graphics2D g2, CvRect eye) 
  // draw outline rectangle around the pupil+iris
  {
    CvRect pupil = pupilAvgRect.get();
    if (pupil == null)
      return;

    pupil.x(pupil.x() + eye.x());     // convert pupil to screen coords
    pupil.y(pupil.y() + eye.y());

    g2.setPaint(Color.YELLOW);
    g2.setStroke(new BasicStroke(4));
    g2.drawRect(pupil.x(), pupil.y(), pupil.width(), pupil.height());

  }  // end of drawPupilRect()

来源:https://stackoverflow.com/questions/23086772/pupil-detection-and-cvhoughcircles

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!