| 293 | } |
| 294 | |
| 295 | static void DetectAllMouths( |
| 296 | vec_Rect& mouths, // out: a vector of detected mouths |
| 297 | const Image& img, // in |
| 298 | const Rect& facerect, // in: the detected face rectangle |
| 299 | const Rect& mouth_searchrect) // in |
| 300 | { |
| 301 | CV_Assert(!mouth_det_g.empty()); // detector initialized? |
| 302 | |
| 303 | static const double MOUTH_SCALE_FACTOR = 1.2; // less false pos with 1.2 than 1.1 |
| 304 | static const int MOUTH_MIN_NEIGHBORS = 5; // less false pos with 5 than 3 |
| 305 | static const int MOUTH_DETECTOR_FLAGS = 0; |
| 306 | |
| 307 | mouths = |
| 308 | Detect(img, mouth_det_g, &mouth_searchrect, |
| 309 | MOUTH_SCALE_FACTOR, MOUTH_MIN_NEIGHBORS, MOUTH_DETECTOR_FLAGS, |
| 310 | facerect.width / 10); |
| 311 | } |
| 312 | |
| 313 | // Return the region of the face which the _center_ of an eye must be for |
| 314 | // the eye to be considered valid. This is a subset of the region we |
no test coverage detected