Siyun He commited on
Commit
35c6cce
·
1 Parent(s): 29cb19e

adjust the angle

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -61,6 +61,9 @@ def process_frame(frame):
61
  delta_y = right_eye_y - left_eye_y
62
  angle = np.degrees(np.arctan2(delta_y, delta_x))
63
 
 
 
 
64
  # Resize the overlay
65
  overlay_resize = cv2.resize(overlay, (int(w * 1.15), int(h * 0.8)))
66
 
 
61
  delta_y = right_eye_y - left_eye_y
62
  angle = np.degrees(np.arctan2(delta_y, delta_x))
63
 
64
+ # Negate the angle to rotate in the opposite direction
65
+ angle = -angle
66
+
67
  # Resize the overlay
68
  overlay_resize = cv2.resize(overlay, (int(w * 1.15), int(h * 0.8)))
69