International Journal of Science, Engineering and Technology Research (IJSETR) Volume 1, Issue 1, July 2012 Watermarking System Using SVD and DWT Khaing Myat Thu1, Aung Myint Aye2 Department of Information Technology, Mandalay Technological University Khaingmyatthu1@gmail.com Abstract— Protection of digital multimedia content has become an increasingly important issue for content owners and service providers. Watermarking is identified as a major means to achieve copyright protection. The proposed system intends to implement a watermarking system which provides the robustness watermarked image to resist many attacking. The system will consist three portions. First is the embedding process of the logo image to achieve the watermarked image. Second is the attacking process of the watermarked image with some attacks. Finally, robustness of the watermark image will be checked by extracting the logo from the watermarked image. In embedding process, the host image will be decomposed by using the discrete wavelet transformation (DWT) and Singular Value Decomposition (SVD). The system will be implemented by using the Matlab. Keywords— Attacking, Embedding, Discrete Wavelet Transform, Extracting, Singular Value Decomposition I. INTRODUCTION atermarking (data hiding) is the process of embedding data into a multimedia element such as image, audio or video. This embedded data can later be extracted from, or detected in, the multimedia for security purposes. A watermarking algorithm consists of the watermark structure, an embedding algorithm, and an extraction algorithm. The security of the image will differ by the using of various algorithms. Some algorithm based on spatial domain and some are on frequency domain. The algorithm used for the proposed system, DWT, is based on frequency domain. It is popular in digital watermarking for the reason of strong security. But it has some weakness such as high compression, so another approach will become. A few years ago, a third transform called Singular Value Decomposition (SVD) was explored for watermarking. SVD is one of the most useful tools of linear algebra with several applications in image compression, watermarking, and other signal processing fields. By using the hybrid of DWT and SVD will get the stronger and more robustness watermarked image.A watermarking algorithm consists of the watermark structure, an embedding algorithm, and an extraction, or detection, algorithm. Watermark embedding can be done in either spatial domain or frequency domain [2]. To become the strong copyright protection on the multimedia items, embedded watermarks should be invisible, robust, and have a high capacity. Invisibility refers to the degree of distortion introduced by the watermark and its effect on the viewers or listeners. Robustness is the resistance of an embedded watermark against intentional attacks, and normal audio/video processes such as noise, filtering (blurring, sharpening, etc.), resampling, scaling, rotation, cropping, and loss compression. Capacity is the amount of data that can be represented by an embedded watermark. The approaches used in watermarking still images include least-significant bit encoding, transform techniques, and image-adaptive techniques. W II. RELATED WORKS There are many researches related to digital watermarking which are based on frequency domain. An effective image watermarking algorithm based on wavelet transform and edge detection is presented in [3]. The watermark is embedded into the sub-bands coefficients that lie on the edge. Also, the watermark is embedded to selected coefficients around edges, using a different scale factor for watermark strength, that are captured by a morphological dilation operation. Ali Al-Haj proposed a new image watermarking concept for image that utilizes the best features of Discrete Cosine Transform and Discrete Wavelet Transform [4]. Watermarking was done by embedding the watermark in the first and second level DWT sub-bands of the host image, followed by the application of DCT on the selected DWT sub-bands. The combination of the two transforms improved the watermarking performance considerably when compared to the DWT-Only watermarking approach. Lijie Cao proposed the digital watermarking system with singular value decomposition. The robust of watermarked image is tested in it [5]. In this paper, the system uses discrete wavelet transform to transform the image from spatial domain to frequency because of it multi-level resolution. And the singular value decomposition is also used to embed the watermark image into the cover image for the robustness. III. OVERVIEW OF DIGITAL WATERMARKING The information to be embedded in a signal is called a digital watermark, although in some contexts the phrase digital watermark means the difference between the watermarked signal and the cover signal. The signal where the watermark is to be embedded is called the host signal. A watermarking system is usually divided into three distinct steps, embedding, attack, and detection. In embedding, an algorithm accepts the host and the data to be embedded, and produces a watermarked signal. Figure 1. Overview of digital watermarking Then the watermarked digital signal is transmitted or stored, usually transmitted to another person. If this person makes a modification, this is called an attack. While the modification may not be malicious, the term attack arises from copyright protection application, where third parties 1 All Rights Reserved © 2012 IJSETR International Journal of Science, Engineering and Technology Research (IJSETR) Volume 1, Issue 1, July 2012 may attempt to remove the digital watermark through modification. There are many possible modifications, for example, lossy compression of the data (in which resolution is diminished), cropping an image or video, or intentionally adding noise [6]. Detection (often called extraction) is an algorithm which is applied to the attacked signal to attempt to extract the watermark from it. If the signal was unmodified during transmission, then the watermark still is present and it may be extracted. In robust digital watermarking applications, the extraction algorithm should be able to produce the watermark correctly, even if the modifications were strong. In fragile digital watermarking, the extraction algorithm should fail if any change is made to the signal. Watermarking schemes can be divided into two main categories according to the embedding domain: spatial domain and transform domain schemes. In spatial domain, the watermark is embedded into the specific pixels of the cover image. In transform domain, the cover image is first transformed to a frequency domain and then watermark is embedded into the frequency coefficients. Although the transform domain watermarking scheme is more complex than spatial domain watermarking, this kind of watermarking is more robust against different attacks than spatial domain watermarking. IV. TRANSFORM DOMAIN Transform domain embeds a watermark by modifying the transform coefficients of the cover image as opposed to the pixel values. Ideally, transform domain has the effect in the spatial domain of apportioning the hidden information through different order bits in a manner that is robust. There are a number of transforms that can be applied to digital images, but there are notably three most commonly used in image watermarking. They are Discrete Fourier Transform (DFT), Discrete Cosine Transform (DCT) and Discrete Wavelet Transform (DWT). In the recent day, another transform method, singular value decomposition (SVD) also becomes popular for its robustness. In the proposed system, the DWT and SVD are used for the digital watermarking algorithms. A. Discrete Wavelet Transform (DWT) Wavelet domain is a promising domain for watermark embedding. Wavelet refers to small waves. Discrete Wavelet Transform is based on small waves of limited duration and varying frequency [7]. This is a frequency domain technique in which firstly cover image is transformed into frequency domain and then its frequency coefficients are modified in accordance with the transformed coefficients of the watermark and watermarked image is obtained which is very much robust. DWT decomposes image hierarchically, providing both spatial and frequency description of the image [8]. It decompose an image in basically three spatial directions i.e, horizontal, vertical and diagonal in result separating the image into four different components namely LL, LH, HL and HH. The decomposing step of the DWT is shown in Fig 2. Here first letter, Lo or HI, refers to applying either low pass frequency operation or high pass frequency operations to the rows and the second letter, D, refers to the filter applied to the columns of the cover image [9]. Figure 2. Decomposing Step of DWT In general most of the image energy is concentrated at the lower frequency sub-bands LL and therefore embedding watermarks in these sub-bands may degrade the image significantly. Embedding in the low frequency sub-bands, however, could increase robustness significantly. On the other hand, the high frequency sub-bands HH include the edges and textures of the image and the human eye is not generally sensitive to changes in such sub-bands. This allows the watermark to be embedded without being perceived by the human eye. The proposed system use LH and HL sub-bands of cover image to embed the watermark image. By using DWT, the image can be decomposed many times to get the multi-resolution image as shown in Fig 3. Figure 3. Multi-Level Resolution 1st Level Decompose LL1 HL1 LH1 HH1 Original Image 2nd Level Decompose LL2 HL2 LH2 HH2 LH1 HL1 HH1 DWT can reconstruct again to obtain the image from the multi-resolution sub-bands. This is known as inverse discrete wavelet transform (IDWT). The process of IDWT is shown in Fig 4. Figure 4. Reconstruction Step of DWT There are so many wavelets to use in DWT which are such as Harr wavelets, Daubechie wavelets and so on. The proposed system used Daubechie-5 wavelets for sampling of DWT. B. Singular Value Decomposition (SVD) Singular Value Decomposition transform is a linear algebra transform which is used for factorization of a real or complex matrix with numerous applications in various fields of image processing [10]. As a digital image can be represented in a matrix form with its entries giving the 2 All Rights Reserved © 2012 IJSETR International Journal of Science, Engineering and Technology Research (IJSETR) Volume 1, Issue 1, July 2012 intensity value of each pixel in the image, SVD of an image A with dimensions m x m is given by: A = USVT Key H Watermark where U and V are orthogonal matrices and S known as singular matrix is a diagonal matrix carrying non-negative singular values of matrix A. The columns of U and V are called left and right singular vectors of A, respectively. They basically specify the geometry details of the original image. Left singular matrix i.e., U represents the horizontal details and right singular matrix i.e., V represents the vertical details of the original image. The diagonal values of matrix S are arranged in decreasing order which signifies that importance of the entries is decreasing from first singular value for the last one, and this feature is employed in SVD based compression techniques. Figure 5. From an image’s matrix to S, V and U matrices The Embedding Process Watermarked Cover Unintentional Distortions Possibly Distorted Watermarked Cover Intentional Attacks Cover Distorted Mark or Confidence Meassure The Detection Process Key Inserted Watermark H Yes Valid Watermark No Invalid Key Key Figure 7. Ovzerall system design of proposed system A. Embedding Algorithm The following procedure describes the algorithm of embedding process in step by step. 1. Load a cover image 2. Transform cover image from spatial domain to transform domain by using DWT (LL, LH, HL and HH) 3. Apply SVD to LH and HL sub-bands of the cover image (S1,V1,U1 and S2,V2,U2) 4. Both S1 and S2 are sum with factor* encrypted watermark image to get the new values of matrix.(temp1key and temp2key) temp1key= S1+(f*Wen) 5. Apply SVD to temp1key to get the S1key, V1key and U1key matrices of the watermark 6. The new value of LHnew is computed from U1, VT and S1key. And the new value of HLnew is also computed like this. 7. The watermarked cover image can reconstructed form the LL,LHnew,HLnew and HH by using IDWT. B. Attacking State In the attacking state, there can be a wide-ranging of attacks has been designated in the literature [8]. In the real world, four types of attacks can be invoked to enter a watermarking Figure 6. From S, VT and U matrices to image matrix system: Removal attacks, Geometrical attacks, There are two main properties of SVD to employ in digital Cryptographic attacks and Protocol attacks. The attack is watermarking schemes [8]: positive if the watermarking can’t be finding anymore, but 1. Small variations in singular values does not affect the the image is still understandable and can be used for specific quality of image and, determined purpose. And many such 2. Singular values of an image have high stability so; they attack actions have proposed lossy image compression, addition of do not change after various attacks. gaussian noise, denoising filtering, median filtering and blurring, signal enhancement and rotating and cropping. V. PROPOSED SYSTEM DESIGN The proposed system used the DWT and SVD to embed C. Detection or Extraction Algorithm The algorithm for the detection process is listed in the and extract of the digital watermark into the cover image in order to get robust watermarked image. The robust image can following procedure. gain strong protection to the owner ship or copy right of the 1. The possibly distorted watermarked image is original cover image. decomposed into four sub-bands by using DWT The proposed system includes three portions which are algorithm. (LL, LH, HL and HH) embedding, distortion or attacking and detection or 2. Applied SVD to LH and HL sub-bands (which already extraction. The proposed system is to ensure the copy right contain the encrypted watermark image) (S1new, U1new, protection of the original image. The overall system design of V1new) the proposed system is shown in Fig 7. 3. Input the required data set (DS) for semi-blind Before the embedding process, the user needs to enter the extraction. key to combine with the watermark image. The watermark 4. Compute the new LH and HL from DSu, DSvT and image will be combined with the hashed key. And that S1new. resulted watermark image will be embedded into the cover 5. Subtract DSs From S1new and divide by factor to obtain image as a signature of the copyright protection. the encrypted watermark image of LH and HL. ( W en =S1new – S /factor) 3 All Rights Reserved © 2012 IJSETR International Journal of Science, Engineering and Technology Research (IJSETR) Volume 1, Issue 1, July 2012 6. If the user inserted key is correct, the inserted watermark will be extracted or detected. VI. TEST AND RESULT The following results are generated by implementing the proposed system. In this paper, the results are displayed a series of interface. The standard Lena image is used as the host or cover image in the testing. And another logo image is used as watermark image. Those images are show in Fig 8 and Fig 9. Figure11. The 4 sub-bands of the cover image Figure 8. Standard Lena as host image Among these 4 sub-bands, the LH and HL sub-bands will be used to embed the watermark. LH and HL sub-bands are applied with SVD decomposition to get the S, V and U matrices of the images. And S matrix or diagonal matrix will be replaced with a new diagonal which are computed from the S matrix and the key inserted watermark image. And then, the new value of LH and HL are calculated from Snew* U*VT. After that, the watermarked image will computed from the LL, LHnew, HLnew, HH. The result watermarked image is shown in the Fig 12. And then, the resulted watermarked is attacked with some attacking or distortion methods. The resulted intentional attacked images are shown in Fig13 to Fig 15. Figure 9. Logo image as watermark image Firstly, the user has to enter the key to the watermark image. After hashing the key, the watermark image is combined with that key and will be displayed the resulted watermark image. The original watermark and key inserted watermark images are show in Fig 10. Figure 12. Key inserted watermark embedded in the cover image Hash Figure 10. Original watermark and key inserted watermark To embed the key inserted watermark image, the cover image need transform into transform domain. So, the cover image is decomposed into 4 sub-bands which are LL, LH, HL and HH by using DWT embedding algorithm. The resulting sub-bands are show in Fig 11. Figure 13. Cutting and Brightening 4 All Rights Reserved © 2012 IJSETR International Journal of Science, Engineering and Technology Research (IJSETR) Volume 1, Issue 1, July 2012 Figure18. The watermark with higher correlation coefficient Figure 14. 45 degree rotation and Gaussian noise attack Figure 15. Increasing contract and histogram equalization The next step is the detection or extraction process of watermark. After attacking the cover watermarked image, the image may alter on geological pixel values. The possibly distorted watermarked image are decomposed into four sub-bands (LL, LH,HL and HH) to extract the key inserted watermark. And then, the LH and HL are applied with SVD and the key inserted watermark’s diagonal matrix will be computed. The user needs to enter the key to get the watermark from the key inserted watermark. If the key is correct, the resulted watermark will be shown. The key inserted watermark and the extracted watermark are shown in Fig 16, 17 and 18. VII. CONCLUSION In the proposed system, it implements the digital watermarking with DWT and SVD for improving robust and safe from many geometrical attacks. The system use DWT-2 (Daubechie-5 wavelet) for decomposing the cover image. In this proposed system, one dimension of SVD is used singular decomposing. This proposed system can be seen as semi blind watermarking system which has to use again the original watermark in the extraction process. And future work can be with another higher level of DWT and other dimension like 2D and 3D of SVD can be used for better copyright protection. Moreover, the blind watermarking system can also be contributed to this proposed system to achieve more powerful watermarking system. VIII. REFERENCES Wikipedia,“Digital Watermarking”, http://en.wikipedia.org/wiki/ Digital _watermarking, 2011. [2] Richa Mishra, “Watermarking Techniques via Discrete Wavelet Transform”, 2013. [3] John N. Ellinas, “A Robust Wavelet-Based Watermarking Algorithm Using Edge Detection”, World Academy of Science, Engineering and Technology, 2007. [4] Ali Al-Haj,“Combined DWT-DCT Digital Image Watermarking”, Journal of Computer Science, 2007. [5] Lijie Cao, “Singular Value Decomposition Applied To Digital Image Processing”, 2011. [6] Harish N J, “Hybrid Robust Watermarking Technique Based on DWT, DCT”, 2013. [7] Chunlin Song, SudSudirman, MadjidMerabti, “Recent Advances and Classification of Watermarking Techniques in Digital Images”, ISBN: 978-1-902560-22-9, 2009. [8] Vaishali S. Jabade,Dr. Sachin R. Gengaje, “ Literature Review of Wavelet Based Digital Image Watermarking Techniques”, International Journal of Computer Applications, October 2011. [9] M. MohamedSathik, S. S. Sujatha, “A Novel DWT Based Invisible Watermarking Technique for Digital Images”, International Arab Journal of e-Technology, January 2012. [10] R. Liu and T. Tan, “An SVD-based watermarking scheme for protecting rightful ownership,” IEEE Transactions on Multimedia, Mar 2002. [1] Figure16. The extracted watermark Figure17. The extracted watermark images from LH and HL 5 All Rights Reserved © 2012 IJSETR