Skip to main content
. 2020 Dec 30;21(1):197. doi: 10.3390/s21010197
Algorithm 1 Multi-State Online Matching Algorithm.
 Inputs:
    B={B0,B1,B2,...,BT1}={{b0,b1,...,bN1}0,...,{b0,b1,...,bN1}T1}
 Outputs:
    Cfinal
 1:   Initial: Cactive=B1, Clost=ϕ, Cdie=ϕ, Cfinal=ϕ
 2:   for t=2 to T1 do
 3:    Bt = NMS(Bt)
 4:    for τiCactive do
 5:     bbest=bj, where max(PTSN(τi,bj)), bjBt
 6:     if PTSN(τi, bj) σPTSN then
 7:       add bbest to τi and remove bbest from Bt
 8:       predict bp from τi and add bp to Bt+1
 9:     else
 10:     move τi to Clost
 11:   end if
 12:    end for
 13:    for τiClost do
 14:    bbest = bj where max(PTSN(τi,bj)), bjBt
 15:    if PTSN(τi,bj) σPTSN then
 16:      add bbest to τi; remove bbest from Bt and move τi to Cactive
 17:      predict bp from τi and add bp to Bt+1
 18:    else
 19:      if timewaiting(τi)δwaiting then
 20:        move τi to Cdie
 21:      end if
 22:     end if
 23:     for bjBt do
 24:      start a new tracklet with bj and insert it into Clost
 25:     end for
 26:   end for
 27:  end for
 28:  for τiCactive do
 29:     if len(τi)λmin then
 30:    add τi to Cfinal
 31:     end if
32:  end for