Skip to main content
. 2021 Aug 13;4:687176. doi: 10.3389/frai.2021.687176

Algorithm 1.

Pseudo code of the proposed algorithm

  • INPUT: Incomplete image X¯, mask tensor Ω¯, vector of block sizes p=[P1,P2,,PL] where L is number of stages, t=[T1,T2], rank vectors r1,,rN, error level ϵ, maximum value of the rank Rmax, internal iteration number Iint, the rank increasing step (inc) and the threshold for selecting the core tensors for rank incremental in each iteration (tol).

  • OUTPUT: Completed image X¯^.

  • 1: Initialize the missing elements of X¯ by zero.

  • 2: for l=1:L do

  • 3:  Block Hankelize the input incomplete image (X¯) and the mask tensor (Ω¯) by block size Pl×Pl and window size t=[T1,T2] which results in H¯ and Ω¯H.

  • 4:  Put H¯˜=H¯

  • 5:  while max(rl)<Rmax (or the normalized approximation error is higher than the error level ϵ) do

  • 6:   for j=1:Iint do

  • 7:    Compute the TR decomposition of H¯˜, i.e., H¯^ with rank vector rl.

  • 8:    H¯˜=Ω¯HH¯+(1¯Ω¯H)H¯^

  • 9:   end for

  • 10:   Increase the elements of the rank vector rl using the approach of (Sedighin et al., 2021).

  • 11:   Compute X¯^ by de‐Hankelizing H¯˜ (in noisy cases by de‐Hankelizing H¯^).

  • 12:   X¯^=Ω¯X¯+(1¯Ω¯)X¯^.

  • 13:   Apply smoothing by replacing each estimated element (for Ω¯=0) by the average of its four neighbors in the frontal slice and keeping the observed elements fixed.

  • 14:  end while

  • 15:  Put X¯=X¯^.

  • 16: end for