Don't zero out motion during calibration (#8163)

* don't zero out motion boxes

* define detect resolution to speed up tests
This commit is contained in:
Blake Blackshear
2023-10-14 08:05:44 -04:00
committed by GitHub
parent fa6c6c50d0
commit 9ea10f8541
5 changed files with 125 additions and 23 deletions
+3 -1
View File
@@ -49,6 +49,9 @@ class ImprovedMotionDetector(MotionDetector):
self.contrast_values[:, 1:2] = 255
self.contrast_values_index = 0
def is_calibrating(self):
return self.calibrating
def detect(self, frame):
motion_boxes = []
@@ -141,7 +144,6 @@ class ImprovedMotionDetector(MotionDetector):
# if calibrating or the motion contours are > 80% of the image area (lightning, ir, ptz) recalibrate
if self.calibrating or pct_motion > self.config.lightning_threshold:
motion_boxes = []
self.calibrating = True
if self.save_images: