General Framework of Reversible Watermarking Based on Asymmetric Histogram Shifting of Prediction Error

1 Jiangsu Engineering Center of Network Monitoring, Nanjing University of Information Science and Technology, Nanjing, Jiangsu 210044, China 2Jiangsu Collaborative Innovation Center of Atmospheric Environment and Equipment Technology, Nanjing University of Information Science and Technology, Nanjing 210044, China 3School of Computer and Software, Nanjing University of Information Science and Technology, Nanjing 210044, China 4School of Information Management, Wuhan University, Wuhan, China 5School of Information Engineering, Jiangxi University of Science and Technology, Jiangxi, China


Introduction
Reversible watermarking is a novel technology that embeds a digital mark in the carrier media with a reversible manner [1].It has attracted many researchers' great interest because of the huge application in sensitivity areas, such as medicine, military, and law.In recent years, many efficient methods have been proposed, especially the histogram shifting of prediction error (HSPR).
HSPR is a novel technology proposed by Tsai et al. [2] in 2009, in which prediction value of the basic pixel is calculated firstly.Then, prediction error is obtained from the subtraction between the original and prediction values, which will form the prediction error histogram.Finally, watermark is embedded in the histogram.Compared with those methods which utilize the histogram of an image itself [3], HSPR can not only make use of the redundancy of image pixels adequately but also obtain higher peak point of histogram.In a word, the usage of HSPR can embed more watermarks expediently and enhance the embedding capacity.
Nowadays, reversible watermarking algorithms based on HSPR have been studied extensively, and many researchers pay attention to the improvement of the predictive precision and the height of histogram.For example, Luo et al. utilized the full-surrounded interpolation technology to compute prediction value separately and obtain prediction value with higher precision [4][5][6].Hong and Chen reduced the embedding distortion based on image interpolation, image smoothness detection operator [7], and energy error control (EEC) when the error energy is too high [8], in which a highly accurate prediction value should be calculated firstly.Secondly, the area complexity composed of basic pixels is computed and divided into smooth and complex areas.After that, image distortion can be relieved and the watermarked image quality can be improved.Rad  and then combined the HSPR to embed the watermark in [9].Ou et al. generated the optimal prediction error histogram by considering the pixel compensation under multilayer embedment [10].Zhang et al. established an equivalence relation between lossless data compression and reversible watermarking by iteratively modifying histogram [11][12][13].In addition, reversible watermarking has obtained many developments and has been applied in many novel domains.For example, Zhang researched reversible watermarking technology of encrypted domain [14].Zeng et al. researched reversible watermarking in H.264/AVC video [15].Huang et al. applied prediction error histogram to highly relevant medical anatomy images and satellite images [16,17].

Motivation
Compared with the methods that utilize the histogram of image itself, though the embedding capacity is higher in the above algorithms, the watermarked image qualities are still unsatisfying.Because these algorithms improve the watermarked image quality only by attempting to increase predictive precision or height of peak point, they do not consider how to decrease watermarked image distortion, especially the number of shifted pixels under the same height of histogram.
In traditional reversible algorithms based on prediction error, the error histogram generally conforms to the Laplace distribution.Figure 1(a) shows the symmetric error histogram of Elaine image using Tsai's method.Even if only peak point is selected as embedded point, about half pixels of the host image are shifted.In Figure 1(b), 104988 pixels of the host image are shifted.When peak point and previous peak point are both selected as embedded points, 190015 pixels need to be shifted, as shown in Figure 1(c); this shifting can lead to huge image distortion.
Through the above analysis, we know that symmetric Laplace distribution, where error histogram has an average value of 0, is the source of huge shifting distortion.Hence, in [18], nearest neighbor prediction mechanism is utilized three times repeatedly and three prediction errors are calculated.Then, the prediction error is selected by utilizing the maximum and minimum functions, respectively; thus two asymmetric error histograms are created.Finally, the histogram bins will be shifted in the direction of small number; thus shifting distortion is reduced hugely and watermarked image quality obtains advancement.The method shows the high efficiency of asymmetric error histogram technology; in addition, the same idea was verified in [19][20][21], in which the surrounded prediction scheme [19], the edge sensitivity detection [20], and the directed prediction schemes [21] are utilized to generate the asymmetrical histograms and then embed the watermark, thus improving the embedding effect.Moreover, Kamal and Islam applied the idea to the stegoimage by using the multiple predictors in [22].
In this paper, we propose a general framework of reversible watermarking based on AHSPE, which gives a more standardized and generalized structure to AHSPE.

General Framework of Reversible Watermarking-Asymmetric Error Histogram Shifting
In this section, we design a general framework of error histogram shifting-asymmetric histogram shifting.The framework is divided into four parts: multi-prediction scheme, creation of asymmetric error histogram, layered complementary embedding strategy, and watermark extraction and image restoration; the process is introduced in detail as follows.

Multi-Prediction Scheme.
In traditional reversible watermarking algorithms based on prediction error, only a prediction value is calculated; then the prediction value is substituted for the original value to embed watermark.For the convenience of description, the model of prediction is defined as single-prediction scheme (SPS), and its detailed definition is described as follows.
Definition 1. Suppose that the current pixel is , its reference pixels are   and    , where  = 1, . . ., , and the prediction value is x; thus the SPS is defined as Figure 2 represents the context of .Unshadowed   is selected as 's reference pixels in semisurrounded prediction algorithm, and full-surrounded prediction algorithm needs to select    as its reference pixels.Due to the wide use of semisurrounded prediction algorithm, in this paper, we only utilize semisurrounded prediction algorithm as an example for introduction.But its theory can almost be extended to full-surrounded prediction algorithm without any modifications, for example, [20].Thus formula (1) can be simplified as x = SPS  ( 1 , . . .,   ).And we can obtain the following: When  = 1, SPS degenerates to the simplest nearest neighbor prediction (NNP): x =  1 .When  = 3 and prediction algorithm selects piecewise function of combining the maximum and minimum value functions, SPS converts to the median edge prediction algorithm (MEP): When  = 7 and prediction algorithm selects 7 piecewise functions according to gradient energy, SPS becomes gradient adjustment predictor (GAP).According to the above example, we know that SPS only calculates a prediction value for the current pixel, thus limiting flexibility of the algorithm.In this paper, we design a multi-prediction scheme (MPS).Definition 2. Suppose that the current pixel is , its reference pixels are   , and the prediction values are x ,  = 1, . . ., ; thus the following model of multivariate vector function is called multi-prediction scheme (MPS): The MPS can be constructed by using a familiar prediction algorithm repeatedly or by combining multiple SPSs; we define the selected prediction algorithms as prediction kernels.

The Creation of
each   is a column matrix of size  × 1 and each   is a row matrix of size 1 ×  and conforms to the symmetric distribution with an average value of 0. If the array  = {ê  | ê = (  ),    = [ 1 ,  2 , . . .,   ],  = 1, . . ., } does not accord with any symmetric distribution, we describe (⋅) as an asymmetric selection function.
According to Definition 3, an asymmetric error histogram is created by selecting an appropriate value amongst multiple prediction errors.The detailed steps are described as follows.
Step 1. Utilize MPS to calculate 's  prediction values, and then obtain  prediction errors.The prediction errors ê are calculated as follows: ê =  − x ,  = 1, . . ., . (5) Step 2. Select appropriate value from the above prediction errors by using asymmetric selection function; the calculation formula is described as follows: Step 3. Collect all prediction errors   and thus an asymmetric error histogram is created.
From the above steps, we can see that the error histogram is biased and asymmetric.For example, when prediction error, which is selected by   (⋅), is low, the number of errors on the right side of the histogram peak point is small and that on the left side is large; thus an L-skewness error histogram is created.If the watermark is embedded by translating histogram bins to the right, shifting distortion is decreasing hugely and the quality of watermarked image is improving greatly.
According to the duality principle, if the selection function   (⋅) is modified slightly (predictive results are negative), the dual and large function    (⋅) can be obtained; thus an R-skewness histogram is created.When the watermark is embedded by combining the two histograms, the modified partial pixels in the previous layer are restored to the original values by being compensated in the next layer due to the opposite shifting of two histograms.Therefore, we design a layered complementary embedding strategy.

Layered Complementary Embedding Strategy.
Suppose that the host image is an 8-bit grayscale image  of size ×,   (  ∈ [0, 255]) presents the pixel that corresponds to the location of host image's  row and  column, and the detailed embedding process is described as follows.
Input.We have host image  and watermarks  1 and  2 as input.
Output.We have watermarked image  as output.
Step 1. Select prediction algorithms and confirm  and ; then initialize  and  by utilizing 's reference pixels.
Step 2. For the predicted pixel   , utilize formulas (3) and ( 5) to calculate its prediction values and prediction errors, respectively.Then use selection function   (⋅) to calculate its asymmetric prediction error  +  according to formula (7).Without loss of generality, we set   (⋅) to be R-skewness selection function.
Step 3. Collect  +  to create the R-skewness asymmetric histogram ℎ + (); set its peak point and left zero point as  + and  + ; utilize the following formula to embed watermark: where  1 ∈  1 ; when all watermarks in  1 are embedded, a provisional image  is obtained.We describe the process as the R-skewness embedding phase.
Step 4. For the predicted pixel   , utilize formula (3) to calculate its prediction values.Then use asymmetric selection function    (⋅) to calculate small-skewness prediction error  +  .
Step 5. Collect  −  to create the L-skewness asymmetric histogram ℎ − (); set its peak point and left zero point as  − and  − ; utilize the following formula to embed watermark: where  2 ∈  2 ; when all watermarks in  2 are embedded, a watermark image  is obtained.We named the process as the L-skewness embedding phase.

Extraction of Watermark and Restoration of Image.
For extracting embedded watermark and restoring watermarked image to the host image, the inverse process of proposed algorithm can be used to realize the two processes.Specific steps of the inverse process are as follows.
Output.We have host image  and watermarks  1 and  2 as output.
Step 1. Select the suitable prediction algorithm and the values of  and ; then initialize  and  by utilizing 's reference pixels.
Step 2. For predicted pixel   , utilize formula (6) to calculate its prediction errors.Then use asymmetric selection function    (⋅) to calculate small prediction error  −  .
Step 3. Collect  −  to create the L-skewness asymmetric histogram ℎ − (); then extract the watermark  2 according to histogram shifting technology: Then obtain the interim value of pixel   by the following formula: Step 4. For predicted pixel   , utilize formulas ( 5) and ( 6) to calculate its prediction value and large-skewness prediction error, respectively.
Step 5. Utilize the above prediction errors to create Rskewness asymmetric histogram ℎ + (); then extract the watermark  1 by using the following formula according to histogram shifting technology: Then restore the value of pixel   by utilizing the following formula: The embedded watermark can be extracted completely and the host image can be restored completely by using the above process.

Instance Verification
To verify the validity of the proposed framework, we will briefly explain the framework through two examples in this section.

Instance 1.
Select NNP prediction algorithm as MPS prediction kernel and  = 3; thus, prediction result of the above MPS is described as follows: Then utilize the maximum function max  (⋅) and the minimum function min  (⋅) as the asymmetric selection functions   (⋅) and    (⋅); create the R-skewness error histogram ℎ + () and L-skewness error histogram ℎ − () through collecting all prediction errors.Standard test image Elaine can establish the maximum and minimum histograms, which are shown in Figure 3.
For the two above asymmetric error histograms, the minimum error histogram just needs to shift 56457 pixels to the right and the maximum error histogram shifts 62003 pixels to the left when selecting embedding points  + and  − .The result is much less than Tsai's algorithm which shifts 85027 pixels to the left and 104988 pixels to the right; thus the proposed algorithm improves the quality of watermarked image.The instance verifies the efficiency of algorithm based on asymmetric error histogram shifting, which is presented in paper [18].
It should be pointed out that, in the error histograms established in instance 1, the peak points of error histograms are not always zero, which existed in the symmetric error histogram widely, because asymmetric selection functions choose the maximum and minimum functions directly.Actually, peak points of the above two histograms are −2 and 0, respectively, due to the skewness of peak point.In the process of embedment, we select 0 instead of peak point to embed watermark in the two error histograms.The goal is to decrease shifting distortion due to the skewness of peak point and improve the quality of watermarked image.

Instance 2.
Select prediction kernels for prediction algorithms MED, GAP, and average function (Mean), then utilize the three prediction kernels to calculate prediction values, respectively, and  = 3.Thus, the three calculated prediction values xMean , xMED , and xGAP are as follows: Finally, use the maximum and minimum functions max  (⋅) and min  (⋅) as asymmetric selection functions   (⋅) and    (⋅).The instance can also set up the asymmetric error histograms which are similar to instance 1 through collecting selected prediction errors.

Experimental Results
For verifying actual effect of the above asymmetric error histogram framework, this section designs several experiments  to assess embedding capacity, shifting distortion, and quality of watermarked image based on the proposed framework, respectively.Select six frequently used grayscale images of size of 512 × 512 as tested covers.These images which are all obtained from the database of image SIPI [23] are shown in Figure 4.

Comparison of Embedding Distortion and Shifting Distortion.
As is known to all, when utilizing histogram shifting to embed watermark, image distortion can be divided into two parts: one is the embedding distortion when the size of embedded watermark is "1" and the other is the shifting distortion when creating excess space for embedding, but the vast majority is the latter.The comparison of embedding distortion (ED) and shifting distortion (SD) by using Tsai's method is shown in Table 1, which select one embedding point (1-EP) and two embedding points (2-EP), respectively.
It can be seen from Table 1 that the average value of SD is 16.6 times bigger than ED; 90% of distortions are almost from shifting.Taking Baboon image as an example, when selecting one embedding point, SD is 30.18 times bigger than ED.When selecting two embedding points, although the index is slightly low in other images, the ratio has increased to 33.37 in Baboon.The phenomenon explains that the proposed method that considers decreasing shifting distortion has great application and promotion space.

Comparison of Symmetric and Asymmetric Histograms.
For verifying the reduced effect of SD of asymmetric error histogram, we take ℎ + () as an example.The ED almost cannot reduce due to the randomness of embedded watermark.Therefore, it is significant for enhancing the quality of watermarked image to decrease SD.For evaluating the reduced effect of SD accurately, we define the rate of shifting distortion R: R = the quantity of the shifted pixel (QS) embedding capacity (EC) .
R is the quantity of shifted pixels when the size of embedded watermark is "1."When R becomes small, the quantity of shifted pixels also gets fewer and fewer; thus the distortion is small and the quality of watermarked image is better.
The effect of R and the quantity of shifted pixels (QS) is compared between asymmetric and symmetric error histogram (Tsai's method) in Table 2.For all tested images, embedded points select "0" and asymmetric error histogram utilize ℎ + ().In order to gain the reduced effect of SD of asymmetric error histogram, the reduction of shifting distortion (RSD) is also calculated in Table 2.
It can be seen from Table 2 that the proposed algorithm decreases the quantity of shifted pixels for different tested images.Average distortion rate of the proposed algorithm is close to half of Tsai's algorithm; thus SD of the watermarked image is decreased.Taking the image of Elaine as an example, the quantity of shifted pixels in Tsai's method is 109079; however, the proposed method only has 62008.When the size of embedded watermark is 1 bit, 7.95 pixels need to be modified averagely in Tsai's method, whereas the proposed method only needs to modify 4.18 pixels averagely.Thus, the quality of watermarked image is improved hugely.

Analysis of Embedded Effect.
In this section, we will compare the embedding capacity and the quality of images between the proposed framework and Tsai's algorithm; the results are shown in Table 3. Table 3 shows the comparison of the embedding capacity (EC) and the peak signal-to-noise ratio (PSNR) between classical symmetric error histogram shifting method, Tsai's method, under single embedding point (1-EP) and double embedding points (2-EP) and the proposed method under maximum embedding (ME) and double embedding (DE).It can be seen from Table 3 that, for every cover image, the proposed method is superior to Tsai's algorithm regarding EC and PSNR under 1-EP or 2-EP.Thus, it reflects the efficiency of proposed algorithm.
It should be pointed out that, for keeping the expandability of the proposed algorithm, we utilize each simplified parameter that appears in instance 1, but the implementation procedure of asymmetric error histogram is independent of the above parameters in above experiments.We have reasons to believe that the proposed algorithm can obtain better effect when we use the procedure of frequently used optimization and selection in existing algorithm based on symmetric error histogram shifting.

Conclusion
This paper proposes a novel general framework of reversible watermarking based on image prediction and histogram shifting technology.Firstly, the new framework designs a multi-prediction scheme and then constructs an asymmetric error histogram by using an asymmetric selection function; thus the quantity of shifted pixels can be decreased.Besides, a complementary embedding strategy is proposed by utilizing double prediction errors.The strategy shifts error histogram to the opposite directions; thus some modified pixels will be restored to the original values and the quality of image can be better improved.Due to the peak overlapping problem under multilayer embedding, the more efficient prediction schemes require further research.
Asymmetric Error Histogram.For calculated  prediction values by formula (3), we first calculate the corresponding prediction errors separately; then we Advances in Multimedia select appropriate prediction errors by using asymmetric selection function; finally, we collect all selected prediction errors to create asymmetric error histogram.We give the definition of asymmetric selection function firstly before creating asymmetric error histogram.

Table 1 :
Comparison of Tsai's ED and SD.