| 118 | // the ASM model, but keeping points in pinnedshape at their original position. |
| 119 | |
| 120 | const Shape ShapeMod::ConformShapeToMod_Pinned_( |
| 121 | VEC& b, // io: eigvec weights from previous iters of ASM |
| 122 | const Shape& shape, // in: shape suggested by the descriptor models |
| 123 | int ilev, // in: pyramid level (0 is full size) |
| 124 | const Shape& pinnedshape) // in: pinned landmarks |
| 125 | const |
| 126 | { |
| 127 | static const double MAX_DIST = 0.5; |
| 128 | static const int MAX_ITERS = 50; |
| 129 | |
| 130 | Shape outshape(shape.clone()); |
| 131 | double dist = FLT_MAX; |
| 132 | for (int iter = 0; dist > MAX_DIST && iter < MAX_ITERS; iter++) |
| 133 | { |
| 134 | outshape = ConformShapeToMod_(b, outshape, ilev); |
| 135 | dist = ForcePinnedPoints(outshape, pinnedshape); |
| 136 | } |
| 137 | return outshape; |
| 138 | } |
| 139 | |
| 140 | } // namespace stasm |
nothing calls this directly
no test coverage detected