From e5048f98b6d23db96be2ff146853f774b0a3de68 Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Sat, 1 Aug 2020 19:20:16 -0500 Subject: [PATCH] fix latest size calculation --- detect_objects.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/detect_objects.py b/detect_objects.py index 6acc75f61..678bc86f1 100644 --- a/detect_objects.py +++ b/detect_objects.py @@ -366,9 +366,9 @@ def main(): # max out at specified FPS frame = object_processor.get_current_frame(camera_name) if frame is None: - frame = np.zeros((height,int(height*16/9),3), np.uint8) + frame = np.zeros((720,1280,3), np.uint8) - height = int(request.args.get('h', str(frame.shape[1]))) + height = int(request.args.get('h', str(frame.shape[0]))) width = int(height*frame.shape[1]/frame.shape[0]) frame = cv2.resize(frame, dsize=(width, height), interpolation=cv2.INTER_AREA)