mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-03 09:45:22 +03:00
Fix equality
This commit is contained in:
parent
d487f84792
commit
794a9072c2
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user