An Information Hiding Scheme Based on Pixel- Value-ordering and Prediction-error Expansion with Reversibility

—This paper proposes a data hiding scheme based on pixel-value-ordering and predication-error expansion. In a natural image, most neighboring pixels have similar pixel values, i.e. the difference between neighboring pixels is small. Based on the observation, we may predict a pixel's value according its neighboring pixels. The proposed scheme divides an image into non-overlapping blocks each of which consists of three pixels, and pixels in a block are sorted in a descending order. Messages are embedded into two difference values, where one is between the largest and medium pixels and the other is between the smallest and medium ones. In the embedding process, difference values equal to 0 or greater than 1 are unchanged or increased by 1, respectively, and those equal to 1 are also unchanged or increased by 1 if the message bit to be embedded is equal to 0 or 1, respectively. Calculating the difference value, one may extract a message bit of 0 or 1 if it is equal to 1 or 2, respectively. Recovering pixels is done by decreasing those difference values by 1 if they are equal to or larger than 2. Experimental results demonstrate that the proposed scheme may provide much larger embedding capacity, comparing to existing study, and a satisfied image quality.

A famous scheme for reversibly embedding messages into an image, based on difference expansion, was proposed by Tian [1] in 2003.Based on differences between neighboring pixels in an image are small, his scheme expands a difference value between two neighboring pixels by increasing or decreasing their pixel values.Specifically, if a difference value between pixels and is calculated as , the difference is expanded to , where ⌊ ⌋ and ⌊ ⌋ if .Then, a message bit is embedded into the expanded difference by setting , if is expandable, i.e. and are not over or under saturated.Later, for an expandable difference, the embedded message may be extracted by calculating , and and are recovered by ⌊ ⌋ and ⌊ ⌋, where .Since we cannot guarantee that every difference is expandable, a location map recording whether a difference is expandable or not is required.Fortunately, most differences are expandable and the location map may be compressed in a satisfied compression ratio so that it consumes only a small part of embedding space.Later, a number of studies [2][3][4][5] inspired by Tian's scheme were proposed.
In 2006, a novel reversible data hiding scheme, based on shifting pixel histogram, was proposed by Ni et al. [6].They calculated the number of pixels with the same pixel value and obtained a pixel histogram where the peak point was selected for embedding messages.Since most images contain few pixels with very small or large pixel values, the histogram on the right or left of peak point may be shifted one to the right or left side, respectively, so that there would be available space for embedding messages.A number of studies based on shifting histogram were proposed.References [7][8][9][10] improved Ni et al.'s scheme by shifting difference histogram, instead of www.ijacsa.thesai.orgpixel histogram.Since difference between neighboring pixels usually is small, the peak point of difference histogram would be much higher than that of pixel histogram.Generally, these schemes have a higher embedding capacity comparing to those based on shifting pixel histogram.
A group of studies [11][12][13][14][15][16] explored neighboring pixels in an image and predicted a pixel value by its neighboring pixels.Then they adopted the histogram of predicted error for embedding messages.In general, the peak point of prediction error histogram is higher than difference histogram.Nevertheless, the embedding capacity of this kind of approach depends on its predictive method.This paper proposes a data hiding scheme based on pixelvalue-ordering and predication-error expansion.In a natural image, most neighboring pixels have similar pixel values, i.e. the difference between neighboring pixels is small.Based on the observation, we may predict a pixel's value according its neighboring pixels.The proposed scheme divides an image into non-overlapping blocks each of which consists of three pixels, and pixels in a block are sorted in a descending order.Messages are embedded into two difference values, where one is between the largest and medium pixels and the other is between the smallest and medium ones.In the embedding process, difference values equal to 0 or greater than 1 are unchanged or increased by 1, respectively, and difference values equal to 1 are also unchanged or increased by 1 if the message bit to be embedded is equal to 0 or 1, respectively.Calculating the difference value, one may extract a message bit of 0 or 1 if it is equal to 1 or 2, respectively.Recovering pixels is done by decreasing those difference values by 1 if they are equal to or larger than 2. Experimental results demonstrate that the proposed scheme may provide much larger embedding capacity, comparing to existing study, and a satisfied image quality.
The rest of this paper is organized as follows.Section II briefly reviews Li et al.'s scheme [15].The proposed scheme is introduced in Section III.Section IV demonstrates our experimental results and compares the performance of the proposed scheme with that of Li et al.'s.Finally, conclusions are given in Section V.

II. RELATED WORK
Li et al. [15] proposed a data hiding scheme based on pixelvalue-ordering and predication-error expansion.First, their scheme divides an image into non-overlapping blocks each of which consists of four pixels and as shown in Fig. 1(a).The four pixel values in a block are sorted in an ascending order as shown in Fig. 1(b) where and denote the sorted pixels.Then calculate where and are the stego-pixel of and the message bit to be embedded, respectively.In Fig. 1(c), the stego-pixel is (i.e.
) and this block may not embed a message bit since .Finally, the stego-pixels would be .If (i.e. ), the embedding result would be unchanged, i.e.
. In case of , the embedding result would be or if the message bit to be embedded is or , respectively.The recovery process is the reverse of its embedding process.If one would like to extract an embedded message bit from a stego-block and recover a stego-pixel to its original pixel, he/she may calculate The rationale of Li et al.'s scheme is based on the concept of pixel values in a block are similar for a natural image.Namely, the difference of pixel values in a block is small and they predicted a difference value (denoted by ) of one.If the difference is larger than one (i.e.
, they increased by one so that there would be an available space of for embedding a message bit into a block.Then if the message bit to be embedded is 0 or 1, is unchanged or set to 2, respectively.

III. PROPOSED SCHEME
The proposed scheme includes the embedding and extraction processes.The former embeds secret messages into a cover image and obtains a stego-image, and the latter extracts the embedded secret messages from the stego-image and completely recovers it to its original image.Most studies avoid the problem of saturated conditions (i.e.pixel value equal to 0 or 255 for a 256-gray-level image).It is worth mentioning that the proposed scheme also includes a solution for solving the www.ijacsa.thesai.orgproblem of saturated conditions.The two processes are presented in the following, respectively.

A. Embedding process
This section shows the embedding process for a cover image I with n pixels.Let the secret message, with bits, to be embedded be a bit string , where { } and .The embedding process is shown as follows.
, where and are the prediction errors of and , respectively.Mark a block with or as overhead information.Let be the required overhead information for extracting the embedded messages, where is its length, { }, and .

4) Let
be the sub-message embedded in step 3 and , where denotes concatenating.For each block with , embed and by performing ( 1) and (2).Overhead information would not be generated in this step since in this step.
In step 2, if the pixels in block are sorted in an ascending, the embedding process in steps 3-4 would still be workable.However, for simplicity, the embedding process selects the descending order.
The proposed scheme applies the medium value in a block to predict its neighboring pixel values and .The rationale is that, in a natural image, most image blocks are smooth.Thereby we may expect that pixel values of and are similar to that of and the prediction error would be small.This implies that we would obtain more embedding space for embedding a message than without prediction.
The problem of recording saturated blocks with pixels modified is taken into account in step 3, and it is recorded by the overhead information embedded in the blocks mentioned in step 4. Note that we would not encounter the problem of saturated blocks in step 4.

B. Extraction process
Whenever a decoder gets the setgo-image , he/she may follow the following process to extract the embedded message and completely recover image to its original image I.In the process, the decoder could determine whether a saturated block needs to be recovered or not, from the extracted overhead information.The extraction process is presented as follows.
1) Divide setgo-image as it was divided by the encoder in the embedding process.
2  C.An example of the proposed scheme An example with 7 blocks is given in this section to illustrate the proposed scheme.The example image is a graylevel one with pixel values between 0 and 255.
In the embedding process, the divided blocks are shown in Fig. 2, where column H/M denotes both overhead information and message bits to be embedded.Pixel values in a block are sorted in a descending order and the largest and smallest pixel values in a block are marked by red and blue color, respectively.Let the message to be embedded be .The first processed block is, in step 3, block 3 which embeds nothing, and is embedded into block 4 by setting and =1.Then is embedded into block 5. Block 6 is a saturated block and its pixels is remained unchanged, and in this step.For simplicity, assume the overhead information is .
In step 4, is embedded into blocks 0 and 1, and is embedded into blocks 1 and 2. Note that block 1 embeds two bits, one is from the second bit of and the other is from the first bit of .After is embedded, the embedding process is completed.
Moving to the extraction process, we divide setgo-image into non-overlapping blocks as it was divided by the encoder in the embedding process and sort pixel values in a descending order for each block.First, in step 3, mixed messages of and , , are extracted from blocks 0-4 by performing (3) and ( 4) and these blocks are recovered by performing ( 5) and (6).Next, the overhead information is extracted from blocks 0-3, since in these blocks.For simplicity, assume that means that block 5 needs to be recovered.Then a bit of 1 is extracted from block 5, and the block is recovered.After all messages are extracted and www.ijacsa.thesai.orgor by rearranging the extracted bit string according to their block indexes.Similarly, is obtained from the above mixed messages but removing and the last bit (i.e. the first bit of ).Finally, is extracted and the cover image is completely recovered.
From the above example, we observe that both stegoblocks 5 and 6 are saturated blocks.However, stego-block 5 needs to be recovered and, in the extraction process, the block must be distinguished from stego-block 6 which was not changed in the embedding process.The problem about whether a saturated block needs to be recovered or not may be solved by the embedded overhead information.In step 3 in the extraction process, we first extract messages from stego-blocks with or , since these blocks would not be saturated ones.Then we decode overhead information from blocks with .As long as the overhead information was decoded, we can recognize which saturated blocks need to be recovered.Note that blocks with or embed user's messages, if any, instead of overhead information in step 3 in the embedding process.The example in the section has illustrated how the overhead information is embedded into and extracted from a stego-image.

IV. EXPERIMENTAL RESULTS
To evaluate the performance of proposed scheme, we implemented the proposed scheme in Java on a personal computer and embedded randomly generated secret messages into cover images, as shown in Fig. 3, which were downloaded from [17].All cover images are grayscale with 256 levels and the dimension is .A test image may be divided into ⌊ ⌋ non-overlapping blocks.In the extreme condition, if a block embeds two bits, the embedding capacity of an image may be up to 174762 bits.Each and in a block may be modified no more than one.For a 256-gray-level image with n pixels, the image quality, or the similarity between a stego-image and its cover image, is evaluated by peak signal to noise ratio (PSNR) calculated as In the above equation, MSE is mean square error calculated as ∑ where and denote cover and stego-pixel values, respectively.
We also implemented Li et al.'s scheme, on the same platform, to compare the performance of our scheme with their scheme's.An image applying the proposed scheme may obtain a larger number of blocks comparing to applying Li et al.'s.Therefore, the image may provide a larger embedding capacity if it applies the proposed scheme.
A smooth image (e.g.Airplane) may contain a larger number of smooth blocks comparing to a complex image (e.g.Baboon).Here a smooth block is an image block with similar pixel values, and it may result in a smaller prediction error.The proposed scheme embeds a message bit into a block with prediction error equal to one which is a smaller prediction error.Since Baboon and Airplane are smooth and complex images, respectively, their prediction errors are usually larger and smaller, respectively, than the other test images.Fig. 4 illustrates the comparison of performance between the proposed and Li et al.'s schemes in terms of image quality (PSNR) and embedding capacity.The figure shows, in a low embedding capacity, the two schemes have similar performance.We can observe that the PSNR is higher than 50 dB for each test images in Fig. 4, and the proposed scheme may provide image quality similar to Li et al.'s scheme but a much higher embedding capacity than their scheme.
In the worst condition, if is increased by one and is decreased by one, we have and .This means the proposed scheme may guarantee the image quality higher than 49.89 dB for a 256-gray-level image.Even in this condition, the difference between a cover image and its stego-image would not be detected by human eye.Fig. 5 shows the comparison of maximum embedding capacity between the proposed and Li et al.'s schemes.For the test images in Fig. 3, the embedding capacity of the proposed scheme is more than twice as high as Li et al.'s.A reason is that we may embed, at most, two message bits into a block, whereas Li et al.'s scheme may embed, also at most, only one message bit into a block.In addition, the proposed scheme could provide more blocks than Li et al.'s.The proposed scheme may satisfy more applications' requirement if they need a higher embedding capacity and satisfied image quality.

V. CONCLUSIONS
We have introduced an information hiding scheme, with reversibility, based on pixel-value-ordering and predictionerror expansion.The proposed scheme divides an image into non-overlapping blocks each of which contains three pixels and sorts pixels in a block in a descending order.After embedding, the property of pixel-value-ordering in a block is invariant so that the image can be recovered.Comparing to Li et al.'s scheme, the proposed scheme can achieve more blocks for embedding.In addition, a block may embed up to two message bits.Consequently, the proposed scheme can obtain a higher embedding capacity and satisfied image quality.Experimental results show that the proposed scheme achieves an embedding capacity more than twice as high as Li et al.'s scheme on the same level of image quality.The proposed scheme is a good candidate for reversible data-hiding applications which need a high embedding capacity and low distortion.

Fig. 1 .
Fig. 1.An embedding process example of Li et al.'s scheme

Fig. 5 .
Fig. 5. Comparison of maximum embedding capacity stego-pixels are recovered, is obtained from blocks withor by rearranging the extracted bit string according to their block indexes.Similarly, is obtained from the above mixed messages but removing and the last bit (i.e. the first bit of ).Finally, is extracted and the cover image is completely recovered.