From 5e93b2d4e6deda6082e6e7b0e54991bc8e3ff9ea Mon Sep 17 00:00:00 2001 From: Alan Davidson Date: Wed, 12 Feb 2025 12:17:45 -0500 Subject: [PATCH] check the max box size in addition to the min --- src/motion_detector.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/motion_detector.py b/src/motion_detector.py index 9a50122..0861944 100644 --- a/src/motion_detector.py +++ b/src/motion_detector.py @@ -287,6 +287,8 @@ def detections_from_gray_imgs(self, gray1, gray2): area = (ymax - ymin) * (xmax - xmin) if area < self.min_box_size: continue + if self.max_box_size is not None and area > self.max_box_size: + continue detections.append( {