Skip to main content
. 2020 Dec 31;23(1):57. doi: 10.3390/e23010057
Algorithm 2 Row/Columns shuffling algorithm
Input: The plain image, O, the polynomial p(x), α1,α2,β1, and β2.
Output: H, the shuffled image.
Step 1: Set [M,N]=size(O)
Step 2: Use Algorithm 1, with polynomial p(x), and interval [α1,β1], to generate a random
           permutation of size M for shuffling the rows, say SRows.
Step 3: Use Algorithm 1, with polynomial p(x), and interval [α2,β2], to generate a random
           permutation of size N for shuffling the columns, say SColumns.
Step 4: For i=1 to M, compute
                  For j=1 to N, compute
                       H(i,j)=O(SRows(i),SColumns(j))
                   End For j
            End For i
Step 5: H, the shuffled image.