Skip to main content
. 2019 Mar 8;19(5):1188. doi: 10.3390/s19051188
Algorithm 1 our hierarchical data association algorithm
Input: Current tth frame and previous trajectories
The detection bounding boxes computed from the detector described in Section 3.3
The tag-boxes computed from the tracker described in Section 3.4
Output: bounding boxes and trajectories for the tth frame
Procedure
1 associate the detection bounding boxes DBt to the tag-boxes TBt
2 If each Dbtj in DBt is assigned to the corresponding Tbti in TBt with one-to-one manner
3   Return the DBt as tracked bounding boxes DBt and update the tracklets
4 else
5   Update the tracklets related to the DBt and return the assigned detection boxes (DBt), unassigned detection boxes (DBt*) and unassigned tag-boxes (TBt*).
6 end if
7 for each tag-box Tbti in the unassigned tag-boxes TBt*
8   set a default box (Dbtli) to the tag-box Tbti according to the updated tracklets;
9   associate the unsigned detection boxes (DBt*) to the default box (Dbtli)
10   if find a best matched box in the DBt*
11     set the best matched box as the tracked bounding box and update the tracklet
12   else
13     set the default box as the tracked bounding box and update the tracklet,
14   end if
15   associate the unassigned tag-boxes (TBt*) to the default box (Dbtli)
16   if no matched tag-box is founded
17     set a counter array (age), age[Tbti] = age[Tbti] + 1
18   else
19     age[Tbti] = age[Tbti] − 1
20   end if
21   if age[Tbti] > threshold value (T)
22     Initialize the tag-box Tbti and reset age[Tbti] = 0;
23   end if
24   associate the assigned detection boxes (DBt) to the unassigned tag-box Tbti
25   if the assigned detection box has more than one tag-boxes
26     pend the tag-box Tbti
27   end if
28 end for