Keywords

1 Introduction

Reversible watermarking [1] is a special type of digital watermarking where both the watermark extraction and the host content recovery can be accomplished without loss at the decoder side. In the past two decades, many reversible watermarking methods have been proposed for digital images [2,3,4,5,6,7,8,9]. However, the transmission channel is supposed to be lossless in these methods, and the watermark extraction becomes a challenge in case of attack. To overcome this weakness, a new type of reversible watermarking, namely, robust reversible watermarking (RRW) is proposed [10]. By RRW, not only the embedded watermark but also the original host image can be restored without distortion in a lossless environment. Moreover, if the marked image is lossily compressed, although the host image may not be restored exactly, the embedded watermark should be recovered in this case. Existing RRW methods can be classified into two categories: redundant histogram shifting (RHS) based methods and multi-layer watermarking (MLW) based methods, and representative achievements of RHS techniques mainly include histogram rotation (HR) and generalized histogram shifting (GHS).

In [10], Vleeschouwer et al. first proposed the HR technique, in which each embedding block is randomly divided into two groups with equal number of pixels, and the watermark is embedded by modifying the centroid vectors of the two groups, while the salt and pepper noise is introduced. To deal with this issue, Zou et al. [11] proposed to modify the average values of the intermediate frequency sub-band in integer wavelet domain. In [12], Ni et al. improved the method [10] and avoided the salt and pepper distortion of HR while error bits are introduced for the blocks with extreme values 0 or 255. And thus, the error correction coding has been exploited in this work. Later on, Zeng et al. [13] proposed to divide the cover image into blocks to calculate the arithmetic difference of each block, and introduced two thresholds to embed the watermark by shifting the arithmetic differences. The performance of this method is better than some previous works, but the side information for data extraction and image recovery should be send to the receiver by using an additional communication channel, and thus this method is not blind. Then, in [14,15,16,17], An and Gao proposed several RRW methods to improve the robustness performance. Especially, in [15], they proposed a new robust reversible embedding framework based on clustering and wavelet transformation. However, this method is not blind as well, and the side information is still necessary for the decoder. In [18] and [19], Coltuc et al. first proposed the MLW technique, and there are two layers of watermark to be embedded into the cover image: a robust watermark is first embedded into the cover image to derive an intermediate image, and then a reversible watermark is embedded into the intermediate image. Most traditional reversible watermarking and robust watermarking techniques are available for this framework. However, for MLW, the noise is inevitably introduced to the intermediate image because both the robust and reversible embedding are applied on the same embedding domain. Then, in [20], Wang et al. proposed a new RRW technique to separately embed the robust and reversible watermark into the independent embedding domains to avoid the noise.

Existing RRW methods, including Zeng et al.’s work [13], have the disadvantages of insufficient embedding capacity and weak robustness due to the large embedding distortion. Based on this consideration, to improve the previous work [13], we propose a new RRW method in this paper. First, the cover image is divided into non-overlapping blocks and a histogram is generated by applying a high pass filter to each block. The generated histogram follows a Laplacien-like distribution. Then, the watermark is embedded into the blocks by shifting this histogram. Specifically, the method [13] is improved by minimizing the embedding distortion using a new modification mechanism. In addition, for blind data extraction and image recovery, a strategy for determining the parameters used in histogram shifting is also proposed. In this way, the proposed method is reversible without side information at the decoder side, and it provides a significant performance improvement in terms of both visual quality and embedding capacity. Experimental results show that the proposed scheme has sufficient robustness against JPEG compression compared with Zeng et al.’s method [13].

The rest of the paper is organized as follows. In Sect. 2, Zeng et al.’s RRW algorithm [13] is briefly introduced, and followed by the proposed scheme described in detail in Sect. 3. Then, the experimental results and the comparison with Zeng et al.’s method [13] are reported in Sect. 4. Finally, the conclusions are presented in Sect. 5.

2 Related Work

In [13], Zeng et al. proposed a new RRW method by using two thresholds. The watermark is embedded by shifting the arithmetic differences of the divided image blocks.

First, the cover image is divided into non-overlapping blocks of size \(m \times n\). Then, a matrix \(M\) sized \(m \times n\) is introduced to calculate the arithmetic difference of each block. Specifically, the matrix \(M\) is given by

$$ M(i,j) = \left\{ {\begin{array}{*{20}l} {1,} \hfill & {{\rm{if}}\;i\;{\rm{and}}\;j\;{\rm{have}}\;{\rm{the}}\;{\rm{same}}\;{\rm{parity}}} \hfill \\ { - 1,} \hfill & {{\rm{otherwise}}} \\ \end{array} .} \right. $$
(1)

As an example, a matrix sized \({8} \times {8}\) is shown in Fig. 1. After that, the arithmetic difference of each block, is given by

$$ \alpha = \sum\limits_{i = 1}^{m} {\sum\limits_{j = 1}^{n} {C(i,j)M(i,j)} } , $$
(2)

where \(C(i,j)\) means the pixel value of a given block \(C\) in the location \((i,j)\). For example, the distribution of \(\alpha\) for the Barbara image with block size of \({8} \times {8}\) is shown in Fig. 2, where the vertical axis represents the values of \(\alpha\) and the horizontal axis is the occurrence of \(\alpha\).

Fig. 1.
figure 1

Matrix \(M\) sized \({8} \times {8}\).

Fig. 2.
figure 2

The distribution of \(\alpha\) of the Barbara image with the \({8} \times {8}\) matrix shown in Fig. 1.

For the data embedding of a given block \(C\), two thresholds \(T{, }G > {0}\) are utilized to shift the value of \(\alpha\). If \(\alpha > T\), it is shifted to the right side by \({2}G + T\) to create vacancy. Specifically, the cover pixel \(C(i,j)\) is modified as

$$ C^{*} (i,j) = \left\{ {\begin{array}{*{20}l} {C(i,j) + \beta_{{1}} ,} \hfill & {{\rm{if}}\;M(i,j) = 1} \hfill \\ {C(i,j),} \hfill & {\rm{otherwise}} \hfill \\ \end{array} } \right., $$
(3)

where

$$ \beta_{{1}} = \left\lceil {\frac{{{4}G + 2T}}{mn}} \right\rceil . $$
(4)

In this way, one can verify that the value of \(\alpha\) will be changed as

$$ \sum\limits_{i = 1}^{m} {\sum\limits_{j = 1}^{n} {C^{*} (i,j)M(i,j)} } = \alpha + \frac{mn}{2}\beta_{1} > 2(G + T). $$
(5)

That is to say, there is no value inside the range of \((T{, 2}(G + T)]\) after shifting. Similarly, if \(\alpha < - T\), it is shifted to the left side by modifying the cover pixel \(C(i,j)\) as

$$ C^{*} (i,j) = \left\{ {\begin{array}{*{20}l} {C(i,j) + \beta_{{1}} ,} \hfill & {{\rm{if}}\;M(i,j) = - 1} \hfill \\ {C(i,j),} \hfill & {{\rm{otherwise}}} \hfill \\ \end{array} .} \right. $$
(6)

If \(\alpha \in [0,T]\), the cover pixel \(C(i,j)\) is modified as

$$ C^{*} (i,j) = \left\{ {\begin{array}{*{20}l} {C(i,j) + \omega \beta_{{2}} ,} \hfill & {{\rm{if}}\;M(i,j) = 1} \hfill \\ {C(i,j),} \hfill & {{\rm{otherwise}}} \hfill \\ \end{array} } \right., $$
(7)

where \(\omega \in {{\{ 0, 1\} }}\), represents the watermark bit to be embedded and

$$ \beta_{{2}} = \left\lceil {\frac{{{2}G + 2T}}{mn}} \right\rceil . $$
(8)

Similarly, if \(\alpha \in [ - T,0)\), the cover pixel \(C(i,j)\) is modified as

$$ C^{*} (i,j) = \left\{ {\begin{array}{*{20}l} {C(i,j) + \omega \beta_{{2}} ,} \hfill & {{\rm{if}}\;M(i,j) = - 1} \hfill \\ {C(i,j),} \hfill & {{\rm{otherwise}}} \hfill \\ \end{array} } \right.. $$
(9)

As shown in Fig. 3, the value of \(\alpha\) falls into the range of \([ - T{, }T]\) due to the embedding bit ‘0’, called bit-0-zone. And the value of \(\alpha\) is within the range of \([T + G{, 2}T + G]\) or \([ - (2T + G{), } - (T + G))\) due to the embedding bit ‘1’, called bit-1-zone.

Fig. 3.
figure 3

The distribution of \(\alpha\) after watermark embedding.

In case of no attack, the extraction is a reverse process, where a bit ‘0’ is extracted when \(\alpha \in [ - T{, }T]\), and a bit ‘1’ is extracted when \(\alpha \in (T{, 2}T + G]\) or \(\alpha \in [ - (2T + G{), } - T)\). Moreover, the cover image can be recovered completely. If \(\alpha \in (T{, 2}T + G]\), the original pixel \(C(i,j)\) can be recovered by

$$ C(i,j) = \left\{ {\begin{array}{*{20}l} {C^{*} (i,j) - \omega \beta_{{2}} ,} \hfill & {{\rm{if}}\;M(i,j) = 1} \hfill \\ {C^{*} (i,j),} \hfill & {{\rm{otherwise}}} \hfill \\ \end{array} } \right., $$
(10)

where \(\omega \in {{\{ 0, 1\} }}\), represents the extracted watermark bit. Similarly, if \(\alpha \in [ - (2T + G{), } - T)\), the original pixel \(C(i,j)\) can be recovered and the details are omitted. If \(\alpha > 2T + G\) or \(\alpha < - (2T + G)\), the original pixel \(C(i,j)\) can be recovered as well according to Eq. (3) and Eq. (6).

As shown in Fig. 4, when the marked image has been attacked by JPEG compression, Zeng et al. [13] first find two ranges of \([ - Adj\_0,Adj\_0]\) and \([ - Adj\_1,Adj\_1]\). Then, the values of \(T\) and \(G\) can be calculated by Eq. (11). Finally, the watermark can be extracted correctly even if the marked image has been attacked by JPEG compression to some extent.

$$ \left\{ {\begin{array}{*{20}l} {T = Adj\_0} \hfill \\ {G = Adj\_1 - 2Adj\_0} \hfill \\ \end{array} } \right. $$
(11)
Fig. 4.
figure 4

The distribution of \(\alpha\) after JPEG compression.

In general, since the value of \(T\) is supposed to be sufficiently large to ensure the robustness. In the experiments of [13], all the pixels are just expanded. Clearly, for this method, the MSE is about \(\frac{{2(T + G)^{{2}} }}{mn}\). Moreover, in terms of reversibility, the values of \(T\) and \(G\) are necessary for the decoder to correctly extract the watermark.

3 Proposed Method

In this section, our proposed method is introduced in detail, which is an improvement of Zeng et al.’s work [13]. Here, we adopt the notations used in Sect. 2. We first introduce the proposed data embedding process. The cover image \(C\) is firstly divided into a number of non-overlapping blocks sized \(m \times n\). Then, as shown in Eq. (1) and Eq. (2), the arithmetic difference \(\alpha\) of each block is calculated using the matrix \(M\). Next, two thresholds \(T > 0\) and \(G > 0\) are selected as parameters for data embedding. Notice that, in our method, the threshold \(T\) is selected such that it is exactly larger than the maximum of \(\alpha\) for all divided image blocks. Finally, the watermark is embedded by shifting the histogram of \(\alpha\). Specifically, if \(\alpha \ge 0\), the marked pixel \(C^{*} (i,j)\) is modified as

$$ C^{*} (i,j) = \left\{ {\begin{array}{*{20}l} {C(i,j) + \omega \beta ,} \hfill & {{\rm{if}}\;M(i,j) = 1} \hfill \\ {C(i,j) - \omega \beta ,} \hfill & {{\rm{if}}\;M(i,j) = - 1} \hfill \\ \end{array} } \right., $$
(12)

where \(\omega \in \{ {0, 1}\}\), represents the watermark bit to be embedded and

$$ \beta = \left\lceil {\frac{G + T}{{mn}}} \right\rceil . $$
(13)

And if \(\alpha < 0\), the marked pixel \(C^{*} (i,j)\) is modified as

$$ C^{*} (i,j) = \left\{ {\begin{array}{*{20}l} {C(i,j) - \omega \beta ,} \hfill & {{\rm{if}}\;M(i,j) = 1} \hfill \\ {C(i,j) + \omega \beta ,} \hfill & {{\rm{if}}\;M(i,j) = - 1} \hfill \\ \end{array} } \right.. $$
(14)

Figure 5 shows the distribution histogram after embedding the watermark. The value of \(\alpha\) falls into the range of \([ - T{, }T]\) due to the embedding bit ‘0’, called bit-0-zone. While the value of \(\alpha\) is within the range of \([T + G{, 2}T + G]\) or \([ - (2T + G{),} - (T + G))\) due to the embedding bit ‘1’, called bit-1-zone. Bit-0-zone and bit-1-zone are separated by the length \(G\). In this way, after a non-malicious attack such as JPEG compression, the two areas will not overlap each other so that the watermark can be correctly extracted. In other words, the proposed algorithm is robust against non-malicious attacks.

Fig. 5.
figure 5

The distribution of \(\alpha\) after data embedding.

Here, by minimizing the embedding distortion, we optimize Zeng et al.’s embedding method [13] and then propose the embedding algorithm as described above. For \(T > 0\) and \(G > 0\), the two methods both shift \(\alpha\) by \(T + G\) to embed bit ‘1’ into a divided image block. In [13], only half of the pixels in the block have changed by \(\left\lceil {\frac{2(T + G)}{{mn}}} \right\rceil\). After calculation, the mean square error (MSE) is about \(\frac{{2(T + G)^{{2}} }}{mn}\). While in this paper, we have modified all pixels in the block by \(\left\lceil {\frac{(T + G)}{{mn}}} \right\rceil\), and then conclude that the MSE is approximate to \(\frac{{(T + G)^{{2}} }}{mn}\), only half of the MSE in [13]. In other words, our proposed algorithm has superior performance in terms of visual quality.

If the marked image \(C^{*}\) is not distorted, as shown in Fig. 5, we can find two ranges of \([ - Lim\_{0, }Lim\_0]\) and \([ - Lim\_{1, }Lim\_1]\) to get the values of \(T\) and \(G\). In particular, \(T\) and \(G\) are initialized to the integer multiple of \(m \times n/2\) in our proposed algorithm. According to that, we can first calculate the value of \(Lim\_1\) using the maximum of \(\alpha\) for all blocks. Then, we can obtain the value of \(Lim\_0\) according to the number of bits ‘1’ embedded into the image. Finally, the values of \(T\) and \(G\) can be calculated by Eq. (15). Similarly, when the watermarked image \(C^{*}\) is attacked by JPEG compression, we can also find two ranges and calculate \(T\) and \(G\) according to Eq. (11). In this case, although the cover image cannot be restored completely, the watermark can be extracted using \(T\) and \(G\). In particular, if \(\alpha \in [ - T{, }T]\), a bit ‘0’ is extracted. If \(\alpha \in [ - (2T + G{), } - T) \cup (T{, 2}T + G]\), a bit ‘1’ is extracted.

$$ \left\{ {\begin{array}{*{20}l} {T = Lim\_1 - Lim\_0} \hfill \\ {G = 2Lim\_0 - Lim\_1} \hfill \\ \end{array} } \right. $$
(15)

Now consider the case that the marked image \(C^{*}\) is not distorted. Not only we can extract watermark correctly, but also the original cover image \(C\) can be recovered without loss. Specifically, if \(\alpha \in (T{, 2}T + G]\), the original pixel \(C(i,j)\) is given by

$$ C(i,j) = \left\{ {\begin{array}{*{20}l} {C^{*} (i,j) - \omega \beta ,} \hfill & {{\rm{if}}\;M(i,j) = 1} \hfill \\ {C^{*} (i,j) + \omega \beta ,} \hfill & {{\rm{if}}\;M(i,j) = - 1} \hfill \\ \end{array} } \right., $$
(16)

where \(\omega \in \{ {0, 1}\}\), represents the extracted watermark bit. And if \(\alpha \in [ - (2T + G{), } - T)\), the original pixel \(C(i,j)\) is given by

$$ C(i,j) = \left\{ {\begin{array}{*{20}l} {C^{*} (i,j) + \omega \beta ,} \hfill & {{\rm{if}}\;M(i,j) = 1} \hfill \\ {C^{*} (i,j) - \omega \beta ,} \hfill & {{\rm{if }}\;(i,j) = - 1} \hfill \\ \end{array} } \right.. $$
(17)

4 Experimental Results

In this section, three commonly used images including Lena, Airplane and Barbara are utilized to evaluate the robustness of our algorithm compared with Zeng et al.’s method [13]. For each image, 100 groups of watermarks are embedded to calculate PSNR and bit error rate (BER). The BER is given by

$$ BER = \frac{{\omega_{e} }}{{\omega_{b} }}. $$
(18)

where \(\omega_{e}\) indicates the number of bits extracted incorrectly, and \(\omega_{b}\) denotes the number of bits embedded into the image.

Figure 6 shows the relationship between PSNR and embedding level \(\beta\), where \(\beta = \left\lceil {\frac{T + G}{{mn}}} \right\rceil\). To ensure the watermark invisible to human eyes, PSNR should be greater than 38 dB [21], i.e., \(\beta < 5\). Here, the threshold \(T\) is decided such that it is exactly larger than the maximum of \(\alpha\) for all divided image blocks, where \(T\) and \(G\) are integer multiples of \(m \times n/2\). For the Lena image with the block sized \(8 \times 8\), we decide that \(T = 128\) and \(G = 64\) such that \(\beta\) is equal to 6, not less than 5. In the same way, thresholds \(T\) and \(G\) are selected for the Airplane image with the block of size \(8 \times 8\), i.e. \(T = 16{0, }G = 32\).

Fig. 6.
figure 6

The relationship between \(\beta\) and PSNR.

Specifically, we evaluate the robustness according to the relationship between BER and \(q\) with the same value of PSNR, and the relationship between 1-BER and PSNR with the same compression strength. With the same value of \(q\) and PSNR, the lower the BER, the stronger the robustness against JPEG compression.

Table 1 shows the BER with compression quality factors of 90, 85 and 80 respectively. Meanwhile, the PSNR of our algorithm is slightly higher than that of Zeng et al. [13]. Moreover, the values of BER are obviously lower under the same compression quality factor. That is to say, the proposed algorithm is more robust to JPEG compression than Zeng et al.’s method [13].

Table 1. Comparison for block size \({8} \times {8}\).

As shown in Fig. 7, we initialize the JPEG quality to 90%, 80% and 70%. Notice that when the PSNR value is less than a certain value, the BER is quite low. While the PSNR becomes lager than this value, the BER increases sharply. Obviously, if the PSNR value is the same, the 1-BER of the proposed algorithm is smaller. That is to say, our proposed algorithm outperforms [13] in terms of the robustness.

Fig. 7.
figure 7

Comparison for \(EC = 4,096\) bits and different PSNRs.

Figure 8 shows the relationship between BER and \(q\) with the same value of PSNR. In [13], the BER increases sharply in case of \(q < 85\%\). The proposed algorithm has the same phenomenon in case of \(q < 80\%\). Therefore, the proposed algorithm is more robust to JPEG compression.

Fig. 8.
figure 8

Comparison for \(EC = 4,096\) bits and quality factors.

5 Conclusions

To overcome the disadvantages of insufficient embedding capacity and weak robustness of the previous RRW methods, in this paper, a new embedding mechanism for RRW is proposed. First, the cover image is divided into non-overlapping blocks and a histogram is generated by applying a high pass filter to each block. Then, the watermark is embedded into the blocks by shifting this histogram. Specifically, instead of using half pixels in the block, each pixel is modified to minimize the embedding distortion. Moreover, a strategy for determining the parameters is proposed to make the method reversible without side information. Experimental results show that compared with the previous methods, the proposed scheme has sufficient robustness against JPEG compression.