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

Method ConformShapeToMod_Pinned_

jni/stasm/shapemod.cpp:120–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118// the ASM model, but keeping points in pinnedshape at their original position.
119
120const 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
125const
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

Callers

nothing calls this directly

Calls 1

ForcePinnedPointsFunction · 0.85

Tested by

no test coverage detected