From 794a9072c2d75746968985c4fb280b82f435ed97 Mon Sep 17 00:00:00 2001 From: Nick Mowen Date: Fri, 27 May 2022 13:34:43 -0600 Subject: [PATCH] Fix equality --- frigate/util.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frigate/util.py b/frigate/util.py index 7782a95b2..595832ea5 100755 --- a/frigate/util.py +++ b/frigate/util.py @@ -984,13 +984,13 @@ class BoundingBoxTriggerEnum(str, Enum): def is_in_zone(self, centroid, box, contour) -> bool: """Tests a zone based on the bounding box trigger and the objects bounding box.""" - if self.value is self.bottom_center: + if self is self.bottom_center: point = (centroid[0], box[3]) - elif self.value is self.left_center: + elif self is self.left_center: point = (box[0], centroid[1]) - elif self.value is self.right_center: + elif self is self.right_center: point = (box[2], centroid[1]) - elif self.value is self.top_center: + elif self is self.top_center: point = (centroid[0], box[1]) return cv2.pointPolygonTest(contour, point, False) >= 0