From d4afcde6c9b2bd399dff3445be12f96aa178e892 Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Tue, 1 Dec 2020 18:53:02 -0600 Subject: [PATCH] reduce min timestamp size --- frigate/object_processing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frigate/object_processing.py b/frigate/object_processing.py index 3d325d173..6208f5d09 100644 --- a/frigate/object_processing.py +++ b/frigate/object_processing.py @@ -199,7 +199,7 @@ class TrackedObject(): time_to_show = datetime.datetime.fromtimestamp(self.thumbnail_data['frame_time']).strftime("%m/%d/%Y %H:%M:%S") size = cv2.getTextSize(time_to_show, cv2.FONT_HERSHEY_SIMPLEX, fontScale=1, thickness=2) text_width = size[0][0] - desired_size = max(200, 0.33*best_frame.shape[1]) + desired_size = max(150, 0.33*best_frame.shape[1]) font_scale = desired_size/text_width cv2.putText(best_frame, time_to_show, (5, best_frame.shape[0]-7), cv2.FONT_HERSHEY_SIMPLEX, fontScale=font_scale, color=(255, 255, 255), thickness=2)