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

Function AlignMeanShapeToBothEyesNoMouth

jni/stasm/startshape.cpp:126–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124// return the model meanshape aligned to both eyes (mouth is not avail)
125
126static Shape AlignMeanShapeToBothEyesNoMouth(
127 const DetectorParameter& detpar, // in
128 const Shape& meanshape) // in
129{
130 if (trace_g)
131 lprintf("AlignToBothEyesNoMouth ");
132
133 CV_Assert(NSIZE(meanshape) > 0 && PointUsed(meanshape, 0));
134 CV_Assert(Valid(detpar.lex));
135 CV_Assert(Valid(detpar.rex));
136
137 Shape meanline(2, 2), detline(2, 2); // line from eye to eye
138
139 const Shape shape17(Shape17(meanshape));
140
141 meanline(0, IX) = shape17(L17_LPupil, IX); // left eye
142 meanline(0, IY) = shape17(L17_LPupil, IY);
143 meanline(1, IX) = shape17(L17_RPupil, IX); // right eye
144 meanline(1, IY) = shape17(L17_RPupil, IY);
145
146 detline(0, IX) = detpar.lex; // left eye
147 detline(0, IY) = detpar.ley;
148 detline(1, IX) = detpar.rex; // right eye
149 detline(1, IY) = detpar.rey;
150
151 return TransformShape(meanshape, AlignmentMat(meanline, detline));
152}
153
154// return the model meanshape aligned to both eyes (mouth is not avail)
155

Callers 2

EstartEyesFunction · 0.85
EstartEyeMouthFunction · 0.85

Calls 7

lprintfFunction · 0.85
NSIZEFunction · 0.85
PointUsedFunction · 0.85
ValidFunction · 0.85
Shape17Function · 0.85
TransformShapeFunction · 0.85
AlignmentMatFunction · 0.85

Tested by

no test coverage detected