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

Function DrawFeat

jni/stasm/eyedet.cpp:713–733  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

711}
712
713static 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
735static void DrawEyes(
736 CImage& img, // io

Callers 2

DrawEyesFunction · 0.85
DrawMouthsFunction · 0.85

Calls 4

RectToImageFrameFunction · 0.85
DarkFunction · 0.85
DrawRectFunction · 0.85
ToCvColorFunction · 0.85

Tested by

no test coverage detected