| 124 | // return the model meanshape aligned to both eyes (mouth is not avail) |
| 125 | |
| 126 | static 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 |
no test coverage detected