Skip to main content
. 2021 Oct 1;12(10):1205. doi: 10.3390/mi12101205
Algorithm 1 Image Restoration Using SPG-SC Model.
  • Require: 

    The observed image y and measurement matrix H.

  •    1:

    Initial XG0=0, AG0=0, B¯G=0, C=0 and J=0.

  •    2:

    Set parameters b, m, L, μ1, μ2, η, τ, p, t, σn, εP, εG, ϵP and ϵG.

  •    3:

    fort=0 Max-Iter do

  •    4:

     Update XG(t+1) by Equation (20);

  •    5:

    R(t+1)=XG(t+1)C(t);

  •    6:

     Construct dictionary D by R(t+1) using K-means algorithm and PCA.

  •    7:

    for Each patch ri do

  •    8:

      Choose the best match PCA dictionary Di for ri;

  •    9:

      Compute αi(t) by Di1ri;

  •  10:

      Update wi(t+1) by computing Equation (30);

  •  11:

      Update λ by computing Equation (32);

  •  12:

      Update αit+1 by computing Equation (22);

  •  13:

    end for

  •  14:

    RG(t+1)=XG(t+1)J(t);

  •  15:

    for Each patch-group RGi do

  •  16:

      Construct dictionary DGi by computing Equation (27);

  •  17:

      Compute BGi(t) by DGi1RGi;

  •  18:

      Update KGi(t+1) by computing Equation (31);

  •  19:

      Update ρ by computing Equation (33);

  •  20:

      Update BGi(t+1) by computing Equation (29);

  •  21:

    end for

  •  22:

     Update AG(t+1) by concatenating all αi;

  •  23:

     Update D(t+1) by concatenating all Di;

  •  24:

     Update B¯G(t+1) by concatenating all BGi;

  •  25:

     Update DG(t+1) by concatenating all DGi;

  •  26:

     Update C(t+1) by Equation (17);

  •  27:

     Update J(t+1) by Equation (18);

  •  28:

    end for

  •  29:

    Output: The final restored image x^ by aggregating patches in XG.