mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-26 19:06:11 +01:00
fix: ensure timestamp is drawn above mask
This commit is contained in:
parent
4443abbc49
commit
905c361d52
@ -284,10 +284,6 @@ class CameraState():
|
|||||||
for region in regions:
|
for region in regions:
|
||||||
cv2.rectangle(frame_copy, (region[0], region[1]), (region[2], region[3]), (0,255,0), 2)
|
cv2.rectangle(frame_copy, (region[0], region[1]), (region[2], region[3]), (0,255,0), 2)
|
||||||
|
|
||||||
if draw_options.get('timestamp'):
|
|
||||||
time_to_show = datetime.datetime.fromtimestamp(frame_time).strftime("%m/%d/%Y %H:%M:%S")
|
|
||||||
cv2.putText(frame_copy, time_to_show, (10, 30), cv2.FONT_HERSHEY_SIMPLEX, fontScale=.8, color=(255, 255, 255), thickness=2)
|
|
||||||
|
|
||||||
if draw_options.get('zones'):
|
if draw_options.get('zones'):
|
||||||
for name, zone in self.camera_config.zones.items():
|
for name, zone in self.camera_config.zones.items():
|
||||||
thickness = 8 if any([name in obj['current_zones'] for obj in tracked_objects.values()]) else 2
|
thickness = 8 if any([name in obj['current_zones'] for obj in tracked_objects.values()]) else 2
|
||||||
@ -301,6 +297,10 @@ class CameraState():
|
|||||||
for m_box in motion_boxes:
|
for m_box in motion_boxes:
|
||||||
cv2.rectangle(frame_copy, (m_box[0], m_box[1]), (m_box[2], m_box[3]), (0,0,255), 2)
|
cv2.rectangle(frame_copy, (m_box[0], m_box[1]), (m_box[2], m_box[3]), (0,0,255), 2)
|
||||||
|
|
||||||
|
if draw_options.get('timestamp'):
|
||||||
|
time_to_show = datetime.datetime.fromtimestamp(frame_time).strftime("%m/%d/%Y %H:%M:%S")
|
||||||
|
cv2.putText(frame_copy, time_to_show, (10, 30), cv2.FONT_HERSHEY_SIMPLEX, fontScale=.8, color=(255, 255, 255), thickness=2)
|
||||||
|
|
||||||
return frame_copy
|
return frame_copy
|
||||||
|
|
||||||
def finished(self, obj_id):
|
def finished(self, obj_id):
|
||||||
|
Loading…
Reference in New Issue
Block a user