Skip to main content
. 2020 May 28;6(6):38. doi: 10.3390/jimaging6060038
Algorithm 1 Algorithm for filtering based CSNN adaptive prediction.
  • 1:

    Initialize the neural networks.

  • 2:

    Calculate the local sample mean using Equation (1).

  • 3:

    for t = 1:N do %% N is the number of batch, and the batch size equals to the number of columns in the spectral band.

  • 4:

        Select the spatial and spectral contexts Ct and Cl for each pixels in batch, and prepare the data pair Ct,Cl,sx,y,z.

  • 5:

        Extract spatial and spectral features Ft and Fl from the contexts using one-layer shallow neural networks.

  • 6:

        Concatenate the features: F=Ft,Fl.

  • 7:

        Predict the pixel values based on F using Equation (11).

  • 8:

        Calculate and record the prediction error ex,y,z for further mapping and coding.

  • 9:

        Calculate the weight updates Δw using Equation (13).

  • 10:

        Adjusting the parameters in every batch: w=w+Δw.

  • 11:

    end for