MCPcopy Create free account
hub / github.com/dkpython7/open-cv-projects- / draw_fist_ui

Method draw_fist_ui

Modern Hand Tracking AR UI/main.py:191–216  ·  view source on GitHub ↗

Modern fist gesture UI

(self, img, palm)

Source from the content-addressed store, hash-verified

189 cv2.FONT_HERSHEY_SIMPLEX, 0.8, NEON_PINK, 2)
190
191 def draw_fist_ui(self, img, palm):
192 """Modern fist gesture UI"""
193 # Rotating hexagon
194 angle_offset = self.frame_count * 3
195 overlay = img.copy()
196
197 # Multiple rotating hexagons
198 for i, radius in enumerate([100, 70, 40]):
199 color = NEON_BLUE if i == 0 else NEON_PURPLE if i == 1 else NEON_CYAN
200 points = []
201 for j in range(6):
202 angle = np.deg2rad(60 * j + angle_offset * (1 if i % 2 == 0 else -1))
203 x = int(palm[0] + radius * np.cos(angle))
204 y = int(palm[1] + radius * np.sin(angle))
205 points.append([x, y])
206 points = np.array(points, np.int32)
207 cv2.polylines(img, [points], True, color, 3)
208
209 # Central pulse
210 pulse_size = int(20 + 10 * np.sin(self.frame_count * 0.15))
211 cv2.circle(img, palm, pulse_size, NEON_CYAN, -1)
212 cv2.circle(img, palm, pulse_size + 5, NEON_BLUE, 2)
213
214 # Status text
215 cv2.putText(img, 'LOCKED', (palm[0] - 50, palm[1] - 120),
216 cv2.FONT_HERSHEY_DUPLEX, 1, NEON_BLUE, 3)
217
218# Initialize
219ui = ModernUI()

Callers 1

main.pyFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected