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

Function EstartEyes

jni/stasm/startshape.cpp:306–330  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

304}
305
306static Shape EstartEyes(
307 const DetectorParameter& detpar_roi, // in: detpar wrt the ROI
308 const Image& face_roi, // in
309 const Shape& meanshape) // in
310{
311 Shape startshape;
312 Shape meanshape1(meanshape);
313 if (Valid(detpar_roi.lex) && Valid(detpar_roi.rex)) // both eyes available?
314 {
315 FlipIfLeftFacing(meanshape1, detpar_roi.eyaw, face_roi.cols);
316 // TODO Tune the following code, what approach is best?
317 if (detpar_roi.eyaw == EYAW00)
318 startshape = AlignMeanShapeToBothEyesEstMouth(detpar_roi, meanshape1);
319 else
320 startshape = AlignMeanShapeToBothEyesNoMouth(detpar_roi, meanshape1);
321 FlipIfLeftFacing(startshape, detpar_roi.eyaw, face_roi.cols);
322 }
323 else // at least one eye is missing, use the face det rectangle
324 {
325 startshape =
326 AlignMeanShapeToFaceDet(detpar_roi, meanshape1,
327 FACERECT_SCALE_WHEN_NO_EYES, face_roi);
328 }
329 return startshape;
330}
331
332static Shape EstartEyeMouth(
333 const DetectorParameter& detpar_roi, // in: detpar wrt the ROI

Callers 1

StartShapeFromDetParFunction · 0.85

Calls 5

ValidFunction · 0.85
FlipIfLeftFacingFunction · 0.85
AlignMeanShapeToFaceDetFunction · 0.85

Tested by

no test coverage detected