Update app.py
Browse files
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 |
|