| 558 | // model), faces are not flipped. |
| 559 | |
| 560 | bool NextStartShapeAndRoi( // use face detector results to estimate start shape |
| 561 | Shape& startshape, // out: the start shape |
| 562 | Image& face_roi, // out: ROI around face, possibly rotated upright |
| 563 | DetectorParameter& detpar_roi, // out: detpar wrt to face_roi |
| 564 | DetectorParameter& detpar, // out: detpar wrt to img |
| 565 | const Image& img, // in: the image (grayscale) |
| 566 | const vec_Mod& mods, // in: a vector of models, one for each yaw range |
| 567 | // (use only estart, and meanshape) |
| 568 | FaceDetector& facedet) // io: the face detector (internal face index bumped) |
| 569 | { |
| 570 | detpar = facedet.NextFace_(); // get next face's detpar from the face det |
| 571 | |
| 572 | if (Valid(detpar.x)) // NextFace_ returned a face? |
| 573 | StartShapeAndRoi(startshape, face_roi, detpar_roi, detpar, img, mods); |
| 574 | |
| 575 | return Valid(detpar.x); |
| 576 | } |
| 577 | |
| 578 | } // namespace stasm |
no test coverage detected