| 175 | } |
| 176 | |
| 177 | static void InitDetParEyeMouthFromShape( // fill in eye and mouth fields of detpar |
| 178 | DetectorParameter& detpar, |
| 179 | Shape& shape) |
| 180 | { |
| 181 | const Shape shape17(Shape17(shape)); |
| 182 | if (PointUsed(shape17, L17_LPupil)) |
| 183 | { |
| 184 | detpar.lex = shape17(L17_LPupil, IX); |
| 185 | detpar.ley = shape17(L17_LPupil, IY); |
| 186 | } |
| 187 | if (PointUsed(shape17, L17_RPupil)) |
| 188 | { |
| 189 | detpar.rex = shape17(L17_RPupil, IX); |
| 190 | detpar.rey = shape17(L17_RPupil, IY); |
| 191 | } |
| 192 | if (PointUsed(shape17, L17_CBotOfBotLip)) |
| 193 | { |
| 194 | detpar.mouthx = shape17(L17_CBotOfBotLip, IX); |
| 195 | detpar.mouthy = shape17(L17_CBotOfBotLip, IY); |
| 196 | } |
| 197 | } |
| 198 | |
| 199 | // We generated the startshape without using the face detector, now "back |
| 200 | // generate" the detpar (the position of this does not have to exactly |
no test coverage detected