14
Self-embedding fragile watermarking with restoration capability based on adaptive bit allocation mechanism Chuan Qin a,b , Chin-Chen Chang b,c,n , Pei-Yu Chen d a School of Optical-Electrical and Computer Engineering, University of Shanghai for Science and Technology, Shanghai 200093, China b Department of Information Engineering and Computer Science, Feng Chia University, Taichung 40724, Taiwan c Department of Biomedical Imaging and Radiological Science, China Medical University, Taichung 40402, Taiwan d Department of Computer Science and Information Engineering, National Chung Cheng University, Chiayi 62102, Taiwan article info Article history: Received 4 July 2011 Received in revised form 25 September 2011 Accepted 12 November 2011 Available online 19 November 2011 Keywords: Fragile watermarking Self-embedding Content restoration Bit allocation Nonsubsampled contourlet abstract In this paper, we propose a novel fragile watermarking scheme with content restoration capability. Authentication-bits are produced using the image hashing method with a folding operation. The low-frequency component of the nonsubsampled contourlet transform (NSCT) coefficients is used to encode the restoration-bits for each block by the adaptive bit allocation mechanism. During the bit allocation, all the blocks are categorized into different types according to their degree of smoothness, and, complex blocks, which are deemed to have higher priority than smooth blocks, are allocated more bits. Two algorithms are utilized to adjust the block classification and the binary representations in order to guarantee that the numbers of the self-embedding authentication-bits and restoration-bits are exactly suitable for 1-LSB embedding capacity. On the receiver side, the extracted authentication-bits and the decoded restoration-bits are used to localize and restore the tampered blocks, respectively. Due to the low embedding volume, the visual quality of the watermarked image is satisfactory. Experimental results also show that the proposed scheme provides high restoration quality. & 2011 Elsevier B.V. All rights reserved. 1. Introduction With the rapid development of networking and multi- media technologies, copyright protection for digital products becomes more and more important. Digital watermarking is one the information hiding technique [14] and it can be used as an effective tool for protecting digital contents, which has aroused significant interest among researchers [5]. Digital images are the most widely used, digital informa- tion medium in our Internet environment, attracting more research attention than any other digital medium. Currently, academic research efforts are focused mainly on three categories of digital image watermarking, i.e., robust water- marking, fragile watermarking, and semi-fragile watermark- ing. For robust watermarking, the watermark embedded in the cover image can be detected and identified, even if the watermarked image undergoes allowable and malicious attacks [69]. Therefore, this robustness can be used for ownership verification. Fragile watermarking is intended for checking the integrity and authenticity of digital images [1014], but an embedded watermark is easily destroyed if the watermarked image undergoes any slight alteration. The robustness characteristic of semi-fragile watermarking is between that of robust watermarking and fragile water- marking [1518]. The embedded watermark of the semi- fragile watermarking scheme is robust to the content-pre- serving manipulations, such as JPEG compression and Contents lists available at SciVerse ScienceDirect journal homepage: www.elsevier.com/locate/sigpro Signal Processing 0165-1684/$ - see front matter & 2011 Elsevier B.V. All rights reserved. doi:10.1016/j.sigpro.2011.11.013 n Corresponding author at: Department of Information Engineering and Computer Science, Feng Chia University, 100 Wenhwa Road, Taichung 40724, Taiwan. Tel.: þ886 4 24517250x3790; fax: þ886 4 27066495. E-mail addresses: [email protected] (C. Qin), [email protected] (C.-C. Chang), [email protected] (P.-Y. Chen). Signal Processing 92 (2012) 1137–1150

Self-embedding fragile watermarking with restoration capability based on adaptive bit allocation mechanism

Embed Size (px)

Citation preview

Page 1: Self-embedding fragile watermarking with restoration capability based on adaptive bit allocation mechanism

Contents lists available at SciVerse ScienceDirect

Signal Processing

Signal Processing 92 (2012) 1137–1150

0165-16

doi:10.1

n Corr

and Co

Taichun

fax: þ8

E-m

(C.-C. C

journal homepage: www.elsevier.com/locate/sigpro

Self-embedding fragile watermarking with restoration capabilitybased on adaptive bit allocation mechanism

Chuan Qin a,b, Chin-Chen Chang b,c,n, Pei-Yu Chen d

a School of Optical-Electrical and Computer Engineering, University of Shanghai for Science and Technology, Shanghai 200093, Chinab Department of Information Engineering and Computer Science, Feng Chia University, Taichung 40724, Taiwanc Department of Biomedical Imaging and Radiological Science, China Medical University, Taichung 40402, Taiwand Department of Computer Science and Information Engineering, National Chung Cheng University, Chiayi 62102, Taiwan

a r t i c l e i n f o

Article history:

Received 4 July 2011

Received in revised form

25 September 2011

Accepted 12 November 2011Available online 19 November 2011

Keywords:

Fragile watermarking

Self-embedding

Content restoration

Bit allocation

Nonsubsampled contourlet

84/$ - see front matter & 2011 Elsevier B.V. A

016/j.sigpro.2011.11.013

esponding author at: Department of Inform

mputer Science, Feng Chia University, 10

g 40724, Taiwan. Tel.: þ886 4 24517250x37

86 4 27066495.

ail addresses: [email protected] (C. Qin), alan3

hang), [email protected] (P.-Y. Chen).

a b s t r a c t

In this paper, we propose a novel fragile watermarking scheme with content restoration

capability. Authentication-bits are produced using the image hashing method with a

folding operation. The low-frequency component of the nonsubsampled contourlet

transform (NSCT) coefficients is used to encode the restoration-bits for each block by

the adaptive bit allocation mechanism. During the bit allocation, all the blocks are

categorized into different types according to their degree of smoothness, and, complex

blocks, which are deemed to have higher priority than smooth blocks, are allocated

more bits. Two algorithms are utilized to adjust the block classification and the binary

representations in order to guarantee that the numbers of the self-embedding

authentication-bits and restoration-bits are exactly suitable for 1-LSB embedding

capacity. On the receiver side, the extracted authentication-bits and the decoded

restoration-bits are used to localize and restore the tampered blocks, respectively.

Due to the low embedding volume, the visual quality of the watermarked image is

satisfactory. Experimental results also show that the proposed scheme provides high

restoration quality.

& 2011 Elsevier B.V. All rights reserved.

1. Introduction

With the rapid development of networking and multi-media technologies, copyright protection for digital productsbecomes more and more important. Digital watermarking isone the information hiding technique [1–4] and it can beused as an effective tool for protecting digital contents,which has aroused significant interest among researchers[5]. Digital images are the most widely used, digital informa-tion medium in our Internet environment, attracting more

ll rights reserved.

ation Engineering

0 Wenhwa Road,

90;

[email protected]

research attention than any other digital medium. Currently,academic research efforts are focused mainly on threecategories of digital image watermarking, i.e., robust water-marking, fragile watermarking, and semi-fragile watermark-ing. For robust watermarking, the watermark embedded inthe cover image can be detected and identified, even if thewatermarked image undergoes allowable and maliciousattacks [6–9]. Therefore, this robustness can be used forownership verification. Fragile watermarking is intended forchecking the integrity and authenticity of digital images[10–14], but an embedded watermark is easily destroyed ifthe watermarked image undergoes any slight alteration. Therobustness characteristic of semi-fragile watermarking isbetween that of robust watermarking and fragile water-marking [15–18]. The embedded watermark of the semi-fragile watermarking scheme is robust to the content-pre-serving manipulations, such as JPEG compression and

Page 2: Self-embedding fragile watermarking with restoration capability based on adaptive bit allocation mechanism

C. Qin et al. / Signal Processing 92 (2012) 1137–11501138

Gaussian low-pass filtering, but fragile to malicious attacks,such as cropping and content replacement. Our main focus ison fragile image watermarking.

Earlier research work on the fragile watermarkingincluded attempts to design schemes for localizing themodified or tampered image regions, and many schemesusually divided a host image into small blocks andembedded the watermark into each block [10–12]. Theembedded watermark is often a hash of the principalcontent about each cover image block. If an attackertampers with the watermarked image, the image contentand the extracted watermark corresponding to the tam-pered blocks cannot be matched so that the tamperedblocks are detected and localized. The fragile watermark-ing method in [13] also was based on this block-wisetechnique, but it aimed at the image in JPEG format as thecover image and two bits were embedded into discretecosine transform (DCT) coefficients of each 8�8 blockusing the reversible data hiding technique. In additionto the localization of tampered blocks, this methodcan recover the intact region without any error.Recently, researchers have proposed some fragile water-marking methods to enhance those developed by earlierresearchers, managing to restore the tampered regionsafter the tampering localization [19–25]. These kinds ofmethods often embed a compressed code of image con-tent into the cover image. Once the watermarked image istampered, this compressed code can be decompressedand used for content restoration. Since this compressedcode is a compact representation of the cover image itself,these kinds of methods also are called self-embeddingmethods.

Fridrich et al. proposed two fragile watermarkingapproaches with recovery capability [19]. In the firstmethod, the DCT coefficients of each 8�8 block werequantized into 64 or 128 bits, which were used to replacethe least significant bits (LSBs) of another block. In thesecond method, a low color depth version of the coverimage generated by reducing the gray levels was cyclic-shifted and embedded into the pixel differences. Afterdetecting the locations of the malicious modifications, thequantized DCT coefficients and the low color depth dataextracted from the reserved regions can be exploited torecover the principal content of tampered regions. Insteadof embedding the frequency coefficients, Yang et al.created an index table of the cover image via vectorquantization (VQ) and embedded the VQ indices of all ofthe blocks together with authentication-bits generated by[10] into the cover image [20]. If the image is tampered,the index table can be extracted and used to restore thetampered regions, but the quality of the recovered imageusing this method is not high enough. In [22], a tailor-made watermark consisting of reference-bits and check-bits was embedded into the cover image using a rever-sible data hiding method. On the receiver side, theextracted and calculated check-bits can be compared toidentify the tampered image blocks. The original imagewas reconstructed exactly using the reliable reference-bits extracted from other blocks. If the tampered area isnot too extensive, this method can restore the coverimage information with no errors, but the visual quality

of the watermarked image of this method is relativelylow. A reference-sharing mechanism for self-embeddingfragile watermarking was proposed in [23]. Theembedded watermark in this method was a referencederived from the original principal content in differentregions and shared by these regions for content restora-tion. After detecting the tampered blocks, both referencedata and the original content in the intact area were usedto restore the tampered area. This method can restore thefive most significant bits (MSBs) accurately, if the tamper-ing rate is below 24%. Qian et al. managed to reduce theamount of the embedded data while maintaining goodrecovery quality [24]. A fast image inpainting techniquewas used in this method to restore the smooth blocks fordecreasing the embedded data.

In this work, we propose a fragile watermarkingscheme based on the nonsubsampled contourlet trans-form (NSCT) using an adaptive bit allocation mechanism.The proposed scheme utilizes two kinds of binary infor-mation, i.e., authentication-bits and restoration-bits, toauthenticate integrity and restore content, respectively.The authentication-bits are generated using the imagehashing strategy to localize the alterations [26,27]. Therestoration-bits are produced by encoding the NSCTcoefficients of the cover image. As we know, a goodtransform can capture the essence of an image with fewbasis elements. Due to the redundancy of the basisfunctions, the NSCT transform is more efficient in captur-ing and representing the image features than other trans-forms that use non-redundant basis functions, such asDCT. Therefore, we utilize the NSCT to represent the coverimage and encode its coefficients for the restoration-bits.The NSCT construction consists of two parts, i.e., thenonsubsampled pyramid filter bank (NSPFB) and thenonsubsampled directional filter bank (NSDFB). Thedetails concerning the implementation of NSCT can befound in [28,29].

Obviously, more restoration-bits will produce betterreconstructed quality, but they could cause more seriousdamage to the cover image since more payloads areembedded. In order to balance the visual quality afterembedding and the restoration capability, we encode theNSCT coefficients of the image blocks into restoration-bitswith the dynamic lengths based on their degree ofsmoothness. By our adaptive bit allocation mechanism,the complex blocks are allocated more bits, while thesmooth blocks are allocated fewer bits, and the samesized images have an equal volume of restoration-bits.The watermark consisting of authentication-bits andrestoration-bits is only embedded into the 1-LSB planeof the cover image. Because modifications to the cover aresmall, the visual quality of watermarked image is satis-factory. On the receiver side, the tampered blocks can bedetected accurately and restored with high quality afterthe watermark is extracted.

The rest of the paper is organized as follows. Section 2describes the watermark self-embedding procedure of theproposed scheme. Section 3 presents the procedure oftampering localization and content restoration. Experi-mental results and analysis are given in Section 4, andSection 5 concludes the paper.

Page 3: Self-embedding fragile watermarking with restoration capability based on adaptive bit allocation mechanism

C. Qin et al. / Signal Processing 92 (2012) 1137–1150 1139

2. Watermark self-embedding procedure

The proposed scheme can localize and restore thetampered regions of the watermarked image by self-embedding the authentication-bits and the restoration-bits into the 1-LSB plane of the cover image. The authen-tication-bits for each cover image block are obtained byone image hashing algorithm that is integrated with afolding operation. The restoration-bits are generatedby encoding the NSCT coefficients of the cover image.We use a bit allocation mechanism to adaptively repre-sent the principle content of the image blocks withdifferent types into a fixed length for 1-LSB embedding.The framework of the watermark self-embedding proce-dure is shown in Fig. 1.

2.1. Authentication-bits generation

First, the cover image I is divided into n�n non-overlapped blocks B1, B2, y, Bk, and the 1-LSB plane ofeach block is set to zero, where k is the number of totaldivided blocks. Then, we utilize the image hashing algo-rithm to calculate m-bits hash value for each image block.Image hashing can represent the image content in com-pact form, and visually different images have distincthash values. In our research, we adopt an image hashingalgorithm based on the DCT transform [27], and denotethe DCT coefficients matrix of each block Bi as Ci, wherei¼1, 2,y, k. The size of Ci is also n�n. To calculate thehash value of Bi, m low-pass, filtered, random masks, i.e.,M1, M2, y, Mm, with the size of n�n are generated usinga secret key. Therefore, the m-bits hash value hi, 1, hi, 2, y,hi, m for Bi can be produced by Eq. (1). Note that the DCcoefficient of Ci should be excluded in the summationfor the performance of the image hashing algorithm.Any malicious tampering with the block may result in a

t×t blockdivision

HashCalculation

NSCTTransform

Coefficients Encoding

CoverImage

RestoraBits

n×n block division Fold

Opera

Fig. 1. Framework of the watermar

Hash bits of 4 blocks

Subsets

Authentication-bits

0 1 0 1 1 1 1 1 0 0

1 1 1 0 1 1 0 1 1 0

0 1 0 1 1

Fig. 2. Illustration of the generat

serious change of the corresponding hash value

hi,j ¼

1, ifXn

x ¼ 1

Xn

y ¼ 1

Ciðx,yÞUMjðx,yÞZ0 i¼ 1,2,. . .,k

0, ifXn

x ¼ 1

Xn

y ¼ 1

Ciðx,yÞUMjðx,yÞo0 j¼ 1,2,. . .,m

:

8>>>>><>>>>>:

ð1Þ

Inspired by the work of [13], we do not use the hashvalues directly as authentication-bits. Before embedding,the hash bits are folded in order to decrease the volume ofthe embedded data for the cover image. We generalize thefolding method in [13] by randomly grouping the totalm � k bits of the hash values into a � k subsets, S1, S2, y,Sa � k, using the secret key. Therefore, each subset containsm/a bits. After computing the modulo-2 sum of the m/abits in each subset, a � k bits are obtained for all k blocksthat are used as the final authentication-bits. The volumeof hash bits is reduced significantly by this folding way.

Fig. 2 gives an example of the generation of the authenti-cation-bits, in which the number of blocks k is equal to 4, andthe length m of the hash value for each block is equal to 6.The value of a is set to 3 in this example. Therefore, afterrandomly grouping and the calculation of the modulo-2 sum,12 authentication-bits are generated, which amounts to farless volume than the volume of the original hash bits. Duringthe authentication procedure, these authentication-bits areused to judge the integrity of the blocks by a voting-basedstrategy, which is described in detailed in the next section.

2.2. Restoration-bits generation

We utilize the NSCT to decompose each cover imageblock into pre-determined levels. One low-frequencycomponent and several high-frequency components withdifferent directions are obtained for each block. Fig. 3(a)

Authentication Bits

Adaptive Bit Allocation

tion

1-LSB Embedding

Watermarked Image

ing tion

k self-embedding procedure.

1 0 1 0 1 1 0 1 0 1 1 0 1 0

1 0 1 0 0 1 0 1 0 0 1 0 1 1

1 1 1 1 0 1 0

ion of authentication-bits.

Page 4: Self-embedding fragile watermarking with restoration capability based on adaptive bit allocation mechanism

Image

Lowpass

Subband

Bandpass

Directional

Subbands

Bandpass

Directional

Subbands

(�, �)

(-�, -�)

�2

�1

Fig. 3. Nonsubsampled contourlet transform. (a) Structure of nonsub-

sampled filter bank and (b) 2-D frequency partitioning.

C. Qin et al. / Signal Processing 92 (2012) 1137–11501140

gives an illustration of the NSCT. The filter bank in NSCTstructure splits the 2-D frequency plane in the subbandsshown in Fig. 3(b). The structures of NSPFB and NSDFBprovide the multi-scale property and the directionality,respectively [28].

Different from the discrete wavelet transform (DWT),the decomposed components of NSCT all have the samesize as the cover image blocks, which ensure the syn-chronization between the spatial domain and the fre-quency domain. This characteristic is very suitable forcontent restoration, because less image content is lost andno interpolation is needed. The high-frequency compo-nents consist mainly of noise, textures, and other details,while the low-frequency component reflects the principlestructure and content of the image block. Therefore, weonly use the low-frequency component of the NSCTdecomposition results to generate the restoration-bits.The low-frequency component becomes smoother as thedecomposition levels increase, and clearly, fewer bits arerequired to represent the smoother low-frequency com-ponent, which might also affect the restoration quality.Consequently, we can set the appropriate decompositionlevels according to the requirement.

We denote the NSCT low-frequency components forthe image blocks as Ui, where i¼1, 2, y, r. The block sizefor NSCT decomposition is t� t, which should not besmaller than 32 due to the property of NSCT and mightnot be equal to n�n for the calculation of authentication-

bits. For simplicity, suppose that t is divisible by n

and that r is the number of all the blocks sized t� t. Inorder to further decrease the volume of the embeddedbits, we conduct the DCT transform to Ui, and then, foreach Ui, the first b percentage of the DCT coefficients inthe zigzag scanning order are used for encoding therestoration-bits. The first one of these bUt2

� �coefficients

is the DC value that reflects the information of meanillumination, which belongs to [0, t �28

�1]. Thus,8þ log2 t bits are needed to represent the first coefficientlosslessly. We group the rest bUt2

� ��1 coefficients into

8þ log2 t sets, i.e., Cj, where j¼1, 2, y, 8þ log2 t, accord-ing to the quota of bits needed for their binary represen-tations. This indicates that the coefficients grouped in theset Cj all need j bits to represent. Therefore, the quota ofbits for losslessly representing the bUt2

� �coefficients of

each Ui is:

Wi ¼ 8þ log2 tþX8þ log2t

j ¼ 1

Qi,jUj, i¼ 1,2,. . .,r, ð2Þ

where Qi,j denotes the number of coefficients in the set Cj

of Ui, and it should satisfy

X8þ log2 t

j ¼ 1

Qi,j � bUt2� �

�1, for 8i 2 f1,2,. . .,rg: ð3Þ

2.3. Adaptive bit allocation mechanism

To allocate the bits quota to restoration-bits moreefficiently, we divide all r blocks Ui sized t� t, into fourtypes, T1, T2, T3, and T4, according to their values of Wi,where i¼1, 2,y, r. We assign two additional bits of {00,01, 10, 11} to each t� t block to indicate the type of {T1, T2,T3, T4} to which the block belongs. Because the bits of thetype indicator are important in the decoding of restora-tion-bits, we duplicate the 2-bits of the type indicator into4-bits to achieve decoding stability. We also uselog2 bUt2

� ��1

� �� �bits to represent the number of the

coefficients in set Cj, i.e., Qi,j, where j¼1, 2,y, 8þ log2 t,for each t� t block Ui. In the procedure of authentication-bits generation described in Section 2.1, a-bits are pro-duced for each n�n block. Therefore, the average sparebits quota for the restoration-bits in the 1-LSB plane ofeach t� t block is

g¼ t2�aUðt=nÞ2� log2 bUt2� �

�1� �� �

Uð8þ log2 tÞ�4 ð4Þ

The process of classifying all r blocks Ui, where i¼1, 2,y, r, is assisted by setting three parameters, i.e., L1, L2,and L3, where L1oL2oL3

Ui ) T1 if 8þ log2 toWirL1

Ui ) T2 if L1oWirL2

Ui ) T3 if L2oWirL3

Ui ) T4 if Wi4L3

i¼ 1,2,. . .,r, ð5Þ

where ) is the operation of classifying Ui into one of thefour types, i.e., T1, T2, T3, or T4, and L3 is equal to g.Obviously, the blocks classified in Ti must be morecomplex than the blocks in Ti�1, where i¼2, 3, 4. Wedenote the numbers of the blocks in the four types after

Page 5: Self-embedding fragile watermarking with restoration capability based on adaptive bit allocation mechanism

C. Qin et al. / Signal Processing 92 (2012) 1137–1150 1141

classification as N1, N2, N3, and N4, respectively, and

X4

i ¼ 1

Ni � r: ð6Þ

We manage to use L1-bits, L2-bits, L3-bits, and L4-bits(L44L3) to represent the blocks of the four types, i.e., T1

through T4, respectively. In other words, Li bits areallocated to represent the blocks in type Ti, where i¼1,2, 3, 4. The values of L1, L2, L3, and L4 are set to satisfy thefollowing relationship:

L3�L1 ¼ l1UðL4�L3Þ

L3�L2 ¼ l2UðL4�L3Þ, subject to L3 ¼ g, and l1, l2 2 Zþ , ð7Þ

where Zþ denotes the set of positive integers, l1 and l2

are the pre-determined parameters, and l1 is greater thanl2. Before transforming all r blocks Ui, where i¼1, 2, y, r,into binary representations for restoration-bits, the blocksin the four types must be adjusted and reclassified inorder to make the total number of bits suitable for the 1-LSB embedding capacity. The adjusting strategy is basedon the fact that the quota of bits for the complex blocksshould have higher priority than the smooth blocks toachieve better restoration quality. We utilize Algorithm 1to adjust the block classification adaptively, and thepseudo code of Algorithm 1 is shown in Fig. 4.

The block numbers in the four types after reclassifica-tion must satisfy the relationship in Eq. (8), and the sumof the block number in each type must still be equal to r

L1UN01þL2UN02þL4UN04 ¼ L3UðN01þN02þN04Þ, subject to

X4

i ¼ 1

N0i � r: ð8Þ

The number of bits for representing all r blocks sizedt� t in the four types is exactly suitable for the 1-LSBembedding capacity, see Eq. (9)

X4

i ¼ 1

LiUN0i ¼ rUg: ð9Þ

It should be noted that one can determine the appro-priate values of L1, L2, and L4 according to the requirement,since the different values of L1, L2, and L4 correspond to

Fig. 4. Algorithm 1 for the adjustm

different restoration particularities. Under the condition ofL1oL2ogoL4 and Eq. (7), if the complex blocks areexpected to be restored more effectively, a larger valuefor L4 should be used, and larger L1 and L2 values ensurethat the smooth blocks will have better restoration effects.

After the block reclassification using Algorithm 1, eacht� t block is assigned with L1-bits, L2-bits, L3-bits, or L4-bits for binary representation according to the type T1, T2,T3, or T4, to which it belongs. We denote one t� t block asUp, which belongs to the type Tq, qA{1, 2, 3, 4}. Becausethe needed bits Wp for lossless representation of Up

calculated by Eq. (2) might not be equal to Lq, we utilizeAlgorithm 2 to adjust the binary representation for Up tosatisfy the relationship

Lq ¼ 8þ log2 tþX8þ log2 t

j ¼ 1

Q 0p,jUj, ð10Þ

where Q0p,j is the adjusted number of the coefficients withj-bits representation in Up. The pseudo code of Algorithm2 is shown in Fig. 5.

Consequently, after the adjustment using Algorithm 2,the length of the restoration-bits for each t� t block is equalto L1, L2, L3, or L4 and coincides with the type to which itbelongs. Therefore, by our adaptive bit allocation mechan-ism, the complex blocks are assigned with a larger quota ofbits, and the greater coefficients in each block are assignedwith more bits for binary representation simultaneously.

2.4. LSB data embedding

After the authentication-bits and restoration-bits aregenerated, LSB embedding is conducted to hide the bitsstream. According to the analysis in the previous Section2.3, the length of the whole bits stream, consisting ofauthentication-bits, type indicators, number indicators,and restoration-bits, is fixed and is exactly equal to the 1-LSB embedding capacity, i.e., r � t2 bits. Table 1 lists thecomponents and their corresponding numbers of bits inthe bits stream. The type indicators, number indicators,

ent of block classification.

Page 6: Self-embedding fragile watermarking with restoration capability based on adaptive bit allocation mechanism

Fig. 5. Algorithm 2 for the binary representation adjustment of each t� t block.

Table 1Components of the bits stream for embedding.

Components Descriptions Bit numbers

Authentication-bits the authentication-bits of all the k blocks sized n�n k �aType indicators two duplicated type indicators for each Ui sized t� t (i¼1, 2, y, r) 4r

Number indicators the number indicator Q0 i,j for bUt2� �

�1 AC coefficients in each Ui (j¼1, 2,y, 8þ log2 t) r � (8þ log2 t) � log2 bUt2� �

�1� �� �

Restoration-bits One DC coefficient and bUt2� �

�1 AC coefficients for each UirU ð8þ log2 tÞþ

P8þ log2 t

j ¼ 1

Q 0i,jUj

" #

Fig. 6. Structure of the reference-bits of each t� t block.

C. Qin et al. / Signal Processing 92 (2012) 1137–11501142

and restoration-bits are referred to as reference-bits intogether. The structure of the reference-bits of each t� t

block Ui, where i¼1, 2, y, r, is illustrated in Fig. 6. TIexpresses the 4-bits binary representation of the dupli-cated type indicators. DC represents the binary represen-tation of the DC coefficient that occupies 8þ log2 t bits.Each number indicator, NIj, occupies log2 bUt2

� ��1

� �� �bits. {ACj} denotes the jth set of binary representationsfor NIj AC coefficients, and all binary representations inthe jth set are commonly j bits (j¼1, 2,y, 8þ log2 t).

We first embed the a authentication-bits of each n�n

block to the random locations in the 1-LSB plane of theblock itself. As a result, each n�n block can be authenti-cated through the embedded authentication-bits on thereceiver side. The procedure of tampered blocks localiza-tion is expressed in detail in the subsequent section. Afterembedding the authentication-bits, the remaining 1-LSBspace of the image is used to hide the reference-bits forcontent restoration. The reference-bits of all r blocks sizedt� t are first concatenated, and then scrambled by a secretkey. After substituting the remaining 1-LSB space of thecover image with the scrambled reference-bits, we canobtain the final watermarked image.

3. Authentication and restoration procedure

On the receiver side, first, the integrity of the receivedimage should be identified, and the damaged regionsshould be localized. Then, the detected damaged regionsare restored. The framework of the procedure for authen-tication and restoration is shown in Fig. 7. Assume thatthe size of the received image has not changed. Theembedded bits are extracted from the 1-LSB plane of thereceived image, and reversed using the same secret key.Authentication and localization of the tampered blocksare achieved by comparing the extracted authentication-bits with the calculated authentication-bits. The NSCTreference image, which is obtained from the decodedrestoration-bits, is utilized to restore the tampered blocks.

3.1. Tampered blocks localization

In the same way as the self-embedding stage describedin Section 2.1, the watermarked image is divided into k

non-overlapped blocks sized n�n. We can obtain m hashbits for each n�n block using the same image hashingalgorithm and compress the m hash bits into a bits, called

Page 7: Self-embedding fragile watermarking with restoration capability based on adaptive bit allocation mechanism

Hash bits of 4 blocks

Subsets

Calculated authentication-bits

Extracted authentication-bits

0 1 0 1 1 1 1 1 0 0 1 0 0 0 0 0 1 0 0 1 1 0 1 0

1 1 0 0 1 1 0 1 0 0 1 0 1 1 0 1 0 0 0 0 1 0 1 0

0 0 0 1 0 1 0 1 0 0 1 1

0 1 0 1 1 1 1 1 1 0 1 0

+ − + + − + +− + − + −

Fig. 8. Illustration of voting-based localization of tampered blocks.

Table 2Voting parameter si for each n�n block.

Block index Distributed subsets of hash bits ri

The 1st block 4th, 1st, 8th, 3rd, 11th, 7th s1¼1

The 2nd block 1st, 4th, 10th, 5th, 3rd, 9th s2¼2

The 3rd block 12th, 6th, 5th, 2nd, 7th, 9th s3¼5

The 4th block 2nd, 6th, 8th, 10th, 12th, 11th s4¼2

CalculatedAuthentication Bits

HashCalculation

Folding Operation

1-LSB Extracting

Extracted Authentication Bits

Decoded Restoration Bits

Received Image

Tampered Blocks Localization

NSCT Reference Image

RestoredImage

Binary Decoding

Fig. 7. Framework of the procedure for authentication and restoration.

C. Qin et al. / Signal Processing 92 (2012) 1137–1150 1143

calculated authentication-bits, by the folding operation.The extracted authentication-bits can be acquired easilyafter the 1-LSB extracting. Then, tampering localizationcan be achieved using a voting-based strategy. Eachcalculated authentication-bit is the modulo-2 sum of m/a bits in one subset, and the m/a bits in the subset arerandomly distributed from all the hash bits of the k

blocks. Therefore, we define a voting parameter si, wherei¼1, 2, y, k, for each block to record the number of itshash bits distributed in the subsets whose calculatedauthentication-bits are not equal to the correspondingextracted authentication-bits.

Fig. 8 gives an example of the localization of tamperedblocks using the voting strategy, in which the number ofblocks, the length of the hash bits for each block, and thenumber of subsets are the same as the example shown inFig. 2. Suppose the content of the third block is tampered.We can see that the mismatched indices between thecalculated authentication-bits and extracted authentica-tion-bits are 2nd, 5th, 7th, 9th, and 12th, which aregenerated from the corresponding subsets. Match andmismatch are indicated by ‘þ ’ and ‘� ’, respectively. Wecount the voting parameter si for each block, which isequal to the number of its distributed subsets belongingto the mismatched subsets: 2nd, 5th, 7th, 9th, and 12th.The results are listed in Table 2. It can be found that thevoting parameter s3 of the third block, i.e., the tamperedblock, is significantly larger than those of other intact

blocks. Therefore, we can utilize the voting parameter si

to identify and localize the tampered blocks by setting theappropriate threshold s.

3.2. Content restoration

In addition to the authentication-bits, the remainingportion of the extracted 1-LSB bits stream is the reference-bits, which include type indicators, number indicators, andrestoration-bits, as shown in Table 1. To conduct contentrestoration for the tampered blocks, the NSCT referenceimage should be generated by decoding the restoration-bits from the reference-bits according to the bits structurein Fig. 6.

First, the reference-bits stream is segmented into r

parts using the type indicators, which indicate the differ-ent encoding lengths for different types of blocks. Eachpart corresponds to the reference-bits for one t� t block.

Page 8: Self-embedding fragile watermarking with restoration capability based on adaptive bit allocation mechanism

C. Qin et al. / Signal Processing 92 (2012) 1137–11501144

Then, the restoration-bits for each t� t block, consisting ofthe 8þ log2 t bits DC coefficient and the 8þ log2 t sets ofAC coefficients, can be obtained according to the numberindicators, which indicate the number of AC coefficientsin each set. Finally, the NSCT reference image can begenerated easily by conducting the inverse DCT on theobtained DC and AC coefficients of all r blocks. Contentrestoration can be achieved by substituting the localizedtampered blocks with the corresponding blocks of theNSCT reference image.

It should be noted that the reference-bits are capableof error correction, if the errors happen to occur in thesections of type indicators TI and number indicators NIj inFig. 6. In this case, the restoration-bits cannot be decodedaccurately, because the lengths of the reference-bits and{ACj} for each block are strictly consistent with TI and NIj,respectively. If the blocks, in which the bits of the sectionsTI and NIj are embedded, are tampered, they can belocalized by the authentication procedure. Therefore,exhaustive trials can be conducted on the error bits ofthe sections TI and NIj, until the restoration-bits can bedecoded properly.

When the tampered image region is too extensive, itmight occur that one block (denoted as A) and itscorresponding block (denoted as B), in which the restora-tion-bits of block A are embedded, are destroyed simul-taneously. In this scenario, the destroyed restoration-bitsembedded in block B cannot be used to restore block A. Todeal with this problem, we utilize the image inpaintingtechnique to automatically repair the blocks whose cor-responding restoration-bits are destroyed. The inpaintingalgorithm based on partial differential equation (PDE)proposed in [30] is adopted in this work, see Eq. (11)

@

@tnIiðx,yÞ ¼r DIiðx,yÞ

� Ur?Iiðx,yÞ, 8ðx,yÞ 2 O, ð11Þ

where Ii denotes the image in which the recoverableblocks are restored by their restoration-bits, (x, y) is thecoordinates of the image pixel, O is the set of the blocksthat cannot be restored by the corresponding restoration-bits, tn denotes the time index, D and r are the Laplacianoperator and the gradient operator, respectively, and r?

Fig. 9. Cover images o

denotes the isophote direction that is normal to thegradient r. The PDE-based model in Eq. (11) imitatesthe practice of a traditional art professional in the manualrepairing process, and propagates the useful neighboringinformation of gray values along isophote direction intothe damaged blocks, which cannot be restored by therestoration-bits, and completes the whole restorationprocedure.

4. Experimental results

In the experiment, the sizes of the divided imageblocks for the hashing calculation and the NSCT transformwere 8�8 and 32�32, i.e., n¼8 and t¼32, respectively.The length m of the hash bits for each 8�8 block was 33,and the threshold s for the voting-based tamperinglocalization was 8. The parameters a and b were set to 3and 0.098, respectively. That is to say, the 33 hash bits ofeach 8�8 block produced 3 authentication-bits by thefolding operation, and 0:098� 322

j k¼ 100 DCT coeffi-

cients for each 32�32 block of the NSCT low-frequencycomponent were used to generate the restoration-bits.Larger a and b values may enhance the accuracy oflocalization and restoration, but they also lead to embed-ding with more bits, which could affect the quality of thewatermarked image.

Two standard gray images, Lena and Boat, both sized512�512, were used as cover images for self-embeddingby the proposed scheme. For the cover images sized512�512, L3 was always equal to 881, calculated by Eq.(4). In our experiment, all of the 256 blocks sized 32�32were classified adaptively into four types, i.e., T1, T2, T3,and T4; l1 and l2 in Eq. (7) were equal to 5 and 2,respectively; L1, L2, and L4 were set to 536, 743, and 950,respectively, which were satisfied with Eq. (7). As statedin Section 2.3, one can also set her or his own L1, L2, and L4

values according to the requirement. By Algorithm 1, thetypes T1 through T4 of the Lena image consist of 4, 2, 226,and 24 blocks, respectively, while the types T1 through T4

of the Boat image consist of 8, 0, 208, and 40 blocks,respectively. This means that 536, 743, 881, and 950 bitsare correspondingly used to represent the restoration-bits

f Lena and Boat.

Page 9: Self-embedding fragile watermarking with restoration capability based on adaptive bit allocation mechanism

Fig. 10. Watermarked images of Lena and Boat.

Fig. 11. Tampered versions of Lena and Boat in Fig. 10.

Fig. 12. Localization results for the tampered images Lena and Boat.

C. Qin et al. / Signal Processing 92 (2012) 1137–1150 1145

of 4, 2, 226, and 24 blocks for Lena, while 8, 0, 208, and 40blocks for Boat, respectively.

Fig. 9 gives the cover images of Lena and Boat. Theirwatermarked versions are shown in Fig. 10(a) and (b),

respectively. The values of the peak signal-to-noise ratio(PSNR) due to watermark embedding are 51.2 dB and51.1 dB, respectively, and the visual distortions are imper-ceptible. The two watermarked images were altered by

Page 10: Self-embedding fragile watermarking with restoration capability based on adaptive bit allocation mechanism

Fig. 13. Restored images for the tampered images Lena and Boat.

Fig. 14. Cover images of Gold and Girl and their tampered, watermarked versions.

C. Qin et al. / Signal Processing 92 (2012) 1137–11501146

substituting their partial contents with the fake informa-tion, shown as Fig. 11(a) and (b). According to theextracted and calculated authentication-bits, all fakeblocks in the two tampered, watermarked images werelocalized and labeled with white, as shown in Fig. 12(a)and (b). The two restored images from the extracted,decoded restoration-bits are shown in Fig. 13(a) and (b),

and the corresponding PSNR values are 41.8 dB and44.8 dB, respectively.

Besides Lena and Boat, two other standard gray images,i.e., Gold and Girl, sized 512�512, were used to comparethe content restoration performance between several self-embedding watermarking schemes. We generated thewatermarked images using the proposed scheme and the

Page 11: Self-embedding fragile watermarking with restoration capability based on adaptive bit allocation mechanism

Fig. 15. Restored results of Gold with the methods in [20,23,24], and the proposed scheme.

C. Qin et al. / Signal Processing 92 (2012) 1137–1150 1147

methods in [20,23,24] and modified the contents of thewatermarked images. Fig. 14(a) and (b) show the coverimages Gold and Girl, and Fig. 14(c) and (d) are thecorresponding tampered versions of the watermarkedimages by the proposed scheme. In Figs. 15 and 16, (a)through (d) show the restored results using the methodsin [20,23,24], and the proposed scheme, respectively.Table 3 gives the PSNR values of the watermarked imagesand the restored images for Lena, Boat, Gold, and Girl. Themethods in [20,23] used the 3-LSB planes to embed thewatermark, while the proposed scheme and [24] only usedthe 1-LSB plane. Therefore, it can be observed that thePSNR values of watermarked images of the proposedscheme and [24] are higher than the values of [20,23].The length of the codebook used in [20] was 256. Becausethe method in [23] can recover the 5-MSB of the tamperedimages with no error when the tampering rate is below24%, the PSNR values of the images restored by thismethod are almost the same. In the results of Figs. 15and 16 and Table 3, the methods in [20,23], and theproposed scheme just restore the localized tamperedregions, while the method in [24] reconstructs the wholeimage region since this method does not emphasize on thetampering localization. Due to the good performance ofadaptive bit allocation for the restoration-bits, it can be

seen in Table 3 that the proposed scheme can restore thetampered images efficiently and that its restored imageshave higher PSNR values than those restored by[20,23,24]. Note that the tampering percentages inFigs. 11 and 14 were less than 5%.

We also conducted the experiments under the condi-tion that the tampered image areas were relatively larger.As we stated in Section 3, the restoration-bits and theinpainting algorithm are jointly utilized to restore theextensive tampered region. First, the tampered blockshave the priority to be restored by their correspondingintact restoration-bits. Then, the inpainting algorithm in[30] is adopted to restore the remaining tampered blockswhose restoration-bits are destroyed due to the extensivetampering. Fig. 17(a) and (b) show the tampered, water-marked versions of Lena and Gold, and the tamperingpercentages are 7.0% and 27.3%, respectively. The restoredimages are presented in Fig. 17(c) and (d), and thecorresponding PSNR values are 39.50 dB and 38.78 dB,respectively.

5. Conclusions

In this paper, we have proposed a self-embeddingfragile watermarking scheme based on the adaptive bit

Page 12: Self-embedding fragile watermarking with restoration capability based on adaptive bit allocation mechanism

Fig. 16. Restored results of Girl with the methods in [20,23,24], and the proposed scheme.

Table 3Comparisons of several self-embedding watermarking schemes.

Watermarking schemes PSNR of watermarked images (dB) PSNR of restored images (dB) Volume of embedded data

Lena Boat Gold Girl Lena Boat Gold Girl

Method in [20] 37.9 37.9 37.8 37.8 37.3 37.6 37.4 37.7 3-LSB

Method in [23] 37.9 37.9 37.9 37.9 40.7 40.7 40.7 40.7 3-LSB

Method in [24] 51.2 51.1 51.1 51.1 29.2 35.2 32.3 30.6 1-LSB

Proposed scheme 51.2 51.1 51.1 51.1 41.8 44.8 45.1 48.4 1-LSB

C. Qin et al. / Signal Processing 92 (2012) 1137–11501148

allocation mechanism. Authentication-bits and restora-tion-bits are embedded into the cover image to realizetampering localization and content restoration, respec-tively. A DCT-based image hashing algorithm is used toproduce the hash bits for each cover block, and thehash bits are reduced to the authentication-bits by thefolding operation. We utilize the NSCT transform toobtain the principle content of the image, and encodethe NSCT coefficients into the restoration-bits usingadaptive bit allocation. All cover blocks are categorizedinto four types according to the degree of smoothness.The type of complex blocks is allocated more bits, andthe type of smooth blocks is allocated fewer bits.Two algorithms are used to adjust the block classification

and binary representation for each block adaptively. Bythe adjustment of these two algorithms, the watermarkbits number of total blocks is exactly suitable for embed-ding into the 1-LSB plane. On the receiver side, using avoting-based strategy, the calculated authentication-bitsand the extracted authentication-bits are compared tolocalize the tampered blocks. After decoding, the restora-tion-bits are used to restore the localized, tamperedblocks. When the tampered region is not too extensive,the PSNR values of the restored images are high due to thegood performance of the adaptive bit allocation forrestoration-bits.

Future work should include the development of a semi-fragile watermarking scheme that can simultaneously

Page 13: Self-embedding fragile watermarking with restoration capability based on adaptive bit allocation mechanism

Fig. 17. Restoration performance for larger tampered area.

C. Qin et al. / Signal Processing 92 (2012) 1137–1150 1149

provide good restoration capability and resist some kindsof content-preserving manipulations.

References

[1] F.A.P. Petitcolas, R.J. Anderson, M.G. Kuhn, Information hiding—asurvey, Proceedings of the IEEE 87 (7) (1999) 1062–1078.

[2] C.D. Vleeschouwer, J.F. Delaigle, B. Macq, Invisibility and applica-tion functionalities in perceptual watermarking: an overview,Proceedings of the IEEE 90 (1) (2002) 64–77.

[3] W.L. Tai, C.M. Yeh, C.C. Chang, Reversible data hiding based onhistogram modification of pixel differences, IEEE Transactions onCircuits and Systems for Video Technology 19 (6) (2009) 906–910.

[4] C.C. Chang, T.D. Kieu, A reversible data hiding scheme usingcomplementary embedding strategy, Information Sciences 180(16) (2010) 3045–3058.

[5] C.C. Chang, Y.S. Hu, T.C. Lu, A watermarking-based image owner-ship and tampering authentication scheme, Pattern RecognitionLetters 27 (5) (2006) 439–446.

[6] I.J. Cox, J. Kilian, F.T. Leighton, T. Shamoon, Secure spread spectrumwatermarking for multimedia, IEEE Transactions on Image Proces-sing 6 (12) (1997) 1673–1687.

[7] X.G. Kang, J.W. Huang, Y.Q. Shi, Y. Lin, A DWT-DFT compositewatermarking. scheme robust to both affine transform and JPEGcompression, IEEE Transactions on Circuits and Systems for VideoTechnology 13 (8) (2003) 776–786.

[8] C.C. Chang, P.Y. Tsai, M.H. Lin, SVD-based digital image water-marking scheme, Pattern Recognition Letters 26 (10) (2005)1577–1586.

[9] P.Y. Lin, J.S. Lee, C.C. Chang, Dual digital watermarking for internetmedia based on hybrid strategies, IEEE Transactions on Circuits andSystems for Video Technology 19 (8) (2009) 1169–1171.

[10] P.W. Wong, N. Memon, Secret and public key image watermarkingschemes for image authentication and ownership verification, IEEETransactions on Image Processing 10 (10) (2001) 1593–1601.

[11] S. Suthaharan, Fragile image watermarking using a gradient imagefor improved localization and security, Pattern Recognition Letters25 (16) (2004) 1893–1903.

[12] H. Yang, A.C. Kot, Binary image authentication with tamperinglocalization by embedding cryptographic signature and blockidentifier, IEEE Signal Processing Letters 13 (12) (2006) 741–744.

[13] X.P. Zhang, S.Z. Wang, Z.X. Qian, G.R. Feng, Reversible fragilewatermarking for locating tampered blocks in JPEG images, SignalProcessing 90 (12) (2010) 3026–3036.

[14] X.P. Zhang, S.Z. Wang, Fragile watermarking scheme using ahierarchical mechanism, Signal Processing 89 (4) (2009) 675–679.

[15] C.Y. Lin, S.F. Chang, A robust image authentication method distin-guishing JPEG compression from malicious manipulation, IEEETransactions on Circuits and Systems for Video Technology 11 (2)(2001) 153–168.

[16] C.Y. Lin, S.F. Chang, Semi-fragile watermarking for authenticatingJPEG visual content, in: Proceedings of SPIE International Confer-ence on Security and Watermarking of Multimedia Contents II, vol.3971, Jan. 2000, pp. 140–151.

[17] X.Z. Zhu, A.T.S. Ho, P. Marziliano, A new semi-fragile image water-marking with robust tampering restoration using irregular sam-pling, Signal Processing: Image Communication 22 (5) (2007)515–528.

[18] Z.M. Lu, C.H. Liu, D.G. Xu, S.H. Sun, Semi-fragile image water-marking method based on index constrained vector quantization,Electronics Letters 39 (1) (2003) 35–36.

[19] J. Fridrich, M. Goljan, Images with self-correcting capabilities, in:Proceedings of IEEE International Conference on Image Processing,1999, pp. 792–796.

[20] C.W. Yang, J.J. Shen, Recover the tampered image based on VQindexing, Signal Processing 90 (1) (2010) 331–343.

Page 14: Self-embedding fragile watermarking with restoration capability based on adaptive bit allocation mechanism

C. Qin et al. / Signal Processing 92 (2012) 1137–11501150

[21] H.J. He, J.S. Zhang, F. Chen, Adjacent-block based statistical detec-tion method for self-embedding watermarking techniques, Signal

Processing 89 (8) (2009) 1557–1566.[22] X.P. Zhang, S.Z. Wang, Fragile watermarking with error-free

restoration capability, IEEE Transactions on Multimedia 10 (8)(2008) 1490–1499.

[23] X.P. Zhang, S.Z. Wang, Z.X. Qian, G.R. Feng, Reference sharingmechanism for watermark self-embedding, IEEE Transactions onImage Processing 20 (2) (2011) 485–495.

[24] Z.X. Qian, G.R. Feng, Inpainting assisted self recovery withdecreased embedding data, IEEE Signal Processing Letters 17 (11)

(2010) 929–932.[25] Z.X. Qian, G.R. Feng, X.P. Zhang, S.Z. Wang, Image self-embedding

with high-quality restoration capability, Digital Signal Processing21 (2) (2011) 278–286.

[26] A. Swaminathan, Y.N. Mao, M. Wu, Robust and secure imagehashing, IEEE Transactions on Information Forensics and Security1 (2) (2006) 215–230.

[27] J. Fridrich, M. Goljan, Robust hash function for digital watermark-ing, in: Proceedings of International Conference on InformationTechnology: Coding and Computing, 2000, pp. 173–178.

[28] A.L. Cunha, J.P. Zhou, M.N. Do, The nonsubsampled contourlettransform: theory, design, and applications, IEEE Transactions onImage Processing 15 (10) (2006) 3089–3101.

[29] A.L. Cunha, J.P. Zhou, M.N. Do, Nonsubsampled contourlet transform:filter design and application in denoising, in: Proceedings of IEEEInternational Conference on Image Processing, 2005, pp. 749–752.

[30] M. Bertalmio, A.L. Bertozzi, G. Sapiro, Navier–Stokes, fluid dynamics,and image and video inpainting, in: Proceedings of the 2001 IEEEComputer Society Conference on Computer Vision and PatternRecognition, vol. 1, 2001, pp. 355–362.