Digital Watermarking Using Combined DWT And DCT

DOI : 10.17577/IJERTV2IS4366

Download Full-Text PDF Cite this Publication

Text Only Version

Digital Watermarking Using Combined DWT And DCT

Vandana Bavkar

Department of Electronics and Telecommunication Maharashtra Institute of Technology, Pune-38


The growth of computer networks has boosted the growth of the information technology sector to a greater extent. Thus the digital information which includes images, videos, text etc. is readily available to anyone. At the same time care is taken to prevent the unauthorized use of the images commercially. To satisfy these need owners moved towards watermarking. In this paper the embedding and extraction technique for watermarking is presented based on DCT & DWT transforms. In this technique the insertion and extraction of the watermark in the gray scale image is found to be simpler than other transform techniques. Various values of PSNRs, NCs are analyzed for watermarked image quality and extracted watermark quality.

Keywords -Digital watermarking, Discrete Wavelet Transform, Discrete Cosine Transform, Peak Signal to Noise Ratio (PSNR), Normalized Correlation (NC).

1. Introduction

The development of effective digital image copyright protection methods have recently become an urgent and necessary requirement in the multimedia industry due to the ever-increasing unauthorized manipulation and reproduction of original digital objects. The new technology of digital watermarking has been advocated by many specialists as the best method to such multimedia copyright protection problem. Its expected that digital watermarking will have a wide-span of practical applications such as digital cameras, medical imaging, image databases, and video-on- demand systems, among many others. In order for a digital watermarking method to be effective it should be imperceptible, and robust to common image

manipulations like compression, filtering, rotation, scaling cropping, and collusion attacks among many other digital signal processing operations. Current digital image watermarking techniques can be grouped into two major classes: spatial-domain and frequency-domain watermarking techniques. [4]

Compared to spatial domain techniques, frequency-domain watermarking techniques proved to be more effective with respect to achieving the imperceptibility and robustness requirements of digital watermarking algorithms. Digital Watermarking is an adaptation of the commonly used and well known paper watermarks to the digital world. Digital Watermarking describes methods and technologies that hide information, for example a number or text, in digital media, such as images, video or audio. The embedding takes place by manipulating the content of the digital data, which means the information is not embedded in the framearound the data. The hiding process has to be such that the modifications of the media are imperceptible. For images this means that the modifications of the pixel values have to be invisible. The most commonly used transforms are Discrete Cosine Transform (DCT) and Discrete Wavelet Transform (DWT) .In this paper, a digital image watermarking algorithm is described which is based on combining two transforms; DWT and DCT. The DCT has high energy compaction property and requires less computational resources. The energy compaction property of an algorithm refers to the ability to concentrate most important information signal into as much as few low frequency component. On the other hand, DWT is a multi-resolution transform and variable compression can be easily achieved. The main disadvantages of DCT are introduction of false contouring effects and blocking artifacts at higher compression, and, that of DWT is requirement of large computational resources. In this paper we will describe the method of digital

watermarking using combined DWT-DCT.

The DCT and DWT transforms have been extensively used in many digital signal processing applications. In this section, the two transforms are briefly introduced, and outline their relevance to the implementation of digital watermarking.

  1. Transform Techniques

    1. Discrete Cosine Transform

      The discrete cosine transforms is a technique for converting a signal into elementary frequency components. It represents an image as a sum of sinusoids of varying magnitudes and frequencies. With an input image, x, the DCT coefficients for the transformed output image, y, are computed according to (1). In this equation, x is the input image having M x N pixels, x (m, n) is the intensity of the pixel in row m and column n of the image and y (u, v) is the DCT coefficient in row u and column v of the DCT matrix.

      M1 N1

      information of original image into the smallest low- frequency coefficient, but also it can cause the image blocking effect being the smallest, this can realize the good compromise between the information centralizing and the computing complication. So it obtains the wide spreading application in the compression coding


    2. Discrete Wavelet Transform

      Wavelets are special functions which, in a form analogous to sine and cosine in Fourier analysis, are used as basal functions for representing signals. For 2-D mages, applying DWT corresponds to processing the image by 2-D filters in each dimension. The filters divide the input image into four non- overlapping multi-resolution sub-bands LL1, LH1, HL1 and HH1. The sub-band LL1 represents the coarse-scale DWT coefficients while the sub-bands LH1, HL1 and HH1 represent the fine-scale of DWT coefficients. Due to its excellent spatio-frequency localization properties, the DWT is very suitable to identify the areas in the host image where a



      y u, v = 2 2

      M N

      v x m, n

      u=0 v=0

      watermark can be embedded effectively. In particular, this property allows the exploitation of the masking effect of the human visual system such that



      2m + 1 u

      2M cos

      2n + 1 v 2N

      if a DWT coefficient is modified, only the region corresponding to that coefficient will be modified. In general most of the image energy is concentrated at the lower frequency sub-bands LLx and therefore embedding watermarks in these sub-bands may

      whereu = 2for u=0 and

      u =1 for u=1,2..,M-1 (1)

      The image is reconstucted by applying inverse operation according to (2).

      M1 N1

      u v

      u v

      x m, n = 2 2 y u, v

      M N

      u=0 v=0

      2m + 1 u 2n + 1 v cos 2M cos 2N



      where = 1 for v=0 and


      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 HHx 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 compromise adopted by many DWT based watermarking algorithm, is to embed the watermark in the middle frequency sub-bands LHx and HLx where acceptable performance of imperceptibility and robustness could be achieved.

  2. Watermarking Algorithms

    1. Insertion Algorithm

      Steps for watermark insertion are given in flowchart as shown in Fig. (1).

      v =1 for v=1,2..,N-1 (2)

      The 2D-DCT can not only concentrate the main

      LOAD Image

      LOAD Image

      Load Watermark

  3. Resultsand Discussion

    In this experiment, several colored host images

    Decompose image into RGB components.

    Perform DWT on Host Image

    Decompose Image into RGB components.

    erform DCT on Watermark

    and colored watermark logos are used. The experiment results are concluded in the form of watermarked image quality and extracted watermark quality. The quality metrics of watermarked image and extracted watermark are calculated in terms of Normalized Correlation (NC) [3], and Peak Signal to Noise Ratio (PSNR) and Universal Image Quality Index (Q).

    Add every component of watermark image into every component of host image

    The Normalized Cross-Correlation (NC) is given by(3)

    m n W m ,n W m ,n

    Perform IDWT of

    NC = m n W 2 m ,n

    every component

    Concatenate the component & get the extracted watermark.

    Fig. (1) Watermark Insertion

    B. Extraction Algorithm

    Steps for watermark extractionare given in

    m n 1W m ,n 1W m ,n

    m n(1W 2 m ,n )


    The value of NC is between 0 and 1.The bigger the value is, the better the watermark robustness is.

    PSNR is calculated mathematically by (4).

    flowchart as shown in Fig. (2).


    (MAX 12 )(4)




    Where Max 1 is the maximum pixel value of the image, I is the original image and K is the watermarked image.

    Decompose image into RGB


    Decompose Image into RGB


    The mean squared error (MSE) is for two m×n monochrome images I and K where one of the images is considered a noisy approximation of the other.MSE is given by (5).

    Perform 2-D DWT on both images.

    MSE = 1 m1 n1[I i, j K i, j ]2 (5)

    mn i=0


    Subtract every component of watermarked image from every component of host image.

    Universal image quality index is mathematically given by (6).

    Q = 4


    Perform IDCT

    ( 2+ 2)( 2+ 2)

    Concatenate the component & get the extracted watermark.

    Fig. (2) Watermark Extraction

    Wherex and y be the original and test image. [6]

    Implementation. In this project, watermark insertion and extraction algorithms are implemented using

    MATLAB software. Using MATLAB commands different operations like DWT, DCT, and IDCT are performed on host image and watermark. One can see the results by simulating programs.

    Combined DWT-DCT method gives better results for quality metrics than single DWT or DCT method. While adding the watermark, scaling can be used. This method reduces the noise in the original image improving the PSNR.

    Different images used for analysis are shown in Fig.(3). The size of host image is 256×256 and size of watermark is 64×64.

    Host images and watermarks

    Fig. (3) Host and watermark images used in experiment

    Table-I shows quality metrics for lena (256×256) as original image and different watermarks (64×64).


    Watermarked image quality metrics























    Table-II shows the effect of size of watermark on PSNR and NC. Resultsand Fig. (4) shows that as watermark size increases, the PSNR of image will go on decreasing.


    Effect of size of watermark

    Origina l Image

    Water Mark

    Size of watermark



















    Fig. (4) Effect of size of watermark

    Table-III shows the effect of scaling on the watermarked image in terms of PSNR values.


    Effect of Scaling

    Scaling Factor


    PSNR (dB)













    So with scaling one can get good watermarked image with high quality and less noise.

  4. Conclusion

    In this paper necessity of digital watermarking, different techniques of watermarking are discussed. Here a comparative study of different images has been done using PSNR, Qand NC. The proposed algorithm with colored images shows excellent PSNR to various images like LENA image. This algorithm shows that increase in size of watermark decreases the PSNR. So one can choose size of the watermark as per requirement.

  5. References

[1] Achintya Singhal, Rudra Pratap Singh, Monal Tenguria, Comparison of Different Wavelets For Watermarking of Colored Images Proceeding of Electronics Computer Technology (ICECT),3rd International Conference,8 to 10 April 2011 Kanyakumari, vol 3,India ,pages :187-191. [2]Xia, X., Boncelet, C.G., & Arce, G.R. A Multiresolution Watermark for Digital Images.

International Conference on Image Processing Proceedings, ICIP 97,Washington, DC, USA, October 26-29, 1997, vol. 1, pp. 548-551 (1997,September).

  1. Suhail M. A. and Obadiah M. S., A Robust Digital Watermarking Technique, 7th IEEE International Conference on Electronics, Circuits and Systems, December 17-18, 2000 Jounieh, Lebanon, vol 2, pp. 629 632 (2000).

  2. Ali Al-Haj Combined DWT-DCT Digital Image Watermarking Journal of Computer Science 3 (9): 740- 746, Amman, Jordan 2007.

  3. Mei Jiansheng1, Li Sukang1 and Tan Xiaomei A Digital Watermarking Algorithm Based On DCT and DWT Proceedings of the 2009 International Symposium on Web Information Systems and Applications (WISA09) Nanchang, P. R. China, May 22-24, 2009, pp. 104-107.

  4. Zhou Wang,Alan C. Bovik A Universal Image Qulality Index IEEE Signal Processing Letters ,vol 9,(81- 84 pages) ,March 2002.

  5. Rafael C. Gonzalez, Richard E. Woods, Steven L. Eddins, Digital Image Processing Using Matlab, Pearson Education(Singapore)Pvt.Ltd, 2005.

Leave a Reply