From ede316d997b968628ae62e3672e21581102b89dc Mon Sep 17 00:00:00 2001 From: Zhiying Li <zhiyingli@g.ucla.edu> Date: Wed, 10 Nov 2021 19:04:59 -0800 Subject: [PATCH] resize the imshow to display more images at the same time --- Code/Control/Laptop_Code/ball_detection/ball_detection.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Code/Control/Laptop_Code/ball_detection/ball_detection.py b/Code/Control/Laptop_Code/ball_detection/ball_detection.py index fbea8d2..3a01288 100644 --- a/Code/Control/Laptop_Code/ball_detection/ball_detection.py +++ b/Code/Control/Laptop_Code/ball_detection/ball_detection.py @@ -129,7 +129,8 @@ def detectLive(url , model, minDetectionScore = 0.90, showSight = True): cv2.FONT_HERSHEY_SIMPLEX, 1, (255, 0, 0), 3) if showSight: - cv2.imshow('Ball Detection', frame) + resized_frame = cv2.resize(frame,(400,300)) + cv2.imshow('Ball Detection', resized_frame) key = cv2.waitKey(1) & 0xFF dist = int(dist) -- GitLab