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

Method ConformShapeToMod_

jni/stasm/shapemod.cpp:95–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93// wrapper around ConformShapeToMod above
94
95const 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)
99const
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.

Callers 1

LevSearch_Method · 0.80

Calls 6

PointWeightsFunction · 0.85
ConformShapeToModFunction · 0.85
GetPyrScaleFunction · 0.85
SQFunction · 0.85
JitterPointsAt00InPlaceFunction · 0.85
ApplyShapeModelHacksFunction · 0.85

Tested by

no test coverage detected