An improved reversible image watermarking algorithm based on difference expansion
International Journal of Distributed Sensor Networks 2017, Vol. 13(1) Ó The Author(s) 2017 DOI: 10.1177/1550147716686577 journals.sagepub.com/home/ijdsn
Zhengwei Zhang1,2, Lifa Wu1, Yunyang Yan2, Shaozhang Xiao2 and He Sun1
Abstract To improve the visual quality and the embedding rate of the existing reversible image watermarking algorithm, an improved reversible image watermarking algorithm based on difference expansion is proposed. First, the watermark information is divided into groups, and the information value of each group is calculated. The watermark group number and the corresponding carrier image block number are mapped, and the corresponding coefficient position of each corresponding carrier block is identified according to the value of the watermark information in each group. Second, the identified location map is compressed and embedded in the original image through the difference expansion. Through circular searching the suitable pixel position, the embedding rate can be effectively improved without sacrificing any visual quality. The experimental results show that the proposed algorithm not only has high embedding rate but also has a high visual quality and can achieve full recovery of the original image. Compared with other algorithms, the algorithm has certain advantages. Keywords Difference expansion, reversible image watermarking, overflow handling, logistic mapping, Arnold transform
Date received: 10 July 2016; accepted: 6 December 2016 Academic Editor: Shancang Li
Introduction With the rapid development of computer science and Internet technology, digital watermarking technology has become a hot topic in the research field of multimedia information security.1 In traditional digital watermarking technology, the image content has irreversible distortion during the process when the watermark is embedded into the carrier image. Even if the distortion is very tiny and can hardly be perceived, it is still intolerable for medical diagnosis, remote sensing, court evidence, and so on. For the practical applications of watermarking technology in the above special fields, reversible image watermarking technology can be adopted as an effective method to solve the problem.2 For this reason, many scholars have conducted
extensive research into reversible image watermarking technology. Similar to traditional image watermarking, the reversible watermarking embedding process can also cause the distortion of the carrier. Reversible image watermarking is the premise to ensure the visual quality 1
College of Command Information System, People’s Liberation Army University of Science and Technology, Nanjing, China 2 College of Computer and Software Engineering, Huaiyin Institute of Technology, Huai’an, China Corresponding author: Zhengwei Zhang, College of Command Information System, People’s Liberation Army University of Science and Technology, No. 1, Haifu Lane, Guanghua Road, Nanjing 210007, Jiangsu, China. Email: [email protected]
Creative Commons CC-BY: This article is distributed under the terms of the Creative Commons Attribution 3.0 License (http://www.creativecommons.org/licenses/by/3.0/) which permits any use, reproduction and distribution of the work without further permission provided the original work is attributed as specified on the SAGE and Open Access pages (http://www.uk.sagepub.com/aboutus/ openaccess.htm).
2 of the original image, the watermark is embedded into the original image, and when the watermark is extracted, the original image can be recovered without damage. Compared with traditional digital image watermarking, reversible image watermarking raises higher requirements in the aspects of watermark embedding, which also enables a wider research and application significance in judicial, military, and medical fields that have high requirements in image authenticity and integrity. The general aim of research in reversible image watermarking algorithm is to maximize the data embedding capacity while satisfying certain distortion requirements.3 Recently, Tian4 proposed the famous difference expansion (DE) technology, which had received wide attention in reversible information hiding field. The DE-based reversible embedding algorithm can provide large embedding capacity and good visual quality. Tseng and Hsieh,5–8 Luo et al.6, Lee et al.,7 and Hong and Chen8 constructed a prediction operator which could remove pixel relativity to improve the concentration of prediction difference, and then adopted a DE-embedding method or histogram translation embedding method to embed a watermark into the prediction difference. Among the algorithms, Luo et al.’s6 algorithm had the best interpolation effect with highest interpolation concentration. So the algorithm also had the best integral performance. Jiang et al.9 proposed a threshold controlled scheme of DE techniques for reversible watermarking. This article first introduces the limitation of the expandable difference selection scheme used in the DE method, DE with histogram shifting and overflow map (DE-HSOM) method, and Kamstr’s method. Then an expandable difference threshold controlled scheme to improve the performance of the three methods is proposed. The experimental results show that this scheme can significantly improve the performance of the three methods when the payload is greater than 0.4 bits/pixel and perform as good as two methods when the payload is low. This scheme is efficient for most natural images, especially for the smooth ones. In Hu et al.,10 dual threshold method is applied to modify the histogram translation technology; meanwhile, the embedding formula is also modified to reduce the nonexpendable difference value. In this way, the compression ratio of the location map and the embedding capacity can be enhanced, and certain improvements of the image quality can be realized. Gu and Gao11 presented a new reversible robust watermarking algorithm based on chaotic system, which is done by finding out the best watermark embedding location and the optimal threshold value for this position. In Gu’s new algorithm, robust reversible watermarking is realized. However, the reversibility of the watermarking in this algorithm heavily depends on the selection of
International Journal of Distributed Sensor Networks threshold values. In other words, inappropriate threshold may directly result in irreversible watermarking. The reversible image watermarking algorithm combined differential expansion with least significant bit (LSB) algorithm proposed in Maity and Maity12 and obtained larger embedding capacity with better visual quality. It is unavoidable that distortion of original image would happen when embedding watermark information. Therefore, to further reduce the image distortion, Li et al.13 proposed a reversible information hiding algorithm based on pixel sequence and prediction difference. Regardless of its improvement in the hiding image quality, it has low embedding capacity. The bigger the image block, the lower the capacity. Lin et al.14 proposed the algorithm of combining histogram translation with prediction difference to enlarge the embedding capacity of reversible watermarking and had achieved good effect. Chang et al.15 reported a method to examine whether DE can be predicted according to the relationship between the adjacent pixel difference and the threshold value; besides, they also tried to further enhance the embedding capacity through the omission of location map. Zeng et al.16 developed the histogram translation reversible watermarking algorithm into pixel difference histogram. The differences between adjacent pixels in natural image are very small, which can increase the peak value and zero value in the difference histogram. As a result, the embedding capacity can be improved, while still quite limited. Pun and Choi17 proposed a generalized integer transform-based reversible watermarking algorithm using efficient location map encoding and adaptive threshold. In this proposed algorithm, two main improvements have been achieved: adaptive threshold and efficient location map encoding. With adaptive threshold, suitable threshold t is selected adaptively, which ensures enough embedding capacity for the watermark while keeping the distortion introduced as low as possible. Moreover, efficient location map encoding helps in reducing the location map size, which is down to 0.4 of the one unmodified in average. It provides more embedding capacity whereas improves the visual quality of the embedded image. Weng and Pan2 proposed a new reversible watermark scheme based on multiple prediction modes and adaptive watermark embedding. Six prediction modes fully exploiting strong correlation between any pixel and its surrounding pixels are designed in this article. Under any prediction mode, each to-be-predicted pixel must be surrounded by several pixels. Therefore, the payload can be largely increased as each to-be-predicted pixel in the smooth set can possibly carry more than 1 bit. Meanwhile, the embedding distortion is greatly controlled by embedding more bits into pixels belonging to smooth set and fewer bits into the others in
Zhang et al. complex set. The experimental results reveal that the proposed method is effective. El-sayed et al.18 presented an adaptive reversible data hiding technique based on DE. This algorithm could embed one bit, two bits or three bits binary numbers into each pixel. To embed and extract data, the proposed technique has some salient features such as its capability to control the embedding capacity using three global embedding parameters. These parameters are computed using the statistics of the embedded pixel surrounding pixels. Also, the data embedding steps in the proposed scheme can be reversed to completely retrieve the cover image free from any deformation. Furthermore, in this technique, no reference images or memorization of the embedded pixel positions are needed in the data extraction process. The results demonstrate that the proposed technique not only has high embedding rate (ER) but also has a high visual quality. For the DE embedding method, the overflow location map is one of the important factors that affect the embedding capacity, and it is very important to improve the performance of the algorithm. A reversible watermarking algorithm based on DE and reversible contrast graph was proposed in Ma and Niu19 to divide the image into 2 3 2 image blocks. In each image block, the first two pixels are reversible contrast image pixel pairs and the other two pixels are the difference extended pixel pairs, and the two pixels are used for embedding information. Reversible contrast image pixel pairs are mainly used to embed small amount of additional information to replace location image, which can improve the embedding capacity. However, half of the pixel pairs in the algorithm adopt reversible contrast image translation, thus causing a dramatic decrease in the image quality. Li et al.20 raised a reversible embedding method based on differential histogram translation. To avoid the pixel overflow, the method adjusts the pixel values in a certain range before translation and records the positions of the pixels in the position map. This embedding method is quite distinctive in dealing with pixel overflow. But the compressed position map needs to be embedded. In Wang et al.,21 the selection of optimal peak value point and null point was presented. The original carrier is divided into two sections. In section 1, LSB substitution method is applied to hide the peak and null point of the histogram to the LSB of the corresponding pixels. Then, histogram translation could embed the rest watermark information and all the LSBs of the replaced pixel into section 2. To avoid overflow during the embedding process, the histogram should be contracted to mark the position of the contracted pixel. Next, run length numbering can be used to carry out lossless compression for the contracted histogram. Through compression, the length and content of the bitmap will be put in the forefront of the watermark information. The
3 length and content are treated as a whole to embed this new watermark into the carrier image. With regard to the above questions, a modified DEbased reversible image watermark algorithm is presented in this article. In this algorithm, the first step is to divide the watermark information into groups and calculate the information value of the watermark in each group. Number the above watermark groups and map the corresponding carrier image blocks. And mark the relevant coefficient locations in the carrier blocks by circular seeking proper pixel location according to the watermark information values of each group. Then compress the marked location map and embed into original carrier image by DE. This algorithm can effectively improve the embedding capacity and reduce the image distortion, at the same time avoids pixel overflow.
Related work Image texture complexity analysis Generally, the smoother the image in the block, the smaller the differences between the internal pixels, and the objective distortion of the original load caused by the embedding of watermark information with the DE method will be relatively small. Then watermark embedding can be preferentially conducted; the more complicated the image texture, the larger the differences between the pixels, and the hiding information will trigger larger distortion. Hence, a pixel block smoothness measuring function needs to be constructed to select appropriate pixel blocks. In this article, we construct a pixel block smoothness approximate measuring function to calculate the approximate smoothness value of each pixel block. In Figure 1, X0 represents the current pixel block; X1, X2, X3, and X4 are the neighboring pixel blocks. The approximate smoothness degree function of X0 will be r(X0 ) =
(xi X )
In formula (1), x0 , x1 , x2 , x3 , and x4 are the pixel mean values of X0 , X1 , X2 , X3 , and X4 , respectively, which can be calculated by formula (2) xi =
xi, j =4
In formula (1), X is the mean value of x0 , x1 , x2 , x3 , and x4 as shown in formula (3) X =
4 X i=0
International Journal of Distributed Sensor Networks Meanwhile, the pixel values obtained by embedding the DE into the watermark information may cause the pixel overflow, so x and y acquired by inverse transform should be limited to the range of [0–255], or it will no longer be reversible in watermark extraction and image restoration. Therefore, h0 should be restricted: jh0 j min(2(255 l), 2l + 1)
Gray overflow processing
Figure 1. The original carrier image is divided into 2 3 2 pixel blocks.
This article first uses formula (1) to calculate the approximate smoothness values of all pixel blocks. Then we sort the smoothness values from small to large. Finally, we conduct watermark embedding for the front pixel blocks according to the information amount to be embedded. The experiments have proven that this method can effectively alleviate the problem of over-occupation of the position map and improve the embedding capacity. Meanwhile, from formula (1), we can see that the approximate smoothness degree value of each pixel block is invariant whenever before or after embedding watermarks, which can be used to identify the information embedding location and thus replace location marking figures that occupy a lot of space.
DE algorithm Tian4 proposed that the expansion algorithm based on the adjacent pixels was to conduct integer transform of any one of the image pixels P = (x, y) and get the mean value l and the difference value h. Accordingly, after the inverse transform, the mean value l and the difference value h can losslessly restore the original image pixel values x and y.
x+y ,h=x y 2 h+1 h ,y=l Inverse transform : x = l + 2 2 Positive transform : l =
The resulting difference h is shifted left 1 bit, and the watermark is embedded into its LSB, and this is the DE. Its mathematical expression is h0 = 2h + b.
There are normally two types of gray overflow solutions: (1) keep the values of the overflow pixels unchanged, record the relevant location information for supplementary information, and transmit the information to the information extraction end so as to make related inverse treatment during the information extraction and (2) compress the gray histogram of the carrier image. After expansion transformation, the gray values of the pixels are kept in an effective range. Record the relevant information of the gray histogram compression, which is kept as part of the supplementary information and transmitted to the data extraction end to make relevant decompression transformation during the information extraction. The supplementary information amount generated by the second solution has a close relationship with the efficiency of contraction operator, which is not suitable for the small-sized image carrier. In addition, compared with the first solution, the process of data compression treatment would increase the complexity of inverse image watermarking algorithm, which is not advisable. Double detection identification bit method. Double detection identification bit method belongs to the first type of gray overflow solution, which is first raised by Thodi and Rodriguez.22 Generally, the pixels of most carrier images can conduct multiple non-overflow expansion transformation. There are few pixels of double transformation overflow and one-time transformation overflow (as shown in sample 1, sample 2, and sample 3 in Figure 2). As shown in Figure 2, the pixels are tested by the maximum expansion transformation distance one by one. If overflow occurs at the first transformation, it is marked by bit 1. The secondary overflow is marked by bit 0, and the others are not marked. After identifying the first or secondary overflow pixels, the bit string and data to be embedded are combined to embed data bit and then start the data embedding. During the data embedding, the marked pixels are not embedded with effective data. The first transformed overflow pixels kept the same; the secondary transformed overflow pixels conduct the maxim transformation of the first transformation distance. Other pixels are performed the conventional extension transformation. At the end of data extraction, conduct the one-
Zhang et al.
Figure 2. Example of the two-time detection identification bit method: (a) initial state, (b) state of transforma one time, and (c) state of transforma two times.
time embedding transformation at the maximum transformation distance on the pixels which are to be inversely transformed. If gray overflow occurs, use identification bit to further confirm whether the pixels at the embedding end kept the same or have conducted the one-time filled transformation with maximum transformation distance. Otherwise, it is considered that the pixels are conducted with normal expansion transformation at the embedding end. Improved overflow processing algorithm. Gray overflow is inevitable for DE transformation. Therefore, based on the second detection identification bit method, this article designs the one-time detection identification bit method. The procedures are as follows: command that the initial value of the overflow information identification bit string F is 0, and then conduct expansion transformation on the pixel pairs one by one. If gray overflow appears, cancel the transformation and keep the pixel pairs unchanged. At the same time, add the identification bit ‘1’ at the end of F; if no gray overflow occurs, execute the expansion transformation. Then, based on the transformation result, conduct the transformation again on the gray overflow that has the largest transformation amount. If overflow occurs, add the identification bit ‘0’ at the end of F. As part of the supplementary information, F is transmitted to the extraction end. When extracting data, we conduct following process according to F, and then the pixel pairs with original values that due to the gray overflow when embedding can be identified. Obtain the current identification bit of F in an inverted order and conduct an invertible
transformation for the implicit pixel pairs one by one according to the inverted order of embedding pixels. Before inverse transformation expansion, conduct the transformation on the gray overflow that has the largest amount of transformation. If overflow appears, observe the current identification bit. If the bit is ‘1’, it means the current pixels are not expanded in the embedding end with the problem of gray overflow, and the data will keep unchanged. Besides, other pixel pairs at the data extraction end need to be conducted with relevant embedding invertible treatment.
Logistic mapping Logistic mapping is a simple chaotic mapping system,23 which can be denoted by equation (4) xn + 1 = mxn (1 xn )
where m 2 (0, 4. Sequence pair initial value generated by logistic mapping is highly sensitive. That is, when x0 takes different values, the value sequence of x shows different states. In addition, the sequence codomain generated by logistic mapping is [0, 1]. In this article, the logistic chaotic mapping is used to construct a mapping function between watermark group number and carrier image block number.
Arnold transform The traditional Arnold scrambling transform is simple.24 When subjected to malicious attacks, it is easy to decrypt to restore the original watermark. The confidentiality and robustness of the traditional Arnold
International Journal of Distributed Sensor Networks
Figure 3. The flow chart of watermark embedding.
transform are not strong enough. To enhance the robustness and security of the digital image watermarking system, this article improves the traditional Arnold scrambling transform, and the improved scrambling method is as follows 0
d x mod M y
x , y 2 f0, 1, 2, . . . , N 1g
where (x, y) and (x#, y#) are the pixel positions in the image before and after transform, respectively; M denotes the image size and c and d denote scrambling times. The Arnold transform is a one-to-one mapping, and the transform parameters c and d are randomly generated. Compared with the traditional Arnold transform, it is not easy to be decoded, which enhances the robustness and security of the whole digital image watermarking system.
Algorithm design In this article, the watermark information is divided into several groups, and the information value of each group is calculated. The watermark group number and the corresponding carrier image block number are mapped, and the corresponding coefficient position of each corresponding carrier block is identified according to the value of the watermark information in each group. The identified location map is compressed and embedded in the original image through the different expansion. The algorithm mainly includes two modules: watermark embedding and watermark extraction.
Watermark embedding The watermark embedding process proposed in this article is shown in Figure 3. The concrete steps of embedding are as follows: Step 1: divide the original image L (size: M 3 N ) into non-overlapped image blocks Li (size: a 3 a), i 2 (0, ((M 3 N )=(a 3 a))). Step 2: conduct Arnold scrambling on the watermark information W to be embedded and transform the scrambled image into one-dimensional vector. Step 3: the scrambled watermark information is grouped. Using key k1, the logistic chaotic mapping is used to construct a mapping function between watermark group number and carrier image block number. Divide the watermark information into n groups equally. Assume the watermark length of each group is m with the value range of 0–2m 2 1. If the watermark information of any of the group is 0110, then the value is 6. Mark the sixth coefficient in the relevant block as 1, and the rest pixel locations are marked as 0. Here, the length of the divided watermark groups should be less than or equal to log2 (a 3 a). Step 4: to embed the binary string whose watermark group length of m into relevant carrier image blocks, this article identifies the S pixel in the relevant block according to the group watermark information value S and marks with ‘1’. Other pixels in the block are marked with ‘0’. After the relevant pixels are found in the carrier image for each group of watermark
Zhang et al.
information, each carrier image block has an image pixel marked with ‘1’. Then the marking location map can be generated. Step 5: re-divide the original image L (size: M 3 N ) into non-overlapped image blocks Lj , Lj (size: b 3 b), j 2 (0, ((M 3 N)=(b 3 b))). Use formula (1) to calculate the approximate smoothness values of all the pixel blocks Lj , sort the smoothness values from small to large, and establish a sequence index information table. Then, based on the watermark information to be hided, properly select the front pixel blocks in the sequence (assume the front k blocks) and embed the watermarks successively. Step 6: compress the identification location map. Based on the above method, use the DE algorithm to embed the location map in any selected smooth block Aj (0 j k). Regarding the pixels that exceeded the image gray value range after embedding the information with DE method, mark in the overflow map; compress the overflow map and hide it in the original carrier image together with the auxiliary information such as watermark embedding capacity and watermark scrambling times c, d and so on. Step 7: the image blocks in the original image L that are not used to embed watermark information, which means the original pixel blocks with complicated textures, are conducted with the first level of integer wavelet transform (IWT), and the highfrequency detail sub-band HHi is selected to embed supplementary information (for high-frequency part, the method of lossless data compression25 is used for the embedding of supplementary information). After selecting n blocks of the sequence to conduct the embedding of supplementary information, the block number n is saved for watermark extraction. Step 8: after reversible operation, the watermarked image L0 is generated.
Watermark extraction If we embed the watermark information of any pixel pair (x, y) in the original image by the differential expansion method and the embedded watermark information is 1, then the new generated value of the pixel pair (a, b) will be a=
x+y 2(x y) + 1 + 1 x+y + = +x y+1 2 2 2 b=
x + y 2(x y) + 1 x+y = x+y 2 2 2
Accordingly, a b = 2x 2y + 1. So in any pixel pair, when the embedded watermark information is 1, the difference of new pixel pair is odd. In the same way, if the embedded watermark information is 0, the difference of new pixel pair is even. By this method, when we restore the original carrier image, if the difference of pixel pair (a, b) in the watermarked image is odd, the watermark information is 1, otherwise 0. Watermark information can be extracted by this method. The process for the watermark extraction and carrier recovery algorithm is shown in Figure 4. The detailed steps of the watermark extraction and carrier recovery algorithm are as follows: Step 1: divide the watermarked image LW (size: M 3 N ) into non-overlapped image blocks LWi (size: b 3 b), i 2 (0, ((M 3 N)=(b 3 b))). Step 2: use formula (1) to calculate the approximate smoothness values of all the pixel blocks LWi , sort the smoothness values from small to large, and establish a sequence index information table. The pixels’ mean values in the block remain the same after embedding the information into the pixel block with the generalized differential expansion method. So before and after the watermark embedding, the order of the image blocks sorted according to the smoothness value is also the same. Step 3: conduct IWT on each image block LWi generated by the stable sorting of the smoothness values from small to large and get the high-frequency part HHWi (here refers to diagonal high-frequency part) of each block. Step 4: extract the watermark embedding auxiliary information from the high-frequency part HHWi (the last n sub-blocks in the smoothness value sequence); get the watermark capacity, image overflow position information, and watermark scrambling times c, d; and restore the high-frequency part HHi of the original image. Step 5: based on the auxiliary information extracted from the high-frequency part HHWi , the capacity of the embedded watermark can be obtained. As the approximate smoothness values of each pixel block LWi calculated by the DE method are constant before and after the watermarking embedding, based on the watermark capacity, the pixel blocks in the front of the sequence are chosen as the smoothness block set and the rest are taken as the complicated region. Step 6: the new pixel pair-wise obtained by watermark information embedded with DE is featured with parity. Extract the marking location map from each pixel block LWi in the smooth block set and restore the original image. Step 7: divide the restored carrier images into a 3 a sized non-overlapped image blocks Li , i 2 (0, ((M 3 N)=(a 3 a))).
International Journal of Distributed Sensor Networks
Figure 4. The flow chart of watermark extraction and image restoration.
Step 8: use key k1 and logistic chaotic mapping to establish a mapping function between watermark information group number and carrier image block number. Step 9: extract the pixel points of the points marked with ‘1’ in the marking location map from relevant image block Li . Number the locations of all the extracted pixel points, combine them according to the watermark information group number, and transform them into a binary string. The binary string represents the one-dimensional watermark information which is scrambled. Step 10: conduct anti-Arnold scrambling of the onedimensional watermark information and get the final watermark information.
Algorithm improvement and optimization When embedding the watermark information through the above method, the embedding capacity is limited. For example, if the watermark information is divided into binary strings of length 4, the value range will be 20 2 1;24 2 1, and then the carrier images should at least be split into 4 3 4 blocks to assure the pixel number range is 20 2 1;24 2 1. In this case, for 256 3 256 carrier images, the maximum embedding watermark capacity would be 256 3 256 O 4 = 16,384 (bit), and the embedded rate is 0.25. The watermark information is grouped into binary string groups with the watermark length of n and the value range of 20 2 1;2n 2 1. The minimum value of the watermark is 0, and the maximum value is 2n 2 1.
The values showed by a group of watermarks are marked in relevant carrier image blocks, which require at least 2n pixels. With the increase in the length n of the grouped watermarks, the pixel points needed in the relevant carrier image block that is the carrier image block sizes increased dramatically. For example, if the watermark information is divided into binary string at the length of 4, then the carrier images should at least be divided into 4 3 4 blocks accordingly; if the watermark information is divided into binary string at the length of 5, then the carrier images should at least be divided into 6 3 6 blocks accordingly; if the watermark information is divided into binary string at the length of 6, then the carrier images should at least be divided into 8 3 8 blocks accordingly; if the watermark information is divided into binary string at the length of 7, then the carrier images should at least be divided into 12 3 12 blocks accordingly. Even the carrier images are divided into rectangle blocks, and the size of each block will also be enlarged dramatically with the increase in the watermark length of the group. Based on the above analysis, to improve the embedding rage of the algorithm in this article, the method of seeking proper pixel location circularly is raised in this article. First, the watermark information is grouped properly, assuming the grouped length as 5 and value range as 0–31. Then the carrier image is divided into several blocks. Assume the block size as 5 3 5 which means 25 pixels, which are then numbered as 0, 1, 2,., 24 from left to right and top to bottom. Finally, logistic chaotic mapping is used to establish a mapping function between the watermark information group number and carrier image block number. Then the
Zhang et al. equivalent pixel number in relevant carrier image block is found and marked according to the watermark information of a certain group. At this time, if the watermark information with the length of 5 in a certain group is 10001 with the information value of 17, then in the relevant image block, the pixel which is numbered as 17 is marked as ‘1’. However, as 27 has exceeded, the range of the image block pixel number cannot be marked. At this time, this article conducted the second round of numbering on the image block, with the numbering order unchanged. In the second numbering, the numbers are 25, 26, 27,., 49. The pixel with the number of 27 will be marked. To differentiate from the first round of marking, the second round used ‘2’ for the marking and ‘0’ to mark other pixels. If the second round cannot be marked, a third round of numbering can be conducted on the image block. But this should be conducted based on a proper division of watermark information and carrier image. Finally, the generalized marking location map is compressed and embedded into the original carrier image block through the above watermarking embedding algorithm, which has accomplished the watermark embedding. For the watermark information embedded through the method of seeking proper pixel location circularly, when extracting the watermark information and marking the location map of each image block through the above watermark extraction algorithm, the marked pixels can be identified from the image block according to the size of the image block, and the watermark information can be extracted. Based on the keys, logistic chaotic mapping is used to establish a mapping function between the watermark information group number and carrier image block number. Taking the 4 3 4 image block as the example, we assume the extracted marking location map is 00000000010000000, and the sequence has 17-digit binary number, which is one more pixels than normal division block. Hence, we start from the position of 1 and select the value that generated by 2-bit as the watermark embedding point, that is 2, which means double circulated embedding is executed. The position of 1 in the sequence is the location of the pixel marked as 1. Then this sequence means that the 10th pixel is marked as 2 and the other pixels are marked as 0. The extracted watermark information is 25, that is, 11001. Similarly, taking the 4 3 4 image block as the example, we assume the extracted marking location map is 0000000001000000, and the sequence has 16digit binary number, which is coincident with the number of pixels in the normal partition block. Hence, we start from the position of 1 and select the value generated by 1-bit as the watermark embedding point, that is, 1, which means one-time circulated embedding is executed. The position of 1 in the sequence is the
9 location of the pixel marked as 1. Then this sequence means that the 10th pixel is marked as 1 and the other pixels are marked as 0. The extracted watermark information is 9, that is, 1001. Similarly, taking the 4 3 4 image block as the example, we assume the extracted marking location map is 00000000011000000, and the sequence has 17digit binary number, which is coincident with the number of pixels in the normal partition block. Hence, we start from the position of 1 and select the value generated by 2-bit as the watermark embedding point, that is, 3, which means three times circulated embedding is executed. The position of 1 in the sequence is the location of the pixel marked as 1. Then this sequence means that the 10th pixel is marked as 3 and the other pixels are marked as 0. The extracted watermark information is 41, that is, 101001. Based on the logistic chaotic mapping function, the watermark information extracted from each watermark image block is sorted and eventually constructed the watermark information. In addition, it is not necessary to save the watermark grouping length when embedding the watermark information through the method of seeking proper pixel location circularly. Only with the watermark block size, the watermark information can be extracted when extracting watermark.
Experimental results and performance analysis Barbara, Lena, Baboon, and Pepper are all 512 3 512 eight-bit standard gray images (all images are derived from http://sipi.suc.edu/database) that are selected in the experiment as the original carrier images (as shown in Figure 5), and the watermark image is 32 3 32 binary image (as shown in Figure 6). All the experiments are carried out in the XP windows operating system through emulation of taking MATLAB R2012b as the experimental platform. The experimental results use image objective distortion (peak signal-to-noise ratio (PSNR)),26 structure similarity index measure (SSIM),27 and information ER28 to evaluate the performance of the algorithm. Generally, the reversible watermarking algorithm requires carrier image to completely recover after extracting watermark image. Therefore, it is measured by the normalized correlation (NC) of the original carrier image and the restored carrier image after extracting watermark. For the original carrier image and the restored carrier image, the NC value is required to be 1, that is, the carrier image is generally required to recover completely. Table 1 denotes the integrity of the results of the four different types of watermarked images without any attack based on this algorithm. It shows that NC1 on four different types of images values the same 1 when
International Journal of Distributed Sensor Networks
Figure 5. Original carrier images: (a) Lena, (b) Barbara, (c) Baboon, and (d) Pepper.
Figure 6. Watermark image.
Table 1. Integrity assessment table without attack. Image (512 3 512)
NC: normalized correlation.
there is no attack. The more the value of NC1 close to 1, the better the carrier image quality relatively, which shows that the original image can be restored in a better quality. The algorithms in this article and in Weng et al.29 are used to embed watermark after using 4 3 4 blocks. The performance of the two algorithms is compared by PSNR and SSIM. The detailed values are shown in Table 2 (the average of data taken 20 tests). In Table 2, when using this algorithm to embed watermark, the watermarks are divided into two
grouped watermarks with the lengths of 4 and 5 to analyze the performances. When the watermark information is divided into grouped watermarks of length 4, one cycle should be completed in relevant image blocks for embedment of relevant grouped watermark information. When the watermark information is divided into grouped watermarks of length 5, a two-time cycle should be completed in relevant image blocks for embedment of relevant grouped watermark information. The number of digits of the grouped watermark with the length of 5 is larger than that of the grouped watermark with the length of 4. However, the number of generalized marking location maps of 5 is larger than that of 4. Hence, as shown in Table 2, the PSNR and SSIM values between the two lengths are very close. According to Table 2, when equivalent amount of watermark information is embedded, the algorithm in this article has better PSNR and SSIM values than the algorithm in Weng et al.29 This also shows that the algorithm in this article has better visual quality. The specific visual effect and watermark extraction results are shown in Table 3. The PSNR values obtained in Table 3 have the visual quality with 4 3 4 blocking and watermark information with the length of 4. As seen from the images from Table 3, human eyes cannot notice the watermark information in watermark image. The image with watermark has a good visual effect. The relate PSNR
Table 2. Algorithm visual quality analysis. Image name
Weng et al.’s29 algorithm
This algorithm n=4
Lena Baboon Barbara Pepper
58.36 57.39 58.51 57.62
0.993 0.988 0.992 0.99
57.73 57.01 58.09 57.15
0.993 0.992 0.993 0.992
PSNR: peak signal-to-noise ratio; SSIM: structure similarity index measure. Note that n is the group length of watermark information.
54.63 52.42 54.51 52.85
0.984 0.982 0.985 0.983
Zhang et al.
Table 3. Algorithm experimental visual effect. Image name
Original carrier image
PSNR: peak signal-to-noise ratio.
values show that different types of image-oriented algorithm are featured with good imperceptibility with an averaged PSNR value as high as 57.97 dB. As shown in Tables 1–3, the algorithm in this article has good visual perception for different texture types of images. The watermark can be extracted accurately and the original image can be restored completely. To estimate the maximum watermark embedding capacity of the original image, this article needs to embed watermarks of all the blocks in the original image to better calculate and analyze the performances of the algorithm in this article. Due to the different sizes in carrier image block and watermark information group, the embedded watermark capacity also changed a lot. Hence, for the convenience of the comparison on algorithm performances, this article divided the carrier image into 5 3 5 image blocks and the watermark information into watermark groups with the group length of 5. To better analyze the performances of the algorithm in this article, the study compared the
algorithm in this article with Weng et al.’s29 algorithm and Lu et al.’s30 algorithm. In Table 4, 10%, 30%, 70%, 90%, and 100% refer to the proportion of watermark capacity to be embedded accounting for maximum embedding capacity. The PSNR is utilized in estimating the visual quality with watermarked image when embedding 10%, 30%, 70%, 90%, and 100% from the allowed maximum embedding capacity. According to Table 4, the reversible image watermarking algorithm proposed in this article has better payload capability than Weng et al.’s29 algorithm but poorer than Lu et al.’s30 algorithm. The reason is that the algorithm in this article divides the carrier image into 5 3 5 image blocks and the watermark information into watermark groups with the group length of 5. If the carrier image is divided into 5 3 5 image blocks, but watermark information is grouped into watermarks at the length of 6, then the maximum embedding capacity is 63,654 bit; if the watermark information is grouped into watermarks
International Journal of Distributed Sensor Networks
Table 4. Performance comparison of watermarking algorithms. Image name
Lena Baboon Barbara Pepper
Lu et al.’s30 algorithm Weng et al.’s29 algorithm This algorithm Lu et al.’s30 algorithm Weng et al.’s29 algorithm This algorithm Lu et al.’s30 algorithm Weng et al.’s29 algorithm This algorithm Lu et al.’s30 algorithm Weng et al.’s29 algorithm This algorithm
Payload in bits
249,763 37,992 53,045 185,940 14,893 53,045 234,281 31,423 53,045 203,298 29,372 53,045
0.8318 0.9232 0.9831 0.8532 0.9085 0.9817 0.8277 0.9011 0.9832 0.8437 0.9393 0.9823
PSNR (%) 10
49.38 59.58 62.16 47.34 58.77 61.36 48.69 59.62 62.55 47.81 58.89 61.79
45.75 55.81 59.89 38.52 55.24 58.94 44.24 57.08 60.07 43.17 55.43 59.36
40.74 53.28 58.94 33.96 53.35 58.05 39.51 53.76 59.19 38.23 51.85 58.32
37.02 51.24 58.29 30.44 52.28 57.32 36.13 51.87 58.48 33.95 50.94 57.69
33.92 50.72 58.05 28.39 51.34 57.14 32.25 51.32 58.26 30.53 50.07 57.27
SSIM: structure similarity index measure; PSNR: peak signal-to-noise ratio.
at the length of 8, then the maximum embedding capacity is 84,872 bit. By analogy, when the group length of the watermark information reaches certain level, the maximum embedding capacity of this algorithm can be better than Weng et al.’s29 algorithm. But the algorithm in this article increased the embedding circulating times and increased the marking location map digits, which slightly reduced SSIM value and PSNR value. The increase in embedding circulating times would limit the increase in marking location map digits, and then the compressed marking location map will be embedded into the carrier image through DE to limit the influences on SSIM and PSNR. In addition, as shown in Table 4, SSIM and PSNR are more obvious in algorithm in this article than in Weng et al.29 and Lu et al.30 The result shows that the improved DE reversible image watermarking technology proposed in this article can greatly increase the payload capability and maintain a good visual quality of the watermarked image. When embedding watermarks with the algorithm proposed in this article, it is determined by the image block size and watermark group size whether to use one-time circulated embedding or double or multiple times circulated embedding. At a certain watermark group size, the reduction in image block size will increase the watermark embedding circulating times, increase the number of marking location digits, increase the complexity of the algorithm, enlarge the maximum watermark embedding capacity, and reduce the visual quality of watermark image; the increase in image block size will reduce the watermark embedding circulating times, reduce the maximum watermark embedding capacity, and improve the visual quality of watermark image. At a certain image block size, the reduction in watermark group size will reduce the watermark embedding circulating times, reduce the number of marking location digits, reduce the maximum watermark
embedding capacity, and improve the visual quality of watermark image; the increase in watermark group size will increase the watermark embedding circulating times, increase the number of marking location digits, increase the complexity of the algorithm, enlarge the maximum watermark embedding capacity, and reduce the visual quality of watermark image. Hence, to better realize the performances of the algorithm, the blocking of original image and grouping of watermark information should be conducted according to the watermark embedding capacity and the size of the original image. To estimate the maximum watermark embedding capacity of the original image, this article needs to conduct watermark embedding for all the blocks in the original image. To better calculate and analyze the performances of the algorithm, this article compared the performances of the algorithm under difference cases through one-time circulated embedding, double circulated embedding, and three times of circulated embedding. Assume that the block size of the original image is a 3 a and the group size is n, we embed the watermark by conducting one-time circulated embedding method, and then the watermark group size n should be less than or equal to log2 (a 3 a). If double circulated embedding method is conducted, the watermark group size n should be greater than log2 (a 3 a) and less than or equal to log2 2(a 3 a). If three times circulated embedding method is conducted, the watermark group size n should be greater than log2 2(a 3 a) and less than or equal to log2 3(a 3 a). As shown in Tables 5–7, when one-time circulated embedding is executed, with the increase in image block size, the watermark ER will go down, which means the maximum embedding capacity will be reduced. However, the PSNR value of the generated watermark image will be increased. The reason is that with the
Zhang et al.
Table 5. The algorithm’s performance comparison based on one-time cycle watermarking embedding. Image name
Image block size
Watermark group length
0.25 0.25 0.25 0.25
58.36 57.39 58.51 57.62
0.16 0.16 0.16 0.16
58.61 57.72 58.73 57.91
0.139 0.139 0.139 0.139
58.79 57.94 58.85 58.11
Lena Baboon Barbara Pepper ER: embedding rate; PSNR: peak signal-to-noise ratio.
Table 6. The algorithm’s performance comparison based on double time cycle watermarking embedding. Image name
Image block size
Watermark group length
0.313 0.313 0.313 0.313
57.73 57.01 58.09 57.15
0.2 0.2 0.2 0.2
58.05 57.14 58.26 57.27
0.167 0.167 0.167 0.167
58.18 57.29 58.37 57.43
Lena Baboon Barbara Pepper ER: embedding rate; PSNR: peak signal-to-noise ratio.
Table 7. The algorithm’s performance comparison based on three-time cycle watermarking embedding. Image name
Image block size
10 3 10
Watermark group length
0.24 0.24 0.24 0.24
57.56 56.89 57.76 56.84
0.143 0.143 0.143 0.143
58.16 57.22 58.34 57.41
0.08 0.08 0.08 0.08
58.92 58.03 59.07 58.32
Lena Baboon Barbara Pepper ER: embedding rate; PSNR: peak signal-to-noise ratio.
increase in the image block size, the generated marking location map gets smaller after normalization compared with smaller image blocks. In the same way, when executing double or multiple times circulated embedding, with the increase in the image block size, the relevant watermark ER decreases, which means the maximum embedding capacity decreases and the PSNR value of the generated watermarked image increases. The reason is that with the increase in the image block size, the generated marking location map gets smaller after normalization compared with smaller image blocks. Under the same image blocking, different times circulated embedding watermark information would gain different watermark ERs and PSNR values, the reason being the watermark grouping has been enlarged. For larger watermark grouping, no matter one-time circulated embedding or multiple times circulated
embedding, the image group size will increase and the ER will decrease dramatically while the PSNR value has no obvious change. Therefore, this case is not advisable. According to Tables 5 and 7, regardless of the block size of the carrier image or group length of the watermark information, the algorithm can obtain a higher value of PSNR, showing that the watermark embedding algorithm can get high visual quality. It is also concluded from the tables that proper block size and watermark group length can effectively improve the watermark embedding capacity and visual quality. This article takes the 512 3 512 carrier image Lena, Baboon, Barbara, and Pepper as the examples and uses charts to analyze the performances of the algorithm. According to Figure 7, when the block size of the carrier image keeps unchanged (the original carrier image is divided into 5 3 5 blocks), the increase in watermark group length can effectively improve the
International Journal of Distributed Sensor Networks quality. The experimental results show that the proposed method has a great improvement in the quality of the watermarked image, which can effectively alleviate the contradiction between the quality of the watermarked image and the amount of embedded data. Original host image after extracting the watermark information without distortion restoration can be used in high demanding fields such as military intelligence, medical records, and legal argumentation. Declaration of conflicting interests
Figure 7. Watermark embedding capacity and image signal-tonoise ratio (the original carrier image is divided into 5 3 5 blocks).
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work was supported by the Jiangsu province Natural Science Foundation of China (no. BK20131069) and the National Natural Science Foundation of China (NSFC; no. 61402192).
Figure 8. Watermark embedding capacity and image signal-tonoise ratio (the watermark information group length is 5).
embedding capacity and still keep the high visual quality of the watermark image. The visual quality will increase with the increase in the ER, although some decline, but quite gentle. According to Figure 8, when the group length of the watermark information keeps unchanged (the watermark information group length is 5), the increase in image block size can reduce the embedding capacity and still keep the high visual quality of the watermark image. The visual quality will increase with the increase in the ER, although some decline, but very gentle.
Conclusion To ensure the quality of the watermarked image and embed more watermark data, this article proposes an improved DE reversible image watermarking algorithm which can effectively improve the watermark embedding capacity and visual quality. After extracting watermark, the original image could be lossless restored with this algorithm. Compared with other algorithms, the main contribution of the proposed reversible image watermarking algorithm is to improve the watermark ER in the premise of maintaining a better visual
1. Lu W, Sun W and Lu H. Novel robust image watermarking based on subsampling and DWT. Multimed Tools Appl 2012; 60: 31–46. 2. Weng S and Pan J-S. Reversible watermarking based on multiple prediction modes and adaptive watermark embedding. Multimed Tools Appl 2014; 72: 3063–3083. 3. Weng S and Pan J-S. Adaptive reversible data hiding based on a local smoothness estimator. Multimed Tools Appl 2015; 74: 10657–10678. 4. Tian J. Reversible data embedding using a difference expansion. IEEE T Circ Syst Vid 2003; 13(8): 890–896. 5. Tseng HW and Hsieh CP. Prediction-based reversible data hiding. Inform Sciences 2009; 179(14): 2460–2469. 6. Luo LX, Chen ZY and Chen M. Reversible image watermarking using interpolation technique. IEEE T Inf Foren Sec 2010; 15(1): 187–193. 7. Lee CF, Chen HL and Tso HK. Embedding capacity raising in reversible data hiding based on prediction of difference expansion. J Syst Software 2010; 83(10): 1864–1872. 8. Hong W and Chen TS. A local variance-controlled reversible data hiding method using prediction and histogramshifting. J Syst Software 2010; 83(12): 2653–2663. 9. Jiang L-J, Guo X-T, Yang H, et al. Threshold controlled scheme of difference expansion techniques for reversible watermarking. J Shanghai Jiaotong Univ (Sci) 2010; 15(5): 541–548. 10. Hu YJ, Lee HK and Li JW. DE-based reversible data hiding with improved overflow location map. IEEE T Circ Syst Vid 2009; 19(2): 250–260. 11. Gu QI and Gao TG. A novel reversible robust watermarking algorithm based on chaotic system. Digit Signal Process 2013; 23(1): 213–217.
Zhang et al. 12. Maity HK and Maity SP. Reversible image watermarking using modified difference expansion. In: 2012 third international conference on Emerging Applications of Information Technology (EAIT), Kolkata, India, 30 November–1 December 2012, pp.320–323. New York: IEEE. 13. Li XL, Li J, Li B, et al. High-fidelity reversible data hiding scheme based on pixel-value ordering and predictionerror expansion. Signal Process 2012; 93(1): 198–205. 14. Lin SL, Huang C-F, Liou MH, et al. Improving histogram based reversible information hiding by an optimal weight-based prediction scheme. J Inf Hiding Multimed Signal Process 2013; 1(1): 19–33. 15. Chang C-C, Huang Y-H, Tsai H-Y, et al. Predictionbased reversible data hiding using the difference of neighboring pixels. Int J Electron Commun 2012; 66(9): 758–766. 16. Zeng X, Li Z and Ping L. Reversible data hiding scheme using reference pixel and multi-layer embedding. Int J Electron Commun 2011; 66(7): 532–539. 17. Pun C-M and Choi K-C. Generalized integer transform based reversible watermarking algorithm using efficient location map encoding and adaptive thresholding. Computing 2014; 96: 951–973. 18. El-sayed HS, El-Zoghdy SF and Faragallah OS. Adaptive difference expansion-based reversible data hiding scheme for digital images. Arab J Sci Eng 2016; 41: 1091–1107. 19. Ma K and Niu X-X. An improved reversible watermarking scheme. In: International conference on signal processing, Beijing, China, 26–29 October 2008, pp.2229–2232. New York: IEEE. 20. Li Z, Chen X-P, Pan X-Z, et al. Lossless data hiding scheme based on adjacent pixel difference. In: Proceedings of the 8th international conference on computer engineering and technology, Singapore, 22–24 January 2009, pp.588–592. Washington, DC: IEEE Computer Society.
15 21. Wang J-X, Ni J-Q and Pan J-W. A high performance reversible watermarking scheme based on histogram shifting. Acta Autom Sin 2012; 38(2): 88–96. 22. Thodi DM and Rodriguez JJ. Expansion embedding techniques for reversible watermarking. IEEE T Image Process 2007; 16(3): 721–730. 23. Jamal SS, Shah T and Hussain I. An efficient scheme for digital watermarking using chaotic map. Nonlinear Dynam 2013; 73: 1469–1474. 24. Kumar AN, Haribabu M and Hima Bindu C. Novel image watermarking algorithm with DWT-SVD. Int J Comput Appl 2014; 106(1): 12–17. 25. Ouni T, Lassoued A and Abid M. Lossless image compression using gradient based space filling curves (GSFC). Signal Image Video Process 2015; 9(2): 277–293. 26. Zhang Z, Wu L and Lai H. Double reversible watermarking algorithm for image tamper detection. J Inf Hiding Multimed Signal Process 2016; 7(3): 530–542. 27. Agoyi M, C xelebi E and Anbarjafari G. A watermarking algorithm based on chirp z-transform, discrete wavelet transform, and singular value decomposition. Signal Image Video Process 2015; 9(3): 735–745. 28. Iyer R, Borse R and Chaudhuri S. Embedding capacity estimation of reversible watermarking schemes. Sadhana 2014; 39(6): 1357–1385. 29. Weng S, Pan J-S and Zhou L. Reversible data hiding based on the local smoothness estimator and optional embedding strategy in four prediction modes. Multimed Tools Appl. Epub ahead of print 11 July 2016. DOI: 10.1007/s11042-016-3693-7. 30. Lu T-C, Chang C-C and Huang Y-H. High capacity reversible hiding scheme based on interpolation, difference expansion, and histogram shifting. Multimed Tools Appl 2014; 72: 417–435.