MCPcopy Create free account
hub / github.com/KAlO2/PerfectShow / DrawEyes

Function DrawEyes

jni/stasm/eyedet.cpp:735–760  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

733}
734
735static void DrawEyes(
736 CImage& img, // io
737 const vec_Rect& leyes, // in
738 const vec_Rect& reyes, // in
739 int ileft_best, // in
740 int iright_best, // in
741 const Rect& facerect, // in
742 EYAW eyaw) // in
743{
744 // rectangles showing search regions
745 const int linewidth = facerect.width > 700? 3: facerect.width > 300? 2: 1;
746 const Rect left_rect(EyeSearchRect(eyaw, facerect, false));
747 const Rect right_rect(EyeSearchRect(eyaw, facerect, true));
748 const Rect eye_inner_rect(EyeInnerRect(eyaw, facerect));
749 DrawRect(img, facerect, Dark(C_YELLOW), linewidth);
750 DrawRect(img, left_rect, VeryDark(C_RED), linewidth);
751 DrawRect(img, right_rect, VeryDark(C_GREEN), linewidth);
752 DrawRect(img, eye_inner_rect, Dark(C_YELLOW), linewidth);
753 int i;
754 for (i = 0; i < NSIZE(leyes); i++)
755 DrawFeat(img,
756 i, leyes, C_RED, linewidth, i==ileft_best);
757 for (i = 0; i < NSIZE(reyes); i++)
758 DrawFeat(img,
759 i, reyes, C_RED /*C_GREEN*/, linewidth, i==iright_best);
760}
761
762static void DrawMouths(
763 CImage& img, // io

Callers 1

DetectEyesAndMouthFunction · 0.85

Calls 7

EyeSearchRectFunction · 0.85
EyeInnerRectFunction · 0.85
DrawRectFunction · 0.85
DarkFunction · 0.85
VeryDarkFunction · 0.85
NSIZEFunction · 0.85
DrawFeatFunction · 0.85

Tested by

no test coverage detected