From 309c0dcda3279ea06645aa6590ca055c615d8912 Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Sun, 20 Sep 2020 20:53:39 -0500 Subject: [PATCH] proper handling of crop param (fixes #208) --- detect_objects.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/detect_objects.py b/detect_objects.py index 029c1cb8e..88dfa7e9a 100644 --- a/detect_objects.py +++ b/detect_objects.py @@ -384,7 +384,7 @@ def main(): best_object = object_processor.get_best(camera_name, label) best_frame = best_object.get('frame', np.zeros((720,1280,3), np.uint8)) - crop = bool(request.args.get('crop', 0)) + crop = bool(request.args.get('crop', 0, type=int)) if crop: region = best_object.get('region', [0,0,300,300]) best_frame = best_frame[region[1]:region[3], region[0]:region[2]]