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

Function ShapeToLandmarks

jni/stasm/stasm_lib.cpp:30–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28}
29
30static void ShapeToLandmarks( // convert Shape to landmarks (float *)
31 float* landmarks, // out
32 const Shape& shape) // in
33{
34 CV_Assert(shape.rows <= stasm_NLANDMARKS);
35 int i;
36 for (i = 0; i < MIN(shape.rows, stasm_NLANDMARKS); i++)
37 {
38 landmarks[i * 2] = float(shape(i, IX));
39 landmarks[i * 2 + 1] = float(shape(i, IY));
40 }
41 // set remaining unused landmarks if any to 0,0
42 for (; i < stasm_NLANDMARKS; i++)
43 {
44 landmarks[i * 2] = 0;
45 landmarks[i * 2 + 1] = 0;
46 }
47}
48
49static const Shape LandmarksAsShape( // return a Shape
50 const float* landmarks) // in

Callers 3

stasm_search_auto_extFunction · 0.85
stasm_search_pinnedFunction · 0.85
stasm_convert_shapeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected