96 for index, landmark
in enumerate(landmarks.landmark):
97 landmark_x = min(int(landmark.x * iw), iw - 1)
98 landmark_y = min(int(landmark.y * ih), ih - 1)
99 landmark_z = landmark.z
100 lp.append([landmark.visibility, (landmark_x, landmark_y)])
102 if landmark.visibility >= visibility_th:
103 helper.drawCircle(landmark_x, landmark_y, 5, col,
True)
104 helper.drawText(landmark_x - 7, landmark_y - 7,
"z:" + str(round(landmark_z, 3)), 0xffff8080)
107 draw_line(helper, lp[1], lp[2], visibility_th, col)
108 draw_line(helper, lp[2], lp[3], visibility_th, col)
109 draw_line(helper, lp[4], lp[5], visibility_th, col)
110 draw_line(helper, lp[5], lp[6], visibility_th, col)
111 draw_line(helper, lp[9], lp[10], visibility_th, col)
112 draw_line(helper, lp[11], lp[12], visibility_th, col)
113 draw_line(helper, lp[11], lp[13], visibility_th, col)
114 draw_line(helper, lp[13], lp[15], visibility_th, col)
115 draw_line(helper, lp[12], lp[14], visibility_th, col)
116 draw_line(helper, lp[14], lp[16], visibility_th, col)
117 draw_line(helper, lp[15], lp[17], visibility_th, col)
118 draw_line(helper, lp[17], lp[19], visibility_th, col)
119 draw_line(helper, lp[19], lp[21], visibility_th, col)
120 draw_line(helper, lp[21], lp[15], visibility_th, col)
121 draw_line(helper, lp[16], lp[18], visibility_th, col)
122 draw_line(helper, lp[18], lp[20], visibility_th, col)
123 draw_line(helper, lp[20], lp[22], visibility_th, col)
124 draw_line(helper, lp[22], lp[16], visibility_th, col)
125 draw_line(helper, lp[11], lp[23], visibility_th, col)
126 draw_line(helper, lp[12], lp[24], visibility_th, col)
127 draw_line(helper, lp[23], lp[24], visibility_th, col)
130 draw_line(helper, lp[23], lp[25], visibility_th, col)
131 draw_line(helper, lp[25], lp[27], visibility_th, col)
132 draw_line(helper, lp[27], lp[29], visibility_th, col)
133 draw_line(helper, lp[29], lp[31], visibility_th, col)
134 draw_line(helper, lp[24], lp[26], visibility_th, col)
135 draw_line(helper, lp[26], lp[28], visibility_th, col)
136 draw_line(helper, lp[28], lp[30], visibility_th, col)
137 draw_line(helper, lp[30], lp[32], visibility_th, col)