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

Function TweakMouthPosition

jni/stasm/eyedet.cpp:646–667  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

644}
645
646static void TweakMouthPosition(
647 vec_Rect& mouths, // io
648 const vec_Rect& leyes, // in
649 const vec_Rect& reyes, // in
650 const int ileft_best, // in
651 const int iright_best, // in
652 const int imouth_best, // in
653 const DetectorParameter& detpar) // in
654
655{
656 mouths[imouth_best].y += // move mouth up to counteract OpenCV mouth bias
657 MouthVerticalShift(ileft_best, iright_best, imouth_best,
658 leyes, reyes, mouths);
659
660 // If face pose is strong three-quarter, move mouth
661 // out to counteract OpenCV mouth detector bias.
662
663 if (detpar.eyaw == EYAW_45)
664 mouths[imouth_best].x -= cvRound(.06 * detpar.width);
665 else if (detpar.eyaw == EYAW45)
666 mouths[imouth_best].x += cvRound(.06 * detpar.width);
667}
668
669static void RectToImageFrame(
670 double& x, // out: center of feature

Callers 1

DetectEyesAndMouthFunction · 0.85

Calls 1

MouthVerticalShiftFunction · 0.85

Tested by

no test coverage detected