Skip to content

Commit

Permalink
pull out temporary value to a variable
Browse files Browse the repository at this point in the history
  • Loading branch information
penguinland committed Feb 12, 2025
1 parent 9eb3702 commit f0419ca
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/motion_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,10 @@ def detections_from_gray_imgs(self, gray1, gray2):
xs = [pt[0][0] for pt in c]
ys = [pt[0][1] for pt in c]
xmin, xmax, ymin, ymax = min(xs), max(xs), min(ys), max(ys)

# Ignore this detection if it's the wrong size
if (ymax - ymin) * (xmax - xmin) < self.min_box_size:
area = (ymax - ymin) * (xmax - xmin)
if area < self.min_box_size:
continue

detections.append(
Expand Down

0 comments on commit f0419ca

Please sign in to comment.