• No results found

The “pixel” Scheme

An alternative method for storing the vectors of indices {lq}Qq=1N which is discussed below is to apply a pseudorandom permutation to the index information.

The “ad hoc” method applies a transformation to the indices and then reduces the

Astronomical Images Natural Images Dc,2i , Dr,2i N = 8 N = 16 N = 24 N = 8 N = 16 N = 24

1 12 14 16 12 14 15

2 14 16 17 13 16 17

3 14 17 18 14 16 17

4 15 17 18 15 17 18

5 15 18 19 15 17 18

6 16 18 19 16 18 19

7 16 18 19 16 18 19

8 16 18 20 16 19 19

Table 4.2: Minimum number of bits u2 which If2 can be quantized to without distorting the index information for any image in the 8 bit astronomical and natural image sets. The result is shown for each column and row dictionary pair Dc,2i , Dr,2i , i = 1, . . . , 8 indicated by the index given in the first column.

1 2 3 4 5 6 7 8

2 4 6 8 10 12 14

Dictionary Dc,2i, Dr,2i

¯xSR S2, N = 8 S2, N = 16 S2, N = 24 S1, N = 8 S1, N = 16 S1, N = 24

Figure 4.3: Average SR (¯xSR) over the 55, 8 bit grey level astronomical and natural image sets when atoms are picked from the dictionaries Dc,2i , i = 1, . . . , 8 by the OMP2D algorithm. The ¯xSR is shown against the index i of each dictionary Dc,2i , i = 1, . . . , 8 for each block size N = 8, 16, 24. The solid lines indicates the ¯xSRfor the astronomical images and the dashed lines indicate the average ¯xSR for the natural images.

1 2 3 4 5 6 7 8 2

2.5 3 3.5 4 4.5 5 5.5

Dictionary Dc,2i , Dr,2i

¯xCR

AH,N = 8 AH, N = 16 AH,N = 24 PX ,N = 8 PX, N = 16 PX,N = 24

Figure 4.4: Average CR (¯xCR) over the 55, 8 bit grey level astronomical image set when applying the “ad hoc” and “pixel” folding procedures. The ¯xCR is shown against the index i of each dictionary Dc,2i , i = 1, . . . , 8 for each block size N = 8, 16, 24. The solid lines and dashed lines indicate the ¯xCR for respectively the “ad hoc” and “pixel” folding procedures.

1 2 3 4 5 6 7 8

1 1.5 2 2.5

Dictionary Dc,2i , Dr,2i

¯xCR

AH,N = 8 AH, N = 16 AH,N = 24 PX ,N = 8 PX, N = 16 PX,N = 24

Figure 4.5: Average CR (¯xCR) over the 55, 8 bit grey level natural image set when applying the “ad hoc” and “pixel” folding procedures. The ¯xCR is shown against the index i of each dictionary Dc,2i , i = 1, . . . , 8 for each block size N = 8, 16, 24. The solid lines and dashed lines indicate the ¯xCR for respectively the “ad hoc” and “pixel” folding procedures.

storage requirement by applying a simple quantization and entropy coding stage. The ap-proach in this Section is instead to first code the indices to reduce the storage requirement of the indices and then control the access to this information.

This method can then be secured by means of a private key to initialize the pseudo-random permutation, preventing a third party not in possession of the private key from recovering the indices. The linear nature of a simple permutation without other security measures will makes this approach susceptible to plain text attacks [50], and therefore less secure than the “ad hoc” method.

4.7.1 Storing the Separable Indices (m1)

This approach flattens the vectors of indices {lq}Qq=1N required in equation (3.4), and then entropy codes the resulting vector. Before flattening the indices two modifications are made to them which were found to reduce the size of the resulting bit stream.

Complement coding

The aim is to find out if any index, which will be referred to as the complementary index ic, has been chosen in over half the image blocks. If it has then the index ic is removed from each vector {lq}Qq=1N which contains it and included in each vector {lq}Qq=1N which does not. To recover the original sets of indices the process is simply repeated with ic.

If the index ic is chosen in the approximation of x% of the image blocks this will reduce the number of indices by (50x − 1)QN.

Index Difference

Storing the indices in independent vectors for each block means there is no restriction on the order that the indices are in, as long as the order of the corresponding coefficient vectors is altered so that the coefficients still correspond to the correct indices. Therefore the indices for each image block can be sorted into ascending numerical order without effecting the recovery. If the indices are sorted in this way then the difference between each index for each block q = 1, . . . , QN could be stored along with the first (smallest) index, instead of the just the indices. This is performed in 2 steps:

1) First the vectors of indices are sorted into ascending numerical order to get the vectors {laq}Qq=1N, where

laq(k) ≤ laq(k + 1), k = 1, . . . , Kq− 1, q = 1, . . . , QN.

Then storing in the vectors liq, the original position of each element of laq in lq, that is liq is such that laq(k) = lq(liq(k)), k = 1, . . . , Kq− 1, q = 1, . . . , QN.

The coefficients which are used to create the embedded image can then be reordered by the following relation

caq(k) = cq(liq(k)), k = 1, . . . , Kq, q = H1+ 1, . . . , QN,

so that their position in the sorted vectors caq corresponds to the position of their index in the corresponding vectors laq, with q = H1+ 1, . . . , QN. These vectors can now be used in equation (3.5).

2) The difference between each index in the sorted vectors, is taken in order, and included with the first element to get the vectors {ldq}Qq=1N, where

ldq(1) = laq(1), and

ldq(k) = laq(k + 1) − laq(k), k = 2, . . . , Kq, q = 1, . . . , QN.

To recover the sorted sets of indices {laq}Qq=1N the procedure is simply reversed by cumulatively summing each set of indices, that is

laq = Xk i=1

ldq(i), k = 1, . . . , Kq, q = 1, . . . , QN.

Storing the Indices

The vectors of indices will now be stored in a large temporary vector t. To enable them to be assigned back from t to the vectors of indices for each block {ldq}Qq=1N, either the numbers Kq, q = 1, . . . , QN can be stored, or the indices for each block split into separate partitions. The first approach is used when creating the “ad hoc” blocks for storing the separable indices, and the second approach is used here, as described below.

First a reserved symbol r is chosen which is not a valid index, this will be used to separate the vectors of indices for each image block when they are placed into new larger vector. The symbol r is first included at the end of each vector {ldq}Qq=1N as

ldq = [ldq; r], q = 1, . . . , QN. These vectors are then placed into the larger temporary vector

t = [Flat({ldq}Qq=1N),

which contains the separable indices for each block separated from each other by r as shown below.

t = [ld1(1); . . . ; ld1(K1); r; ld2(1); . . . ; ld2(K2); r; . . . ; r; ldQN(1); . . . ; ldQN(KQN)]. (4.11) Using a suitable entropy coding algorithm the vector of indices t can be converted to a bit stream bm1 ∈ RNbm1.

4.7.2 Restricting access

Access can be restricted to the indices stored in bm1 by applying a pseudorandom permu-tation to the order of its elements to get a reorder vector ¯bm1, which is generated in the following way.

A vector m ∈ RNbm1 of unique pseudorandom natural numbers is first generated by the pseudorandom number generator initialized with a seed. These vectors are then used to reorder the elements of the vectors bm1 by the relation

m1(i) = bm1(m(i)), i = 1, . . . , Nbm1. (4.12)

The self contained folded image If is then the union of the two images, If1,△ containing the vectors of coefficients cq, and If2 containing the vectors of indices lq which are both required to recover image blocks ˜IKq in equation (3.4), with q = 1, . . . , QN.

As discussed in Section 3.3.2 the pseudorandom vector m ∈ RNbm1 should be generated with a CSPRNG.

4.7.3 Recovery procedure

The self contained folded image If is first split into If1,△ and If2. The indices are then recovered from If2 by:

• Relabelling the elements of the image array If2 back to become the vector g = Vec(Id f2).

• Converting each unsigned integer in g back to its binary representation to create the bit stream ¯bm1 as

m1(i, . . . , i + u − 1) = dBin(g, u), i = nu, n = 1, . . . ,

Nbm1 u

 .

• Reverse the permutation with the same vector of pseudorandom numbers m ∈ RNbm1 from equation (4.12) with the following procedure,

bm1(m(i)) = ¯bm1(i), i = 1, . . . , Nbm1.

• Apply the decoding phase of the entropy coding algorithm which created the original vector bm1 torecover the vector of indices t.

• The large vector t is then split into QN smaller vectors each containing the index information for a single block. This is achieved by placing the elements in between the reserved symbols r shown in equation (4.11) back into the sets {ldq}Qq=1N.

• The original sets of indices {lq}Qq=1N can then be recovered from {ldq}Qq=1N, by reversing the procedure outlined in Section 4.7.1.

4.7.4 Storing the row and column indices (m2)

An alternative to storing the vectors of separable indices {lq}Qq=1N intervening in (3.4) is to store both vectors of indices {lcq}Qq=1N and {lrq}Qq=1N corresponding. This can be performed in a similar way to the procedure above for the vectors of separable indices. The main difference is that now the indices come in pairs, that is each separable index lq(k) now corresponds to the index pair (lcq(k), lrq(k)). This means that for each block q = 1, . . . , QN only one of the vectors of indices lcq(k), k = 1, . . . , Kq or lrq(k), k = 1, . . . , Kq can be sorted in ascending numerical order, the other vector must then be reordered so that the index pairs are still consistent. In the following discussion the convention will be to sort the elements of the vectors {lcq}Qq=1N into ascending numerical order.

The procedure for coding the indices is given below. The access restriction procedure is exactly the same as described in Section 4.7.2 and is not repeated below.

Complement coding

The aim now is to find out the most common index pair (lcq(k), lrq(k)), k = 1 . . . , Kq, q = 1, . . . , QN defined as (icc, irc). If this index pair, (icc, irc) occurs in over half the pairs of vectors (lcq, lrq), q = 1, . . . , QN then it is removed from each pair where is occurs and included in each pair where it does not.

That is given the pair of index vectors lcq= [1; icc; 2; irc; 4; icc] and lrq = [3; 1; 2; icc; 7; irc] for a block q containing the common index pair (icc, irc), the new vectors with the compliment removed are lcq = [1; icc; 2; irc; 4] and lrq = [3; 1; 2; icc; 7]. Then given the pair of index vectors lcq = [1; icc; 2; irc; 4] and lrq = [3; 1; 2; icc; 7] for a block q which do not contain the common index pair (icc, irc), the new vectors with the compliment added are lcq = [1; icc; 2; irc; 4; icc] and lrq = [3; 1; 2; icc; 7; irc].

It is clear from the above that to recover the original vectors of indices the process is simply repeated with (icc, irc).

Index difference

Storing the indices in independent vectors {lcq}Qq=1N and {lrq}Qq=1N for each block again means there is no restriction on the order that the indices are in, as long as any change to the order of the elements in {lcq}Qq=1N is also made to the elements of {lrq}Qq=1N and {cq}Qq=1N. This order needs to be maintained to ensure that for q = 1, . . . , QN, each coefficient cq(k), k = 1, . . . , Kq still corresponds to the same column and row vectors Dc(:, lcq(k)) and Dr(:, lrq(k)) used to generate the sparse approximation in equation (2.15). Therefore the vectors of indices {lcq}Qq=1N can be sorted into ascending numerical order without effecting the recovery. If the indices are sorted in this way the difference between each index in each vector {lcq}Qq=1N could be stored along with the first (smallest) index, instead of the just the indices. This is performed in 2 steps:

1) First the vectors of indices are sorted into ascending numerical order to get the vectors {lc,aq }Qq=1N, where

lc,aq (k) ≤ lc,aq (k + 1), k = 1, . . . , Kq− 1, q = 1, . . . , QN.

Then storing in the vectors liq, the original position of each element of lc,aq in lcq, with q = 1, . . . , QN, that is liq is such that lc,aq (k) = lcq(liq(k)).

The vectors of indices {lrq}Qq=1N and coefficients {cq}Qq=1N, which create the embedded image, can then be reordered by the following

lr,aq (k) = lrq(liq(k)), k = 1, . . . , Kq, q = 1, . . . , QN, and

caq(k) = cq(liq(k)), k = 1, . . . , Kq, q = H1+ 1, . . . , QN. The vectors of coefficients can now be used in equation (3.5).

2) The difference between each index in the sorted vectors {lc,aq }Qq=1N, is taken in order, and included with the first element to get the vectors {lc,dq }Qq=1N, where

lc,dq (1) = lc,aq (1), and

lc,dq (k) = lc,aq (k + 1) − lc,aq (k), k = 2, . . . , Kq, q = 1, . . . , QN.

To recover the sorted sets of indices {lc,aq }Qq=1N the procedure is simply reversed by cumulatively summing each set of indices, that is

lc,aq = Xk

i=1

lc,dq (k), k = 1, . . . , Kq, q = 1, . . . , QN.

Storing the Indices

The same procedure which was applied to the vectors in Section 4.7.1 to produce the temporary vector t, is applied here. The new temporary vector contains each {lc,dq }Qq=1N, separated by a reserved symbol r. This vector is then enlarged to include the sets of vectors {lrq}Qq=1N as

t = [t; [Flat({lrq}Qq=1N)].

Through a suitable entropy coding algorithm the vector of indices t can be converted to a bit stream bm2 ∈ RNbm2.

The same procedure as in Section 4.7.2 is then applied to secure the information in bm2 and produce the image If2. The index information can be recovered from If2 by simply reversing the procedure, applying the method for the separable indices described in Section 4.7.3.

4.7.5 Comparison of index storage methods

To examine which index storage method (m1 or m2) requires the smallest of bit stream the following Experiment was realized. The entropy coding in this Experiment was again performed with the same adaptive arithmetic coding algorithm in Section 2.7.

Given that the range of possible indices is dependent on the both the number of atoms in the dictionary and the size N of the square blocks, three block sizes N = 8, 16, 24 were tested together with the 8 dictionaries Dc,2i , i = 1, . . . , 8, of increasing size described in Section 4.8.1.

For 55 astronomical and natural images and each dictionary Dc,2i , i = 1, . . . , 8 the images were processed in blocks of N = 8, 16, 24 and approximated to a PSNRa of 45 ±

4.5 × 10−3dB. The indices were then coded first using m1 and then m2 and the size of the respective bit streams Nbm1 and Nbm2 recorded.

A paired sample t-test was realized on the results of the 55 sample images to a 95%

confidence level. The aim of the test was to investigate whether the index coding methods produce bit streams of the same size. The results for each dictionary and block size N = 8, 16, 24 are shown in Appendix E.2.

The results for astronomical images showed that when N = 8 and 16, the bit stream produced by m2 was significantly smaller than that produced by m1, for the dictionaries, Dc,2i , i = 5, . . . , 8. When N = 24, the bit stream produced by m2 was significantly smaller than that produced by m1, for the dictionaries, Dc,2i , i = 4, . . . , 8.

The results for the natural images were similar. For N = 8 and 16, the bit stream produced by m2 was significantly smaller than that produced by m1, for the dictionaries, Dc,2i , i = 4, . . . , 8. When N = 24, the bit stream produced by m2 was significantly smaller than that produced by m1, for dictionaries, Dc,2i , i = 3, . . . , 8.

Both image corpus produce the same conclusion, that is, m2 produces a significantly smaller bit stream when the number of vectors in the dictionary used increases.

In the next Experiments involving the “pixel” method, the approach used for coding the indices will be to used the results of this Experiment to determine when to use m1 and m2. That is when the pixel method is used, m1 will code the indices in all Experiments for both astronomical and natural images except for experiments involving:

• astronomical images approximated by dictionaries Dc,2i , i = 5, . . . , 8 for N = 8, 16, and Dc,2i , i = 4, . . . , 8 for N = 24, or experiments involving

• natural images approximated by dictionaries Dc,2i , i = 1, . . . , 8 for N = 8, 16, and Dc,2i , i = 3, . . . , 8 for N = 24,

when m2 will be used.

The self contained folded image resulting from applying this will represented with Nbf2 bits and denoted as If2 ∈ RNr3×Nc3.