The constructor of the class is given as follows:
class Sort: def __init__(self, max_age=2, min_hits=3): self.max_age = max_age self.min_hits = min_hits self.trackers = [] self.count = 0
It stores two parameters:
- The first parameter is max_age, which specifies how many consecutive times a tracker of a certain object can remain without an associated box before we consider the object to have gone from the scene and delete the tracker.
- The second parameter is min_hits, which specifies how many consecutive times a tracker should be associated with a box so that we consider it to be a certain object. It also creates properties for storing the trackers and counting the total number of trackers during the ...