aboutsummaryrefslogtreecommitdiff
path: root/game.py
diff options
context:
space:
mode:
Diffstat (limited to 'game.py')
-rw-r--r--game.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/game.py b/game.py
index 9158e37..8f33b91 100644
--- a/game.py
+++ b/game.py
@@ -13,13 +13,13 @@ from asteroid import Asteroid
pygame.init()
# Define screen dimensions
-SCREEN_WIDTH = 600
-SCREEN_HEIGHT = 400
+SCREEN_WIDTH = 1920
+SCREEN_HEIGHT = 1080
class MyGame:
def __init__(self) -> None:
# Open the webcam (0 is usually the default)
- self.cap = cv2.VideoCapture(0)
+ self.cap = cv2.VideoCapture('rtsp://10.20.89.139:8080/h264_aac.sdp')
# Create a list to hold cockroaches
self.cockroaches = []
@@ -139,6 +139,7 @@ class MyGame:
# Rotate the frame counter-clockwise by 90 degrees
frame = cv2.rotate(frame, cv2.ROTATE_90_COUNTERCLOCKWISE)
+ frame = cv2.flip(frame, 0)
# Convert frame from RGB to HSV, and define frame used for detection
det_frame = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV)