1. Introduction
Reversible watermarking (RW) hides data into a host image by modifying pixel values, and the distortion caused by embedding can be eliminated in the extracting process. As a result the embedded data can be extracted and the original host image recovered perfectly.
Difference expansion (DE) in [1] and histogram Shifting (HS) in [2] are two pivotal methods due to their large data embedding capacity and high quality of the marked image. Many improvements have been proposed based on DE and HS, such as prediction error expansion (PEE) [3], invariability and adjustment on pixel pairs [4], better location map construction [5], double-layered embedding and sorting [6], adaptive embedding [7], histogram modification of pixel differences [8, 9], interpolation error histogram shifting [10] and the recently proposed two dimensional histogram shifting methods [11, 12]. The above mentioned RW schemes are categorized as RW scheme without compensation because of the modification to host image can only be recovered after extracting data from the marked image.
In this paper, we propose a novel RW scheme with compensation which can recover parts of marked image back to original host image during the embedding procedure. In embedding procedure, each pixel is utilized for embedding data 0, 1 or 2 times, where the number of embedding is determined by the difference value between two pixels. The superiority of our scheme is that the distortion to the host image is reduced by embedding twice to certain pixels, and in the meantime, the embedding capacity is increased. However, a very large distortion could be caused by embedding to one pixel twice in most RW schemes without compensation. To further improve the marked image quality, a pixel selection scheme is incorporated into data embedding procedure. The pixels in smooth regions of the host image are used with priority, which reduces the distortion significantly. In the experiment section, the performance comparison of our proposed method with other pixel difference modification based methods demonstrates the huge effect of the novel compensation strategy. The further comparison of our method with three other state-of-the-arts methods shows that the proposed method is very effective for most test images.
The rest of this paper is organized as follows. The proposed scheme is described in section 2. Extensive experiments compare the proposed scheme with other five schemes in section 3. The conclusion is in the last section.
2. The Proposed Method
The data embedding procedure is introduced following the data extracting procedure, then we show how the overhead information is constructed which guarantees the success of blind extraction.
2.1 Embedding procedure
Assume the host image I is an eight-bit grayscale image with gray-level range [0, 255]. Let (x, y) be a pair of pixels. The half difference (denoted by dh) between (x, y) is computed as
The is the floor operation which rounds down the value to the next lowest integer value. To embed a data bit b belonging to {0, 1}, (x, y) should be transformed into (x', y’) according to the values of dh and b. The embedding rules are in Table 1.
Table 1.Embedding rules
When dh is equal to 0, a bit b can be embedded. Otherwise dh is increased by 1 or unchanged. Notice that for all cases, x stays unchanged or increased by 1 and y stays unchanged or decreased by 1. Assume (x, y, z) are three consecutive pixels, first we try to embed data into (x, y), so y becomes to y' which may be y or y - 1. Then we try to embed data into (y', z), so y' becomes to y″ which may have the value y' or y' +1. The possible value changes of y are summarized into Table 2. When y is decreased by 1 and y' is increased by 1, y″ is recovered to the original value of y. It shows that after two embedding, the value of y is recovered.
Table 2.Possible changes of y
Notice that when dh is negative, we skip it without embedding data. The reason is that negative dh has different modification direction for (x, y), where x may be decreased and y may be increased. Assume there is a positive dh followed by a negative dh, then the middle pixel may be modified in one direction by two times, which will lead to large distortion. To summarize the possible number of embedding for each pixel, we denote dh1 and dh2 as the half difference between (x, y) and (y', z), respectively. If dh1 and dh2 are both negative, then there is no embedding for y. If dh1 and dh2 are non-negative and negative and vice versa, then there is one embedding for y. If dh1 and dh2 are both non-negative, there are two embedding.
From another perspective, the proposed difference modification methods can be described with histogram shifting as in [9]. In the proposed method, only the peak 0 is used for embedding data. Any histogram bin that is bigger than 0 is shifted to right by 1. On the other hand, any negative histogram bin remains unmodified. However, the difference used in our method is quite different with [9]. The peak 0 in our method is composed of 0 and 1 in [9]. Therefore, our histogram peak is much higher than that of [9]. The negative histogram bin is not modified in our method, whereas most of the negative histogram bin in [9] will be modified, which causes large distortion. Another advantage of our proposed method is that the consecutive non-positive histogram bin can have compensation effect. In the experiment section, extensive experiments are conducted to show the superiority of the proposed method.
In each embedding for (x, y), the embedding procedure has the tendency to increase the value of x and decrease the value of y. When y is used for the second embedding in (x, y, z), its value has been modified to y'. In order to approximate the original dh between (y, z), Eq. (1) is modified to
The first pixel in a pair is added by 1 when calculating dh to eliminate the value decrease caused by the previous embedding.
As shown in Table 1, only dh with value 0 can be used for embedding. The dh which is bigger than 0 is increased by 1 and no data is embedded. For natural images, the smooth region tends to generate dh with smaller value than the rough region. Thus we incorporate a technique called pixel selection into our scheme to further improve the performance, which only selects the relatively smooth regions in the host image to use. A smoothness value for (x, y) is calculated by using its neighbor pixels. The locations of the neighboring pixels is shown in Fig. 1. The smoothness value is computed as
Fig. 1.The neighboring pixels of (x, y) including n1 to n7
In the embedding procedure, only those pixel pairs with smoothness value smaller than a threshold T will be utilized. The largest possible value for T is 255 × 5=1,275, so 11 bits are needed to record T. The value of T needs to be selected as in [7] to be the smallest value under which the embedding capacity is large enough for the to-be-embedded data.
The complete embedding procedure is as follows:
1. Assume the size of host image I is W × H, scan I into a vector S in raster-scan order (column-wise or row-wise). 2. Iterate from the first pixel in S, calculate the difference between (Si, Si+1), where 1 ≤ i ≤ W × H -1, and embed data into the possible pixel pairs with smoothness value smaller than threshold T. 3. Embed the overhead information into the first N pixels’ least significant bit (LSB) and the LSBs from the first N pixels are embedded into other pixels. (The detailed process is described in section 2.3.) 4. Transform S back to I.
An embedding example is given in Fig. 2. In the embedding process, there are three different kinds of pixel can appear which are defined separately. The modified pixel, unmodified pixel and recovered pixel are defined as pm (red color), pu (blue color) and pr (green color), respectively.
Fig. 2.Left: embedding example, from up to down. Right: extracting example, from down to up
2.2 Extracting procedure
The extracting procedure is the reverse of embedding procedure. For each pixel pair (x', y'), calculate dh'. Then the embedded data b can be extracted and (x', y') is transformed back to the original value (x, y). The extraction rules are shown in Table 3.
Table 3.Extracting rules
The complete extraction procedure is as follows:
1. Extract the first pixel’s LSB and determine the scan order. Scan the marked image I into vector S by the same manner as in the embedding procedure. 2. Extract complete overhead information from the first N pixels’ LSB values. 3. The extraction starts from the last used pixel pair and iterate to the first pixel pair by the reverse of embedding order. Calculate the dh' and smoothness value for each pixel pair. If the smoothness value is smaller than T, extract data according to Table 3. The first N pixels’ LSB values are then recovered using the extracted data. 4. Transform S back to image I.
An extracting example is given in Fig. 2. Remark that the extracting order is the reverse of the embedding order.
2.3 Overhead information
The modification of pixels in the host image may cause overflow and underflow problems, where the pixel values are out of the gray-scale range [0, 255]. A location map is needed to record the pixels’ locations where overflow and underflow may occur. Scan the host image, record the locations of pixels with value 0 or 255 because the embedding procedure can only modify pixel values at most by 1. Each position needs log2 (W × H) bits. For most natural images, there are not so many pixels with value 0 or 255, so the location map size is very small.
Some other information is also needed for blind extraction such as the last used pixel pair location (log2 (W × H) bits), threshold for smoothness value T (11 bits), scan order (1 bit). The scan order bit is located as the first bit in the overhead information. Least significant bit (LSB) replacement is utilized where the first N pixels’ LSBs are replaced with overhead information and those N LSBs are embedded together with the payload data.
3. Experiment
The performance of reversible data hiding method is usually evaluated by the embedding capacity (EC) and the quality of the marked image. For measuring embedding capacity, bits per pixel (bpp) is the most popular metric which counts how many bits can be embedded into one pixel. Another popular metric to measure the embedding capacity is the number of embedded bits. For measuring marked image quality, the peak signal-to-noise ratio (PSNR) value is commonly used which is determined by the mean square error between the cover image and the marked image. In the following experiment, both bpp and the number of embedded bits are utilized.
The first experiment in this paper is carried out using images of SIPI image database [13]. Six test images with size 512 ×512 are used as shown in Fig. 3.
Fig. 3.Six test images, from left to right and top to down, Lena, Baboon, F16, Barbara, Boat and Peppers.
To show the compensation effect of the proposed method, the distributions of pm, pu and pr are calculated. The gain of our compensation method depends on the number of pr and the more pr, the better of the marked image quality. The distribution of pm, pu, and pr for Lena is shown in Fig. 4. The pixel distributions of all test images are summarized in Table 4. About 20 to 30 percent of pixels are pr that are successfully compensated to their original values. Together with pu, around 50 percent of pixels stays unmodified after embedding data which can produce a peak signal-to-noise ratio (PSNR) value for marked image around 10 × log10 (255 × 255/0.5) = 51.14dB.
Fig. 4.Pixel distribution for Lena. pm is red, pu is blue and pr is green.
Table 4.Pixel distribution (%)
We then compare our method with [4] and [9] as shown in Table 5. Both methods in [4] and [9] embed data by using pixel difference modification, which is similar with the proposed method. The superiority of the proposed method compared with [4] and [9] is thus mainly due to the compensation effect. The embedding capacity in Table 5 is the largest number of bits that can be embedded under the biggest modification of 1 to the pixel values of host image. The PSNR value is guaranteed to be above 48.13 dB [2]. The proposed method 1 and 2 are implemented using Eqs. (1) and (2), respectively. As can be seen in Table 5, the proposed method 2 has larger embedding capacity than the proposed method 1 for all test images. Our method can embed much more bits than [4] and with higher marked image quality. For example, the proposed method 1 can embed 48,731 bits into Lena with PSNR 50.83 dB, their method can only embed 38,562 bits with PSNR 48.82 dB. Li et al. [9] can actually embed more number of bits than our method but their marked image quality is much lower than ours. The embedding capacity difference is less than 2,000 bits between proposed method 2 and [9], but the proposed method 2 has the PSNR values 2 to 3 dB higher than [9] in most images. From the performance comparisons between the proposed method and [4, 9], it clearly validates the effectiveness of our compensation method.
Table 5.The comparison of embedding capacity (EC via number of bits) and PSNR value (dB).
The incorporation of pixel selection can further improve the proposed methods to have comparable performance with the state-of-the-arts reversible watermarking methods. To demonstrate the superiority of the proposed scheme, we compare it with the methods in [6, 7], and [10] as shown in Figs. 5 - Fig. 10. It can be seen that our scheme has comparable performance with other three methods for all test images and has the best performance for most test images. For the test image Boat, our scheme clearly outperforms the other three methods. Notice that the methods in [6, 7] and [10] all use complicated predictors to predict pixel value, then, the data is embedded into prediction errors. For example, interpolation is used in [6], rhombus pattern prediction is used in [7] and gradient adaptive prediction is used in [10]. The prediction errors are usually smaller than pixel difference which helps prediction errors based methods perform better than pixel difference based methods. However, the above experiment shows that our proposed pixel difference based method performs better than prediction error based methods by using a clever compensation embedding method. The compensation effect in our proposed method greatly improves the performance.
Fig. 5.Embedding capacity and PSNR of Lena
Fig. 6.Embedding capacity and PSNR of Baboon
Fig. 7.Embedding capacity and PSNR of F16
Fig. 8.Embedding capacity and PSNR of Barbara
Fig. 9.Embedding capacity and PSNR of Boat
Fig. 10.Embedding capacity and PSNR of Peppers
The second experiment evaluates the proposed method on two larger image data set. The first one is the Kodak image data set [14] which contains 24 color images. The second one is the BossBase image data set [15] that contains 10,000 gray-scale images. The BossBase image data set is originally used as a large scale standard data set for evaluating steganalysis methods. Fig. 11 shows the performance comparison of the proposed method with [4] and [9] with embedding 10,000 bits into each image. It can be seen that the proposed method outperforms [4] and [9] with big margin for most of the images.
Fig. 11.Performance comparisons of Kodak data set.
To compare the performance on the BossBase data set, we calculate the difference of PSNR for each image with embedding 10,000 bits and draw an occurrence histogram. The occurrence histogram shows the distribution of the PSNR difference. A better method should have more positive PSNR difference than negative PSNR difference. Figs. 12 and Fig. 13 shows the histogram of PSNR difference between the proposed method and [4, 9], respectively. It can be seen that most of the PSNR difference between our method and the other two methods are positive. For example, Fig. 14 shows that the most occurred PSNR difference between the proposed method and [9] is 5 dB, which occupies more than 16% of the PSNR difference distribution.
Fig. 12.Distribution of PSNR difference between the proposed method and [4] on the database of Boss Base.
Fig. 13.Distribution of PSNR difference between the proposed method and [9] on the database of Boss Base.
4. Conclusion
In this paper, a novel reversible watermarking method using compensation is proposed. This method can recover some parts of image during the embedding procedure by compensation, where the second embedding does not introduce distortion but reduce the overall distortion. The obtained marked image has very high image quality.
References
- Jun Tian, “Reversible Data Embedding Using a Difference Expansion,” IEEE Trans. Circuits Syst. Video Technol, vol. 13, no. 8, pp. 890-896, Aug. 2003. https://doi.org/10.1109/TCSVT.2003.815962
- Zhicheng Ni, Yunqing Shi, Nirwan Ansari, and Wei Su, “Reversible Data Hiding,” IEEE Trans. Circuits Syst. Video Technol, vol. 16, no. 3, pp. 354-362, Mar. 2006. https://doi.org/10.1109/TCSVT.2006.869964
- Diljith Thodi and Jeffrey Rodriguez, “Expansion Embedding Techniques for Reversible Watermarking,” IEEE Trans. Image Process, vol. 16, no. 3, pp. 721-730, Mar. 2007. https://doi.org/10.1109/TIP.2006.891046
- Shaowei Weng, Yao Zhao, Jeng-Shyang Pan and Rongrong Ni, “Reversible Watermarking Based on Invariability and Adjustment on Pixel Pairs,” IEEE Signal Process. Lett, vol. 15, pp. 721-724, Aug. 2008. https://doi.org/10.1109/LSP.2008.2001984
- Hyoung Joong Kim, Vasiliy Sachnev, Yun Qing Shi, Jeho Nam and Hyon Gon Choo, “A Novel Difference Expansion Transform for Reversible Data Embedding,” IEEE Trans. Inf. Forensics Security, vol. 13, no. 3, pp. 456-465, Sep.2008.
- Vasiliy Sachnev, Hyoung Joong Kim, Jeho Nam, Sundaram Suresh and Yun Qing Shi, “Reversible Watermarking Algorithm Using Sorting and Prediction,” IEEE Trans. Circuits Syst. Video Technol, vol. 19, no. 7, pp. 989-999, July.2009. https://doi.org/10.1109/TCSVT.2009.2020257
- Xiaolong Li, Bin Yang and Tieyong Zeng, “Efficient Reversible Watermarking Based on Adaptive Prediction-Error Expansion and Pixel Selection,” IEEE Trans. Image Process, vol. 20, no. 12, pp. 3524-3533, Dec. 2011. https://doi.org/10.1109/TIP.2011.2150233
- Wei Liang Tai, Chia Ming Yeh and Chin Chen Chang, “Reversible Data Hiding Based on Histogram Modification of Pixel Differences,” IEEE Trans. Circuits Syst. Video Technol, vol. 19, no. 6, pp. 906-910, Jun. 2009. https://doi.org/10.1109/TCSVT.2009.2017409
- Yu Chiang Li, Chia Ming Yeh and Chin Chen Chang, “Data Hiding Based on the Similarity Between Neighboring Pixels With Reversibility,” Digit. Signal Process, vol. 20, no. 4, pp. 1116-1128, July.2010. https://doi.org/10.1016/j.dsp.2009.10.025
- Lixin Luo, Zhenyong Chen, Min Chen and Zhang Xiong, “Reversible Image Watermarking Using Interpolation Technique,” IEEE Trans. Inf. Forensics Security, vol. 5, no. 1, pp. 187-193, Mar. 2010. https://doi.org/10.1109/TIFS.2009.2035975
- Xiaolong Li, Weiming Zhang, Xinlu Gui and Bin Yang, “A Novel Reversible Data Hiding Scheme Based on Two Dimensional Difference Histogram Modification,” IEEE Trans. Inf. Forensics Security, vol. 8, no. 7, pp. 1091-1100, July.20103. https://doi.org/10.1109/TIFS.2013.2261062
- Bo Ou, Xiaolong Li, Yao Zhao, Rongrong Ni and Yun Qing Shi, “Pairwise Prediction-Error Expansion for Efficient Reversible Data Hiding,” IEEE Trans. Image Process, vol. 22, no. 12, pp. 5010-5021, Dec. 2013. https://doi.org/10.1109/TIP.2013.2281422
-
[Online]. Available:
http://sipi.usc.edu/database/. -
[Online]. Available:
http://r0k.us/graphics/kodak/. -
[Online]. Available:
http://www.agents.cz/boss/.
Cited by
- Reversible Data Hiding Using a Piecewise Autoregressive Predictor Based on Two-stage Embedding vol.11, pp.4, 2016, https://doi.org/10.5370/JEET.2016.11.4.974
- Improved reversible data hiding in JPEG images based on new coefficient selection strategy vol.2017, pp.1, 2017, https://doi.org/10.1186/s13640-017-0206-1
- Genuine reversible data hiding technology using compensation for H.264 bitstreams 2017, https://doi.org/10.1007/s11042-017-4698-6