mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-26 19:06:11 +01:00
fix intersection calculation
This commit is contained in:
parent
07bd376649
commit
9550ac7422
@ -284,7 +284,7 @@ def reduce_boxes(boxes):
|
|||||||
# modified from https://stackoverflow.com/a/40795835
|
# modified from https://stackoverflow.com/a/40795835
|
||||||
def intersects_any(box_a, boxes):
|
def intersects_any(box_a, boxes):
|
||||||
for box in boxes:
|
for box in boxes:
|
||||||
if box_a[2] < box[0] or box_a[0] > box[2] or box_a[1] < box[3] or box_a[3] > box[1]:
|
if box_a[2] < box[0] or box_a[0] > box[2] or box_a[1] > box[3] or box_a[3] < box[1]:
|
||||||
continue
|
continue
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user