Digital Watermarking Using Inter-Block Correlation: Extension to JPEG Coded Domain
Yoonki CHOI
Kiyoharu AIZAWA
[email protected]
[email protected]
School of Engineering The University of Tokyo 7-3-1 Hongo, Bunkyo-Ku, Tokyo, 113-8656, JAPAN
Abstract
Digital watermarking schemes have been discussed to solve the problem associated with copyright enforcement. As a digital watermarking, we proposed a method using inter-block correlation of DCT coef cients. It has the features that the embedded watermark can be extracted without the original image nor the parameters used in embedding process and that the amount of modi cation, the strength of embedded watermark, depends on the local feature of an image. This feature makes it dicult for pirate to predict the position in which the watermark signal is embedded. In this paper, we propose a method which can embed/extract watermark with high speed by utilizing this watermaking method for JPEG le format. 1
Introduction
Recently, as the increasing use of the electronic publishing, the digital data which require less eort to make its copies are widely distributed. This eciency also increases the problems associated with copyright enforcement. To solve these problems, digital watermarking schemes have been discussed[1]-[6]. The digital watermark schemes are categorized into either frequency domain or spatial domain techniques. Original images are performed various processing such as compression, ltering etc. From the point of view of the robustness to attacks, such as compression and ltering, frequency domain embedding is considered stronger than spatial domain embedding. The watermarking schemes are also categorized as follows, from the point of view of the requirements for watermark extracting procedure. 1. methods which require original image. 2. methods which do not require original image but require parameters which are used in embedding procedure.
3. methods which do not require original image nor parameters. Examples of category 1 are the methods proposed by Swanson et al.[2] and Cox et al.[3]. The extracting algorithms of these methods are based on the relation between the original image and the watermarked image, and they can not avoid multiple claims of ownerships. They can not guarantee the rightful ownership since one of the crucial requirements of watermark algorithm might be that the watermarks should be detected without original image[4]. Examples of category 2 are the methods proposed by Swanson et al.[5] and Bender et al.[6]. All watermarking techniques have its own parameters which determine the amount of modi cation. By adjusting these parameters, user can embed watermark weakly or strongly. Methods in this category can not properly extract the embedded watermark when the strength parameters are not known. Although these methods do not need the original image, the necessity to estimate the strength parameters used in watermark embedding process is the crucial weakness, because target images are often unspeci ed ones in the internet, Thus, embedded watermark must be extracted without using the original image nor the strength parameters used in embedding procedure. In this point of view, we proposed a watermarking method using inter-block correlation[7]. In this paper, we adapted this method to JPEG compressed images. By integrating the feature of the inter-block correlation method and the structure of JPEG images, watermark embedding/extracting speed can be improved.
Figure 1: JPEG coding Process Figure 2: Embedding Process 2
Watermark DCT
Embedding
Domain Using
in
Inter-
Block Correlation
Let p(k ) (=1 or 0) be the digital signature data, and I the 24 bit color JPEG compressed image(K2L pixels). In JPEG compression, RGB color space is converted into YCR CB color space, and follows DCT transform, quantization and entropy coding[8] (See Figure 1). In watermarking method using inter-block correlation, a watermark is embedded in the DCT coecients of luminance(Y ) component, and embedding strength is determined by the feature of images and the quantization coecients used in original JPEG image. The procedure to embed ph;w into the image I is as follows (See Figure 2). 1. Perform entropy decoding for CQH of JPEG compressed image I to obtain CQh;w (i; j ). CQh;w (i; j ) means the quantitized 8 2 8 DCT coecients of luminance component.
CQ
h;w
(i; j ) = round
C (i; j ) Q(i; j ) h;w
(1)
Here, h and w indicate the position of a block in an image, and i and j indicate the position of a pixel in a block (H=K/8; W=L/8; h=0,1,..., H-1; w=0,1,...,W-1; i,j= 0,1,...,7 ), respectively. 2. As shown in upper-right side of Figure 2, nine (3 2 3) blocks (== 24 2 24 DCT coecients) are grouped together. 3. A single bit is embedded into a single coecient of the center block of the nine grouped blocks.
The coecient(CQh;w (i0 ; j0 )) is modi ed as follows. When p(k ) = 0, if CQh;w (i0; j0 ) < Mh;w (i0 ; j0 ) 0 1 then CQ0h;w (i0 ; j0 ) = round(Mh;w (i0 ; j0 )) + Vh;w (i0 ; j0 ) else no change (2) When p(k ) = 1,
if CQh;w (i0; j0 ) > Mh;w (i0 ; j0 ) + 1 then CQ0h;w (i0 ; j0 ) = round(Mh;w (i0 ; j0 )) 0 Vh;w (i0 ; j0 ) else no change (3) where Mh;w (i0 ; j0 ) is the mean value of CQh+m;w+n (i0 ; j0 )(m; n = 61). Vh;w (i0; j0 ) is the amount of modi cation determined as follow.
V
h;w
= round ( Sh;w (i0 ; j0 ) )
(4)
Sh;w is the standard deviation among the four coecients, Ch+m;w+n (i0 ; j0 )(m; n = 61) and is user-controllable value which determines the strength of watermarks. Embedding process uses the correlation between CQh;w (i0 ; j0 ) and CQh+m;w+n (i0 ; j0 ) (m; n = 61). Because the value of CQh;w (i0 ; j0) is close to the average of its neighborhood coecients(CQh+m;w+n (i0 ; j0 )), we replace CQh;w (i0 ; j0 ) with Mh;w (i0 ; j0 ) and add some modi cation according to the watermark signal. The sign of modi ed value is the embedded signal: when embedded bit is 0(or 1), the sign of modi ed value is +(or -).
(a) Splash
(b) Airplane
(c) Lenna
(d) Baboon
Figure 3: amount of modi cation The amount of modi cation, Vh;w (i0 ; j0 ), is determined by Sh;w (i0 ; j0 ) as shown in Equation (4). The value of Sh;w (i0 ; j0 ) depends on the local feature of an image, and we can interpret it as the degree of variation of an original image. If there is less change of the pixel intensities in a region, modi cation value by watermark embedding should be smaller since signal distortion in such region is visible. If the change is large, watermark can be strongly embedded. It can be said that this system exploits the feature of human eyes since the watermark is strongly embedded in the region insensitive to signal distortion, and the watermark is weakly embedded in the region sensitive to signal distortion. This feature makes it dicult for pirate to predict the position in which the signal is embedded, since the amount of modi cation varies in the image. 4. Mathematically, the equation x+y=IDCT(X+Y) (where X=DCT(x), Y=DCT(y)) is always true when ignoring minute error. But in case of image, above equation is not always true since the available range of intensity is restricted to 0 b 255. When the result of calculation greater than 255(over ow), it is clipped to remain in the available range. To prevent over ow, we restrict the modi cation value, Vh;w as follows. ( if Vh;w = 0 Vh;w = 1 else if Vh;w > Vmax Vh;w = Vmax otherwise no change (5) Figure 3 illustrates the relationship between Vh;w and Sh;w (i0 ; j0 ). 5. CQh;w is replaced with new coecients CQ0h;w . 6. Apply above procedures to all group of blocks.
Figure 4: Original Images
7. We get watermarked image I 0 by entroy coding the CQ0hw (i; j ). 3
Watermark Extracting
The procedure of watermark extracting is the inverse procedure of watermark embedding. Suppose that I 3 is the signal distorted or maliciously attacked image of the watermarked image. To extract water3 mark from I 3 , we calculate Mh;w from CQ3 like the same way in Equation (2) and (3). Then, determine the watermark p3h;w according to following rule. 3 if CQ3h;w (i0 ; j0 ) < Mh;w (i0 ; j0 ) then p3h;w = 1 3 else ph;w = 0 (6)
Note that the embedding and extracting functions are not symmetric, that is, the extracting function is not the inverse of the embedding function. The sign of the dierence between CQ3h;w (i0 ; j0 ) and the aver3 (i ; j )) of its neighborhood coecients age value(Mh;w 0 0 determines the embedded bit. By the proposed scheme, we can skip inverse quantization, inverse DCT transform and YCR CB -to-RGB conversion in JPEG decoding procedure. Also, the embedded watermarks can be detected without using
(a) Splash (53.02 dB)
(b) Airplane (49.94 dB)
(a) Splash
(b) Airplane
(c) Lenna (49.23 dB)
(d) Baboon (44.41 dB)
(c) Lenna
(d) Baboon
Figure 5: Watermarked Images
Figure 6: dierencial between original and watermarked images (210)
the original image I nor the parameters which are used in embedding process. 4
Experimental Results
Four standard color images, Splash, Airplane, Lenna, and Baboon were used in our experiments. All images are 5122512 pixels and 24-bit color. First, these four images are JPEG compressed by using the quantization coecients in Table 1. Then, we embedded a same watermark into these images using parameters, = 0:5 and Vmax = 5. The position into which we embed the watermark is (i0 ; j0 ) = (2; 2). A single bit is embedded in a 323 blocks(24224 pixels), and totally, 441 bits are embedded in an image. Figure 4 and 5 show the original and the watermarked images. The SNRs of Y signal after watermark embedding are 53.0 dB(Splash), 49.9 dB(Airplane), 49.2 dB(Lenna) and 44.4 dB(Baboon). Figure 4 and Figure 5 are originally color images and SNR of Y signal is calculated using the equation below.
SNR = 20 2 log10
255
err
(7)
1 err = 512
512 X 512 X =1 =1
x
(Y (x; y ) 0
Y 0 (x; y))2
!1 2 =
y
Although the same parameters are used, the SNR of Figure 5(a) is higher than that of Figure 5(b), (c) and (d). This is because that the amount of modi cation by watermark embedding depends on an image. As you can see in Figure 5, since the variation of intensity of Figure 4(b), (c) and (d) are larger than that of Figure 4(a), watermark in (b), (c) and (d) are strongly embedded than that in (a).
Table 1: Q-table used for original image 8 6 5 8 12 20 26 31 6 6 7 10 13 29 30 28 7 7 8 12 20 29 35 28 7 9 11 15 26 44 40 31 9 11 19 28 34 55 52 39 12 18 28 32 41 52 57 46 25 32 39 44 52 61 60 51 36 46 48 49 56 50 52 50
1.2
1
1
0.8
0.8
Normalized Correlation
Correlation
1.2
0.6
0.4
0.6
0.4
0.2
0.2
(a) Splash (53.02 dB) (b) Airplane (49.94 dB) (c) Lenna (49.23 dB) (d) Baboon (44.41 dB)
0
0
−0.2
−0.2
100%
80%
60%
40%
20%
200
400
600
800
1200
1400
1600
1800
2000
(a) Correlation between original PN and randomly generated PNs (one of them is original PN)
(a) JPEG compression 1.2
1.2
1
1
Normalized Correlation
0.8
Correlation
1000
PN #
JPEG Quality
0.6
0.4
0.2
(a) Splash (53.02 dB) (b) Airplane (49.94 dB) (c) Lenna (49.23 dB) (d) Baboon (44.41 dB)
0
0.8
0.6
0.4
0.2
0
−0.2
0
50
100
150
200
250
300
Gaussian Noise −0.2
(b) Gaussian noise addition
200
400
600
800
1000
1200
1400
1600
1800
PN #
(b) Correlation between extracted PN from JPEG compressed image and randomly generated PNs (one of them is original PN)
Figure 7: Robustness to Attacks
1.2
1
Normalized Correlation
Figure 6 shows the dierence of Y signal between Figure 4 and Figure 5. The dierence is displayed with magni cation factor 10. You can easily imagine that signal distortion in Figure 4(a) is more sensitive than in Figure 4(d) since almost all area in this gure is at. The region into which the watermark can be strongly embedded is milk drop ring. As you can see in Figure 6(a), our scheme, which controls the watermark strength by the variation, as a results, strongly embeds watermark around the drop ring. On the other hand, one can strongly embed watermark anywhere in Figure 4(d) except the nose area. Figure 6(d) tells that the watermark is weakly embedded around the nose. To verify the robustness of the proposed system, the watermarked images in Figure 5 are attacked by JPEG compression and Gaussian noise addition. Figure 7 shows the normalized correlations between the origi-
0.8
0.6
0.4
0.2
0
−0.2
200
400
600
800
1000
1200
1400
Image #
(c) Correlation between original PN and extracted PNs from sample images (one of them is watermark embedded and JPEG compressed image) Figure 8: Correlations
2000
nal watermark and extracted watermarks from the attacked images. In Figure 7(b), x-axis means the mean P n(i)2 ). As power of generated Gaussian noise( N1 N i=1 we can see in these gures, although the same watermarks and parameters are used in embedding process, watermark in Figure 5(d) is more robust than Figure 5(a). This is because that the strength of watermark depends on the contents of the image. In this method, correlation value between the original watermark and the extracted watermark is used to determine whether watermark is embedded or not. We carried three kinds of experiments To con rm that the correlation value does not become high accidently, we carried three kinds of experiments. First, we generated 2000 kinds of PN sequences by using random seed and calculated the correlation between them and watermark extracted from Figure 5(a). Figure 8(a) shows the result and the 200th PN is the one used in embedding process. Next, we calculated the correlation between randomly generated PNs and watermark extracted from JPEG compressed(Quality=30%) image of Figure 5(a) (Figure 8(b)). Finally, we prepared 1500 kinds of sample images and 200th image among them is replaced with JPEG compressed(Quality=30%) image of Figure 5(a). Then calculated correlation between original watermark and extracted watermarks from sample images(Figure 8(c)). As we can see in Figure 8, only one peak exists in these three gures and it can be said that the correlation value will not become high accidently. The method how to determine the threshold value is our future work. 5
Conclusion
In this paper, our previously proposed watermarking scheme "inter-block correlation method" is adapted for JPEG compressed images and tested for some standard color images. DCT coecients of Y signal are used for watermark embedding. It exploits the correlation between CQh;w (i0 ; j0 ) and CQh+m;w+n (i0 ; j0) (m; n = 61). Because the expected value of CQh;w (i0 ; j0 ) is close to the average of its neighborhood coecients, we replace CQh;w (i0 ; j0 ) with the average and add some modi cation according to the watermark signal. The amount of modi cation by watermark embedding depends on the standard deviation of CQh+m;w+n (i0 ; j0 ) (m; n = 61). As a result, watermark is strongly embedded in the region where signal distortion is less visible, and is weakly embedded in the region where signal distortion is more visible. This feature also makes it dicult for pirate to predict the position in which the signal is embedded, since the amount of modi cation depends on the contents of the image.
Watermarking embedding/extracting speed can be highly improved since the inverse quantization procedure can be skipped in JPEG decoding. In watermark extracting procedure, embedded watermark can be detected without the information about the parameters which are used in embedding procedure to determine the strength of watermark. Of course extracting procedure does not require an original image. By experimental results, we con rmed that the embedded watermark can be extracted without original image nor strength parameters. The embedded watermark is shown robust to JPEG compression. References
[1] Mitchell D.Swanson, Mei Kobayashi, Ahmed H.Tew k, \Multimedia Data-Embedding and Watermarking Technologies", PROCEEDINGS OF THE IEEE, VOL.86, NO.6, pp.1064-1087, JUNE, 1998 [2] Mitchell D. Swanson, Bin Zhu, Ahmed H. Tew k, \TRANSPARENT ROBUST IAMGE WATERMARKING", ICIP 96, pp.211-214, 1996 [3] Ingemar J. Cox, Joe Kiliant, Tom Leighton, Talal Shamoon, \SECURE SPREAD SPECTRUM WATERMARKING FOR IMAGES, AUDIO AND VIDEO", ICIP 96, pp.243-246, 1996 [4] Wenjun Zeng, Bede Liu, \On Resolving Rightful Ownerships of Digital Images by Invisible Watermarks", ICIP 97, pp.552-555, 1997 [5] Mitchell D. Swanson, Bin Zhu, Ahmed H. Tew k, \Data hiding for Video-in-Video", ICIP 97, pp.676-678, 1997 [6] W.Bender, D.Gruhl, N.Morimoto, A.Lu, \Techniques for data hiding", IBM SYSTEMS JOURNAL, VOL 35, NOS 3&4, pp.313-336, 1996 [7] Yoonki CHOI, Kiyoharu AIZAWA, \Digital Watermarking Using Inter-Block Correlation", ICIP 99, pp.216-220, 1999 [8] Wallace, Gregory K., \The JPEG Still Picture Compression Standard", Communications of the ACM, vol.34, no.4, pp.30-44, 1991