Journal of Information & Computational Science 5: 4 (2008) 1521-1526 Available at http: www.joics.com A Digital Watermarking Scheme Based on DWT Using MATLAB Chun Liu *, Jingmin Gao,Ying Zhang Beijing Information Technology University, Beijing 100192, China Abstract The technology of digital watermarking is to embed the image media with imperceptibility copyright information, so as to identify the copyright owner, detect and track the pirate behavior.in this paper, a digital watermarking scheme based on watermarking transform using MATLAB7.0 is presented. Based on the wavelet analysis theory and the analysis elements of its property, an idea of the embedding and extracting of watermarking is proposed, and the algorithms of embedding and extracting for the color image are carried out. The results show that the watermarks are invisible and robust. Keywords: Digital Watermarking; Wavelet Transform; Embedding and Extracting; Matlab7.0 1 Introduction With the widespread distribution of digital media contents the protection of the intellectual property rights has become increasingly important. Watermark technology is widely researched as an important method to safeguard copyright and information. It embeds secret information into original data to confirm its copyright and integrality based on feature of human visual system. Wavelet transform is the key technology in the new image compression standard-jpeg2000[1], and now more and more people focus on the watermarking based on the DWT(discrete wavelet transform).this paper selects the robust invisible watermarking as research object, improves the algorithms of digital watermarking, designs and implements a embedding and extracting system, the experiment result is satisfying. * Corresponding author. Email addresses: springice1984@163.com (Chun Liu) 1548-7741/ Copyright 2008 Binary Information Press July, 2008
1522 C. Liu et al. / Journal of Information & Computational Science 5:4 (2008) 1521-1526 2 Digital Image Watermarking Theory Assuming the original image is f(x, y), the watermarking is W(x, y), the watermarked image is g(x, y), the embedding process can be expressed as Where E( ) is embedding function, given analytic image h ( x, y) watermarking from it. g = E( f, W) (1), we can extract the possible ω = D( f, h) (2) Where D ( ) is detecting function, considering correlation function C ( s, t), if C ( W, ω ) > T (3) Then the watermarking is thought to be existed, or else it is thought to be no watermarking exists. Where T is a determined threshold [2, 3]. 3 DWT Theory The proposed scheme embeds both the fingerprinting and watermark into DWT coefficients. The DWT will be introduced briefly as below. Figure 1 shows a three-level wavelet decomposition of an image. First, an image is decomposed into four sub-bands LL 1, HL 1, LH 1 and HH 1, where LH 1, HL 1 and HH 1 represent the finest scale wavelet coefficients. The sub-band LL 1 can be further decomposed into four sub-bands LL 2, HL 2, LH 2 and HH 2, and also the sub-band LL 2 can be further decomposed into four sub-bands LL 3, HL 3, LH 3 and HH 3.The process times will be iterated according to the users applications. In general, the watermark embeds into middle frequency of an image that can provide a better tradeoff between the robustness and imperceptibility. Here, the low sub-bands LL 3 is the approximation coefficient matrix of the original image, the middle sub-bands HL 3, LH 3,HH 3,HL 2, LH 2,HH 2 and high sub-bands HL 1, LH 1 and HH 1 is the detail coefficient matrix[4,5]. Figure2 shows four-level wavelet decomposition of the Lena image. We can see that the most of the energy is concentrated in the LL 4 sub-bands [2, 3]. 4 Implements a Embedding and Extracting Method Using MATLAB7.0
C. Liu et al. / Journal of Information & Computational Science 5:4 (2008) 1521-1526 1523 LL LH 3 3 HL 3 HH 3 HL 2 LH 2 HH 2 LH 1 HL 1 HH 1 Fig. 1 three-level wavelet decomposition of an image. Fig.2 Original Lena image and 4-level wavelet decomposition image 4.1 Embedding watermarking The process of embedding watermarking based on matlab 7.0[6] as follows. 1. Read the original colored image (using the imread function), turn the original image from RGB space to Y,I,Q array, noted as y, i, q(using the rgb2ntsc function). 2. Read the watermarking colored image, also turn it from RGB space to Y, I, Q array, noted as wy, wi, wq. 3. Make DWT to y, i, q, obtain the sub wavelet low-frequency matrix, note as Dy, Di, Dq (using the wavedec2, appcoef2, length, sort function). 4. Embed wy, wi, wq into Dy, Di, Dq, take inverse DWT transform and obtain new Y, I, Q, note as Yn, In, Qn(using the waverec2 function). 5. Turn Yn, In, Qn from Y, I, Q array to RGB space, then we can get the watermarked image. Assuming the original image is Ci (, j, ) the watermarking colored image is W(m,n). Take Y for example, embedding formula becomes C (, i j) = C (, i j) + a W ( m, n) (4) ya2 ya2 y Where a is embedding strength, C ya ( i, ) is sub wavelet low-frequency matrix of Y. W(m,n) 2 j
1524 C. Liu et al. / Journal of Information & Computational Science 5:4 (2008) 1521-1526 is the Y vector of original image. C ya2( i, j) is sub wavelet low-frequency matrix of watermarked image. Experiment results shown in Fig.3. Fig.3 Embedding watermarking 4.2 Extracting watermarking The extracting of watermarking is the Reverse process of embedding and need to use the original image. Experiment results shown in Fig.4. Fig.4 Extracting watermarking 4.3 Rotating attack As shown in the Fig.5,when rotate the watermarked image, we also can extract a clear watermarking from it, which proves the algorithm is robust.
C. Liu et al. / Journal of Information & Computational Science 5:4 (2008) 1521-1526 1525 Fig.5 Rotary attack 4.4 Salt and pepper noise attack As shown in the Fig.6, when put the salt and pepper noise into the watermarked image, we can t extract a clear watermarking from it, which shows the robustness has no resistance to the salt and pepper noise attack. Fig.6 Salt and pepper noise attack 5 Conclusions The algorithm is applicable to the original image which has no size restrictions, many formats are applicable, this study used pictures of the original random interception is the 365 x 480 24-bit RGB color depth and the image format is. Jpg. Experiments proves that the watermarking feature described below.
1526 C. Liu et al. / Journal of Information & Computational Science 5:4 (2008) 1521-1526 1. Invisibility Before and after the watermarking embedded in the visual images, there isn t obvious difference between two colored images visually. The algorithm is proved more transparent, to achieve the purpose of hidden watermarking. 2. Vindicability Before and after the watermarking embedded in the visual images, there isn t obvious difference between the watermarking visually. It proves that the algorithm has a good vindicability. 3. Robustness Compare with the result of rotating attack and salt and pepper noise attack, it is known that the robustness of the algorithm only applies to some attacks, while to some other attacks will lose value. References [1] Eggers JJ, Su JK, Girod B. A blind watermarking scheme based on structured codebooks. In: IEEE Colloquium: Secure Images and Image Authentication. London, 2000: 219-223. [2] Cox I J, Kilian J, Leighton F T, et al. Secure Spread Spectrum Watermarking for Multimedia. IEEE Trans. on Image Processing, 1997, 6(12): 1673-1687. [3] Cox I J, Miller M L. Watermarking application and their properties based on Information Technology: Coding and Computing in: Proceedings International Symposium. Cambridge, 2000: 27-29. [4] Shoemaker C,Bits H.A survey of techniques for digital watermarking.eer-290,spring,2002 [5] HUANG P S,CHIANG C S.Novel and robust saturation watermarking in wavelet domains for color images[j].optical Engineering,2005,44(11):1-15. [6] WANG yan ling. Digital Watermarking Based on DWT by Matlab[J].2001,1:54-55.