From 50f0c05e690816c9bf66b0f2eb0692850f183b1b Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Tue, 13 Jul 2021 08:51:15 -0500 Subject: [PATCH] fix motion mask overlay --- frigate/object_processing.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frigate/object_processing.py b/frigate/object_processing.py index 660f74d87..999b67e6e 100644 --- a/frigate/object_processing.py +++ b/frigate/object_processing.py @@ -322,7 +322,9 @@ def zone_filtered(obj: TrackedObject, object_config): # Maintains the state of a camera class CameraState: - def __init__(self, name, config, frame_manager): + def __init__( + self, name, config: FrigateConfig, frame_manager: SharedMemoryFrameManager + ): self.name = name self.config = config self.camera_config = config.cameras[name] @@ -396,7 +398,7 @@ class CameraState: cv2.drawContours(frame_copy, [zone.contour], -1, zone.color, thickness) if draw_options.get("mask"): - mask_overlay = np.where(self.camera_config.motion_mask == [0]) + mask_overlay = np.where(self.camera_config.motion.mask == [0]) frame_copy[mask_overlay] = [0, 0, 0] if draw_options.get("motion_boxes"):