Skip to content

Commit

Permalink
check the max box size in addition to the min
Browse files Browse the repository at this point in the history
  • Loading branch information
penguinland committed Feb 12, 2025
1 parent f0419ca commit 5e93b2d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/motion_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
{
Expand Down

0 comments on commit 5e93b2d

Please sign in to comment.