Sunteți pe pagina 1din 4

A BLIND WATERMARKING TECHNIQUE IN JPEG COMPRES S ED DOMAIN

Department of Electri cal and Electronic Engineering The Hong Kong University of Science and Technology Email: peterwong@ieee.org*, eeau@ee.ust.hk**

Peter H. W. Wong*, Oscar C. Au**

ABSTRACT We proposed a blind watermarking technique to embed the watermark in JPEG compressed domain. Low frequency DCT coeffi cients are extracted to form an M-dimensional vector. Watermarking is achieved by modifying this vector in order to point to the centroid of a particular cell. This cell is determined according to the extract ed vector, private keys and the watermark. A dual-key system is used to reduce the chance of the removal of wat ermark. An iterative approach is used to prevent the removal of watermark by JPEG re-quantization. Experimental results show that the watermark can be detect ed when the watermarked image is further compressed using a larger scaling factor. 1. INTRODUCTION Spread spectrum technique [1] is widely adopted for image and video watermarking in the past few years [1, 2]. In [1], a private watermarking scheme is proposed which requires the original data to detect the watermark. The robustness of this scheme is good against many signal processing such as JPEG compression and filtering. However, in some situations such as watermark detection in a DVD player, private schemes are infeasible. Semi-private (or blind) watermarking schemes [2, 3] detect the watermark with the watermarking or key inform ation but without the original data. The trade-off is oft en reduced robustness. Most existing watermark techniques embed watermark in the uncompressed images. Only a few techniques [2,3] focus on embedding the watermark in the JPEG compressed images. One problem of embedding watermarks in JPEG compressed images is that the watermarked images need to be JPEG compatible. This implies that all DCT coeffi cients need to be re-quantized with the same quantization factor aft er the watermark insertion. This in term implies that small-magnitude watermark can be completely removed in the re-quantization. In this paper, we proposed an iterative approach to prevent the removal of the watermark in the real re-quantization process. The paper is organi zed as follows. Section 2 describes our vector extraction from the JPEG compress ed domain. Sections 3 and 4 gives the proposed waterm ark embedding process and the decoding/detection process respectively. Experimental results are presented in Section 5.

2. PROPOSED VECTOR EXTRACTION Before the watermark embedding process, a vector is extract ed from the JPEG compressed domain. Watermarking is achieved by modifying this vector according to the watermark and the private keys. The modified vector will be inserted back to the original location and the image will be re-quantized with the same quantization table. We propose to use the first P percent AC coeffi cients of the whole image to embed the watermark. For each of the 8x8 blocks in a JPEG compressed image, the first AC coeffici ent in zigzag order is extracted and ordered to form the first segment of the vector. Next, the second AC coeffi cient in zigzag order is extracted and appended to the first segment of the vector and so on, until P percent of the AC coefficients are extracted. 3. PROPOSED WATERMARK EMBEDDING 3.1 Definitions The host vector Y defined in Eqn. 1 is used to embed a watermark bit sequence. Let the vector dimension be M. Y = [ y 1 , y 2 ,..., y M

(1)

The watermark W is assumed to be a bit sequence of length N as defined in Eqn. 2, where N << M . The bit sequence may be a pseudo-random bit sequence, or a meaningful pattern such as the logo of the image owner. For a meaningful pattern, we modulate the bit sequence by another pseudo-random bit sequence to minimize the chance of attackers decoding and removing the watermark. W = [w1 , w 2 ,..., w N ] , w i {0,1} (2) In the proposed watermark algorithm, the host vector is segmented into N sub-vectors of length L = M / N . Each sub-vector is used to embed one bit of watermark inform ation. The ith sub-vector is denoted by Yi. Y 1 = [ y1 , y 2 ,..., y L ] Y 2 = [y L +1 , y L+ 2 ,..., y 2 L ] ... Yi = y ( i 1 )L +1 , y ( i 1 )L + 2 ,..., y iL (3)

A dual key technique is proposed to embed one bit in each sub-vector. The first privat e key D is a set of N numbers. The second private key K is a set of N random sequences of length L. The random sequence of the

second key can be normally distributed or binary noise. Both keys are used to detect the watermark. For this reason, the proposed scheme is a blind watermarking scheme. D = [d1 , d 2 ,..., dN | d i ,1 i N ] K = [K 1 , K 2 ,..., K N ] (4) (5)

Where 2 denotes the module 2 operation and Yi , K i denotes the inner product of vector Y i and K i as in Eqn. 12. l Y i , K i = y(i 1)L + j kij (12)
j =1

yi' = yi , for L N < i M )

(13)

K 1 = [k11 , k12 ,..., k1L ] K i = [ki 1 , k i 2 ,..., kiL ]

K 2 = [k 21 , k 22 ,..., k 2L ]

(6)

The watermarked vector and the watermarked i-th sub-vector are denoted by Y' and Y i ' respectively. Y' = [y1' , y 2' ,..., yM '] Y 1' = [y 1' , y 2 ' ,..., y L ' ] Y 2' = [ y L +1' , y L+ 2 ' ,..., y 2 L' ] . . Y n' = y ( N 1 ) L+ 1' , y ( N 1 ) L +2 ' ,..., y NL ' (7)

3.3 Iterative Embedding There is one major problem associated with watermarking in JPEG compressed domain. In the basic embedding process, the key is scaled and added to the extracted vector. The scale for the ith sub-vector depends on the second key di, the waterm arking bit w i and the correlation between the ith sub-vector and the kij. The larger the di, the more robust is the embedded watermark. However, if the di is too large, the watermarked image may have significant visual artifacts. As a result, the ikij is usually a small number. The problem is that the small-magnitude watermark can be easily removed during the JPEG re-quantization. The goal of the proposed watermarking schem e is to insert a watermark into a JPEG image, producing a similar-looking JPEG image with watermark embedded. So all the components of the host vector will be re-quantized to produce the JPEG image. As the inserted watermark term ikij has very small magnitude, it can be easily removed during the re-quantization especi ally for large quantization factors. We observed from our experiments that the watermark can be easily undetectable if the watermarked image is recompressed with the same quality factor. We proposed a novel iterative approach to solve this problem called iterative embedding. In the iterative embedding, Y i is a function of the host vector Y i, the ith watermark bit w i, K i, di, the quantization vector Qi obtained from the JPEG file and a pre-defined number T as shown in Eqn. 14. Y i ' = g (Y i , wi , K i , di , Q i , T ) Qi = [qi 1 , qi 2 ,..., qiL ] (14) (15)

(8)

3.2 Basic Embedding The watermarked sub-vector is a function of the host vector Y i, the ith watermark bit w i, K i and di as shown in Eqn. 9. Yi ' = f (Yi , wi , K i , di ) (9)

To embed the ith watermark bit in the ith sub-vector, Eqn. 10 and 11 are used. Y i ' = Yi + i K i (10)

d i round Y i , K i / d i Y i , K i , for case 1 Ki 2 d i round Y i , K i / d i + 1 Y i , K i i = , for case 2 Ki 2 d i round Y i , K i / d i 1 Y i , K i , for case 3 Ki 2 (11)

) ]

) ]

Case 1: Case 2:

round ( Y
i i

) = w round ( Y , K / d ) w Y , K d round ( Y , K
i

,K i / d i
i i

where qij is the JPEG quantization step size (accounting for both the quantization matrix and the scaling factor) for yij in the host vector. In the iterative embedding, we add a random vector Ni to Y i before the basic waterm ark embedding described in previous sections. The random vector Ni has the same dimension as Y i and is defined in Eqn. 16. N i = [ni1 , ni 2 ,..., niL ] (16)

i i

and / di

Case 3:

round ( Y
Yi , K i

) = w and < d round ( Y , K / d )


i

,K i / d i
i

where nij is uniformly distributed in [-qij/2, qij/2] if yij is non-zero and is zero otherwise. Then a trial JPEG re-quantization and watermark decoding is performed on the watermarked sub-vector. If the decoded watermark bit is wrong, another Ni is generated to replace the previous Ni and the iteration continues until the correct waterm ark

bit is decoded or T random vectors have been tried. It should be noted that there is no need to keep the random vector for watermark decoding and detection. The iterative embedding process is illustrated in Fig. 1. 4. WATERMARK DECODING AND DETECTION To decode the watermark, only the private keys are needed. The feature vector X is extract ed from the testing image using the same way mentioned in section 2. The extracted vector is then segmented to N sub-vector similar to the watermark embedding process. The decoded ith watermark bit is computed according the Eqn. 17. w i ' = round X i , K i

)/ d
i

(17)

To detect the existence of a waterm ark in a testing image, more information are needed: both the wat ermark and the private keys. We propose two methods to detect the watermark. In method 1, after all the N bits watermark is decoded, a normalized cross-correlation score S1 between the original watermark and the decoded watermark is computed according to Eqn. 18. S1 =

w w'
i =1 i i

w w'
2 i i i= 1 i =1

(18)
2

factor (SF). This SF is used to scale the quantization matrix recommended in the JPEG standard. The watermark is embedded in the JPEG decoded images with T=1000. 20 percent (P=20) of the DCT coeffi cients are used to embed the waterm ark. After the waterm ark embedding process, the watermarked image is then recompressed using the same SF and quantization matrix. The PSNR of the JPEG compressed images with di fferent SF and the corresponding recompressed wat ermarked images are shown in Fig. 2. A sample JPEG compressed image with SF = 1 is shown in Fig. 6 and the corresponding watermarked and recompressed image using the same SF is shown in Fig. 7. On the average, 9.08 iterations are needed in the iterative embedding. The perceptual quality of the waterm arked images is very good. The decoded watermark is shown in Fig. 4b. The S1 and S2 against different SF are shown in Fig. 3. As shown in Fig. 3, the S2 is always higher than S1 for all SF. This suggests that S2 is better than S1. To simulate the effect of JPEG recompression, the image in Fig. 7 is decoded and further JPEG compress ed with SF = 2 and the decoded watermark is shown in Fig. 4c. Watermark detection using method 2 is carried out also on this image using the correct watermark and 299 other random watermarks. The results are shown in Fig. 5. The middle spike is the detection score S2 for the correct watermark. It is clear that this score can be distinguished from the score of incorrect waterm arks.
Ki di wi Qi

In method 2, since low frequency DCT coeffici ents tend to have higher energy and thus higher robustness towards signal processing, we associat e a weighting factor to each watermark bit. Larger weights are given to low frequency DCT coefficients. The weighted score S2 is computed according to Eqn. 19. S2 =

Yi

Zi

Bas ic Embedding

[ (2 w 1)] [ (2 w ' 1)]


i i i i i= 1

[ (2 w
i =1 i

1)]
2

[ (2 w ' 1)]
i =1 i i

(19)
2

Ni

Zi'

Yi Random Vec tor Generator Qi

Quantization

It should be noted that the introduction of the weighting factor i does not affect the embedding process. The weighting factors are determined by the visual importance of the corresponding region. The i-th weighting factor is determined according to Eqn. 20.

Watermar k Dec oding wi'

i =

q
j =1

( n1 )l + j

(20)
No

wi' = wi ? No T random vector tried?

Yes

Zi'

The watermark is decl ared to be present i f S1 or S2 is larger than a threshold. 5.EXPERIMANTAL RESULTS AND DISCUSSION The Lena is used in our experiments. The image size is 512-by-512 pixels and only the luminance component is used. A 44-by-30 pixels binary logo called UST shown in Fig. 4a is used as a decodable wat ermark. Lena is initially JPEG compressed with different scaling

Yes Zi'

Figure 1:

Iterative embedding

Figure 2: PSNR for JPEG compressed images with different SF. Cross -- no watermark, circle watermarked

Figure 6: JPEG compressed Lena (SF=1, PSNR=35.81dB, 0.6234 bpp)

Figure 3: Watermark detection scores. (Cross S1 , circle S2 ) Figure 7: Recompressed Watermarked Lena (SF=1, PSNR=35.20dB, 0.6255 bpp, T=1000) 6. CONCLUSION In this paper, we proposed a novel blind watermarking scheme to embed watermark in JPEG compressed domain.. Experimental results show that the proposed iterative approach can give good quality images and the watermark can be success ful detect ed. In particular, the proposed iterative embedding succeeds in preventing the removal of waterm ark by JPEG requantization. [1] REFERENCE I.J. Cox, et al., Secure Spread Spectrum Watermarking for Multimedia, IEEE Trans. on Image Processing, vol. 6, no. 12, pp. 1673-1687, Dec. 1997. F. Hartung, Digital Watermarking and Fingerprinting of Uncompressed and Compressed Video, Shaker Verlag, 2001. P.H.W. Wong, et al., Data Hiding and Watermarking in JPEG Compressed Domain by DC Coefficient Modi fication, Proc. Of SPIE Conf. of Security and Watermarking of Multimedia Content, pp. 237-239, Jan 2000.

Figure 4: Left: original watermark UST. Center: Decoded watermark with SF = 1, S1=0.8773, S2 =0.9122. Right: Decoded watermark with SF=1 then SF=2, S1 =0.5409, S2=0.5786.

[2]

[3]

Figure 5: Random watermark test results for recompressed image. (SF=1 then SF=2, PSNR=31.79dB, 0.4637 bit per pixel, S1=0.5409, S2 =0.5786)

S-ar putea să vă placă și