Pratyush101 commited on
Commit
c3ddf22
·
verified ·
1 Parent(s): b850f19

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -79,6 +79,8 @@ def video_frame_callback(frame: av.VideoFrame) -> av.VideoFrame:
79
  incorrect = 0
80
 
81
  image = frame.to_ndarray(format="bgr24")
 
 
82
  h, w = image.shape[:2]
83
  image_rgb = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
84
 
 
79
  incorrect = 0
80
 
81
  image = frame.to_ndarray(format="bgr24")
82
+ # Mirror the image horizontally
83
+ image = cv2.flip(image, 1) # Flip code 1 means horizontal flip
84
  h, w = image.shape[:2]
85
  image_rgb = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
86