Update app.py
Browse files
app.py
CHANGED
@@ -70,6 +70,8 @@ def video_frame_callback(frame: av.VideoFrame) -> av.VideoFrame:
|
|
70 |
global indexImg, output_text
|
71 |
|
72 |
img = frame.to_ndarray(format="bgr24")
|
|
|
|
|
73 |
result = hands.process(cv2.cvtColor(img, cv2.COLOR_BGR2RGB))
|
74 |
|
75 |
# Create the keyboard buttons
|
|
|
70 |
global indexImg, output_text
|
71 |
|
72 |
img = frame.to_ndarray(format="bgr24")
|
73 |
+
# Mirror the image horizontally
|
74 |
+
img = cv2.flip(img, 1) # Flip code 1 means horizontal flip
|
75 |
result = hands.process(cv2.cvtColor(img, cv2.COLOR_BGR2RGB))
|
76 |
|
77 |
# Create the keyboard buttons
|