| 93 | // wrapper around ConformShapeToMod above |
| 94 | |
| 95 | const Shape ShapeMod::ConformShapeToMod_( // return shape conformed to shape model |
| 96 | VEC& b, // io: eigvec weights from previous iters of ASM |
| 97 | const Shape& shape, // in: shape suggested by the descriptor models |
| 98 | int ilev) // in: pyramid level (0 is full size) |
| 99 | const |
| 100 | { |
| 101 | // static for efficiency (init once) |
| 102 | static const VEC pointweights(PointWeights()); |
| 103 | |
| 104 | Shape newshape = ConformShapeToMod(b, |
| 105 | shape, meanshape_ * GetPyrScale(ilev), |
| 106 | eigvals_ / pow(SQ(PYR_RATIO), ilev), eigvecs_, eigvecsi_, |
| 107 | bmax_, pointweights); |
| 108 | |
| 109 | JitterPointsAt00InPlace(newshape); // jitter points at 0,0 if any |
| 110 | |
| 111 | if (ilev >= SHAPEHACK_MINPYRLEV) // allow shape hacks only at coarse pyr levs |
| 112 | ApplyShapeModelHacks(newshape, hackbits_); |
| 113 | |
| 114 | return newshape; |
| 115 | } |
| 116 | |
| 117 | // Like ConformShapeToMod_ but with pinned landmarks. Conform the given shape to |
| 118 | // the ASM model, but keeping points in pinnedshape at their original position. |
no test coverage detected