| 569 | } |
| 570 | |
| 571 | static bool MouthOnNose( // true if mouth is probably a mouth false detect on the nostrils |
| 572 | const Rect& mouth, // in: left eyes found by eye detector |
| 573 | const Rect& facerect, // in: |
| 574 | const Rect& mouth_searchrect) // in: |
| 575 | { |
| 576 | return mouth.x < // near top of search rect? |
| 577 | mouth_searchrect.x + .20 * mouth_searchrect.height && |
| 578 | double(mouth.width) / facerect.width < .28; |
| 579 | } |
| 580 | |
| 581 | static void SelectMouth( // return index of the best mouth in the list of mouths |
| 582 | int& imouth_best, // out: index into mouths, -1 if none |