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

Function stasm_force_points_into_image

jni/stasm/stasm_lib.cpp:294–304  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

292}
293
294void stasm_force_points_into_image( // force landmarks into image boundary
295 float* landmarks, // io
296 int ncols, // in
297 int nrows) // in
298{
299 for (int i = 0; i < stasm_NLANDMARKS; i++)
300 {
301 landmarks[i * 2] = Clamp(landmarks[i * 2], 0.0f, float(ncols-1));
302 landmarks[i * 2 + 1] = Clamp(landmarks[i * 2 + 1], 0.0f, float(nrows-1));
303 }
304}
305
306void stasm_convert_shape( // convert stasm_NLANDMARKS points to given number of points
307 float* landmarks, // io: return all points zero if can't do conversion

Callers 1

getFaceFeaturePointsFunction · 0.85

Calls 1

ClampFunction · 0.85

Tested by

no test coverage detected