| 644 | } |
| 645 | |
| 646 | static 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 | |
| 669 | static void RectToImageFrame( |
| 670 | double& x, // out: center of feature |
no test coverage detected