From d23466bef060378c8a1a4d1e240fa37c0d5bd35b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Agust=C3=ADn=20Castro?= Date: Thu, 8 Feb 2024 03:05:03 -0300 Subject: [PATCH] Decrease one vote when growing or splitting --- norfair/multi_camera.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/norfair/multi_camera.py b/norfair/multi_camera.py index 11dff386..ef70dd90 100644 --- a/norfair/multi_camera.py +++ b/norfair/multi_camera.py @@ -424,6 +424,7 @@ def update(self, trackers_by_camera): if cluster.grow_votes == self.max_votes_grow: # if the votes to grow are enough, then we will expand our cluster # we might need to steal ids from other clusters, so first we will remove those from the others + cluster.grow_votes -= 1 other_cluster_number = 0 while other_cluster_number < len(self.clusters): @@ -480,6 +481,7 @@ def update(self, trackers_by_camera): # if we have enough votes to split our cluster # we update the old cluster with the information of the biggest current cluster inside # for the other current clusters that intersect it, we create new clusters + cluster.split_votes -= 1 other_current_cluster_number = 0 while other_current_cluster_number < len(current_clusters):