From 0b8f2cadf32c5f846eaf0c8cc3ababecd55bda88 Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Mon, 6 Jan 2020 20:34:53 -0600 Subject: [PATCH] fix color of best image --- detect_objects.py | 1 + 1 file changed, 1 insertion(+) diff --git a/detect_objects.py b/detect_objects.py index 4a1f6d1ac..e31f6f03b 100644 --- a/detect_objects.py +++ b/detect_objects.py @@ -127,6 +127,7 @@ def main(): best_frame = cameras[camera_name].get_best(label) if best_frame is None: best_frame = np.zeros((720,1280,3), np.uint8) + best_frame = cv2.cvtColor(best_frame, cv2.COLOR_RGB2BGR) ret, jpg = cv2.imencode('.jpg', best_frame) response = make_response(jpg.tobytes()) response.headers['Content-Type'] = 'image/jpg'