a novel reversible watermarking method ...based histogram shifting method: the proposed method is...

15
International Journal of Innovative Computing, Information and Control ICIC International c 2011 ISSN 1349-4198 Volume 7, Number 11, November 2011 pp. 6187–6201 A NOVEL REVERSIBLE WATERMARKING METHOD USING PRE-SELECTION STRATEGY Xiang Wang and Zongming Guo * Institute of Computer Science and Technology Peking University No. 5, Yiheyuan Road, Haidian District, Beijing 100871, P. R. China [email protected] * Corresponding author: [email protected] Received June 2010; revised October 2010 Abstract. The histogram shifting based reversible watermarking method manipulates the prediction error of the pixels either to avoid overlapping or to embed the watermark. The embedding distortion of this kind of methods is mainly introduced by the pixels with large prediction error. In this paper, we employ the gradient-adjusted predictor (GAP) to improve the prediction efficiency and present a pre-selection algorithm to decrease the number of large prediction errors in the embedding process. Consequently, the embedding distortion is greatly reduced in the encoder. In addition, in order to obtain the optimal embedding thresholds, we design an earning-cost ratio (ECR) based selection algorithm whose computation complexity is much lower than that of the traditional iterative method. Experimental results verify the superiority of the proposed method by comparing with some existing schemes. Keywords: Reversible watermarking, Histogram shifting 1. Introduction. Digital watermarking for copyright protection and content authenti- cation has become one of the most important issues in the digital world [1, 2]. Usually, the watermarking algorithms introduce irreversible distortions to the host image during the embedding process. Even though the embedding distortion is slight and imperceptible, it is still unacceptable to some high-fidelity applications. For example, any modification to the original image caused by the medical image processing may affect a doctor’s diagnosis and lead to legal problems. Therefore, this requirement arouses the common interest in the so-called ‘reversible watermarking’ technique, which is able to perfectly recovery the host image in the decoder [3, 4, 5]. One objective of the reversible watermarking is to embed the desired watermark while keeping the distortion low. Thus, reversible watermarking methods are commonly eval- uated by the embedding capacity and the embedding distortion. In most cases, the embedding capacity-distortion curve is constructed to evaluate the performance of the watermarking algorithm. There are huge reversible watermarking algorithms having been presented in the literature. Tian’s difference expansion (DE) method [6] is the founda- tion of many following reversible watermarking algorithms. The DE method expands the difference of two adjacent pixels to carry one bit of watermark. Owing to the correlation between the neighboring pixels, this difference usually has small magnitude. Thus, the DE method introduces low distortion to the host image. In addition, Tian designed the location map technique, which is widely adapted by the following reversible watermarking algorithms, to solve the overflow/underflow problem. Notice that, the maximum embed- ding capacity of the DE method is 0.5 bits per pixel (BPP) because two adjacent pixels are utilized to embed one bit of watermark. 6187

Upload: others

Post on 22-Sep-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: A NOVEL REVERSIBLE WATERMARKING METHOD ...based histogram shifting method: the proposed method is described in detail in Section 3, and the experiments comparing with some other methods

International Journal of InnovativeComputing, Information and Control ICIC International c⃝2011 ISSN 1349-4198Volume 7, Number 11, November 2011 pp. 6187–6201

A NOVEL REVERSIBLE WATERMARKING METHOD USINGPRE-SELECTION STRATEGY

Xiang Wang and Zongming Guo∗

Institute of Computer Science and TechnologyPeking University

No. 5, Yiheyuan Road, Haidian District, Beijing 100871, P. R. [email protected]

∗Corresponding author: [email protected]

Received June 2010; revised October 2010

Abstract. The histogram shifting based reversible watermarking method manipulatesthe prediction error of the pixels either to avoid overlapping or to embed the watermark.The embedding distortion of this kind of methods is mainly introduced by the pixels withlarge prediction error. In this paper, we employ the gradient-adjusted predictor (GAP)to improve the prediction efficiency and present a pre-selection algorithm to decrease thenumber of large prediction errors in the embedding process. Consequently, the embeddingdistortion is greatly reduced in the encoder. In addition, in order to obtain the optimalembedding thresholds, we design an earning-cost ratio (ECR) based selection algorithmwhose computation complexity is much lower than that of the traditional iterative method.Experimental results verify the superiority of the proposed method by comparing with someexisting schemes.Keywords: Reversible watermarking, Histogram shifting

1. Introduction. Digital watermarking for copyright protection and content authenti-cation has become one of the most important issues in the digital world [1, 2]. Usually, thewatermarking algorithms introduce irreversible distortions to the host image during theembedding process. Even though the embedding distortion is slight and imperceptible, itis still unacceptable to some high-fidelity applications. For example, any modification tothe original image caused by the medical image processing may affect a doctor’s diagnosisand lead to legal problems. Therefore, this requirement arouses the common interest inthe so-called ‘reversible watermarking’ technique, which is able to perfectly recovery thehost image in the decoder [3, 4, 5].

One objective of the reversible watermarking is to embed the desired watermark whilekeeping the distortion low. Thus, reversible watermarking methods are commonly eval-uated by the embedding capacity and the embedding distortion. In most cases, theembedding capacity-distortion curve is constructed to evaluate the performance of thewatermarking algorithm. There are huge reversible watermarking algorithms having beenpresented in the literature. Tian’s difference expansion (DE) method [6] is the founda-tion of many following reversible watermarking algorithms. The DE method expands thedifference of two adjacent pixels to carry one bit of watermark. Owing to the correlationbetween the neighboring pixels, this difference usually has small magnitude. Thus, theDE method introduces low distortion to the host image. In addition, Tian designed thelocation map technique, which is widely adapted by the following reversible watermarkingalgorithms, to solve the overflow/underflow problem. Notice that, the maximum embed-ding capacity of the DE method is 0.5 bits per pixel (BPP) because two adjacent pixelsare utilized to embed one bit of watermark.

6187

Page 2: A NOVEL REVERSIBLE WATERMARKING METHOD ...based histogram shifting method: the proposed method is described in detail in Section 3, and the experiments comparing with some other methods

6188 X. WANG AND Z. GUO

Many studies have extended the DE method by using other integer transforms andpresented improved result over the DE method [7, 8, 9, 10, 11, 12, 13]. Kamstra et al. [14]improved Tian’s DE technique by sorting the pixel pairs prior to the embedding process.After sorting, the pixel pairs with better expandability are adjusted to the beginningof the image. According to the sorted locations, the location map in their method canachieve significantly higher compression ratio than that of DE. As a result, Kamstra’smethod can produce higher embedding capacity while keeping the distortion at the samelevel as the original DE method. Alattar [15] generalized the DE technique by takingpixel blocks with arbitrary size rather than pixel pairs. Thus, this method is able toimprove the embedding capacity from DE’s 0.5 BPP to almost 1 BPP. Based on thesame idea, Lee et al. [16] proposed a reversible watermarking method by exploiting aninteger wavelet transform. These approaches can be classified as integer transform basedreversible watermarking algorithms. Although the integer transform based algorithmstheoretically provide high embedding capacity, the practical embedding ability is limiteddue to the huge size of the location map (even after compression).Thodi et al. [17] firstly designed the histogram shifting method for creating ‘free space’

which can be used to insert the watermark. The histogram is constructed by computingthe occurrence of the prediction errors of all pixels. In the encoder, the watermark is em-bedded into the expanded prediction errors. While, the prediction errors without carryingwatermark have to be shifted to avoid overlapping with the ones carrying watermark. Inthe decoder, we can determine whether a pixel carries watermark, unless the pixel iscausing the overflow/underflow problem. Thus, a location map in the histogram shiftingmethod is constructed to eliminate the obscurity between the problematic pixel and theothers. For most cases, there are a small number of such problematic pixels, especially insmooth images. Thus, this location map has better compressibility than the one of theDE method. In addition, they present a histogram shifting method based on prediction,which theoretically improves the embedding capacity from 0.5 BPP (DE based method)to 1 BPP.Hu et al. [18] improved the histogram shifting method by constructing a payload-

dependent location map and using zero points in the histogram. In [19], they furtherimproved the histogram shifting method by alternatingly increasing the thresholds. Sach-nev et al. [20] combined Kamstra’s sorting idea with the histogram shifting method, whichachieved significant improvement over Thodi’s method. However, in order to use sorting,Sachnev et al. divided the pixels of the host image into the two sets, and embedded half ofthe watermark into each set in a single pass embedding process. Therefore, their methodhas to perform the sorting and the histogram shifting process twice to embed the wholewatermark. Besides Hu et al.’s and Sachnev et al.’s work, there is also much literaturehaving been proposed to extend the histogram shifting method [21, 22, 23, 24, 25].In comparison with the DE method, the histogram shifting method has better capacity

control ability and a smaller location map (in some cases, no location map is desired).Specifically, for the histogram shifting method, the embedding distortion of each pixel isdetermined by the intensity of its prediction error. Expanding or shifting a pixel with smallprediction error introduces low distortion, and vice versa. In addition, a lot of pixels inthe histogram shifting method have to be shifted to avoid overlapping. Apparently, thesepixels are modified without carrying the watermark. If the number of the shifted pixels isreduced, we are able to lower the embedding distortion and keep the embedding capacityunchanged. In this paper, we improve the histogram shifting method in two aspects.Firstly, an efficient prediction algorithm, which can achieve higher prediction accuracy,is introduced to the histogram shifting method. Accordingly, the prediction error andthe corresponding embedding distortion of each pixel are reduced. Secondly, we design a

Page 3: A NOVEL REVERSIBLE WATERMARKING METHOD ...based histogram shifting method: the proposed method is described in detail in Section 3, and the experiments comparing with some other methods

REVERSIBLE WATERMARKING USING PRE-SELECTION STRATEGY 6189

Figure 1. Labeling of neighboring pixels used in JPEG-LS prediction

pre-selection process to reduce the number of the pixels with large prediction error. Thispre-selection process gives higher priority to the smaller prediction errors and removes thelarger prediction errors from the embedding process. Therefore, the number of the pixelsthat are only shifted but not carrying watermark is decreased. The pre-selection basedwatermarking method brings less embedding distortion in comparison with the originalone. In addition, in order to reduce time complexity, we present a novel embeddingthreshold selection strategy based on the earning-cost ratio (ECR). Experimental resultsshow that the time of complexity for the threshold selection has been reduced effectivelywhile the embedding performance is almost completely preserves.

The rest of this paper is organized as follows: in Section 2, we review the prediction errorbased histogram shifting method: the proposed method is described in detail in Section3, and the experiments comparing with some other methods are reported in Section 4;finally, we conclude our work in the last section.

2. Review. This section briefly reviews Thodi’s prediction-error based histogram shiftingmethod [17], which is a combination of histogram shifting and difference expansion. Inthis method, the prediction error of each pixel is calculated by exploiting the correlationbetween the pixel and its neighborhoods. Then, the prediction error is either expandedto embed the watermark or shifted to avoid overlapping in terms of its intensity.

The JPEG-LS [26] predictor is utilized to efficiently predict the intensity of the cur-rent pixel. Let B(pi) be the intensity of the current pixel and B(pik) the intensity of a

neighboring pixel (see Figure 1). The predicted value B(pi) is calculated by the followingequation:

B(pi) =

max(B(pi1), B(pi3)), if B(pi2) ≤ min(B(pi1), B(pi3))min(B(pi1), B(pi3)), if B(pi2) ≥ max(B(pi1), B(pi3))B(pi1) +B(pi3)−B(pi2), otherwise.

(1)

The difference between the original pixel intensity and the predicted one, di = B(pi)−2⌊B(pi)/2⌋, is the prediction error. One bit watermark w ∈ {0, 1} can be embedded byexpanding the prediction error as follows:

d′i = 2× di + w, (2)

where d′i is the prediction error after expansion.The distortion introduced by the above expansion embedding is di + w, and mainly

depends on the magnitude of the prediction error. Thus, pixels with smaller predictionerrors introduce less distortion and should be given higher priority in the embeddingprocess. Since the distribution of the prediction error approximately follows the Laplacedistribution, Thodi et al. divided the histogram into the nonoverlapping inner and outerregion, as shown in Figure 2. The inner region occupies the range [Tl, Tr] (Tl < 0, Tr ≥ 0),and the bins of the inner region are selected for expansion embedding. In Thodi’s method,they simply define Tl = −Tr − 1. After embedding, the inner region is expanded to

Page 4: A NOVEL REVERSIBLE WATERMARKING METHOD ...based histogram shifting method: the proposed method is described in detail in Section 3, and the experiments comparing with some other methods

6190 X. WANG AND Z. GUO

Figure 2. Histogram of prediction errors. The thresholds Tl and Tr des-ignate the prediction errors into the inner region and outer region.

the range [2 × Tl, 2 × Tr + 1]. Since the corresponding outer region covers the range[−255, Tl − 1] and [Tr + 1, 255], bins of the outer region are shifted to avoid overlappingwith the expanded inner region. The negative bins and the nonnegative bins are shiftedaccording to the following:

d′i =

{di + Tr + 1, if di > Tr

di + Tl, if di < Tl(3)

After expansion or shifting, the modified prediction error is added to the predictedvalue to create the watermarked pixel intensity:

B′(pi) = B(pi) + d′i, (4)

In the decoder, the watermark sequence is extracted by sequentially reading the LSBsof the prediction errors of the inner region, and the original prediction error of the outerregion and inner region can be easily reversed if Tl and Tr are known:

di =

d′i − Tr − 1 if d′i > 2Tr + 1⌊d′i/2⌋ if 2Tl ≤ d′i ≤ 2Tr + 1d′i − Tl if d′i < 2Tl.

(5)

However, the histogram shifting method may lead to the reconstructed pixel inten-sity (Equation (4)) lying outside the original range [0, 255], which is called the over-flow/underflow problem. The conditions given below B(pi) + Tr + 1 ≤ 255 if di > Tr

B(pi) + di ∈ [0, 254] if di ∈ [Tl, Tr]B(pi) + Tl ≥ 0 if di < Tl

(6)

are used for locating the problematic pixels. The pixels satisfying the above conditions(not cause the overflow/underflow problem) are divided into two subsets. The expandableset contains pixels with prediction error di ∈ [Tl, Tr] into which the watermark is embeddedby expansion, and the shiftable set contains pixels with prediction error lying out [Tl, Tr]which are shifted to solve overlapping. The pixels that cannot satisfy Equation (6) arethe problematic pixels and should not be involved in the histogram shifting process. Inorder to ensure that the decoder can correctly locate the problematic pixels, Thodi etal. proposed two algorithms which differ in the way the encoder records the problematicpixels. In the first algorithm (DE-HS-OM ), an overflow/underflow map, which coversall locations of the host image, is created to distinguish the locations of the problematicand the nonproblematic pixels. This location map is then losslessly compressed andembedded together with the watermark. In the second algorithm (DE-HS-FB), Thodi et

Page 5: A NOVEL REVERSIBLE WATERMARKING METHOD ...based histogram shifting method: the proposed method is described in detail in Section 3, and the experiments comparing with some other methods

REVERSIBLE WATERMARKING USING PRE-SELECTION STRATEGY 6191

Figure 3. Labeling of neighboring pixels used in GAP prediction

al. indicate that the prediction errors capable of undergoing multiple expansion/shiftingcan be removed from the location map, which provides a way to reduce the size of locationmap. In their method, a flag bitstream, instead of the location map, is formed to identifythe problematic prediction errors.

3. Proposed Method. In Thodi et al.’s method, the prediction errors of the innerregion are expanded to embed the watermark, and that of the outer region are shifted toprevent overlapping. Clearly, the pixels in the outer region are modified without carryingthe watermark. Therefore, if the image have a larger proportion of the inner region, itwill produce better embedding performance based on the same Tl and Tr. Although theJPEG-JS predictor performs quite well in terms of histogram shape, the outer region stillaccounts for a substantial proportion.

The gradient-adjusted predictor (GAP) [27] is employed in this paper to calculatethe prediction errors. Then, a prediction error estimator is designed by analyzing theprediction algorithm of GAP. According to the estimator, we are able to remove the largeprediction errors from the embedding process. As a result, the proportion of the outerregion is decreased, and the histogram shifting method produces a better result. The GAPpredictor employed by CALIC [27] is a simple, adaptive, and nonlinear algorithm whichcan achieve high prediction efficiency with relatively low time and space complexities.GAP predicts the current pixel, pi, according to the estimated gradient of the texturecontext which is computed by the following:

Gh = |B(pi1)−B(pi7)|+ |B(pi3)−B(pi2)|+ |B(pi4)−B(pi3)|Gv = |B(pi1)−B(pi2)|+ |B(pi3)−B(pi6)|+ |B(pi4)−B(pi5)| .

(7)

Figure 3 illustrates the locations of the causal pixels pik , 1 6 k 5 7. Evidently, Gh

and Gv are estimates of the magnitude and the orientation of near pi in the horizontaland vertical directions, respectively. According to Gh and Gv, the predicted intensity iscomputed as follows:

B(pi) =

B(pi1) if Delta > 80(B(pi1) + ξ)/2 if ∆ ∈ (32, 80](B(pi1) + 3ξ)/4 if ∆ ∈ (8, 32](B(pi3) + 3ξ)/4 if ∆ ∈ [−32,−8)(B(pi3) + ξ)/2 if ∆ ∈ [−80,−32)B(pi3) if ∆ < −80,

(8)

where ∆ = Gv − Gh and ξ = (B(pi1) + B(pi3))/2 + (B(pi4) − B(pi2))/4. The prediction

intensity is further set to B(pi) = round(B(pi)

). Here, the function round(·) represents

rounding a number to its nearest integer.

Page 6: A NOVEL REVERSIBLE WATERMARKING METHOD ...based histogram shifting method: the proposed method is described in detail in Section 3, and the experiments comparing with some other methods

6192 X. WANG AND Z. GUO

The prediction value B(pi) calculated by Equation (8) mainly depends on the intensitiesof pi1 and pi3 especially when |∆| > 32. It is observed that the difference di1 = |B(pi1)−B(pi)| strongly correlates with the neighboring differences, including |B(pi1)−B(pi7)|,|B(pi3)−B(pi2)| and |B(pi4)−B(pi3)|. Thus, according to the definition, Gh can bereasonably used to predict di1 . Similarly, Gv is employed to estimate di3 = |B(pi3)−B(pi)|.Moreover, Equation (8) indicates that GAP weights the neighboring pixels B(pi3) andB(pi1) according to the magnitudes of Gh and Gv. If Gh > Gv, GAP gives larger weightsto B(pi3), and vice versa. Based on this finding, the following prediction error estimatoris designed:

e =

min(Gh, Gv)/3 + 2ε if |∆| > 80(3min(Gh, Gv) + max(Gh, Gv))/12 + 2ε if |∆| ∈ (32, 80](5min(Gh, Gv) + 3max(Gh, Gv))/24 + 2ε if |∆| ∈ (8, 32](Gh +Gv)/6 + 2ε else,

(9)

where ε =4∑

k=1

|B(pik)− B(pik)|4

is the mean value of the previous prediction error. ε

is included in computing e because large prediction errors tend to occur consecutively.The value of e indicates the efficiency of the GAP predictor: the larger the e is, themore inefficient the GAP is. Conversely, the GAP predictor performs well on pixels withsmall e, and produces small prediction error. According to the value of e, we design apre-selection step to decrease the proportion of large prediction errors in the embeddingprocess.

3.1. Pre-selection strategy. We define a threshold δ to filter large prediction errors.Only errors satisfying e ≤ δ are involved in the embedding process. Intuitively, for thefixed Tl and Tr values, a smaller δ yields a histogram with larger proportion of innerregion. Therefore, the embedding performance tends to be improved. However, whenembed a desired watermark, δ is not always the smaller the better. Here, we give anexample to better illustrate this viewpoint. Suppose ‘Lena’ is the host image. We canachieve an embedding rate of 0.15 bites per pixel (BPP) when δ = 5, Tl = −4 and Tr = 3.The corresponding outer regions are [−255,−5] and [4, 255]. According to the shiftingstrategy (Equation (3)), prior to expansion, the outer regions should be shifted outwardsto become [−255,−9] and [8, 255]. In this case, the modifications of the left and theright outer regions are 4. On the other hand, if δ = 7, we only need to set Tl and Tr

to −1 and 1 to get the embedding rate of 0.15 BPP. Similarly, the corresponding pixelmodifications of the left and the right outer regions are 1 and 2, respectively. As seen fromthe example, even though the proportion of the outer region occupies a larger proportionalong with the decrease of δ, the modification of each pixel is increased. Therefore, fora specific embedding capacity, a larger δ might achieve a better embedding performance.Specifically, in the above example, the PSNR is 49 and 51 for δ = 5 and δ = 7, respectively.Obviously, we can perform an exhaustive iteration to get the optimal combination of δ,

Tl and Tr to embed a certain amount of payload. However, this method is not practicalbecause iteration of three parameters is time consuming. In order to deal with this issue,we design the earning-consumption ratio (ECR) by investigating the effect of the increasein δ on the embedding capacity and distortion. Suppose the height of each bin in thehistogram, in terms of the selection threshold δ, is bδi , i ∈ [−255, 255]. Thus, the totalamount of pixels in the inner region and the outer region are

Page 7: A NOVEL REVERSIBLE WATERMARKING METHOD ...based histogram shifting method: the proposed method is described in detail in Section 3, and the experiments comparing with some other methods

REVERSIBLE WATERMARKING USING PRE-SELECTION STRATEGY 6193

Mδinner

=Tr∑

i=Tl

bδi

Mδouter =Tl−1∑

i=−255

bδi +255∑

i=Tr+1

bδi .

(10)

Figure 4. Sample prediction error histograms of δ and δ + ∆δ (∆δ > 0).The red and the green regions illustrate the growth of the inner region andthe outer region, respectively.

Note that if the threshold δ is increased to δ + δ, the increased height of each bin is∆bi = b(δ+δ)i

− bδi (see Figure 4). It is clear that the increase of embedding capacity isonly attributed to the increased amount of the inner region. Since each pixel in the innerregion can embed one bit of watermark, the increased amount of embedding capacity iscomputed as follows:

∆Cap = ∆M(δ+δ)inner−∆Mδinner

=Tr∑

i=Tl

∆bi . (11)

There are two factors which account for the increase of the embedding distortion: ex-pansion and shifting. According to Equation (3), it is observed that the distortion causedby shifting for a pixel in the left outer region is Tl, and for a pixel in the right outer regionis Tr + 1. Thus, the total increased distortion resulted from shifting is:

∆Dis shift =

Tl−1∑i=−255

∆bi × Tl +255∑

i=Tr+1

∆bi × (Tr + 1) (12)

In addition, Equation (2) shows that the expansion distortion for a pixel in the innerregion is di+w, where di is the value of prediction error. So, the total increased distortionproduced by expansion is:

∆Dis exp =Tr∑

i=Tl

∆bi × i (13)

It is a reasonable assumption that the earning of reversible watermarking algorithmis the embedding capacity growth, whereas the cost is the embedding distortion growth.Based on this assumption, for the selection threshold δ and its increased magnitude δ, wedefine the earning-cost ratio (ECR) as follows:

ECR =∆Cap

∆Dis

=∆Cap

∆Dis exp +∆Dis shift

(14)

Page 8: A NOVEL REVERSIBLE WATERMARKING METHOD ...based histogram shifting method: the proposed method is described in detail in Section 3, and the experiments comparing with some other methods

6194 X. WANG AND Z. GUO

It is observed that the increase in selection threshold can significantly improve the em-bedding capacity while keeping the distortion low when the ECR is large. Conversely, inorder to create the same capacity growth by increasing the selection threshold, a smallerECR would introduce more embedding distortion. Thus, increasing δ cannot efficientlyimprove the embedding performance if the ECR is small. In this method, when the ECRis smaller than a threshold TECR, we choose to modify Tr and Tl instead of increasing δto embed more watermark bits. The detailed selection method of δ, Tl and Tr for a givenembedding capacity is presented in Section 3.2. Note that, in order to reduce computationcomplexity, we compute the embedding capacity growth ∆Cap and embedding distortiongrowth ∆Dis without considering the overflow/underflow problem. However, experimentalresults show that this has little impact on the value of the ECR. In addition, it is ob-served that the ECR increases quickly for textural images (e.g., Baboon), but slowly forsmooth images (e.g., Airplane). Therefore, it is inefficient to define a uniform thresholdfor different images. In this experiment, we compute the threshold TECR according to thecomplexity of texture.

TECR =h0

255∑i=−255

hi

(15)

where hi is the height of bin i in the prediction error histogram (containing all pixels).

Thus, h0 represents the amount of pixels that are correctly predicted by GAP, and255∑

i=−255

hi

is the total number of pixels of the image. Since the smooth image has better correlationwithin the neighboring pixels, it has more correctly predicted pixels than textual images.Thus, we use the proportion of correctly predicted pixels to represent different texturelevels.

3.2. Underflow/overflow problem. Thodi’s DS-HS-FB technique is investigated inthis work to deal with the overflow/underflow problem. We divide the pixels which satisfye ≤ δ into three sets:

1. ME: pixels that can undergo expansion and/or shifting twice.2. SE: pixels that can only be expanded or shifted once.3. NE: pixels that can not be expanded or shifted even once.

Here, ME, SE and NE are abbreviations for multiple expansion, single expansion andnon expansion, respectively. In the embedding process, the pixels in sets ME and SE areselected either for expanding by Equation (2) (expandable) or for shifting by Equation(3) (shiftable), and the pixels in set NE are kept unchanged. Note that the pixels notbelonging to ME, SE or NE (e > δ) are excluded by our pre-selection strategy and notmodified by expansion or shifting in the embedding process.Evidently, the pixels in set ME are still able to undergo expansion or shifting (satisfying

the condition Equation (6)) after the single-pass embedding process. On the other hand,the pixels belonging to sets SE or NE will cause the overflow/underflow error if they arefurther modified by expanding or shifting. It is clearly that the ambiguity only existsbetween the set SE and NE in the decoder, because the pixels in ME can be distinguishedfrom those in SE and NE by Equation (6). In order to resolve this ambiguity, a locationmap is established. We assign “1” in the location map for pixels in set SE, and “0”for pixels in NE. Particularly, pixels in ME are not recorded in the location map. Thelocation map is therefore small in size if most pixels of the host image can undergo multipleexpansion/shifting.

Page 9: A NOVEL REVERSIBLE WATERMARKING METHOD ...based histogram shifting method: the proposed method is described in detail in Section 3, and the experiments comparing with some other methods

REVERSIBLE WATERMARKING USING PRE-SELECTION STRATEGY 6195

Since the parameters Tl, Tr and δ should also be transmitted to the decoder to correctlyextract the watermark and recover the host image, we construct a flag sequence η asfollows:

η = Dec2Bin8(Tl)•Dec2Bin8(Tr)•Dec2Bin4(δ)•Dec2Bin8(len(M))•Dec2Bin8(len(W )),

where the function Dec2Binl(·) returns the L-bit binary value of a decimal number,function len(·) returns the length of a binary sequence, and • denotes concatenation. Wand M denote the watermark and the location map sequence, respectively. Evidently, thelength of η is 36. Thus, the overall auxiliary sequence that needs to be embedded is:

ζ = η •M.

The maximum capacity of the watermark is:

C = m− len(ζ) = m− len(M)− 36, (16)

where m is the amount of the expandable pixels in sets ME and SE, and function len(·)returns the length of a binary sequence.

Based on Equation (16), we present a strategy to determine Tl, Tr and δ for a specificembedding capacity. Suppose the length of the watermark sequenceW is n, the parametersearching procedure is summarized as follows:

Step-1: Initialize Tl = −1, Tr = 0, δ = 1 and δ = 0. Calculate the prediction error byEquation (8) and the estimated prediction error for each pixel.

Step-2: Classify the pixels whose estimated prediction errors satisfy e ≤ δ into sets ME,SE and NE, and then create the location map M to distinguish the pixels in setSE and NE.

Step-3: Calculate the maximum embedding capacity (Equation (16)). If C ≥ n, thecurrent parameters can provide enough capacity, skip to Step-6. Otherwise, go tonext step.

Step-4: Calculate the ECR according to Equation (14). If ECR > TECR, we set δ = δ+ δand repeat Step-2. Otherwise, go to next step.

Step-5: Modify Tl and Tr as follows:{Tr = Tr + 1 if |Tl| > Tr

Tl = Tl − 1 else.

If the maximum embedding capacity C < n, go to Step 2. Otherwise, repeatedlyset δ = δ − δ until it provide just enough capacity for the watermark W (if δ isfurther decreased one more times, C < n happens).

Step-6: Determined the optimal thresholds Tl, Tr and δ which result in just enough ca-pacity to embed the desired watermark.

3.3. Encoder and decoder. In this section, we first describe the process of embeddingn bits of watermark W = (w1, . . . , wn) ∈ Zn

2 in terms of the parameters Tl, Tr and δ, andthen demonstrate the extraction and recovery process.

In the encoder, the pixels in sets ME and NE are classified into two subsets: expandableand shiftable. Let E be the ordered set of expandable pixels, and S be the ordered setof shiftable pixels. Specifically, the kth element of E and S are represented by ek and sk.The set E is then partitioned into Es, Ee and Er. Es = {ei : 0 < i ≤ len(ζ)} containsthe first len(ζ) elements of E, Ee = {ei : len(ζ) < i ≤ len(ζ) + n} comprises the next nelements and Er = {ei : ei /∈ Es ∪ Ee} consists of the remaining elements.

We first sequentially embed the watermark sequence W into Ee by Equation (2). Inorder to avoid overlapping, the elements in S whose location precede that of elen(ζ)+n

are required to be shifted according to Equation (3). Then, the auxiliary information ζ

Page 10: A NOVEL REVERSIBLE WATERMARKING METHOD ...based histogram shifting method: the proposed method is described in detail in Section 3, and the experiments comparing with some other methods

6196 X. WANG AND Z. GUO

(including the flag sequence η and the location map M) is embedded by replacing theLSBs of last len(ζ) pixels of the host image. We denote this subset of the host imageas Ilsb. As the LSB replacement is an irreversible operation, the original LSBs of Ilsb arecollected to get a binary sequence Clsb, which is embedded into Es by expansion. Finally,we obtain the watermarked image.In the decoder, we first extract the flag sequence η and the location map M by reading

the LSBs of Ilsb. The parameters Tl, Tr and δ, and the lengths of the location mapand the watermark are retrieved from the flag sequence. Then, the corresponding setEs is identified. The recorded LSB sequence Clsb is extracted by reading the LSBs ofthe prediction errors in set Es. Based on Clsb, the original LSBs of Ilsb is recovered. Inaddition, the watermark sequence can be extracted by reading the LSBs of the predictionerrors in set Ee. Finally, the expanded and shifted pixels are recovered according toEquation (5).

4. Experimental Results. In order to evaluate our method, we implement five re-versible watermarking methods, including Thodi’ et al.’s PE3 [17], Hu et al.’s methods[18, 19], Wang et al.’s method [10] and Luo et al.’s method [25]. The experiments are per-formed on four gray-scale images, including: ‘Lena’, ‘Barbara’, ‘Baboon’ and ‘Airplane’,which are downloaded from the USC-SIPI [28] image database. All images are in gray-scale and with size 512× 512. The arithmetic lossless compression coding is employed tocompress the location map in case lossless compression is needed. The comparison withthe PE3 method on ‘Lena’ is first presented to illustrate the efficiency of our pre-selectionprocedure. Then, the computation complexities are listed to demonstrate the superiorityof the ECR based threshold selection algorithm. Finally, we evaluate our method bycomparing with four state-of-the-art algorithms.

Table 1. Comparison with Thodi’s PE3 method on ‘Lena’

BPPThodi’s PE3 Ours

PSNR Tr Tl R PSNR Tr Tl R0.05 47.87 –1 0 3.485 57.56 –1 0 1.7650.1 47.62 –1 0 3.485 53.99 –1 0 2.1120.2 47.17 –1 0 3.485 50.01 –1 0 2.7860.3 43.55 –2 1 1.413 46.31 –1 1 1.6190.4 43.15 –2 1 1.413 44.2 –2 2 0.620.5 40.87 –3 2 0.7675 42.55 –3 2 0.5190.8 37.06 –6 5 0.7675 37.8 –7 6 0.096

4.1. Comparison with the PE3 method. In this subsection, we evaluate the pixelpre-selection strategy by comparing with Thodi’s PE3 method. Since we use the samehistogram shifting and location map technique as PE3, comparing with PE3 can betterillustrate the effort of the selection strategy. To make the comparison more clearly, weuse the ratio between the outer region and the inner region to represent the sharp of thehistogram. This ratio is computed as follows:

R =Mδouter

Mδinner

where Mδinnerand Mδouter are defined in Equation (10). As we have introduced previously,

embedding the watermark into the histogram with smaller R yields lower distortion interms of the same Tr and Tl. The result of the comparison with Thodi’s PE3 method

Page 11: A NOVEL REVERSIBLE WATERMARKING METHOD ...based histogram shifting method: the proposed method is described in detail in Section 3, and the experiments comparing with some other methods

REVERSIBLE WATERMARKING USING PRE-SELECTION STRATEGY 6197

is shown in Table 1, which lists the PSNR, Tr, Tl and R at various embedding rates.For the embedding rate of 0.5 BPP, Tr and Tl are set to –1 and 0 for both Thodi’s PE3and our method. Due to a large portion of pixels in outer region are excluded from theembedding process by the pre-selection algorithm, our method creates a histogram witha smaller R than PE3’s counterpart. Thus, performing the histogram shifting method onour histogram produces better embedding performance than on PE3’s histogram, and thegain in PSNR (almost 10 dB) further reinforces this notion. In addition, it is observedthat the PE3 method uses the same Tr and Tl to achieve the embedding rate: 0.05,0.1 and 0.2 BPP. According to its shifting strategy, the same outer region identified byTr and Tl is shifted at these three different rates. As a result, the PE3 method cannotembed a small watermark at low distortion, i.e., it produces similar PSNRs for embeddingrates varying from 0.05 to 0.2 BPP. In our method, although the corresponding Tr andTl are also the same for embedding rates 0.05 and 0.1 BPP, different amount of pixelsare involved in the embedding process by varying the selection threshold. For smallembedding rates, we use a small selection threshold, which produces a sharp histogram.As the embedding rate increases, the selection threshold is increased, which results in arelatively flatter histogram. Figure 5(a) shows the histograms for the threshold 0.05, 0.1and 0.2 BPP. Specifically, for 0.05, 0.1 and 0.2 BPP, 43395 pixels (15694 in inner region),88050 pixels (28293 in inner region) and 196691 (51945 in inner region) are selected toform the histogram, respectively. For the sake of clarity, we scale the three histogramsto the same peak height (see Figure 5(b)). We can see that the histogram of embeddingrate 0.05 produces a remarkably sharper histogram. It also illustrates that our selectionstrategy can significantly reduce the proportion of outer region. It is also observed thatthe gain in PSNR decreases as the embedding capacity increases (more than 9 dB to lessthan 1 dB). This is owing to the selection threshold having to be large enough to achievea high embedding capacity. In this case, the effect of using selection becomes weaker.Thus, embedding with the selection strategy produces a slight advantage over Thodi’sPE3 method, e.g., 0.8 BPP.

Table 2. Iteration times to calculate the threshold at various embedding rate

XXXXXXXXXXXXMethodsBPP

0.1 0.2 0.3 0.4 0.5 0.6 0.7

Exhaustive Search 20 159 230 478 560 712 1011PE3 3 6 11 20 25 27 33ECR 3 7 11 22 29 32 38

Table 2 presents the iteration times to calculate the optimal thresholds for differentmethods. Since single embedding process at different embedding rate costs almost thesame time, iteration time is reasonable employed to illustrate the computation complexityof each method. Compared with exhaustive search algorithm, the complexity is remark-ably reduced by the ECR based algorithm. Notice that although our method calculatesan extra threshold (δ) in comparison with the PE3 method, we are able to get the optimalvalues in almost similar iteration times and achieve much better embedding performance.

4.2. Comparison with other algorithms. In this subsection, our method is comparedwith four state-of-the-art algorithms: (1) Hu et al.’s method (2008) [18]; (2) Hu et al.’smethod (2009) [19]; (3) Wang et al.’s method, for 4×4 block [10]; (4) Luo et al.’s method[25]. Hu et al. presented two studies which extended Thodi’s classical histogram shiftingmethod from different aspects. In [18], the zero points in the prediction error histogram isutilized to reduce the shifting distances of the outer region, and in [19], Hu et al. improved

Page 12: A NOVEL REVERSIBLE WATERMARKING METHOD ...based histogram shifting method: the proposed method is described in detail in Section 3, and the experiments comparing with some other methods

6198 X. WANG AND Z. GUO

−20 −15 −10 −5 0 5 10 15 200

0.5

1

1.5

2

2.5

3x 10

4

Prediction Error

Occ

uren

ce

0.2 BPP0.1 BPP0.05 BPP

(a)

−20 −15 −10 −5 0 5 10 15 200

0.5

1

1.5

2

2.5

3x 10

4

Prediction Error

Occ

uren

ce

0.2 BPP0.1 BPP0.05 BPP

(b)

Figure 5. (a) Histogram of embedding rates at 0.05, 0.1 and 0.2 and (b)normalized histogram of embedding rates at 0.05, 0.1 and 0.2

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 130

35

40

45

50

55

BPP

PSN

R

Hu et al. (08)Hu et al. (09)Luo et al.Wang et al.Our Method

(a) Lena

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.935

40

45

50

55

60

BPP

PSN

R

Hu et al. (08)Hu et al. (09)Luo et al.Wang et al.Our Method

(b) Airplane

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.830

35

40

45

50

55

BPP

PSN

R

Hu et al. (08)Hu et al. (09)Luo et al.Wang et al.Our Method

(c) Barbara

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.920

25

30

35

40

45

50

BPP

PSN

R

Hu et al. (08)Hu et al. (09)Luo et al.Wang et al.Our Method

(d) Baboon

Figure 6. Performance comparison of other four methods with our method

Thodi’s algorithm by alternatingly increasing Tl and Tr to reduce unnecessary alterationto the host image. In addition, they design a payload-dependent overflow location map forboth of their methods which can achieve higher compression ratio. Experimental resultsindicate that Hu et al.’s methods perform as well as or better than Thodi’s algorithms

Page 13: A NOVEL REVERSIBLE WATERMARKING METHOD ...based histogram shifting method: the proposed method is described in detail in Section 3, and the experiments comparing with some other methods

REVERSIBLE WATERMARKING USING PRE-SELECTION STRATEGY 6199

0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.1150

52

54

56

58

60

62

64

66

68

BPP

PSN

R

Hu et al. (09)Our Method

(a) Lena

0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.1152

54

56

58

60

62

64

66

68

BPP

PSN

R

Hu et al. (09)Our Method

(b) Airplane

0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.1150

55

60

65

BPP

PSN

R

Hu et al. (09)Our Method

(c) Barbara

0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.1144

46

48

50

52

54

56

58

60

BPP

PSN

R

Hu et al. (09)Our Method

(d) Baboon

Figure 7. Performance comparison of four other methods with our methodat small embedding capacity

(including DE2, PE2, DE3 and PE3) at all embedding rates. Thus, in this section wecompare with Hu et al.’s methods instead of Thodi’s. Recently, Luo et al. proposedthe method [25] combining the histogram shifting and image interpolation techniques,and achieved significant improvements over Thodi’s method. In addition, Wang et al.presented an integer transform based reversible watermarking method, which reportedlyhas better results than previous integer transform based methods. Thus, Wang et al.’smethod is also included in this comparison. Figure 6 presents the embedding results ofthe above four methods and our method, and the embedding rate varies from 0.1 BPPto more than 0.7 BPP. It is clear that our method outperforms the above methods at allembedding rates. Figure 7 presents the performance of our method at small embeddingcapacity. Hu et al.’s method presented the best performance when the payload is small.Thus, we compared with Hu et al.’s method to evaluate the embedding performance ofour method in small embedding capacity. It is observed that our method performs wellon the image with less texture at both large and small embedding rates, e.g., Lena andAirplane. However, the superiority of our method is not so clear for the textural images,e.g., Baboon. The prediction error estimator accounts for this phenomenon because itcannot work well on textural areas.

One drawback of our method is that it cannot achieve the level of embedding capac-ity as high as previous prediction error based histogram shifting methods. For example,the maximum embedding rate is 0.7 BPP for Barbara, while the embedding rate of Hu’s

Page 14: A NOVEL REVERSIBLE WATERMARKING METHOD ...based histogram shifting method: the proposed method is described in detail in Section 3, and the experiments comparing with some other methods

6200 X. WANG AND Z. GUO

method can reach almost 1 BPP. Our threshold selection process leads to the decrease ofthe watermarking capacity. According to the selection strategy, the iteration is stoppedwhen the threshold δ grows to a certain value. Thus, some pixels with large predictionerror are excluded from the embedding process for any Tl and Tr. As a result, the embed-ding capacity of our method is smaller than that of Hu’s method. However, as mentionedabove, the pixels with large e usually have large prediction error. Thus, expanding theprediction error of such pixels introduces huge distortion to the host image. In otherwords, embedding watermark in these pixels is inefficient. For example, the experimentalresults in [19] show that the curve of Hu’s method falls quickly when embedding ratelarger than 0.7 for Barbara. In this case, to achieve a higher embedding rate, we usemultiple pass embedding rather than embed watermark in the pixels with large e.

5. Conclusion. In this paper, we propose a reversible watermarking method based onGAP, which can robustly exploit the correlation within the neighboring pixels. A pre-diction error estimator is then designed to reduce the amount of shifted pixels. Owingto these two improvements, our method greatly reduces the embedding distortion intro-duced by shifting and expansion in the embedding process. Furthermore, we propose anovel threshold selection strategy to calculate the thresholds of our method. The com-putation complexity has decreased by thirty times over the traditional exhaustive searchalgorithm. Experimental results indicate that the proposed method is superior to thereversible watermarking methods of Hu et al., Wang et al. and Luo et al.

Acknowledgment. This work was supported by National Natural Science Foundationof China under contract No. 61071082 and Beijing Municipal Natural Science Foundationunder contract No. 4102025.

REFERENCES

[1] I. Cox, M. Miller, J. Bloom, J. Fridrich and T. Kalker, Digital Watermarking and Steganography,2nd Edition, Morgan Kaufmann Publishers Inc., San Francisco, 2007.

[2] F. Y. Shih, Digital Watermarking and Steganography: Fundamentals and Techniques, CRC Press,FL, 2007.

[3] J. Fridrich, M. Goljan and R. Du, Lossless data embedding – New paradigm in digital watermarking,EURASIP Journal on Applied Signal Processing, vol.2002, no.2, pp.185-196, 2002.

[4] Y. Q. Shi, Z. Ni, D. Zou, C. Liang and G. Xuan, Lossless data hiding: Fundamentals, algorithmsand applications, Proc. of IEEE ISCAS, vol.2, pp.33-36, 2004.

[5] Y. Q. Shi, Reversible data hiding, Proc. of IWDW, LNCS, vol.3304, pp.1-12, 2004.[6] J. Tian, Reversible data embedding using a difference expansion, IEEE Trans. Circuits Syst. Video

Technol, vol.13, no.8, pp.890-896, 2003.[7] D. Coltuc and J. M. Chassery, Very fast watermarking by reversible contrast mapping, IEEE Signal

Process. Lett., vol.14, no.4, pp.255-258, 2007.[8] H. J. Kim, V. Sachnev, Y. Q. Shi, J. Nam and H.-G. Choo, A novel difference expansion transform

for reversible data embedding, IEEE Trans. Inf. Forens. Security, vol.4, no.3, pp.456-465, 2008.[9] M. Chaumount and W. Puech, A high capacity reversible watermarking scheme, Proc. of VCIP,

vol.7257, 2009.[10] X. Wang, X. Li, B. Yang and Z. Guo, Efficient generalized integer transform for reversible water-

marking, IEEE Signal Process. Lett., vol.17, no.6, pp.567-570, 2010.[11] I. Usman, A. Khan, A. Ali and T.-S. Choi, Reversible watermarking based on intelligent coefficient

selection and integer wavelet transform, International Journal of Innovative Computing, Informationand Control, vol.5, no.12(A), pp.4675-4682, 2009.

[12] T.-C. Lu and C.-H. Tsai, An improved lossless hiding technique using integer transform function,International Journal of Innovative Computing, Information and Control, vol.5, no.9, pp.2645-2656,2009.

Page 15: A NOVEL REVERSIBLE WATERMARKING METHOD ...based histogram shifting method: the proposed method is described in detail in Section 3, and the experiments comparing with some other methods

REVERSIBLE WATERMARKING USING PRE-SELECTION STRATEGY 6201

[13] C.-C. Chen and D.-S. Kao, DCT-based zero replacement reversible image watermarking approach,International Journal of Innovative Computing, Information and Control, vol.4, no.11, pp.3027-3036,2008.

[14] L. Kamstra and H. J. A. M. Heijmans, Reversible data embedding into images using wavelet tech-niques and sorting, IEEE Trans. Image Process., vol.14, no.12, pp.2082-2090, 2005.

[15] A. M. Alattar, Reversible watermark using the difference expansion of a generalized integer trans-form, IEEE Trans. Image Process., vol.13, no.8, pp.1147-1156, 2004.

[16] S. Lee, C. D. Yoo and T. Kalker, Reversible image watermarking based on integer-to-integer wavelettransform, IEEE Trans. Inf. Forens. Security, vol.2, no.3, pp.321-330, 2007.

[17] D. M. Thodi and J. J. Rodriguez, Expansion embedding techniques for reversible watermarking,IEEE Trans. Image Process., vol.16, no.3, pp.721-730, 2007.

[18] Y. Hu, H.-K. Lee, K. Chen and J. Li, Difference expansion based reversible data hiding using twoembedding directions, IEEE Trans. Multimedia, vol.10, no.8, pp.1500-1512, 2008.

[19] Y. Hu, H.-K. Lee and J. Li, DE-based reversible data hiding with improved overflow location map,IEEE Trans. Circuits Syst. Video Technol., vol.19, no.2, pp.250-260, 2009.

[20] V. Sachnev, H. J. Kim, J. Nam, S. Suresh and Y. Q. Shi, Reversible watermarking algorithm usingsorting and prediction, IEEE Trans. Circuits Syst. Video Technol., vol.19, no.7, pp.989-999, 2009.

[21] Z. Ni, Y. Q. Shi, N. Ansari and W. Su, Reversible data hiding, IEEE Trans. Circuits Syst. VideoTechnol., vol.16, no.3, pp.354-362, 2006.

[22] S. Weng, Y. Zhao, J.-S. Pan and R. Ni, Reversible watermarking based on invariability and adjust-ment on pixel pairs, IEEE Signal Process. Lett., vol.15, pp.721-724, 2008.

[23] S. Weng, Y. Zhao and J.-S. Pan, A novel reversible data hiding scheme, International Journal ofInnovative Computing, Information and Control, vol.4, no.2, pp.351-358, 2008.

[24] W.-L. Tai, C.-M. Yeh and C.-C. Chang, Reversible data hiding based on histogram modification ofpixel differences, IEEE Trans. Circuits Syst. Video Technol., vol.19, no.6, pp.906-910, 2009.

[25] L. Luo, Z. Chen, M. Chen, X. Zeng and Z. Xiong, Reversible image watermarking using interpolationtechnique, IEEE Trans. Inf. Forens. Security, vol.5, no.1, pp.187-193, 2010.

[26] M. Weinberger, G. Seroussi and G. Sapiro, Loco-i: A low complexity, context-based, lossless imagecompression algorithm, Proc. of IEEE Data Compression Conf., pp.140-149, 1996.

[27] X. Wu and N. Memon, Context-based, adaptive, lossless image coding, IEEE Trans. Commun.,vol.45, no.4, pp.437-444, 1997.

[28] Signal Image Process. Inst., University Southern California, Los Angeles, http://sipi.usc.edu/ data-base/.