Skip to main content
. 2014 Feb 17;14(2):3130–3155. doi: 10.3390/s140203130

Algorithm 1 Incremental discriminative structured dictionary learning (IDSDL).

Input:
Nt0 −1i, ps+i, ps−i, i = 1, 2, …, N, Tt0 −1, λ1, λ2.
1: A0+←0, B0+←0, A0−←0, B0−←0
2: for t = t0→T do
3:  Obtain P(t−1)i, N(t−1)i by D(t−1)i based on Equation (4).
4:  for i = 1 → N do
5:   Sparse representation of positive sample patches ps+i to obtain βs+i∈ℝd2×s+ by Equation (2) based on Tt−1.
6:   Sparse representation of negative sample patches ps−i to obtain βs−i∈ℝd2×s− by Equation (2) based on Nt−1i.
7:   Update At+←At−1++βs+i(βs+i)T, At−←At−1−+βs−i(βs−i)T
8:   Update Bt−←Bt−1−+ps+i(βs+i)T, Bt←Bt−1+ps−i(βs−i)T.
9:   for j = 1 → M do
10:    Update [(Pt1:N)j] by Equations (7) and (8) with Dt−1i=Pt−1i.
11:    Update dtj by Equations (7) and (8) with Dt−1i=Nt−1i.
12:   end for
13:   Update the learned dictionary part, Pti, based on Equation (6).
14:   Update the learned dictionary part, Dt, based on Equation (4).
15:  end for
16:  Update the template set, Tt, based on Equation (5).
17: end for
Output:
Updated Tt, Dt.