Hybrid DCT-CT Digital Image Adaptive Watermarking Bijan Fadaeenia, Nasim Zarei Electrical engineering department Islamic Azad University-Hamedan Branch Hamedan, Iran Fadaeenia@iauh.ac.ir, Nasim.zarei@iauh.ac.ir Abstract This paper proposes a robust and blind digital image watermarking which uses a correlation based algorithm to embed a binary pseudo-random sequence into a grayscale host image. This scheme applies a combination of Discrete Cosine Transform (DCT) and Contourlet Transform (CT). Due to increasing the imperceptibility of embedded watermark, the power of watermark is varying in different regions of host image. The varying watermark power calculation is based on fuzzy decision. Experimental results show that the proposed method is robust against both geometric and non-geometric attacks. Keywords-Watermarking; DCT; Contourlet; Fuzzy. I. INTRODUCTION Digital watermarking has been identified as a possible solution for Copyright protection of digital media and has become an area of increased research activity over the last decade [1]. Commonly, a digital watermark is a code that is embedded into a media. It plays the role of a digital signature, providing the media with a sense of ownership or authenticity. The primary benefit of watermarking is that the content is not separable from the watermark [2]. In the case of digital image this technique tries to embed invisible information in digital image. As mentioned before, the digital watermark must be robust against media manipulations [3]. Although most of works in the field of watermarking focuses on using the multiresolution analysis proposed by Wavelet Transform [4], [5], [6], [7], Contourlet Transform began to gain some interests for its capability of capturing directional information such as smooth contours, and directional edges [1], [8], [9], [10], [11], [12]. In this paper, we compute two level CT of host image then we divide selected sub-bands into blocks and apply DCT to each block. Next, we generate two pseudo-random uncorrelated sequences for embedding 0 and 1 and alter the CT DCT coefficients by using a fuzzy system. We will show that the proposed algorithm can resist against both geometric and nongeometric attacks and increase the PSNR. This paper is organized as follows: in Section 2, a quick view of CT and its advantages for watermarking will be provided. The proposed algorithm will be introduced in Section 3. Experimental results will be shown in Section 4. Finally, Section 5 concludes the paper. II. CONTOURLET TRANSFORM (CT) The Discrete Contourlet Transform is a relatively new transform which was proposed by Do et al. [13]. The main feature of this transform is the potential to efficiently handle 2-D singularities, unlike wavelets which can deal with point singularities exclusively. This difference is caused by two main properties that the CT possess: 1) The directionality property, as opposed to only 3 directions of wavelets. 2) The anisotropy property, meaning that the bases functions appear at various aspect ratios (depending on the scale), whereas wavelets are separable functions and thus their aspect ratio equals to 1. The main advantage of the CT over other geometrically-driven representations, e.g., curvelets [14] and bandelets [15], is its relatively simple and efficient waveletlike implementation using iterative filter banks. Due to its structural resemblance with the wavelet transform (WT), many image processing tasks applied on wavelets can be seamlessly adapted to contourlets. Figure 1: Contourlet Filter Bank The CT is constructed by two filter-bank stages, a Laplacian Pyramid (LP) [16] followed by a Directional Filter Bank (DFB) [17] as shown in Fig. II. The LP decomposes the image into octave radial-like frequency bands to capture the point discontinuities, while the DFB decomposes each LP detail band into many directions (a power of 2) to link these point discontinuities into linear structures Fig. 2. In CT the HF subband is created by subtracting the G-filtered LF subband from the original image [1]. In this case, if we change the HF coefficients, the LF coefficients will be affected likely. Because of the characteristic of LP, the CT is evidently different from the WT. In the WT, the HF subband is created by filtering the original image with high-pass filter. 47
Therefore, the change of HF coefficients does not affect the LF coefficients. Because the WT does not have the spreading effect as the LP, the embedded watermark is susceptible to the attacks such as low-pass filtering, quantization and compression that destroy the HF coefficients of the image seriously. In contrast, if the watermark is embedded into the largest detail subbands of CT, it is likely to be spread out into all subbands when we reconstruct the watermarked image. Thus, the watermarking scheme in CT domain may be robust to the widely spectral attacks resulting from both LF image processing and HF image processing Step 5 : To embed watermark into the produced blocks, the middle frequency coefficients of each block are selected and denoted as Y. This selection is a tradeoff between robustness and imperceptibility of watermark. Step 6 : The optimum watermarking weight, α, is calculated for each block using a fuzzy system. The used fuzzy system will be explained later. Step 7 : The watermark bits are embedded into image as follows: Y = Y +α P N 0 α P N 1 if W = 0 (1) Y = Y +α P N 1 α P N 0 if W = 1 (2) Figure 2: Frequency partitioning with four real wedge-shaped frequency bands. Step 8 : By Applying inverse DCT (IDCT) to each block after its mid-band coefficients have been modified, the CT of watermarked image is generated. Step 9 : Finally the watermarked image can be produced by using inverse CT ( ICT). The embedding process is depicted in Fig. 3. III. PROPOSED ALGORITHM In this paper, a 1225 bits pseudo-random sequence is used as watermark. In this algorithm sub-bands 2 and 3 in second level are selected (Fig. 2), because human eyes are less sensitive to noise in oblique orientation [18] and these subbands are the most oblique [13]. A. Watermark embeding Step 1 : Two level contourlet is applied to image and image is divided into nine sub-bands. Step 2 : Sub-bands 2 and 3 of second level are selected for watermark insertion. Step 3 : Selected sub-bands are divided into N N blocks and the DCT of each block is computed. These blocks are denoted as block i, i = 1, 2,...M and M N w, which N w is the number of watermark bits. If dimensions of watermark logo are denoted as L w and H w then N w = L w H w. Table I, is shown that the combination of CT and DCT can increase the quality of watermarked image. Table II, is shown that the combination of CT and DCT can increase the robustness of algorithm against both geometric and non-geometric attacks by comparing NC values. Step 4 : If each element of watermark is denoted as W j, j = 1, 2,..., N w,two uncorrelated pseudorandom sequences with zero mean are generated, one of them is used for embedding W j = 0 and the other one for W j = 1, which denoted as P N 0 and P N 1 respectively. B. Watermark extraction Figure 3: Watermark embedding process. step 1 : Two level contourlet is applied to watermarked image and watermarked image is divided into nine sub-bands. step 2 : Selected sub-bands are divided into N N blocks. step 3 : Two pseudo-random sequences P N 0 and P N 1 are regenerated by using same seeds as embedding stage. step 4 : For each block in the selected sub-band, correlations between mid-band coefficients with P N 0 and P N 1 are calculated. If the correlation with the P N 0 is higher than the correlation with P N 1, the watermark bit will be considered as 0, otherwise it will be considered as 1. step 5 : After watermark extraction, similarity between the original and extracted watermarks is computed. The extraction process is depicted in Fig. 4. C. Fuzzy system The used fuzzy system is a two-input and one-output system. The system tries to balance watermark power and brings us both robustness and invisibility. This fuzzy system 48
Figure 4: Watermark extraction process. The surface of fuzzy system is shown in Fig. 5. D. An example Explanation of embedding and extracting of a watermark bit into the host image is the goal of this example. As shown in Fig. 6 a grayscale, 512 512 of cat image is selected as host image. In this example, the procedure of inserting a 0 as a watermark bit into the host image will be presented. is based on a simple rule: In watermarking, large coefficients can be changed more than small ones. Two inputs of fuzzy system are named as AVERAGE and DISTANCE. AVERAGE is the average of each block Y (watermark embeding:step5). AV ERAGE i = average(y i ), i = 1...N W (3) N W is the number of watermark bits.to calculate the DISTANCE two correlation must be calculated. Correlation between P N 0 and Y i which named DIF F 0 and correlation between P N 1 and Y i which named DIF F 1.Calculation of DISTANCE is related to value of watermark bits: Figure 6: Original image of Cat 1) Embedding: First Two level contourlet is applied to image and image is divided into nine sub-bands as shown in Fig. 7. DIST ANCE i = DIF F 0 DIF F 1 if W = 0 (4) DIST ANCE i = DIF F 1 DIF F 0 if W = 1 (5) DIST AN CE [ 1.8, +1.8]. This algorithm tries to increase the correlation of each Y i with P N 0 or P N 1 in respect of value of W, hence fuzzy rules of system can be written as below: 1: If AVERAGE is very small then α is Very small. 2: If AVERAGE is small then α is small. 3: If AVERAGE is medium then α is medium. 4: If AVERAGE is large then α is large. 5: If AVERAGE is very large then α is very large. 6: If DISTANCE is very small then α is very small. 7: If DISTANCE is small then α is small. 8: If DISTANCE is medium then α is medium. 9: If DISTANCE is large then α is large. 10: If DISTANCE is very large then α is very large. Figure 7: Contourlet representation of Cat Then subbands 2 and 3 of second level are selected for watermark insertion ( Fig. 8). Next, the selected subbands are devided into 512 512 blocks. Hence, 625 blocks per subband is obtained. In this example, the 33 th bit of host image is selected for embedding. Figure 8: Representation of subbands Figure 5: Fuzzy system surface. DCT of selected block will be computed and its middle frequency will be selected. For further use it is named as 49
DBKDA 2011 : The Third International Conference on Advances in Databases, Knowledge, and Data Applications M id. 2.9323 0.7020 M id= 1.1322 1.1205 (6) After that, watermark power is calculated with fuzzy system: W atermarkpower= 59.2577 (7) Then P N0 and P N1 will be produced. By using equation (1), the new Mid (M id ) will be obtained: 13.3630 16.9973 M id = (8) 21.0886 23.3414 Finally, Mid will be replaced with Mid* and all above steps will be done reversely to produce watermarked image. (a) (b) (c) Figure 10: First row original images, second row watermarked images. (a) Cat (b) Man (c) Pepper (d) Baboon (e) Watermark Table I: PSNR and MSSIM of watermarked images, Combination of DCT and CT can increase the quality of watermarked image. Transform CT&DCT CT Factor PSNR MSSIM PSNR MSSIM Baboon 40.82 0.990 38.48 0.983 1 Lw.Hw LX w 1 H w 1 X x=0 2) Extraction: Such as embedding section, middle frequency of 33th block (W M id) is produced: 4.4099 14.6900 W M id= (9) 20.0518 14.5569 By calculating the correlation between this matrix and P N0 and P N1, we will have : Correlation (P N0, WMid) = 0.1272 (10) Correlation (P N1, WMid) = 0.0589 (11) By comparison of above results, the watermark bit will be acquired as 0. IV. EXPERIMENTAL RESULTS Testing this algorithm is done by using 512 512 gray scale host images: Man, Pepper, Baboon, Lena, Gold hill, Plane, Boat and Cat. Only partial results of them are shown. Watermark W is a binary pseudo-random sequence with 1225 bits length. For brevity only the pepper image is shown here. Fig. 10. To evaluate this algorithm, we used three factors: PSNR, MSSIM and normalized Correlation Coefficient (NC). PSNR is used to evaluate the quality of watermarked image regardless of HVS, but MSSIM tries to evaluate the image quality in respect to HVS. The used PSNR formula is [10]: Cat 41.83 0.985 40.13 0.974 Man 41.3 0.984 40.45 0.979 Pepper 42.13 0.988 39.85 0.957 255 255 P SN R = 10Log10 Figure 9: Watermarked image of Cat (d) [f(x,y) g(x,y) ] y=0 (12) where Hw and Lw are the height and width of the image, respectively. f(x,y) and g(x,y) are the values located at coordinates (x,y) of the original image, and the watermarked image, respectively. For the sake of brevity, explanation of MSSIM is omitted. It is available in [19]. After watermark extraction, the normalized Correlation Coefficient (NC) is computed using the original watermark and the extracted watermark to measure the correctness of an extracted watermark. It is defined as [10]: PNw wi w0 i N C = qp i 1qP (13) Nw Nw 2 02 w w i i i 1 i 1 where Nw is the number of watermark bits. w and w are the original watermark and the extracted watermark, respec- Table II: Comparison of NC values for CT and CD-DCT. Test Gaussian filter5 5 Median filter5 5 Average filter5 5 Gaussian noise (Var=20) Salt and pepper (density=0.05) JPEG (10%) Scaling (50%) Cropping (75%) Histogram equalization Image sharpening CT 0.8858 0.7417 0.6503 0.7367 0.8364 0.7125 0.9680 0.7066 0.9768 0.9868 CT-DCT 0.9611 0.8892 0.9354 0.7727 0.8353 0.7118 0.9848 0.7222 0.9890 0.9912 50
Table III: Correlation Coefficients after attack by median, gaussian, Average filtering with various filter size (n n), and histogram equalization Image Median Gaussian Average Hist equal 3 3 5 5 13 13 3 3 5 5 13 13 3 3 5 5 13 13 Cat 0.9633 0.8683 0.6703 0.9655 0.9111 0.7930 0.9650 0.8785 0.7280 0.9729 Man 0.9270 0.8009 0.6799 0.9404 0.8830 0.7630 0.9386 0.8305 0.7062 0.9599 Pepper 0.9834 0.8892 0.6888 0.9880 0.9611 0.8098 0.9879 0.9354 0.7398 0.9890 Baboon 0.9135 0.7930 0.6789 0.9289 0.8786 0.7765 0.9289 0.8363 0.7062 0.9278 Table IV: Correlation Coefficients after attack by JPEG compression with various quality and sharpening JPEG Quality Sharpening image 10 15 20 25 30 40 50 65 75 80 Cat 0.7797 0.8317 0.8654 0.8940 0.9243 0.9576 0.9689 0.9756 0.9790 0.9810 0.9857 Man 0.7591 0.8029 0.8452 0.8884 0.9066 0.9248 0.9311 0.9386 0.9445 0.9453 0.9513 Pepper 0.7118 0.7535 0.8310 0.8873 0.9165 0.9723 0.9846 0.9885 0.9881 0.9910 0.9912 Baboon 0.7928 0.8469 0.8943 0.9112 0.9135 0.9279 0.9348 0.9406 0.950 0.9505 0.9366 Table V: Correlation Coefficients after attack by gaussian noise which its variance varies from 1 to 10, salt & pepper noise which varies from 2% to 20%, cropping up to 75% of image and scaling 50% and 75% Salt and Pepper Gaussian noise Cropping (%) Scaling (%) image 0.02 0.05 0.2 1 10 20 20 50 75 50 75 Cat 0.9042 0.8424 0.7314 0.9366 0.7757 0.7218 0.9383 0.8346 0.7140 0.9582 0.9769 Man 0.8837 0.8244 0.7337 0.9031 0.7730 0.7277 0.91148 0.8248 0.6988 0.9294 0.9450 Pepper 0.9090 0.8353 0.7105 0.9320 0.7727 0.7192 0.9500 0.8452 0.7222 0.9848 0.9890 Baboon 0.8894 0.8218 0.7430 0.9044 0.7956 0.7334 0.9009 0.8184 0.7017 0.9223 0.9406 Table VI: Comparison between proposed method and some previous works. Test Shao zho[10] Zhao Xu [11] XIE Jing[12] Proposed method Gaussian filter 3x3 0.9321 0.7658 0.8956 0.9861 Median filter 3x3 NA NA 0.9689 0.9868 Gaussian noise (Var=0.001) 0.9683 0.8430 0.4505 0.9829 Salt and pepper (density=0.001) 0.9976 0.98 0.9472 0.9853 Speckle noise (density=0.001) NA NA 0.9472 0.9865 Scaling (40%) 0.9866 0.8394 NA 0.9041 Cropping (50%) 0.7244 0.7240 NA 0.7835 JPEG (80%) 1.000 0.9870 NA 0.9850 JPEG (50%) 1.000 0.8670 0.8956 0.9838 Histogram equalization NA NA NA 0.9812 Image sharpening NA NA NA 0.9861 tively. The watermarked images and extracted watermark have been shown in Fig. 11. In experiments both geometric and non-geometric attacks are considered. Non-geometric attacks includes JPEG compression, histogram equalization, sharpening and gaussian, median and average filtering and Gaussian noise, salt and pepper noise. For geometric attacks, scaling and cropping are used. The results are shown in Tables III, V, and IV. A comparison between proposed method and some previous works is shown in Table VI, in this comparison Lena image is used as host [10], [11], [12]. A group of 10,000 different watermarks including the genuine (embedded) one is used for evaluating the robustness of watermark detection algorithm against various attacks. As mentioned before each watermark is a 1225-bit binary pseudo-random sequence. The experimental results show that for genuine watermark the detector algorithm has highest response ( the genuine watermark is 5000th watermark). Detection responses of algorithm against various attacks and relevant images are shown in Fig. 11 and Fig. 12, respectively, and prove that proposed method is robust against both geometric and non-geometric attacks. V. CONCLUSION A blind watermarking scheme was proposed in this paper, which uses Contourlet and Discrete Cosine Transform to increase robustness and invisibility. By considering the fact that human eyes are less sensitive to noise in oblique angels, Contourlet was used because of its directional property. On 51
(a) Scale:0.25 (b) Crop:0.80 (c) Average filter 13 13 (d) Gaussian filter 13 13 (e) Salt&pepper noise 0.34 (f) Gaussian noise var=65 (g) Histogram Eq (h) JPG quality=6 (i) Median filter 13 13 (j) Sharpening Figure 11: Detector response against various attacks the other hand to improve the throughput of watermarking algorithm, the power of watermark is determined with a two-input fuzzy system. Experimental results demonstrate that the proposed scheme is robust against common nongeometric and geometric attacks. REFERENCES [1] S. Haohao, S. Yu, X. Yang, L. Song, and C. Wang, Contourletbased image adaptive watermarking, Signal Processing: Image Communication, vol. 23, no. 23, pp. 167 178, 2008. [2] M. Prasad. R and Sh. Koliwad, A comprehensive survey of contemporary researches in watermarking for copyright protection of digital images, IJCSNS International Journal of Computer Science and Network Security, vol. 9, no. 4, April 2009. [3] G. Voyatzis and I. Pitas, The use of watermarks in the protection of digital multimedia products, in Proceedings of IEEE, 1999, vol. 87. [4] R. Wolfgang, C. Podilchuk, and E. Delp, Perceptual watermarks for digital images and video, in Proceedings of IEEE, July 1999, vol. 87, pp. 1108 1126. [5] M. Barni, F. Bartolini, and A. Piva, Improved wavelet-based watermarking through pixel-wise masking, IEEE Transactions on Image Processing, vol. 10, no. 5, pp. 783 791, 2001. [6] M.J. Tsai, Ch.T. Lin, and J. Liu, A wavelet-based watermarking scheme using double wavelet tree energy modulation, in ICIP, 2008, pp. 417 420. [7] X.B. Wen, H. Zhang, X.Q. Xu, and J.J. Quan, A new watermarking approach based on probabilistic neural network in wavelet domain, Soft Comput., vol. 13, no. 4, pp. 355 360, 2009. [8] H. Li, W. Song, and Sh. Wang, A novel blind watermarking algorithm in contourlet domain, in 18th International Conference on Pattern Recognition, 2006, vol. 3, pp. 639 642. [9] S. Zaboli and M.S. Moin, Cew: A non-blind adaptive image watermarking approach based on entropy in contourlet domain, in IEEE International Symposium on Industrial Electronics, June 2007, pp. 1687 1692. [10] S. M. Zhu and J. M. Liu, A novel blind watermarking scheme in contourlet domain based on singular value decomposition, International Workshop on Knowledge Discovery and Data Mining, vol. 0, pp. 672 675, 2009. [11] Z. Xu, K. Wang, and X. h.q, A novel watermarking scheme in contourlet domain based on independent component analysis, Intelligent Information Hiding and Multimedia Signal Processing, International Conference on, vol. 0, pp. 59 62, 2006. [12] J. Xie and Y. Wu, Fingerprint image watermarking algorithm using the quantization of parity based on contourlet transform, Computer Applications, vol. 6, pp. 1365 1367, 2007. [13] M.N. Do and M. Vetterli, The contourlet transform:an efficient directional multiresolution image representation, in IEEE Trans. on Image Processing, December 2005, vol. 14, pp. 2091 2106. [14] E.J. Candes and D. Donoho, New tight frames of curvelets and optimal representations of objects with smooth singularities, in technical report, 2002. [15] E.L. Pennec and S. Mallat, Sparse geometric image representation with bandelets,, in IEEE Trans. on Image Processing, April 2005, vol. 14, pp. 423 438. [16] M.N. Do and M. Vetterli, Framing pyramids, in IEEE Trans. on Signal Processing, September 2003, vol. 51, pp. 2329 2342. 52
DBKDA 2011 : The Third International Conference on Advances in Databases, Knowledge, and Data Applications (a) Scale:0.25, (PSNR=27dB) (b) Crop:0.80, (PSNR=6.37dB) (c) Average filter13 13, PSNR=23.74dB (d) Gaussian filter13 13, PSNR=26.4dB (e) Salt&pepper noise0.34, PSNR=9.9dB (f) Gaussian noisevar=65, PSNR=9dB (g) Histogram PSNR=20.7dB (h) JPG quality=6, PSNR=26.7dB (i) Median filter13 13, PSNR=26dB (j) Sharpening, PSNR=24.8dB Eq, Figure 12: Some used images for evaluating the robustness of algorithm against various attacks [17] R.H. Bamberger and M.J.T. Smith, A filter bank for the directional decomposition of images: Theory and design, in IEEE Trans. on Signal Processing, April 1992, vol. 40, pp. 882 893. [18] Glenn and E. William, Digital image compression based on visual perception, pp. 63 71, 1993. [19] Z. Wang, A. C. Bovik, H. R. Sheikh, and E. P. Simoncelli, Image quality assessment: From error measurement to structural similarity, IEEE Trans. on Image Processing, vol. 13, pp. 600 612, 2004. 53