Combined DWT-DCT Digital Image Watermarking

: The proliferation of digitized media due to the rapid growth of networked multimedia systems, has created an urgent need for copyright enforcement technologies that can protect copyright ownership of multimedia objects. Digital image watermarking is one such technology that has been developed to protect digital images from illegal manipulations. In particular, digital image watermarking algorithms which are based on the discrete wavelet transform have been widely recognized to be more prevalent than others. This is due to the wavelets' excellent spatial localization, frequency spread, and multi-resolution characteristics, which are similar to the theoretical models of the human visual system. In this paper, we describe an imperceptible and a robust combined DWT-DCT digital image watermarking algorithm. The algorithm watermarks a given digital image using a combination of the Discrete Wavelet Transform (DWT) and the Discrete Cosine Transform (DCT). Performance evaluation results show that combining the two transforms improved the performance of the watermarking algorithms that are based solely on the DWT transform.


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 [1,2] . 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 [3] .
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, 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 [5] , frequency-domain watermarking techniques proved to be more effective with respect to achieving the imperceptibility and robustness requirements of digital watermarking algorithms [6] .
Commonly used frequency-domain transforms include the Discrete Wavelet Transform (DWT), the Discrete Cosine Transform (DCT) and Discrete Fourier Transform (DFT). However, DWT [7] has been used in digital image watermarking more frequently due to its excellent spatial localization and multi-resolution characteristics, which are similar to the theoretical models of the human visual system [8] . Further performance improvements in DWT-based digital image watermarking algorithms could be obtained by combining DWT with DCT [9] . The idea of applying two transform is based on the fact that combined transforms could compensate for the drawbacks of each other, resulting in effective watermarking.
In this paper, we will describe a digital image watermarking algorithm based on combining two transforms; DWT and DCT. Watermarking is done by altering the wavelets coefficients of carefully selected DWT sub-bands, followed by the application of the DCT transform on the selected sub-bands.

THE DCT AND DWT TRANSFORMS
The DCT and DWT transforms have been extensively used in many digital signal processing applications. In this section, we introduce the two transforms briefly, and outline their relevance to the implementation of digital watermarking.
The DCT transform: The discrete cosine transforms is a technique for converting a signal into elementary frequency components [9] . 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 Eq. 1 shown below. In the equation, x, is the input imagehaving N x M 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. The image is reconstructed by applying inverse DCT operation according to Eq. 2: The popular block-based DCT transform segments an image non-overlapping blocks and applies DCT to each block. This results in giving three frequency sub-bands: low frequency sub-band, mid-frequencysub-ban and high frequency sub-band. DCT-based watermarking is based on two facts. The first fact is that much of the signal energy lies at low-frequencies sub-band which contains the most important visual parts of the image. The second fact is that high frequency components of the image are usually removed through compression and noise attacks. The watermark is therefore embedded by modifying the coefficients of the middle frequency sub-band so that the visibility of the image will not be affected and the watermark will not be removed by compression [10,11,12,13] .
The DWT transform: Wavelets are special functions which, in a form analogous to sines and cosines in Fourier analysis, are used as basal functions for representing signals [7] . For 2-D images, 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. To obtain the next coarser scale of wavelet coefficients, the sub-band LL1 is further processed until some final scale N is reached. When N is reached we will have 3N+1 sub-bands consisting of the multi-resolution sub-bands LL N and LHx, HLx and HHx where x ranges from 1 until N.
Due to its excellent spatio-frequency localization properties, the DWT is very suitable to identify the areas in the host image where a watermark can be embedded effectively. In particular, this property allows the exploitation of the masking effect of the human visual system such that 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 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 ub-bands LHx and HLx where acceptable performance of imperceptibility and robustness could be achieved [14,15,16,17,18,19,20] .

THE COMBINED DCT-DWT ALGORTIHM
The watermark embedding procedure is depicted in Fig. 1 followed by a detailed explanation.
Step 1: Apply DWT to decompose the cover host image into four non-overlapping multi-resolution sub-bands: LL 1 , HL 1 , LH 1 , and HH 1 .
Step 2: Apply DWT again to sub-band HL 1 to get four smaller sub-bands and choose the HL 2 sub-band as shown in Fig. 2 a. Or, apply DWT to sub-band HH 1 to get four smaller sub-bands and choose the HH 2 sub-band as shown in Fig. 2
Step 4: Apply DCT to each block in the chosen sub-band (HL 2 or HH 2 ) .
Step 5: Re-formulate the grey-scale watermark image into a vector of zeros and ones.
Step 6: Generate two uncorrelated pseudorandom sequences. One sequence is used to embed the watermark bit 0 (PN_0) and the other sequence is sued to embed the watermark bit 1 (PN_1). Number of elements in each of the two pseudorandom sequences must be equal to the number of mid-band elements of the DCT-transformed DWT sub-bands.
Step 7: Embed the two pseudorandom sequences, PN_0 and PN_1, with a gain factor , in the DCT transformed 4x4 blocks of the selected DWT sub-bands of the host image.
Embedding is not applied to all coefficients of the DCT block, but only to the mid-band DCT coefficients. If we donate X as the matrix of the midband coefficients of the DCT transformed block, then embedding is done as follows: If the watermark bit is 0 then otherwise, if the watermark bit is 1 then, Step 8: Apply inverse DCT (IDCT) to each block after its mid-band coefficients have been modified to embed the watermark bits as described in the previous step.
Step 9: Apply the inverse DWT (IDWT) on the DWT transformed image, including the modified sub-band, to produce the watermarked host image. The watermark extraction procedure is depicted in Fig. 3, and described in details in the following steps. The combined DWT-DCT algorithm is a blind Step 1: Apply DWT to decompose the watermarked image into four non-overlapping multi-resolution subbands: LL 1 , HL 1 , LH 1 , and HH 1 .
Step 2: Apply DWT to HL 1 to get four smaller subbands, and choose the sub-band HL 2 , as shown in Fig. 2 a. Or, apply DWT to the HH 1 sub-band to get four smaller sub-bands, and choose the HH 2 sub-band , as shown in Fig. 2
Step 4: Apply DCT to each block in the chosen sub-band (HL 2 or HH 2 ), and extract the mid-band coefficients of each DCT transformed block.
Step 5: Regenerate the two pseudorandom sequences (PN_0 and PN_1) using the same seed used in the watermark embedding procedure.
Step 6: For each block in the sub-band HL 2 (or HH 2 ) , calculate the correlation between the mid-band coefficients and the two generated pseudorandom sequences (PN_0 and PN_1). If the correlation with the PN_0 was higher than the correlation with PN_1, then the extracted watermark bit is considered 0, otherwise the extracted watermark is considered 1. Step 7: Reconstruct the watermark using the extracted watermark bits, and compute the similarity between the original and extracted watermarks.

PERFORMANCE EVALUATION
We evaluated the performance of the combined DWT-DCT image watermarking algorithms using a 512×512 'Lena' as the original cover host image, and a 256×256 grey-scale image of the expression 'copyright' as the watermark image. The two images are shown in Fig. 4 and 5, respectively.

Performance Evaluation Metrics:
Watermarking algorithms are usually evaluated with respect to two metrics: imperceptibility and robustness [21] . The two metrics are described below.  Imperceptibility: Imperceptibility means that the perceived quality of the host image should not be distorted by the presence of the watermark. As a measure of the quality of a watermarked image, the peak signal to noise ratio (PSNR) is typically used. PSNR in decibels (dB) is given below in Eq. 5.

(5)
Robustness: Robustness is a measure of the immunity of the watermark against attempts to remove or degrade it, internationally or unintentionally, by different types of digital signal processing attacks [22] . In this chapter, we will report on robustness results which we obtained for three major digital signal processing operations (attacks): Gaussian noise, image compression and image cropping. The three attacks are a few, however, they are good representatives of the more general attacks. That is the Gaussian noise is a watermark degrading attack, JPEG compression is a watermark removal attack and cropping is a watermark dispositioning geometrical attack. We measured the similarity between the original watermark and the watermark extracted from the attacked image using the correlation factor ρ given below in Eq. 6.
where N is the number of pixels in watermark, w and wˆ are the original and extracted watermarks respectively. The correlation factor ρ may take values between 0 (random relationship) to 1 (perfect linear relationship). In general, a correlation coefficient of about 0.75 or above is considered acceptable.
Performance results: We carried out the watermark embedding algorithm described in the previous section. Applying the 1-level DWT of the 'Lina' image produced four 256256 sub-bands; LL 1 , LH 1 , HL 1 and HH 1 . Since embedding the watermark beyond the first DWT level is more effective, we decided to embed the watermark in HL 2 (or HH 2 ). The selected 128×128 sub-band was divided into 4×4 blocks giving a total of 1024 blocks. The DCT transform was then applied to each block in the chosen sub-band, after which the watermark was embedded according to Eq. 3 and 4.

Imperceptibility:
We evaluated imperceptibility of the combined DWT-DCT algorithm by measuring PSNR for the HL 2 and HH 2 sub-bands. HL 2 gave a PSNR value of 97.072 while HH 2 gave 97.083. The difference is small between the two PSNR values indicating comparable performance of the two sub-bands. In contrast, and as shown in Table 1, the difference between the PSNR values of the DWT-Only and the combined DWT-DCT algorithms is relatively large. This indicates that improvement in imperceptibility can be achieved by applying DCT on a DWT transformed HL 2 (or HH 2 ) sub-band. Table 2 shows the correlation values between the original watermark and the watermarks extracted from sub-bands HL 2 and HH 2 after being subjected to different attacks, independently.

Robustness:
The correlation values given in Table 2 show clearly that the combined DWT-DCT watermarking algorithm outperforms the conventional DWT-Only approach with respect to robustness against the Gaussian noise and cropping attacks. The results are better regardless of whether the watermark was embedded in HL 2 or HH 2 , however, HH 2 gave better    Figure 6 shows the extracted watermarks from HH 2 when DWT-Only was used. In contrast, the better combined DWT-DCT results are shown in Figure 7 which shows the extracted watermarks from the HH 2 sub-band. As given in Table 2 and illustrated in Fig. 8 and 9, the robustness of the DWT-Only approach against the JPEG compression attack is better than that of the combined DWT-DCT algorithm. This is due to the fact that the DCT is the core component of the JPEG compression, and therefore applying DCT at a DCTtransformed image degraded the quality of the embedded watermark greatly.

RESULTS AND DISCUSSION
We described the performance of the combined DWT-DCT watermarking algorithm. For the sake of comparison, we also evaluated the watermarking performance when DWT-Only was used. The results we obtained for the DWT-Only approach indicated a better imperceptibility performance was obtained when the watermark was embedded in the HL 2 or HH 2 subbands. The robustness performance, however, was not acceptable. To improve performance, we combined DWT with the another equally powerful transform; the DCT. The combined DWT-DCT watermarking algorithm's imperceptibility performance was better than the performance of the DWT-Only approach. Moreover, the improvement in robustness brought by the combined DWT-DCT algorithm was considerably high.

CONCLUSIONS
The discrete wavelet transform (DWT) and the discrete cosine transform (DCT) have been applied successfully in many in digital image watermarking. In this paper, we described a combined DWT-DCT digital image watermarking algorithm. 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. In conclusion, in DWT-based digital watermarking applications, combining appropriate transforms with the DWT may have a positive impact on performance of the watermarking system.