Skip to content

Commit

Permalink
Decrease one vote when growing or splitting
Browse files Browse the repository at this point in the history
  • Loading branch information
Agustín Castro committed Feb 8, 2024
1 parent e19e6e0 commit d23466b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions norfair/multi_camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit d23466b

Please sign in to comment.