A New Digital Watermarking Algorithm Based on DWT-DCT-RLC

The paper presents an imperceptible and robust digital watermarking algorithm using a combination of the DWT-DCT , which improves the robustness via using new embedding strategy. Apply 4-level DWT to the host image. Then, DCT transform of each directional middle frequencies DWT subband is computed; A binary watermarked logo is coded by Run-Length Code(RLC);The watermark bits are embedded in the coefficients of the DCT block based on the energy of each corresponding to coefficient in the highest level selected using the value of RLC. Performance evaluation show that the proposed scheme is invisible and robust against common image manipulations like JPEG compression, noise adding, sharpening, filtering.


I Introduction
Image watermarking is the process of embedding the ownership information into host data so that intellectual copyrights can be identified.Along with the rapid growth of novel watermarking schemes, various attacking attempts have also been developed to destroy watermarking [1] .Such attacks as median filtering, compression, noise, and cropping, can easily make most of existing watermarking schemes ineffective.This is mainly due to the fact that slight manipulation for the marked image could desynchronizes the location of the watermark and causes incorrect watermark detection.In other words, the detection or extraction of the watermark requires a synchronization step to locate the embedded mark in the content.Recent contributions have shown that image adaptive watermarking schemes can be successfully implemented by changing some coefficients of transform domain.Commonly used frequency-domain watermarking schemes are the discrete cosine transform (DCT) [2] -based, the discrete wavelet transform (DWT) [3,4] -based and Discrete Fourier Transform (DFT) [5] -based.DWT typically provide higher imperceptibility and are much more robust to image process due to its excellent spatial localization and multi-resolution characteristics, which are similar to the theoretical models of the human visual system.Further performance improvements in DWT-based digital image watermarking algorithms could be obtained by combining DWT with DCT [6,7] .
In this paper, we will propose a digital image watermarking algorithm based on DWT-DCT domain and RLC.Encoding binary watermark logo by Run-Length Code;the binary watermark image are embedded in the low-middle frequency coefficients of selected DCT blocks according to the RLC.The idea of applying RLC is based on the fact that RLC of binary watermarking image could favor the orientation of embedded watermarking imformation, so that effective watermarking approaches could acquire.

II Theory A.Run Length Code
Run-length code (RLC) is a very simple form of data compression in which runs of data (that is, sequences in which the same data value occurs in many consecutive data elements) are stored as a single data value and count, rather than as the original run.This is most useful on data that contains many such runs: for example, simple graphic images such as icons, line drawings, and animations.
For example,consider a screen containing plain black text on a solid white background.There will be many long runs of white pixels in the blank space, and many short runs of black pixels within the text.Fig. 1 shows a row of the image with g representing pixel value and l representing the run length of pixels whose gray value are g .
If we apply the run-length code (RLC) data compression algorithm to the above hypothetical scan line shown as Fig. 1, we get the following: 8g 4g 12g 7g 15g 9g 5g .This is to be interpreted as eight W's, four B, twelve W's, seven B's, etc.The run-length code represents the original 60 characters in only 16.In fact, the actual format used for the storage of images is generally binary image.Binary data files can be compressed with this method which can take advantage of runs of strings of characters.

B.Discrete Wavelet Transform(DWT)
The discrete wavelet transform (DWT) is a powerful tool signal processing for its multi-resolutional possibilities.Unlike the Discrete Fourier transform, the DWT is suitable for application to non-stationary signals with transitory phenomena, where frequency of the signal varies with respect to time.The wavelet coefficients obtained after DWT represent a measure of similarity in the frequency content between a signal and a chosen wavelet function.These coefficients are computed as a convolution of the signal and the scaled wavelet function.For 2-D images, applying DWT corresponds to processing the image by 2-D filters in each dimension.For each decomposition level the half band high-pass filter forming the wavelet function produces the details(LF subbands ),the complementary half band lowpass filter representing the scaling function produces the approximations(HF subbands).Approximations provide the global information from the signal whereas details provide the fine information from the signal.
By analyzing, we find that DWT is very suitable to identify the subbands in the host image where a watermark can be embedded effectively.If we modify only the high-frequency(HF) subband coefficients to embed the watermark, the low-frequency(LF)coefficients will not be affected.Considering a watermarking scheme that embeds watermark into HF subbands, the watermark will be removed easily when the watermarked image is attacked by image processing methods which destroy the HF of the image;Watermark is embedded in LF subbands,however, it makes the scheme easily perceptible.In order to ensure the visual quality and robustness of the image which watermark is embedded into, the watermark should be embedded into the low-middle frequency subbands.It is well known that even after the wavelet decomposition,typically there still exists some correlation between the wavelet coefficients, especially those corresponding to the same spatially local region at the same scale.This correlation between the coefficients corresponding to different frequencies but the same spatial location could be removed based on the Discrete Cosine Transform(DCT) technique and the energy of the image could be further concentrated, leading to an embedding domain that permits the embedding of larger watermark energy, which in turn lead to better perceptual transparency and getting improved robustness.In the paper, applying 4*4 block DCT to the 2 nd level wavelet coefficients in all directions,where a 4*4 block coefficients in one direction subband correspond to one coefficient in the same spatial location of its upper two level subbands.Embedding watermark is carried out by modifying DCT low-middle frequency coefficients.This approach makes the watermark less visible and more robust to some common image processes than embedding watermarks in only DWT or DWT-DCT domain.
Advanced Engineering Forum Vol. 1

A.Embedding Procedure
To insure the security of digital watermarking information embedded into the host images, and to further enhance the robustness of digital watermarking algorithm, original binary watermarking image are coded with Run-length code(RLC).Applying DCT to The watermark embedding in the DWT domain is implemented through the following procedures: (1)The host image is carried out two-dimensional decomposition of four layers DWT shown as Fig. 3, namely it is first decomposed into (5) According to the recorder in the step 4, select DCT blocks and insert the binary watermark bits w into the image,the coeffients of the DCT blocks selected are modified by Eq.( 1) and Eq.( 2

B.Extraction Procedure
The watermark extraction is the inverse process of watermark embedding.The test image is DWT decomposed,then DCT is applied, the procedure is described in details as the following steps: (1)Perform DWT on the test image to decompose it into thirteen nonoverlapping multi-resolution coefficient sets: ), calculate the coefficients with Eq.(3) to gain watermark ' w .where σ is a very small threshold.(7) Compute by Eq.( 4)the similarity between the original and extracted watermarks.
The correlation factor ρ may take values between 0 to 1.In general, a correlation coefficient of about 0.75 or above is considered acceptable.
w i j w i j w w w i j w i j

IV Experimental Results
In this section the results of our study is shown.Several experiments are done to evaluate the effectiveness of the presented watermarking algorithm, a 512×512 'Lena' is taken as the original host image,a 32×32 binary image, as shown in Fig 4(a) is taken as the watermark of image.In the paper, the three 128×128 DWT subbands are divided into 4×4 blocks , 1024 watermark bits are embedded into the coefficients of the selected 1024 blocks in our image.The performance of the watermarking methods under consideration is investigated by measuring their imperceptible and robust capabilities.For the imperceptible capability, Peek Signal-to-Noise Ratio (PSNR), is employed to evaluate the difference between an original image and a watermarked image; For the robust capability, the correlation values ( ρ ) measures the difference between an original watermark w and the corresponding extracted watermark ' w .We evaluated imperceptibility of the proposed algorithm by measuring PSNR.As shown in Fig. 4(b)-(d), the difference among the PSNR values of the DWT-Only(reference [3]) and the DWT-DCT-Only (reference [7])and the presented algorithm is relatively large.This indicates that   1 show clearly that the proposed algorithm outperforms the conventional DWT-Only approach and DWT-DCT-Only approach with respect to robustness against the Gaussian noise and compression and cropping attacks .Advanced Engineering Forum Vol. 1 Fig. 5(a)-(b) display the extracted watermarks when the test image was subjected to Gaussian noise attacks with sigma 0.03 and 0.07,respectively;Fig. 5(c)-(d) show the watermarked image is manipulated by using a JPEG compression with parameter Q 30 and 70, respectively; Fig. 5(e)-(f) illustrate the watermarked image is cropped by 10*10 and 20*10, respectively.In contrast, the better results are shown in the bottom in Fig. 5 which shows the extracted watermarks using the proposed method.it is evident that the proposed method outperforms the other methods with regards to these attacks for 'lena' image.

V. Conclusion
We propose a new content-based image watermarking scheme.The scheme belongs to the class of second generation watermarking schemes whose advantages include automatic resynchronization and exclusion of unreliable template embedding.Our major contribution is two-fold: Firstly, compared with other watermarking algorithms reported in the literature, the proposed scheme is more robust and has a higher PSNR of the watermarked image.The method can successfully resist to many attacks; Secondly, we achieve synchronization against attacks by using RLC of the watermark logo to record those coefficients which the watermark information are embedded.Experimental results demonstrate that the proposed scheme outperforms DWT-Only-based and DWT-DCT-Only-based both in terms of the invisibility and robustness.This work was supported by Scientific Research Program of Shaanxi Provincial Education Department(2010JK700).

Fig. 1 a
row of the image with RLC representing Fig.2 Watermark embedding process are the 2nd and 3nd coeffient in the each DCT blocks.(6)Apply inverse DCT (IDCT in Fig2) on the modified DCT blocks to obtain the changed wavelet coefficients.(7) Performing inverse DWT (IDWT in Fig 2) on the varied image coefficients and obtaining a watermarked image.

2 HH 2 LH and 2 HH ). ( 4 )( 5 ) 4 HL , 4 LH , 4 HH 2 LH and 2 HH
into 4 x 4 blocks.(3)Apply DCT to each block in the selected coefficient sets ( 2 HL , Code the same binary logo using RLC which is used in the watermark embedding procedure.Contrast 3 coefficients corresponding to the value of RLC in the coefficient sets: ,and record the directional subbuand relevant to the maximum coefficient.(6) For each block in the coefficient sets: ( 2 HL ,

2 LH and 2 HH
Watermark logo (b) Original Image (c) DWT-Only (d)DWT-DCT-Only (e)The proposed method Fig.4 Comparison between original images and their corresponding watermarked images improvement in imperceptibility can be achieved by applying DCT on a DWT transformed 2 HL , subband based on RLC.

Fig. 5
Fig.5 Extracted watermarks from the attacked test image using DWT,DWT-DCT and the proposed scheme,respectively(top to bottom).

Table 1
shows the correlation values between the original watermark and the watermarks extracted from sub-bands

Table 1 :
Correlation values due to image prosessing attacks