Example #1
0
cv::Point2f findEyeCorner(cv::Mat region, bool left, bool left2) 
{
  cv::Mat cornerMap = eyeCornerMap(region, left, left2);

  cv::Point maxP;
  cv::minMaxLoc(cornerMap,NULL,NULL,NULL,&maxP);

  cv::Point2f maxP2;
  maxP2 = findSubpixelEyeCorner(cornerMap, maxP);

  return maxP2;
}
cv::Point2f findEyeCorner(cv::Mat region, bool left, bool left2) {
    cv::Mat cornerMap = eyeCornerMap(region, left, left2);
    
    cv::Point maxP;
    cv::minMaxLoc(cornerMap,NULL,NULL,NULL,&maxP);
    
    cv::Point2f maxP2;
    maxP2 = findSubpixelEyeCorner(cornerMap, maxP);
    // GFTT
    //  std::vector<cv::Point2f> corners;
    //  cv::goodFeaturesToTrack(region, corners, 500, 0.005, 20);
    //  for (int i = 0; i < corners.size(); ++i) {
    //    cv::circle(region, corners[i], 2, 200);
    //  }
    //  imshow("Corners",region);
    
    return maxP2;
}