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

Function Shape77As20

jni/stasm/convshape.cpp:50–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50static Shape Shape77As20( // return an approximated BioID 20 point shape
51 const Shape& shape) // in: Stasm 77 point shape
52{
53 CV_Assert(shape.rows == 77);
54
55 Shape newshape(20, 2);
56
57 CopyPoint(newshape, shape, 0, 38);
58 CopyPoint(newshape, shape, 1, 39);
59 CopyPoint(newshape, shape, 2, 59);
60 CopyPoint(newshape, shape, 3, 65);
61 CopyPoint(newshape, shape, 4, 18);
62 CopyPoint(newshape, shape, 5, 21);
63 CopyPoint(newshape, shape, 6, 22);
64 CopyPoint(newshape, shape, 7, 25);
65 CopyPoint(newshape, shape, 8, 0);
66 CopyPoint(newshape, shape, 9, 34);
67 CopyPoint(newshape, shape, 10, 30);
68 CopyPoint(newshape, shape, 11, 40);
69 CopyPoint(newshape, shape, 12, 44);
70 CopyPoint(newshape, shape, 13, 12);
71 CopyPoint(newshape, shape, 14, 52);
72 CopyPoint(newshape, shape, 15, 51);
73 CopyPoint(newshape, shape, 16, 53);
74 CopyPoint(newshape, shape, 17, 62);
75 CopyPoint(newshape, shape, 18, 74);
76 CopyPoint(newshape, shape, 19, 6);
77
78#if MOD_A1 || MOD_A || MOD_A_EMU
79 const double eyemouth = EyeMouthDist(shape);
80 newshape(15, IY) += MAX(1, .02 * eyemouth); // move down, into nostril
81 newshape(16, IY) += MAX(1, .02 * eyemouth); // move down, into nostril
82#endif
83
84 return newshape;
85}
86
87static Shape Shape77As22( // return an approximated AR 22 point shape
88 const Shape& shape) // in: Stasm 77 point shape

Callers 2

Shape77As22Function · 0.85
ConvertShapeFunction · 0.85

Calls 2

EyeMouthDistFunction · 0.85
CopyPointFunction · 0.70

Tested by

no test coverage detected