From 19bdf26245663ce002f6341132c960e309974251 Mon Sep 17 00:00:00 2001 From: JC Date: Fri, 23 Feb 2024 09:26:21 +0000 Subject: [PATCH] Setting motion masks to zero, rather than 255, will speed up calibration, as the average frame starts out at zero --- frigate/motion/improved_motion.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frigate/motion/improved_motion.py b/frigate/motion/improved_motion.py index 603d8fda4..d7f9df8a1 100644 --- a/frigate/motion/improved_motion.py +++ b/frigate/motion/improved_motion.py @@ -96,7 +96,8 @@ class ImprovedMotionDetector(MotionDetector): # mask frame # this has to come after contrast improvement - resized_frame[self.mask] = [255] + # Setting masked pixels to zero, to match the average frame at startup + resized_frame[self.mask] = [0] resized_frame = gaussian_filter(resized_frame, sigma=1, radius=self.blur_radius)