| 711 | } |
| 712 | |
| 713 | static void DrawFeat( // draw eye (or mouth) at index i in the eyes vec |
| 714 | CImage& img, // io |
| 715 | int i, // in |
| 716 | const vec_Rect& eyes, // in |
| 717 | unsigned col, // in |
| 718 | int linewidth, // in |
| 719 | bool best) // in: true if this is the best eye |
| 720 | { |
| 721 | double x, y; |
| 722 | RectToImageFrame(x, y, eyes[i]); |
| 723 | Rect rect; |
| 724 | rect.x = cvRound(x - eyes[i].width / 2); |
| 725 | rect.y = cvRound(y - eyes[i].height / 2); |
| 726 | rect.width = eyes[i].width; |
| 727 | rect.height = eyes[i].height; |
| 728 | if (!best) |
| 729 | col = Dark(col); |
| 730 | DrawRect(img, rect, col, linewidth); |
| 731 | cv::circle(img, cv::Point(cvRound(x), cvRound(y)), |
| 732 | (best? 2: 1) * linewidth, ToCvColor(col), linewidth); |
| 733 | } |
| 734 | |
| 735 | static void DrawEyes( |
| 736 | CImage& img, // io |
no test coverage detected