Digital Using DWT and Shift Invariant Edge Detection Apeksha Tiwari 1, Virendra Singh 2 1, 2 Department of Electronics & Communication, Sagar Institute of Research &Technology, Bhopal, India Abstract Adding robustness and invisibility to digital image watermarking method for copyright protection is a challenging task. In this paper a robust invisible watermarking algorithm is proposed using discrete wavelet transform based edge detection. is decomposed to sub-band coefficients using the wavelet transform. The shift invariant edge detection is applied to high frequency sub-band to find the edge coefficients. The watermark is embedded within the selected sub-band coefficients near the edges. Morphological dilation is used along with the edge coefficients for improving the robustness of the watermarking. As adding the watermark in high frequency sub-bands may degrade the invisibility thus, scaled dilated edge coefficients are used to improve the invisibility. Performance of the method is tested on the different images and evaluated based on MSE, PSNR and NCC. It is found that the proposed method improves the invisibility of the watermark and is robust to various attacks such as compression, cropping and resizing. Index Terms Digital image watermarking, Edge detection, Discrete Wavelet transform, Dilation. I. INTRODUCTION The exponentially increasing demand of multimedia systems and the distribution of large variety of digital image data over the World Wide Web (www) create the need of copyright protection of digital image data. The purpose of digital watermarks is to provide copyright protection for intellectual property rights that is in digital format. Digital watermarking method must satisfy two basic requirements first it must be having perceptual invisibility or transparent for original image. Secondly the watermark must be highly resistant and robust to various attacks such as cropping, noise, compression, rotation, scaling, resizing and translation. Various methods have been developed to increase the transparency and robustness of the watermarking methods [1,3 7 and 9]. techniques are broadly classified as visible and invisible watermarking as shown in Fig.1. In visible watermarking, the watermark is visible in the image or video frames. These watermarks are not robust and can be used as logos or overlay images in the field of image or video watermarking. But in invisible watermarking the information is hidden within the image. Based on domain which the watermark is applied the invisible watermarking can be further classified as transform domain or spatial 21 Visible Digital Transform Domain (DCT, DWT) In Visible Fig.1 Classification of Techniques The spatial domain methods [1]-[3] embed the watermark by modifying the pixel values of the original image. The transform domain techniques are which embed the watermark in the domain of an invertible transformation. The most commonly used transformations for watermarking are discrete cosine transforms (DCT) and the discrete wavelet transform (DWT). These transform domain watermark methods typically provides higher image imperceptibility and also more robust to the image manipulations and watermark attacks. The transform domain algorithms modify a subset of the transform coefficients with the watermarking data and generally achieve better robustness than spatial domain methods. The discrete wavelet transformation has become a powerful tool for watermarking the images, because of its multi-resolution features and its ability of joint time-frequency analysis. Lot of wavelet based image watermarking methods have been developed as in [1, 3, 8, 9, and 21]. The edge detection methods are widely used with transform domain methods to improve the robustness of the watermarking techniques. In this paper a robust invisible watermarking method is proposed using a asymmetric shift invariant edge detection and discrete wavelet transform (DWT). In order to add more robustness morphological image dilation is used with edge detection. A zero mean additive Gaussian noise template is used as a watermark template. II. LITERATURE REVIEW Spatial Domain (Pixel level) Researchers have proposed various watermarking methods [1, 3, 4, 7, and 9], for additional robustness constrain.
A robust, computationally efficient and blind digital image watermarking in spatial domain has been proposed by Santi et al. [4]. In their technique the average brightness of the homogeneous regions of the input image are utilize for watermark insertion process. They have used a spatial mask of suitable size to hide data with less visual degradations and recovery process needs only one secret image. Saeed et al. [7] proposed an algorithm based on Joint DWT-DCT transformation. A binary watermarked logo is scrambled by Arnold cat map and embedded in certain coefficient sets of a 3-level DWT transformed of a host image. Then, DCT transform of each selected DWT sub-band is computed and the PN-sequences of the watermark bits are embedded in the middle frequencies coefficients of the corresponding DCT block. But method seems to be much complex which needs larger time and processing power. Ellinas et al.[1] have used edge detection and algorithm embeds the watermark data to selected groups of DWT coefficients. Method weighted the watermark strength using the contrast sensitivity function (CSF) of the DWT sub-band corresponding to edge coefficients. Hemanth anvesh et al.[2] have also proposed the DWT based edge detection for the watermarking and they have also exploit the contrast sensitivity function for watermark insertion. Edge detection is widely used in watermarking algorithms to provide invisibility. John N. Ellinas [3] has presented a robust watermarking algorithm using wavelet-based edge detection. Soble edge detection mask is used to find the edge of two levels DWT image. Then morphological dilation is performed with 3x3 structuring mask on the detected edge image and then zero mean Gaussian noise is inserted as watermark sequence. Agarwal, et al. [8] robustly embedded watermark either in Discrete Hartley Transform (DHT) domain or in Discrete Cosine Transform (DCT) domain depending upon the number of edges in the blocks of the original image. The watermark is embedded invisibly block by block into the blocks of the original image. Block based edge detection is used in embedding process for robustness. Senthil et al. [5] have proposed digital image watermarking using edge detection and wavelets with robust analysis against JPEG compression attacks. They have used the canny edge detection and DWT for watermarking. Method performs efficiently against attacks. Kumar et al. [9] have proposed a watermarking algorithm using sobel edge detection in the DCT domain. Method first performs DCT on the original image and finds the modulated coefficients on which the watermark is inserted. The method inserts the watermarking data on the Edge coefficients of the input image. Edge coefficients are formed after detecting the edges using a Sobel edge detection method. Since the watermark is inserted at the Edges of the input image, and then apply the IDCT in ordered to generate the image that contains the watermark. The distortions in the watermarked image are less noticeable. Still there is scope to improve the robustness of the watermarking algorithm to make the watermark more secure. III. PROPOSED WATERMARK EMBEDDING In this paper, an invisible watermarking method is proposed. Fig. 2 shows the overall process of watermark insertion and detection. Method is a modified robust watermarking algorithm is proposed which embeds the edge data to selected groups of wavelet coefficients decomposed by discrete wavelet transform. The original input image is decomposed up to two levels of the DWT, Resulting an approximation sub-band with low frequency components and detail sub-bands with high frequency components. The proposed algorithm detects edge in HH sub-band using shift invariant edge detector mask. Also, a morphological dilation operation around this edge coefficient captures and forms another sub group. Gaussian noise is used as watermark template. Watermark strength is varied by scaling the sub-band level and the corresponding edge coefficients using scaling parameter. X(i,j) Input W(i,j) Output DWT IDWT W(x,y) Shift invariant edge detector Dilation Y L x,y Watermark Insertion Figure 2 Block diagram of proposed method X L x,y Finally, the Gaussian noise template is used as watermark energy and is distributed among these edged groups with a variable strength. The receiver detects the watermark data by correlating the watermarked image with the watermark sequence. In this present work watermark is embedded to the HH coefficients instead of LL coefficients. Adapting the watermark to high frequency components of image provides a transparent and robust watermark. Using shift invariant edge detection adds the robustness to the watermarking. 22
A. Linear Shift Invariant Edge detector In order to find the edge detection a shift invariant anti symmetric high pass filter mask [11], is used. For finding the edges, filter mask is convolved with original input image using discrete convolution operation. The elementary combination of the pixels in the convolution window for finding the discrete convolution is basically given by an operation which multiplies each pixel in the range of the filter mask with the corresponding weighting factor of the convolution mask, then sum up the multiplied values, and replaces the sum with the brightness of the current position of the center pixel this process can be mathematically represented as; A discreet dimensional filter or the edge detection operation can be written in terms of a simplified vector indexing as: ii) Shift invariance: This is another important property of the edge detector mask. The shift invariance is also known as translation invariance or homogeneity. That means if we shift an image, the output image is the same but for the shift applied. An edge detector operator is shift invariant only if it commutes with the shift operator as: IV. WATERMARK INSERTION RULE The watermark is inserted in an additive way to the selected sub-band coefficients using the equation (8). The detail sub-bands, where the watermark is inserted, contain edge information or high frequency coefficients. Consequently, adding the watermark to these coefficients makes the insertion invisible to the human visual system. Moreover, the insertion may be scaled according to the decomposition level and the group that coefficients belong to. Finally, the watermarked image is attained by taking the inverse transform Where is the edge detected coefficients of the LL wavelet sub-band and is the dilation of the edge coefficients. START (8) Where, [ ] [ ] and represent the corresponding element of the convolution is mask, and is an element of dimensional signal. The sums in the above equation can abbreviate as; The linear shift invariant edge detection mask used in this thesis is shown in the equation below. [ ] (5) This linear edge detector mask (or operator) is an asymmetric matrix and satisfies the basic property of the superposition and shift invariance. i) Superposition: In order to understand it let and are two dimensional complex valued signals, and are two complex-valued scalars, and is an edge operator, then the operator is linear if and only if (6) 23 Find the Dilation of Reading RGB Colour RGB to Gray Conversion Find the L level DWT Find the edge detection Watermark Insertion Finding the IDWT Watermarked image out Find Zero Mean isy Templates End Figure 3 Flow chart of watermark insertion method Where is defined as the scaling parameter and for better invisibility the value of should be higher. This watermark is added to the HH decomposition DWT sub-band defined as,
Where, is HH sub-band of L th level of DWT decomposition and is the watermark sequence of zero mean Gaussian noise template and WT is watermark template. (9) V. DILATION OF EDGE COEFFICIENTS In order to compute the dilation of the edge coefficients an N x N size of structuring element is used. Then for each input pixel location superimpose the structuring element mask on the top of the input image such that the centre (origin) of the structuring element overlap the input pixel position. Then pixels in the structuring element which coincides with the pixel in the input image are convolved to each other. The maximum value of the input pixel is set as the dilated value. Let the B is represented by the structuring mask and is the edge image. Then the gray-scale dilation of by is defined as: ( ) { } Where, D B is the domain of the structuring element B and is assumed to be outside the domain of the image and is the pixels of the image. An example of the structuring element mask is given in the Figure 4. It can be seen that the canter of the set of coordinate points is at origin and all other pixels are marked as their relative position with respect to origin. The size of the structuring element mask is variable. Figure 4 Example of 3 x 3 Structuring element mask John N. Ellinas [3] have generated dilation using a structuring element of 9 mask after five levels DWT. In this paper as a modification the edge detected image is formed with just two levels DWT, and then dilated using a structuring element of mask instead of 3 x 3. This improves the invisibility of the watermarking method. Comparison of image dilation with 2x2 and 3x3 masks are shown in the Fig. 5 a) b) c) Figure 5 Dilation of edge detected Football image a) Original edge image, b) Dilation with 3x3 mask, c) Dilation with 2x2 mask. VI. EXPERIMENTAL RESULTS In this paper the edge detection and discrete wavelet transformation (DWT) decomposition coefficients are uses to generate the watermarked images. In this section, some experimental results of our work on proposed digital image watermarking method have presented. The various edge detections methods are implemented and performance is compared on the basis of the visual artefacts The results of the work are presented sequentially. In the first stage the results of the various classical edge detector masks and dilation masks are presented in section 6.A. The comparisons of results of watermark insertion process are presented in section 6.B. In the final stage in section 6.3 the results of the performance evaluation is presented. Based on MSE and SNR. In addition watermarking performance is verified for the different size of the input images. A Results of Edge Detection: The comparison of edge detection methods for Lena image is shown in Fig 6. As can be observed from Fig.6 that our proposed method performs very much similar to Sobel s edge results but are less sharper, thus are less prone to noise. Also our method performs significantly better than Prewitt mask. In Fig.7 comparison of the dilation coefficients with various edge detectors are presented. It can be observed that our proposed method performs smoother than other methods. For the comparison, the dilation is calculated with our proposed structuring mask size of 2 x 2. a) Original image b) Edges with Prewitt 24
Table 3 Comparison of MSE for variable image size 256x256 512x512 128x128 c) Edges with Sobel d) Edges with our mask Figure 6 Comparison of edge detection (Lena image) 1 Lena 12.4541 3.7163 9.6501 2 Football 4.2442 2.7619 3.32145 3 Barbara 16.4463 11.533 24.3174 4 Baboon 15.9203 4.8015 13.071 Table 4 Comparison of SNR for variable image size 256x256 512x512 128x128 1 Lena 9.1779 30.7189 11.7479 2 Football 14.9832 23.0198 19.0980 3 Barbara 6.9443 9.94333 4.6365 4 Baboon 8.1385 26.9225 9.8257 a) Original edge image b) Dilation with Prewitt c) Dilation with Sobel d) Dilation with our mask a) Original and Watermarked Lena image Figure 7 Comparison of dilation for Lena image B Results of : In this section the results of the proposed watermarking method are presented. Input and watermarked images for various kinds of images with different image size are given in the Fig. 8. Table 1 MSE with different edge detector. Prewitt Sobel Proposed 1 Lena 12.4503 12.4690 12.4541 2 Football 4.1554 4.2544 4.2442 3 Barbara 16.348 16.46 16.4463 4 Baboon 15.8763 15.935 15.9203 b) Original and Watermarked Football image Table 2 SNR for different edge detector. Prewitt Sobel Proposed 1 Lena 9.18067 9.1669 9.1779 2 Football 15.3034 14.947 14.9832 3 Barbara 6.9858 6.9385 6.9443 4 Baboon 8.1612 8.1307 8.1385 c) Original and Watermarked Cameraman image 25
d) Original and Watermarked Cameraman image Figure 8 results of the proposed method for 256 x 256 image size. C Evaluation of Results: In this section the results of the proposed watermarking method are evaluated based on mean square error (MSE) and Signal to ise Ration (SNR) as parameters. The Table 1 and 2 shows the MSE and SNR for different edge detector mass. It can be observed that our method wit shift invariance and asymmetric properties performs better than Sobel method.. Although MSE and PSNR are minimized with Prewitt operator but since it is sensitive to noise thus is not opted for proposed method. Table 3 and 4 compares the MSE and SNR respectively for variable image size it can be observed that proposed method is perform extremely well with increase or decrease in size except Barbara image. The proposed method is not sensitive to interpolation attacks. VII. CONCLUSIONS AND FUTURE WORK In the paper, a robust method of image watermarking is proposed using edge detection and DWT. It proposed to use the shift invariant edge detector for watermarking. Method gives better performance for most of the images.. Watermark is inserted to the diagonal wavelet component instead of low pass component, thus improves the robustness. Although invisibility may degrade in case of images with sharp diagonal edges..in this paper scaling parameter is kept fixed during watermark insertion. In further future adaptive scaling may improve the performance much better. Acknowledgment I am highly indebted to Prof. Virendra Singh sir for his invaluable guidance and suggestions. I also owe thanks to God and my family for their support. REFERENCES [1] John N. Ellinas, A Robust Wavelet-Based Algorithm Using Edge Detection, IEEE Journal on image processing, pp. 197-208 2008. [2] J. N. Ellinas, D. E. Manolakis, A robust watermarking scheme based on edge detection and contrast sensitivity function, in VISAPP Proc. Int. Conf. Computer Vision Theory and Applications, Barcelona, 2007. [3] Hong Shan Dr. 101 Innovation Dr. San Jose, Adaptive Edge Detection for Real-Time Video Processing using FPGAs [4] J. Canny, 1986, A computational approach to edge detection, IEEE Trans on.pattern Anal. Machine Intelleence, Vol. PAMI-8, pp. 679-698.2004. [5] M. Barni, F. Bartolini,a and A. Piva, Improved wavelet-based watermarking through pixel-wise masking, IEEE Trans. Processing, vol. 10, no. 5, pp. 783 791, 2001 [6] Mallat, W. L. Hwang, 1992, Singularity detection and processing with wavelets, IEEE Trans.on Inform. Theory, Vol.38, no.2, pp. 617-643. [7] I. J. Cox, J. Kilian, T. Leighton, and T. Shamoon, Secure spread spectrum watermarking for multimedia, IEEE Trans. Processing, vol. 6, no. 12, pp. 1673 1687, Dec. 1997. [8] X. Xia, C. G. Boncelet, and G. R. Arce, A multiresolution watermark for digital images, in IEEE Proc. Int. Conf. Processing, USA, 1997, pp. 548-551. [9] I. Daubechies, 1992, Ten lectures on Wavelets, CBMS-NSF Series in Appl. Math., #61, SIAM, Philadelphia. [10] Y. Y. Tang, L.H. Yang, L. Feng, Characterization and detection of edges by Lipschitz exponent and MASW wavelet transform, Proc. 14th Int. Conf. Pattern Recognition., Brisbane, Australia, pp. 1572-1574, 1998,. [11] R.Dugad, K. Ratakonda, and N. Ahuja, A new wavelet-based scheme for watermarking images, in IEEE Proc. Int. Conf. Processing, USA, 1998, pp. 419-423. [12] J. R. Kim, and Y. Moon, A robust wavelet-based digital watermarking using level-adaptive thresholding, in IEEE Proc. Int. Conf. Processing, Japan, 1999, pp. 226-230. [13] A. Cohen, R. D. Ryan, 1995, Wavelets and Multiscale Signal Processing Chapman &Hall. [14] R. B. Wolfgang, C. I. Podilchuk, and E. J. Delp, Perceptual water-marks for digital images and video, in SPIE Proc. Int. Conf. Security and watermarking of multimedia contents, USA, 1999, pp. 40-51. [15] R. J. Beattie, 1984, Edge detection for semantically based early visual processing, dissertation, Univ. Edinburgh, Edinburgh, U.K. [16] B. K. P. Horn, 1971, The Binford-Horn line-finder, Artificial Intell. Lab., Mass. Inst. Technol., Cambridge, AI Memo 285. [17] Mallat, Zhong, 1992, Characterization of signals from multistage edges,, IEEE Trans. Pattern Anal. Machine Intell., vol.14, no.7, pp. 710-732. [18] R. Nevatia, 1977, Evaluation of simplified Hueckel edge-line detector, Comput., Graph., Process., vol. 6, no. 6, pp. 582-588. [19] J. C. Goswami, A. K. Chan, 1999, Fundamentals of wavelets: theory, algorithms, and applications, John Wiley & Sons, Inc. [20] K. R. Castleman, 1996, Digital Processing, Englewood Cliffs, NJ: Prentice Hall. Authors Apeksha Tiwari have completed her B. Tech degree from I.R.T.Bhopal. and is currently perusing M. Tech. from I.R.T. Bhopal. Prof. Virendra Singh have completed Maser of Technology degree and is currently working as assistant Prof. in I.R.T.,Bhopal. 26