# Compression Domain Reversible Robust Watermarking Based on Multilayer Embedding

Authors: Qianwen Li; Xiang Wang; Qingqi Pei
Journal: Security and Communication Networks
 (2022)

---

## Abstract

The integration of data sensing, communication, and computing (SCC) is a requirement for the IoT to provide a high quality of service. However, there are still data security issues in SCC integration, where data are vulnerable to leakage during sensing, communication, and computing, and the leaked data are difficult to be copyrighted and traced to the source of leakage. In this study, we consider the copyright protection problem in multimedia data transmission and propose a robust reversible watermarking algorithm based on multilayer embedding in the compression domain. In the first stage, the robust watermark is embedded into the mid-frequency coefficients, and then, the auxiliary information to revert the robust embedding is embedded into the high-frequency coefficients. To improve robustness and reduce embedding distortion, we propose a coefficient selection method, by which the watermark and the recovery information are embedded in different DCT-quantized coefficients according to the texture complexity. Experiment results indicate that the proposed method performs better than some state-of-the-art RRW methods.


---

## Body

## 1. Introduction

As one of the strategic emerging industries with important global development, the Internet of Things (IoT) technology is rapidly penetrating into various application areas, from people’s daily lives to national strategic industries, and in many ways, also driving the world’s development progress. IoT uses communication technologies such as local networks or the Internet to connect sensors [1–3], controllers, machines [4, 5], people, and objects together in new ways, forming a network where people are connected to things and things are connected to things. The integration of data sensing, communication, and computing (SCC) is a requirement for the IoT to provide a high quality of service. However, there are still security issues in SCC integration [6–10], such as node location leakage in data sensing, data leakage in data communication, and authentication. These privacy and security issues have an impact on the development of IoT. Digital watermarking, as a lightweight algorithm, can effectively solve the problems such as data authentication after data leakage. Existing watermarking algorithms can be classified into the robust watermarking algorithm, reversible watermarking algorithm, and robust reversible watermarking algorithm according to the characteristics of watermarking.Robust watermarking algorithms require high robustness, which means it is possible to extract the correct watermarks when the marked image is attacked [11]. Robust watermarking schemes based on spatial domain mainly utilize some statistical characteristics of the images (e.g., focus or centroid of the image). Because the spatial domain is more intuitive and simple, most of the studies focus on it. However, the transform domain is more robust to compression and quantify attacks. Thus, the transform domain-based method achieved more attention [12, 13].However, the robust watermark always introduces irreversible distortions to the cover images, which cannot be tolerated in some special applications, such as medical image system, law enforcement, and military image. Reversible watermarking [14] is proposed to overcome this issue, by which the cover image could be recovered after watermark extraction. There are many relative researches have been proposed so far, mainly including four categories: compression based [15–17], integer transform based [18–21], histogram shifting (HS) based [14, 22–24], and prediction-error expansion (PEE) [25]. Compression-based technology exploits the embedded space by lossless compression of a specific area of the cover image, and then, this area is replaced by the compressed image and the watermark. This kind of method cannot efficiently use the redundant information of the image itself, so its embedding efficiency is low. Different expansion algorithm is one of the representative schemes of integer transform-based researches. This algorithm groups pixels into pairs and the watermarks are embedded into the expansion error of pixel pairs. Later works involve changing pixel pairs into pixel blocks to increase capacity. The histogram translation algorithm embeds watermarking information by changing the histogram formed by an attribute of the host image. This attribute may be only the value of pixels, or it may be the prediction error of the image. Prediction-error expansion (PEE) is one of the representative works. The histogram is constructed by counting the prediction errors of the pixels, and then, a part of the area in the histogram is shifted to create space for embedding the watermark. The method is characterized by large embedded capacity and low complexity of the algorithm. However, all these methods are so fragile that the watermarking cannot be extracted after being attacked.For solving the poor robustness of reversible watermarking, a new technique named robust reversible watermarking (RRW) is proposed. By RRW, the cover images can be recovered if the marked images do not suffer from attacks, and the robust watermarks are robust against some normal attacks such as image compression, geometric attacks, and unavoidable addition of random noise. As a result, at the decoder side, both the watermarks extraction and image recovery can be achieved in the case of no attacks.To our knowledge, the RRW methods mainly include two categories: generalized histogram shifting (GHS) and multilayer watermarking (MLW). GHS achieves good robustness by increasing the shifting distance of partial bins in the statistical quantity histogram, by which extra space for tolerance is created around the embedded position. When the image is distorted, the watermark is supposed to be extracted correctly as long as the distortion of the histogram does not exceed the fault-tolerant area. One of the representative results of such methods is histogram rotation (HR) [26] proposed by Bender et al., which is based on the patchwork theory [27] and modulo-256 addition. Their scheme can achieve reversibility and robustness by using a circular interpretation of bijective transformations. However, to avoid the overflow/underflow problems, the so-called salt-and-pepper noise occurs. Later on, Ni et al. [28] improved Zeng et al.’s scheme by utilizing different bit-embedding strategies for groups of pixels with different pixel grayscale value distributions together with error correction codes. Experimental results show this method had good robustness in the absence of salt-and-pepper noise. The other is redundant histogram shifting (RHS) [29], which is based on the traditional histogram shifting and gets more redundancy by expanding the distance of shifting. Experiment results show a good performance of robustness. For this method can be extended to the transform domain to improve robustness, some RRW schemes have been developed based on this framework [30, 31]. However, these methods require a lot of additional information (e.g., location maps) to be transmitted over additional secure channels. Therefore, no longer suitable for many applications.As for MLW, Coltuc proposed the relevant framework in reference [13], which contains two embedding stages: the robust embedding stage and the reversible embedding stage. As shown in Figure 1, the first is the robust watermarking stage, where we embed the watermark information W by the robust watermarking algorithm. Then, the reversible watermarking algorithm is used to embed additional information RI to recover the original image. Finally, the watermarked image is generated. In the case of no attacks, the robust watermark can be extracted from the marked image, and the decoder exactly recovers the cover image. In the case of attacks, the reversibility is lost, but the robust watermark is also supposed to be extracted. One of the advantages of this framework is that the existing excellent robust and reversible watermarking methods could be directly introduced because of the two independent stages. However, Coltuc et al.’s method has its own shortcomings. The reversible watermark in stage 2 directly consists of the distortion from the first stage. Because the watermark information is too large, a reversible watermark (RW) scheme with a large capacity is required, but this will cause a considerable distortion. In addition, the robust and the reversible watermarking use the same embedding domains; thus, the two stages are not independent and interfere with each other.Figure 1
The framework of Coltuc et al.’s RRW method.As shown above, there are a large number of RRW methods, but few algorithms are proposed specifically for JPEG image. In this study, we propose a new reversible robust watermarking scheme for JPEG images. The reversible watermarks and robust watermarks are embedded into the coefficients of different frequency bands, respectively. Meanwhile, the algorithm preferentially selects the region with complex image texture for robust watermark embedding and the smooth texture region for reversible watermark embedding. That will cause less distortion. Moreover, a new robust watermarking is proposed in the study, which needs less information to invert both the robust and reversible watermarking in the second stage.The rest of this study is organized as follows: in Section2, the framework of MLW is introduced in detail. In Section 3, the proposed scheme is presented in detail. Experiment results compared with Zeng et al.’s RRW method are given in Section 4. Finally, conclusions are drawn.


## 2. Preliminaries

The MLW algorithm [12] proposed by Coltuc et al. is briefly introduced in this section. The framework of MLW includes two embedding stages: reversible embedding stage and robust embedding stage.As shown in Figure1, a watermark W is embedded into the cover image C by a robust watermarking method to generate a transitionary image CW′, and then, the recovery information RI=C−CW′ is hidden in the image CW′ by the reversible watermarking method. In the decoder, as Figure 2 shows, the recovery information RI can be extracted from CW as well as recovering the transitionary image CW′. Then, the original image C can be recovered according to C=CW′+RI.Figure 2
Decoder without distortion.


### 2.1. Embedding Procedure

#### 2.1.1. Robust Embedding

The cover image is divided to8×8 blocks and the DCT coefficients of each block are computed. One bit of watermark can be embedded into two coefficients from the middle-band frequencies of one block. For instance, a bit of “1” is embedded if the difference of these two coefficients is positive and “0” otherwise. Specifically, for two coefficients c1 and c2 of a 8×8 block, one bit of watermark w is embedded as follows:(1)c1′,c2′=c1,c2,ifc1−c2>0andw=1,c2,c1,ifc1−c2≤0andw=1,c1,c2,ifc1−c2≤0andw=0,c2,c1,ifc1−c2>0andw=0,where c1′ and c2′ denote the marked coefficients. Figure 3 shows two examples of the embedding process, and the two framed coefficients are the selected coefficients c1 and c2. In the case of c1>c2, when embedding bit 0, the positions of two coefficients are swapped; otherwise, the positions remain unchanged. In the case of c1≤c2, when embedding bit 0, the positions of two coefficients remain unchanged; otherwise, they are swapped.Figure 3
Robust embedding.


### 2.2. Reversible Embedding

As shown in Figure1, in this stage, the recovery information RI=C−CW′ , which is the difference between C and CW′, is first generated. Then, RI is losslessly compressed to get the reversible watermark R. The RRW relies on the reversible watermarking stage’s embedding capacity; thus, a reversible watermarking algorithm with high capacity is demanded. Specifically, CW′ is partitioned into pairs of pixels, and each pair c1′,c2′ is transformed as follows:(2)c1″=m+1c1′−mc2′,c2″=m+1c2′−mc1′,where m>1 is a fixed integer to control EC.The watermarkr∈−m,m is embedded as follows:(3)cw1,cw2⟶c1″+r,c2″,and after all bits of the compressed information R are embedded, the marked image is generated.


### 2.3. Extracting Procedure

In the case of the marked imageCW suffers no distortion, as shown in Figure 2, the reversible extracting procedure is first implemented. The same as the embedding procedure in stage 2, the marked image CW is partitioned into pairs of pixels, and for each pixel pair, the compressed information R is extracted as follows:(4)r=m+1cw1+mcw2mod2m+1,and the extracted watermark R is then decompressed to get the recovery information RI, and the transitionary image CW′ is recovered as follows:(5)c1′=m+1cw1+mcw22m+1,c2′=m+1cw2+mcw12m+1,where ∗ is the floor operation.After reversible decoding, the watermarkW could be extracted from the transitionary image CW′ by a robust extracting process. Specifically, CW′ is divided into 8×8 blocks and the DCT coefficients of each block are computed. For each block, the watermarking bit is extracted according to the difference between the two selected coefficients. If this difference is positive, the embedded information is “1,” and otherwise, the embedded information is “0.” Finally, the original image is recovered as C=RI+CW′.In the case of marked imageCW with distortion, the original image C and the transitionary image CW′ could not be restored, but the watermark W can be extracted from the distorted image directly, as shown in Figure 4.Figure 4
Decoder with distortion.


## 2.1. Embedding Procedure

### 2.1.1. Robust Embedding

The cover image is divided to8×8 blocks and the DCT coefficients of each block are computed. One bit of watermark can be embedded into two coefficients from the middle-band frequencies of one block. For instance, a bit of “1” is embedded if the difference of these two coefficients is positive and “0” otherwise. Specifically, for two coefficients c1 and c2 of a 8×8 block, one bit of watermark w is embedded as follows:(1)c1′,c2′=c1,c2,ifc1−c2>0andw=1,c2,c1,ifc1−c2≤0andw=1,c1,c2,ifc1−c2≤0andw=0,c2,c1,ifc1−c2>0andw=0,where c1′ and c2′ denote the marked coefficients. Figure 3 shows two examples of the embedding process, and the two framed coefficients are the selected coefficients c1 and c2. In the case of c1>c2, when embedding bit 0, the positions of two coefficients are swapped; otherwise, the positions remain unchanged. In the case of c1≤c2, when embedding bit 0, the positions of two coefficients remain unchanged; otherwise, they are swapped.Figure 3
Robust embedding.


## 2.1.1. Robust Embedding

The cover image is divided to8×8 blocks and the DCT coefficients of each block are computed. One bit of watermark can be embedded into two coefficients from the middle-band frequencies of one block. For instance, a bit of “1” is embedded if the difference of these two coefficients is positive and “0” otherwise. Specifically, for two coefficients c1 and c2 of a 8×8 block, one bit of watermark w is embedded as follows:(1)c1′,c2′=c1,c2,ifc1−c2>0andw=1,c2,c1,ifc1−c2≤0andw=1,c1,c2,ifc1−c2≤0andw=0,c2,c1,ifc1−c2>0andw=0,where c1′ and c2′ denote the marked coefficients. Figure 3 shows two examples of the embedding process, and the two framed coefficients are the selected coefficients c1 and c2. In the case of c1>c2, when embedding bit 0, the positions of two coefficients are swapped; otherwise, the positions remain unchanged. In the case of c1≤c2, when embedding bit 0, the positions of two coefficients remain unchanged; otherwise, they are swapped.Figure 3
Robust embedding.


## 2.2. Reversible Embedding

As shown in Figure1, in this stage, the recovery information RI=C−CW′ , which is the difference between C and CW′, is first generated. Then, RI is losslessly compressed to get the reversible watermark R. The RRW relies on the reversible watermarking stage’s embedding capacity; thus, a reversible watermarking algorithm with high capacity is demanded. Specifically, CW′ is partitioned into pairs of pixels, and each pair c1′,c2′ is transformed as follows:(2)c1″=m+1c1′−mc2′,c2″=m+1c2′−mc1′,where m>1 is a fixed integer to control EC.The watermarkr∈−m,m is embedded as follows:(3)cw1,cw2⟶c1″+r,c2″,and after all bits of the compressed information R are embedded, the marked image is generated.


## 2.3. Extracting Procedure

In the case of the marked imageCW suffers no distortion, as shown in Figure 2, the reversible extracting procedure is first implemented. The same as the embedding procedure in stage 2, the marked image CW is partitioned into pairs of pixels, and for each pixel pair, the compressed information R is extracted as follows:(4)r=m+1cw1+mcw2mod2m+1,and the extracted watermark R is then decompressed to get the recovery information RI, and the transitionary image CW′ is recovered as follows:(5)c1′=m+1cw1+mcw22m+1,c2′=m+1cw2+mcw12m+1,where ∗ is the floor operation.After reversible decoding, the watermarkW could be extracted from the transitionary image CW′ by a robust extracting process. Specifically, CW′ is divided into 8×8 blocks and the DCT coefficients of each block are computed. For each block, the watermarking bit is extracted according to the difference between the two selected coefficients. If this difference is positive, the embedded information is “1,” and otherwise, the embedded information is “0.” Finally, the original image is recovered as C=RI+CW′.In the case of marked imageCW with distortion, the original image C and the transitionary image CW′ could not be restored, but the watermark W can be extracted from the distorted image directly, as shown in Figure 4.Figure 4
Decoder with distortion.


## 3. Proposed Method

As aforementioned, Coltuc et al.’s algorithm has its own shortcomings. First, the two embedding stages shared the same embedding domain, which leads to additional distortion. At decoder side actually will face two kinds of noises: the attacks from outside and the interference of the reversible embedding. Second, the spatial domain embedding process is not suitable to be directly introduced to JPEG images.To this end, a RRW scheme for JPEG images is presented in this section. This scheme focuses on the compressed domain and embeds watermarks in the DCT-quantized coefficients. The proposed method follows the Coltuc et al.’s MLW framework and overcomes some shortcomings.As Figure5 shows, in the JPEG compression process, the source image is divided into 8×8 sized nonoverlapping blocks, for the pixels in each block, the DCT will be performed. Then, the DCT coefficients are quantified by using a quantization table, which is the cause of the image loss. After the entropy coding, the JPEG image is formed. The proposed method is applied to the quantized coefficients, and these coefficients are divided into two independent embedding domains, one for robust embedding and the other for reversible embedding.Figure 5
The position of our embedding process throughout the JPEG compress procedure.


### 3.1. Embedding Procedure

The embedding procedure roughly contains three steps: coefficients preprocessing, robust embedding, and reversible embedding. This section will introduce them one by one.


### 3.2. Stage 1 (Coefficients Selection)

The DCT-quantized coefficients of the blockBi are zigzag arranged to generate a vector Ci. As shown in Figure 6, the vector could easily be divide into four regions: the low frequency Cil marked in yellow, the medium frequency for robust embedding Ciro marked in orange, the medium frequency for reversible embedding Cire marked in red, and the high frequency Cih marked in bronzing. The energy is concentrated in the low frequency coefficients Cil, which always refers to the part with large scale information (e.g., the background region). Thus, data embedding into low-frequency coefficients can generate visible artifacts. Coefficients in this part will stay unchanged. For the high-frequency region Cih, which always represents the small-scale detail information of the images, such as noise, edge, and jump part). The coefficients in this part will also remain unchanged because changing them affects the efficiency of entropy coding. Moreover, we use Cih to predict the texture complexity of each block as follows:(6)Bi∈Bs,ifg≤G;Bc,ifg>G;where we set G>0 as the threshold to distinguish smooth block Bs and complex block Bc, and g=∑ck∈Chck. is used to predict the texture complexity of each block. Obviously, the larger g is, the more complex block texture, which indicates the richer block information.The medium frequency coefficients in Cro are robust against many attacks, which are selected to carry the robust watermarks. In addition, because the area with higher textural information usually has higher just noticeable difference (JND), we only use Cro of the blocks from set Bc for robust embedding to ensure the high visual image quality. The reversible watermark in this scheme is embedded by the classical histogram shift (HS). For HS methods, the histogram with higher peak value and small variance produces higher performance. Thus, we use the coefficients of region Cre in smooth block Bs to embed reversible watermark, because the high-frequency coefficient in smooth area has a small variance. Figure 7 shows the comparison between the histogram of Cre and Cro. Therefore, the coefficients of medium frequency region Cre marked in red in Figure 6 from smooth block Bs are used for reversible embedding.Figure 6
Frequency segmentation in a block.Figure 7
Coefficients histogram of regionCre (a) and region Cro (b) for Lena.
(a)(b)


### 3.3. Stage 2 (Robust Embedding)

The blockBi includes two independent embedding part: a robust embedding part Ciro=cip,cip+1,…,cit. and a reversible embedding part Cire=cit+1,cit+2,…,ciq., where p, q, and t represent the position of the coefficient in the vector Ci. The robust watermark is embedding into Cro of the complex blocks. We use the set Ω to denote these coefficients: Ciro∈Ω,ifBi∈Bc. Suppose there are n coefficients in Ω. We use a random mapping as follows: 1,2,…,n⇒σ1,…,σ2,σn, and the coefficients are arranged as a random long vector cσ1,cσ2,…,cσn.. Then, to improve the robustness, we partition the coefficients into l segments Sk with m coefficients according to the robust watermarks length l, where m=n/l, k∈0,…,l−1, and ck×m+1,ck×m+2,…,ck+1×m∈Sk. Details are shown in Figure 8. Each coefficients ci in the kth segment Sk is modified to embed the kth bit watermark wk∈0,1 as follows:(7)cwi=ci+δk,ifwk=1andci∈Sk,ci−δk,ifwk=0andci∈Sk.δk is the modification value of each segment, which is calculated by the threshold T as follows:(8)δk=T−∑cim,where ∑=∑i=k×m+1k+1×mk∈0,…,l−1. For the reversibility, δk in each segment must be recorded. After embedding, the sum of coefficients in each segment is greater than or equal to a threshold T.Figure 8
The diagram of robust embedding.It is worth noting that the coefficients will stay unchanged if the sum of the original coefficients of a segment exceeds or equals to the threshold requirement, i.e., the modificationδ=0. After the watermark embedding is completed, the related inverse operation is performed on the coefficients in each segment to restore the position of the coefficients in each block. Afterwards, the robust embedding procedure is completed.


### 3.4. Stage 3 (Reversible Embedding)

In reversible embedding stage, auxiliary informationL, which is the information to erase the robust embedding distortion at the decoder side, is as reversible watermark. With the help of the auxiliary information L, the extraction of the watermarks w and recovery of the original image could be achieved. The auxiliary information L consists of δi when each bit of robust watermark is embedded:(9)L=δ1,δ2,⋯,δl.The auxiliary informationL is losslessly compressed as the reversible watermarks and transformed into a 0–1 sequence β=β1,…,βl with length l. Then, the reversible watermarks β are embedded in all the coefficients in the Cre of smooth block Bi∈Bs by the classical HS-based reversible watermarking method. The set Φ=Cire,ifBiinBs. More specifically, the reversible embedding process is performed as follows:(10)cwi′=ci+βj×T1+1,ifci∈Φandci∈0,T1,ci−βj×T1+1,ifci∈Φandci∈−T1,0,ci+T1+1,ifci∈Φandci>T1,ci−T1+1,ifci∈Φandci<T1,where βj∈0,1j=1,…,l is the reversible watermark, and T1 is the threshold controlling the EC (embedding capacity) of HS method.Noticed that, in consideration of the entropy coding in JPEG compress procedure, the more zero coefficients are, the smaller size of the JPEG image is. Thus, we skip the situation whenci=0, which will control the size of the watermarked image. As for the problem of overflow/underflow that most watermarking schemes must face, our algorithm does not need to worry about it because it works in the transform domain of the JPEG image.After the above operations, all the watermarks are embedded in the coefficients. The last step is to reintegrate the DCT coefficients and rewrite them into the JPEG image.


### 3.5. Extracting Procedure

As for the decoding side, there are two kinds of cases that should be mentioned. In the case of no attacks, it contains the watermark extraction and image recovery. After preprocessing the DCT-quantized coefficients as mentioned in Section3.1, the reversible watermarks should firstly be extracted:(11)β=0,ifcwi′∈−T1,T1andcwi′≠0,1,ifcwi′∈−2×T1−1,−T1orcwi′∈T1,2×T1+1.The auxiliary informationL is obtained after the decompression of the reversible watermarks. Meanwhile, the coefficient ci∈Φ is recovered by the following equation:(12)ci=cwi′−T1+1,ifcwi′∈T1,+∞,cwi′+T1+1,ifcwi′∈−∞,−T1.According to Section3.1, the robust watermark is extracted only by the following equation:(13)w=0,if∑cwi<0,1,if∑cwi≥0.Finally, with help of the auxiliary informationL, the coefficient cσiro is recovered by the following equation:(14)ci=cwi−δk,ifw=1,cwi+δk,ifw=0,where the definition of δk is as shown in equation (9). With the related inverse operation, the coefficients can be back to their original positions and the coefficients ci∈Ω can be restored.In the case of the marked image is distorted, the original image could not be recovered. However, the watermark is expected to be extracted according to equation (14) owning to the robustness of statistical property.


### 3.6. Procedures of Embedding and Extraction

The embedding procedure is described as follows:Step 1. The JPEG image I is read in and each JPEG compression unit is treated as a processing block Bi.Step 2. Zigzagly arranging each block to generate a vector Ci. Each vector is divided into 4 regions Cl,Cro,Cre,Ch as mentioned before. Then, using the coefficients in region Ch to predict the texture complexity of each block as equation (6).Step 3. Picking out all the coefficients in the region Cro of complex blocks, then integrating them into a long vector. After random mapping, the vector is then split into separated segments.Step 4. As shown in equation (8), the robust watermarks w will be embedded in each separated segment in turn. As w=1, the coefficients in the segment are modified so that its sum is greater than the threshold T; otherwise, it is less than the threshold −T.Step 5. Noticed that the following auxiliary information should be recorded as reversible watermark: the value of the modification of each segment δk.Step 6. The reversible watermark will be embedded in the region Cre of smooth blocks Bi∈Φ by the traditional HS method as shown in equation (11).Step 7. After robust embedding and reversible embedding, reintegrate the DCT coefficients and rewrite them into the JPEG image. The watermarked image is obtained.The extraction scheme is the inverse of the embedding scheme as follows:Step 1. Referring to steps 1, 2, and 3 in embedding procedure, the regions Cro and Cre are obtained.Step 2. The reversible watermark should be extracted first. Using the traditional HS extraction and recovery method, auxiliary information can be obtained and coefficients in the region Cre of smooth blocks can be restored.Step 3. Referring to step 4 in the embedding procedure, the robust watermark can be extracted by judging the sign of the sum of the coefficients in the segment, as shown in equation (13).Step 4. According to auxiliary information, coefficients in the region Cro of complex blocks are recovered by the related inverse operation.Step 5. Finally, reintegrate the DCT coefficients and rewrite them into the JPEG image. The watermarked is obtained and the original image is restored.It is worth mentioning that the original image may not be recovered if the watermarked image is attacked. However, the watermark is also supposed to be extracted.


## 3.1. Embedding Procedure

The embedding procedure roughly contains three steps: coefficients preprocessing, robust embedding, and reversible embedding. This section will introduce them one by one.


## 3.2. Stage 1 (Coefficients Selection)

The DCT-quantized coefficients of the blockBi are zigzag arranged to generate a vector Ci. As shown in Figure 6, the vector could easily be divide into four regions: the low frequency Cil marked in yellow, the medium frequency for robust embedding Ciro marked in orange, the medium frequency for reversible embedding Cire marked in red, and the high frequency Cih marked in bronzing. The energy is concentrated in the low frequency coefficients Cil, which always refers to the part with large scale information (e.g., the background region). Thus, data embedding into low-frequency coefficients can generate visible artifacts. Coefficients in this part will stay unchanged. For the high-frequency region Cih, which always represents the small-scale detail information of the images, such as noise, edge, and jump part). The coefficients in this part will also remain unchanged because changing them affects the efficiency of entropy coding. Moreover, we use Cih to predict the texture complexity of each block as follows:(6)Bi∈Bs,ifg≤G;Bc,ifg>G;where we set G>0 as the threshold to distinguish smooth block Bs and complex block Bc, and g=∑ck∈Chck. is used to predict the texture complexity of each block. Obviously, the larger g is, the more complex block texture, which indicates the richer block information.The medium frequency coefficients in Cro are robust against many attacks, which are selected to carry the robust watermarks. In addition, because the area with higher textural information usually has higher just noticeable difference (JND), we only use Cro of the blocks from set Bc for robust embedding to ensure the high visual image quality. The reversible watermark in this scheme is embedded by the classical histogram shift (HS). For HS methods, the histogram with higher peak value and small variance produces higher performance. Thus, we use the coefficients of region Cre in smooth block Bs to embed reversible watermark, because the high-frequency coefficient in smooth area has a small variance. Figure 7 shows the comparison between the histogram of Cre and Cro. Therefore, the coefficients of medium frequency region Cre marked in red in Figure 6 from smooth block Bs are used for reversible embedding.Figure 6
Frequency segmentation in a block.Figure 7
Coefficients histogram of regionCre (a) and region Cro (b) for Lena.
(a)(b)


## 3.3. Stage 2 (Robust Embedding)

The blockBi includes two independent embedding part: a robust embedding part Ciro=cip,cip+1,…,cit. and a reversible embedding part Cire=cit+1,cit+2,…,ciq., where p, q, and t represent the position of the coefficient in the vector Ci. The robust watermark is embedding into Cro of the complex blocks. We use the set Ω to denote these coefficients: Ciro∈Ω,ifBi∈Bc. Suppose there are n coefficients in Ω. We use a random mapping as follows: 1,2,…,n⇒σ1,…,σ2,σn, and the coefficients are arranged as a random long vector cσ1,cσ2,…,cσn.. Then, to improve the robustness, we partition the coefficients into l segments Sk with m coefficients according to the robust watermarks length l, where m=n/l, k∈0,…,l−1, and ck×m+1,ck×m+2,…,ck+1×m∈Sk. Details are shown in Figure 8. Each coefficients ci in the kth segment Sk is modified to embed the kth bit watermark wk∈0,1 as follows:(7)cwi=ci+δk,ifwk=1andci∈Sk,ci−δk,ifwk=0andci∈Sk.δk is the modification value of each segment, which is calculated by the threshold T as follows:(8)δk=T−∑cim,where ∑=∑i=k×m+1k+1×mk∈0,…,l−1. For the reversibility, δk in each segment must be recorded. After embedding, the sum of coefficients in each segment is greater than or equal to a threshold T.Figure 8
The diagram of robust embedding.It is worth noting that the coefficients will stay unchanged if the sum of the original coefficients of a segment exceeds or equals to the threshold requirement, i.e., the modificationδ=0. After the watermark embedding is completed, the related inverse operation is performed on the coefficients in each segment to restore the position of the coefficients in each block. Afterwards, the robust embedding procedure is completed.


## 3.4. Stage 3 (Reversible Embedding)

In reversible embedding stage, auxiliary informationL, which is the information to erase the robust embedding distortion at the decoder side, is as reversible watermark. With the help of the auxiliary information L, the extraction of the watermarks w and recovery of the original image could be achieved. The auxiliary information L consists of δi when each bit of robust watermark is embedded:(9)L=δ1,δ2,⋯,δl.The auxiliary informationL is losslessly compressed as the reversible watermarks and transformed into a 0–1 sequence β=β1,…,βl with length l. Then, the reversible watermarks β are embedded in all the coefficients in the Cre of smooth block Bi∈Bs by the classical HS-based reversible watermarking method. The set Φ=Cire,ifBiinBs. More specifically, the reversible embedding process is performed as follows:(10)cwi′=ci+βj×T1+1,ifci∈Φandci∈0,T1,ci−βj×T1+1,ifci∈Φandci∈−T1,0,ci+T1+1,ifci∈Φandci>T1,ci−T1+1,ifci∈Φandci<T1,where βj∈0,1j=1,…,l is the reversible watermark, and T1 is the threshold controlling the EC (embedding capacity) of HS method.Noticed that, in consideration of the entropy coding in JPEG compress procedure, the more zero coefficients are, the smaller size of the JPEG image is. Thus, we skip the situation whenci=0, which will control the size of the watermarked image. As for the problem of overflow/underflow that most watermarking schemes must face, our algorithm does not need to worry about it because it works in the transform domain of the JPEG image.After the above operations, all the watermarks are embedded in the coefficients. The last step is to reintegrate the DCT coefficients and rewrite them into the JPEG image.


## 3.5. Extracting Procedure

As for the decoding side, there are two kinds of cases that should be mentioned. In the case of no attacks, it contains the watermark extraction and image recovery. After preprocessing the DCT-quantized coefficients as mentioned in Section3.1, the reversible watermarks should firstly be extracted:(11)β=0,ifcwi′∈−T1,T1andcwi′≠0,1,ifcwi′∈−2×T1−1,−T1orcwi′∈T1,2×T1+1.The auxiliary informationL is obtained after the decompression of the reversible watermarks. Meanwhile, the coefficient ci∈Φ is recovered by the following equation:(12)ci=cwi′−T1+1,ifcwi′∈T1,+∞,cwi′+T1+1,ifcwi′∈−∞,−T1.According to Section3.1, the robust watermark is extracted only by the following equation:(13)w=0,if∑cwi<0,1,if∑cwi≥0.Finally, with help of the auxiliary informationL, the coefficient cσiro is recovered by the following equation:(14)ci=cwi−δk,ifw=1,cwi+δk,ifw=0,where the definition of δk is as shown in equation (9). With the related inverse operation, the coefficients can be back to their original positions and the coefficients ci∈Ω can be restored.In the case of the marked image is distorted, the original image could not be recovered. However, the watermark is expected to be extracted according to equation (14) owning to the robustness of statistical property.


## 3.6. Procedures of Embedding and Extraction

The embedding procedure is described as follows:Step 1. The JPEG image I is read in and each JPEG compression unit is treated as a processing block Bi.Step 2. Zigzagly arranging each block to generate a vector Ci. Each vector is divided into 4 regions Cl,Cro,Cre,Ch as mentioned before. Then, using the coefficients in region Ch to predict the texture complexity of each block as equation (6).Step 3. Picking out all the coefficients in the region Cro of complex blocks, then integrating them into a long vector. After random mapping, the vector is then split into separated segments.Step 4. As shown in equation (8), the robust watermarks w will be embedded in each separated segment in turn. As w=1, the coefficients in the segment are modified so that its sum is greater than the threshold T; otherwise, it is less than the threshold −T.Step 5. Noticed that the following auxiliary information should be recorded as reversible watermark: the value of the modification of each segment δk.Step 6. The reversible watermark will be embedded in the region Cre of smooth blocks Bi∈Φ by the traditional HS method as shown in equation (11).Step 7. After robust embedding and reversible embedding, reintegrate the DCT coefficients and rewrite them into the JPEG image. The watermarked image is obtained.The extraction scheme is the inverse of the embedding scheme as follows:Step 1. Referring to steps 1, 2, and 3 in embedding procedure, the regions Cro and Cre are obtained.Step 2. The reversible watermark should be extracted first. Using the traditional HS extraction and recovery method, auxiliary information can be obtained and coefficients in the region Cre of smooth blocks can be restored.Step 3. Referring to step 4 in the embedding procedure, the robust watermark can be extracted by judging the sign of the sum of the coefficients in the segment, as shown in equation (13).Step 4. According to auxiliary information, coefficients in the region Cro of complex blocks are recovered by the related inverse operation.Step 5. Finally, reintegrate the DCT coefficients and rewrite them into the JPEG image. The watermarked is obtained and the original image is restored.It is worth mentioning that the original image may not be recovered if the watermarked image is attacked. However, the watermark is also supposed to be extracted.


## 4. Experimental Results and Discussion

This section presents experimental results for the proposed scheme. The proposed method is evaluated with embedding capacity from 200 bits to 1000 bits with an interval of 100 bits. Notice that, Coltuc et al.’s method does not perform well in JPEG images, which is explained earlier. Thus, the performance of the proposed scheme will be compared with Zeng et al.’s RHS method implemented in the compressed domain. For Zeng et al.’s method, the block size is fixed to8×8 in consideration of JPEG procedure, and only the coefficients in the region Cro are used for the sake of fair comparison. We implement the method by Matlab and three 512×512 sized JPEG images (lena, baboon, and airplane) serve as test images, which are compressed with a quality factor of 95%. We change the embedding intensities to obtain different BERs and PSNRs both for the proposed method and Zeng et al.’s method. We change the variables G and T to control the PSNR of the proposed method. The threshold T1, which controls the EC in reversible embedding stage, is set as a fixed number T1=1, because it has little effect on the image.


### 4.1. Robustness against JPEG Recompression

The proposed scheme is first evaluated the robustness against JPEG recompression. The bit error rate (BER) is adopted to estimate the robustness:(15)ber=lelw,where le and lw are the number of error bits and watermark bits, respectively. The trend of BER with the changes of the EC and PSNR for different images is shown in Figure 9. As mentioned before, to generate different PSNRs, the variables controlling the embedding intensity are varied within a certain range. Specifically, T is varying from 30 to 130 and the scope of G is based on the complexity of the image. As the axis of the EC is fixed, the BER increases with the growth of PSNR. It is because the embedding intensity decreases with the PSNR increasing, resulting in lower robustness. Furthermore, as the axis of the PSNR is fixed, the BER increases with the growth of EC. This is because the robustness of the algorithm decreases as the embedding capacity EC increases when the PSNR is fixed, which leads to an increase in BER.Figure 9
Trend of BER with the changes of the EC and PSNR.Figure10 shows the comparison performance with BER vs. Figure 11PSNR at the EC of 200 bits and 500 bits. The proposed method outperforms the Zeng et al.’s method as the PSNR increases for the test images in most situations, especially for the textural image (baboon). In the case of the 80% JPEG compression, the proposed method has no error bits for 200 and 500 bits. As for the compression is to 60%, the correctness still can arrive at 100% only controlling the PSNR below 40 for the EC of 200 bits, and the corresponding PSNR might be lower when the EC is 500 bits. Even at 40% JPEG compressing, the proposed method also could keep the error rate low when the PSNR is below 36 for the EC of 200 bits. For Zeng et al.’s method, the BER quickly increases to around 50% when the PSNR arrives at a critical point, which means all the bits are wrong. The performance of Zeng et al.’s embedding scheme depends on the distribution of the histogram determined by the variance. The smaller the variance values, the better the performance of the data hiding scheme. Therefore, the performance for textural images is not satisfactory when using Zeng et al.’s method.Figure 10
Comparison under different PSNRs at EC is 200 bits.Figure 11
Comparison under different PSNRs at EC is 500 bits.Referring to Figure12, the comparisons at different JPEG Figure 13quality factors are presented. In this comparison, the PSNR is set to around 34 dB. It is obvious that the proposed method performs much better. For Zeng et al.’s method, the correct rate dropped quickly with the quality factor decrease, especially for the textural image baboon. This can be explained by comparing the threshold at decoding side: T and G for Zeng et al.’s method and 0 for the proposed method. Table 1 lists partial sum of the coefficients and partial arithmetic average difference of the coefficients with EC of 200 bits for image Lena when the PSNR is around 34. Here, So, Sw, and Sc represent the sum of the coefficients before embedding, after embedding and after JPEG compression with the 80% quality factor, and Ao, Aw, and Ac respectively represent the arithmetic average difference of the coefficients. We can see that even at 80% JPEG compression, Sc and Ac reduce quickly, which means the threshold at decoding side must be well designed for Zeng et al.’s method. Table 2 lists BER in different thresholds in the 80% quality factor compression with EC of 200 bits for image Lena, and the PSNR is also set to around 34. It could be found that for Zeng et al.’s method, the high accuracy could achieve only by setting an appropriate threshold. However, there is no such problem for the proposed method because the threshold is always 0.Figure 12
Comparison under different quality factors at EC is 200 bits.Figure 13
Comparison under different quality factors at EC is 500 bits.Table 1
Sum of the coefficients and arithmetic average difference of the coefficients in the 80% quality factor compression.
EC = 200 bitsEC = 500 bitsThe proposed methodRHSThe proposed methodRHSSoSwScAoAwAcSoSwScAoAwAc−54919−711128−36−92−20770374811−1−105−2432−100−23−1−1022−50−11−1−10−105016−1−65−16−16476−1−105−23287615−1−65−151946201042620962106416−102−102−29−1−10−94915−1−65−16−95−95−2722044−84−21220545418−3−107−2596715−3−67−16Table 2
BER in different thresholds with EC of 200 bits.
The proposed methodRHSGδBERGTBER470.00096600.490580.005104600.4906100.005112560.4907100.005120480.4907110.005128400.015880.000136320.000890.000144240.000


### 4.2. Robustness against Other Attacks

This section introduces the watermarking robustness against other attacks, including AWGN with standard deviationσn, Gaussian filter with standard deviation σn equal to 1.1, median filter, and Wiener filter. Tables 3 and 4 list the BER results of image Lena for the different σn and different sizes of filtering mask, and the PSNR is around 34 dB. Under the AWGN with different σn, both the two methods perform well, because it is just a simple additive noise. But as for other complicated attacks, the proposed scheme performs better than Zeng et al.’s. For the Gaussian filter and median filter, Zeng et al.’s method does not have any correct rate, our method can still maintain a certain accuracy. Even under multiplicative noise attacks, the proposed method still can yield a stable performance.Table 3
Resistance to other attacks at EC of 200 bits.
MethodAWGNσnGaussian filterMedian filterWiener filter102030403∗ 35∗ 57∗ 73∗ 35∗ 57∗ 77∗ 7Zeng et al.’s00000.4900.4900.4900.4900.4900.4900.150Proposed00000.0550.1600.1750.1200.4600.4800.015Table 4
Resistance to other attacks at EC of 500 bits.
MethodAWGNσnGaussian filterMedian filterWiener filter102030403∗ 35∗ 57∗ 73∗ 35∗ 57∗ 77∗ 7Zeng et al.’s00000.5280.5280.5280.5280.5280.5280.528Proposed00000.1320.2700.2700.2140.4920.4820.026


## 4.1. Robustness against JPEG Recompression

The proposed scheme is first evaluated the robustness against JPEG recompression. The bit error rate (BER) is adopted to estimate the robustness:(15)ber=lelw,where le and lw are the number of error bits and watermark bits, respectively. The trend of BER with the changes of the EC and PSNR for different images is shown in Figure 9. As mentioned before, to generate different PSNRs, the variables controlling the embedding intensity are varied within a certain range. Specifically, T is varying from 30 to 130 and the scope of G is based on the complexity of the image. As the axis of the EC is fixed, the BER increases with the growth of PSNR. It is because the embedding intensity decreases with the PSNR increasing, resulting in lower robustness. Furthermore, as the axis of the PSNR is fixed, the BER increases with the growth of EC. This is because the robustness of the algorithm decreases as the embedding capacity EC increases when the PSNR is fixed, which leads to an increase in BER.Figure 9
Trend of BER with the changes of the EC and PSNR.Figure10 shows the comparison performance with BER vs. Figure 11PSNR at the EC of 200 bits and 500 bits. The proposed method outperforms the Zeng et al.’s method as the PSNR increases for the test images in most situations, especially for the textural image (baboon). In the case of the 80% JPEG compression, the proposed method has no error bits for 200 and 500 bits. As for the compression is to 60%, the correctness still can arrive at 100% only controlling the PSNR below 40 for the EC of 200 bits, and the corresponding PSNR might be lower when the EC is 500 bits. Even at 40% JPEG compressing, the proposed method also could keep the error rate low when the PSNR is below 36 for the EC of 200 bits. For Zeng et al.’s method, the BER quickly increases to around 50% when the PSNR arrives at a critical point, which means all the bits are wrong. The performance of Zeng et al.’s embedding scheme depends on the distribution of the histogram determined by the variance. The smaller the variance values, the better the performance of the data hiding scheme. Therefore, the performance for textural images is not satisfactory when using Zeng et al.’s method.Figure 10
Comparison under different PSNRs at EC is 200 bits.Figure 11
Comparison under different PSNRs at EC is 500 bits.Referring to Figure12, the comparisons at different JPEG Figure 13quality factors are presented. In this comparison, the PSNR is set to around 34 dB. It is obvious that the proposed method performs much better. For Zeng et al.’s method, the correct rate dropped quickly with the quality factor decrease, especially for the textural image baboon. This can be explained by comparing the threshold at decoding side: T and G for Zeng et al.’s method and 0 for the proposed method. Table 1 lists partial sum of the coefficients and partial arithmetic average difference of the coefficients with EC of 200 bits for image Lena when the PSNR is around 34. Here, So, Sw, and Sc represent the sum of the coefficients before embedding, after embedding and after JPEG compression with the 80% quality factor, and Ao, Aw, and Ac respectively represent the arithmetic average difference of the coefficients. We can see that even at 80% JPEG compression, Sc and Ac reduce quickly, which means the threshold at decoding side must be well designed for Zeng et al.’s method. Table 2 lists BER in different thresholds in the 80% quality factor compression with EC of 200 bits for image Lena, and the PSNR is also set to around 34. It could be found that for Zeng et al.’s method, the high accuracy could achieve only by setting an appropriate threshold. However, there is no such problem for the proposed method because the threshold is always 0.Figure 12
Comparison under different quality factors at EC is 200 bits.Figure 13
Comparison under different quality factors at EC is 500 bits.Table 1
Sum of the coefficients and arithmetic average difference of the coefficients in the 80% quality factor compression.
EC = 200 bitsEC = 500 bitsThe proposed methodRHSThe proposed methodRHSSoSwScAoAwAcSoSwScAoAwAc−54919−711128−36−92−20770374811−1−105−2432−100−23−1−1022−50−11−1−10−105016−1−65−16−16476−1−105−23287615−1−65−151946201042620962106416−102−102−29−1−10−94915−1−65−16−95−95−2722044−84−21220545418−3−107−2596715−3−67−16Table 2
BER in different thresholds with EC of 200 bits.
The proposed methodRHSGδBERGTBER470.00096600.490580.005104600.4906100.005112560.4907100.005120480.4907110.005128400.015880.000136320.000890.000144240.000


## 4.2. Robustness against Other Attacks

This section introduces the watermarking robustness against other attacks, including AWGN with standard deviationσn, Gaussian filter with standard deviation σn equal to 1.1, median filter, and Wiener filter. Tables 3 and 4 list the BER results of image Lena for the different σn and different sizes of filtering mask, and the PSNR is around 34 dB. Under the AWGN with different σn, both the two methods perform well, because it is just a simple additive noise. But as for other complicated attacks, the proposed scheme performs better than Zeng et al.’s. For the Gaussian filter and median filter, Zeng et al.’s method does not have any correct rate, our method can still maintain a certain accuracy. Even under multiplicative noise attacks, the proposed method still can yield a stable performance.Table 3
Resistance to other attacks at EC of 200 bits.
MethodAWGNσnGaussian filterMedian filterWiener filter102030403∗ 35∗ 57∗ 73∗ 35∗ 57∗ 77∗ 7Zeng et al.’s00000.4900.4900.4900.4900.4900.4900.150Proposed00000.0550.1600.1750.1200.4600.4800.015Table 4
Resistance to other attacks at EC of 500 bits.
MethodAWGNσnGaussian filterMedian filterWiener filter102030403∗ 35∗ 57∗ 73∗ 35∗ 57∗ 77∗ 7Zeng et al.’s00000.5280.5280.5280.5280.5280.5280.528Proposed00000.1320.2700.2700.2140.4920.4820.026


## 5. Conclusion

In this study, a reversible robust watermarking scheme is proposed. Different from the previous RRW methods, watermarks are embedded into the compression domain in our scheme. The reversible watermarks and robust watermarks are embedded into the coefficients of different frequency bands respectively. Meanwhile, the algorithm preferentially selects the region with complex image texture for robust watermark embedding and the smooth texture region for reversible watermark embedding. That will cause less distortion. The message can be extracted and the cover image could be recovered only if the marked image has not been attacked; otherwise, the message still could be extracted. Experiment results indicate that the proposed method can yield a quite good performance from enhancing the capacity to robustness, especially for the textural images.



---

*Source: 4542705-2022-08-28.xml*