Skip to main content
. 2017 Jul 26;17(8):1696. doi: 10.3390/s17081696
Algorithm 1 Estimating Homography for a Foreground in Current Frame
Input: Infrared foreground: BIR. visible foreground: BVIS. Moving state: FIR.
Reservoir group: {Rcur}. Previous homography group: {Mqt1}. Global matrix: Mgt
Output: current frame-wide homography group: {Mqt}
Proceduce Homography estimation
  Ifsize ({Rcur})=1
      RcurHqcur, Ecur=1Γ(BIR,Hqcur)BVISΓ(BIR,Hqcur)BVIS
      If FIR=tracking normally Mqreft1=Mqt1 end if;
      If FIR=fragmentation Mqreft1=i=1NMqit1N end if;
      If FIR=entering or lost tracking Mqreft1=Mgt end if;
      Ereft1=1Γ(BIR,Mqreft1)BVISΓ(BIR,Mqreft1)BVIS
      Hqcur, Ecur, Mqreft1, Ereft1Mqt
  Else
      BIRB1IR,B2IR,,BMIR
      For RjcurR1cur,R2cur,,RMcur do
      RjcurHqjcur, Ejcur=1Γ(BjIR,Hqjcur)BVISΓ(BjIR,Hqjcur)BVIS
      Mqreft1=Mqjt1, Ereft1=1Γ(BjIR,Mqreft1)BVISΓ(BjIR,Mqreft1)BVIS
      Hqjcur ,Ejcur, Mqreft1, Ereft1Mqjt
      End for
  End if
End proceduce