Modern pinch gesture UI
(self, img, palm, pinch_value)
| 162 | cv2.FONT_HERSHEY_SIMPLEX, 0.5, WHITE, 1) |
| 163 | |
| 164 | def draw_pinch_ui(self, img, palm, pinch_value): |
| 165 | """Modern pinch gesture UI""" |
| 166 | # Pulsing glow |
| 167 | pulse = int(20 + 10 * np.sin(self.frame_count * 0.2)) |
| 168 | self.draw_glow_effect(img, palm, 50 + pulse, NEON_PINK, 0.3) |
| 169 | |
| 170 | # Animated circles |
| 171 | for i in range(3): |
| 172 | radius = 60 + i * 20 |
| 173 | alpha = (self.frame_count + i * 40) % 360 |
| 174 | cv2.ellipse(img, palm, (radius, radius), 0, alpha, alpha + 120, NEON_PINK, 3) |
| 175 | |
| 176 | # Central indicator |
| 177 | cv2.circle(img, palm, 40, NEON_PURPLE, -1) |
| 178 | cv2.circle(img, palm, 40, NEON_PINK, 3) |
| 179 | |
| 180 | # Pinch value arc |
| 181 | arc_radius = 80 |
| 182 | arc_angle = int(pinch_value * 3.6) |
| 183 | cv2.ellipse(img, palm, (arc_radius, arc_radius), -90, 0, arc_angle, ACCENT_GREEN, 5) |
| 184 | |
| 185 | # Value display |
| 186 | cv2.putText(img, f'{pinch_value}%', (palm[0] - 30, palm[1] + 10), |
| 187 | cv2.FONT_HERSHEY_DUPLEX, 1, WHITE, 2) |
| 188 | cv2.putText(img, 'PINCH', (palm[0] - 35, palm[1] - 100), |
| 189 | cv2.FONT_HERSHEY_SIMPLEX, 0.8, NEON_PINK, 2) |
| 190 | |
| 191 | def draw_fist_ui(self, img, palm): |
| 192 | """Modern fist gesture UI""" |