You are on page 1of 5

DIGITAL IMAGE WATERMARKING USING DISCRETE WAVELET TRANSFORM: PERFORMANCE COMPARISON OF ERROR CORRECTION CODES

Nataa Terzija, Markus Repges, Kerstin Luck, Walter Geisselhardt Faculty of Engineering Sciences, Institute of Information Technology, Gerhard-Mercator-Universitt Duisburg, Duisburg, Germany {nterzija,m.repges,k.luck}@uni-duisburg.de watermark. The encoded data streams are embedded into an image by a DWT based watermarking method. After running several attacks on the watermarked image the influence of the ECCs are compared and evaluated. Error correction codes used were the (7,4)-Hamming code, the (15,7)-BCH and (15,7)-Reed-Solomon code, respectively. By considering these ECCs we try to find a tradeoff between the number of bits to be embedded and the number of bit errors that can be corrected. The advantage of the Hamming code is that the number of bits to be embedded (294) is less than that one the BCH (315) and Reed-Solomon code (360) require. Whereas the Hamming code allows to correct only one error, the BCH and Reed-Solomon code allow correction of two and four errors, respectively. After embedding the watermark several attacks were executed on the images to investigate the influence of the error correction codes. To run the attacks the MATLAB program Checkmark has been used. Checkmark consists of about six categories of attacks [5]. We focus on template removal, denoising and compression attacks. The denoising attacks are represented by several filtering attacks using, for instance, a Gaussian or a Wiener filter. The compression attacks contain several JPEG and Wavelet compressions. Considering these compressions we include the mostly used image transformations in our investigations. The paper is organized as follows. In section 2 the main idea of the Discrete Wavelet Transformation is introduced. Section 3 consists of the description of the watermarking method that is used to embed information into an image. The method is based on the DWT. A short overview of the attacks that are used to destroy the watermark and that are part of the program Checkmark is given in section 4. In section 5 the embedding method and the error correction codes applied are considered and their impact on the robustness of the encoded watermarks is presented. In the following section 6 we draw a conclusion and give an outlook.

Abstract. In this paper the influence of different error correction codes on the robustness of image watermarks is investigated. To encode the watermark three different error correction codes are considered: the Hamming, the BCH and the Reed-Solomon code. Following the idea of the JPEG2000 standard the encoded watermark is embedded by a method based on Discrete Wavelet Transform (DWT). Availability of the original image is presumed for extraction. The sensitivity against attacks on the watermarked image is investigated. The types of attacks applied are: the removal, denoising and compression attack. It is shown that the Hamming and the Reed-Solomon code yield better results than the BCH code. Due to the higher correction capability the ReedSolomon code behaves better than the Hamming code. Keywords: Robust image watermarking, discrete wavelet transform, error correction codes, attacks. 1. Introduction
With the development of the JPEG2000 standard digital image watermarking schemes that are based on Discrete Wavelet Transform (DWT) are becoming more and more interesting. The majority of watermarking schemes consider Discrete Cosine Transform (DCT) as the method of choice. An overview can be found in [1]. Though, there is evidence that DWT could enhance robustness of the watermark against intentional and unintentional attacks, work based on DWT for watermarking is comparatively rare but exists, e.g. [2]. The reason mainly being that the former JPEG standard relied on DCT. With the advent of JPEG 2000 schemes based on DWT are gaining interest. Though, watermark robustness varies with the underlying transform algorithms, provisions must be taken to harden a watermark against attacks. Ways are, e.g. multiple embedding [3] and the application of error correction codes (ECC) [4] are in use to regain the embedded watermark. Robustness of watermarking schemes being far from satisfactory this paper investigates application of DWT in conjunction with ECC. In this paper three different error correction codes are applied to the ASCII representation of the text "Universitaet Duisburg" being used as

2. Discrete Wavelet Transform (DWT)


The basic idea of DWT for one-dimensional signals is briefly described. A signal is split into two parts, usually

the high frequency and the low frequency part. This splitting is called decomposition. The edge components of the signal are largely confined to the high frequencies part. The signal is passed through a series of high pass filters to analyze the high frequencies, and it is passed through a series of low pass filters to analyze the low frequencies. Filters of different cutoff frequencies are used to analyze the signal at different resolutions. Let us suppose that x[n] is the original signal, spanning a frequency band of 0 to rad/s. The original signal x[n] is first passed through a halfband highpass filter g[n] and a lowpass filter h[n]. After the filtering, half of the samples can be eliminated according to the Nyquists rule, since the signal now has the highest frequency of /2 radians instead of . The signal can therefore be subsampled by 2, simply by discarding every second sample. This constitutes one level of decomposition and can mathematically be expressed as follows:
yhigh [k ] = x[k ]g[2k n]
n

An example of such H() and G() is given by


H ( ) = 1 1 j + e 2 2

and
G ( ) = 1 1 j e 2 2

which is known as the Haar wavelet filters. The DWT and IDWT for an one-dimensional signal can be also described in the form of two channel treestructured filterbanks. The DWT and IDWT for a twodimensional image x[m,n] can be similarly defined by implementing DWT and IDWT for each dimension m and n separately DWTn[DWTm[x[m,n]], which is shown in Figure 1.
H*() n G*() n H*() n G*() n 2 n 2 n 2 n 2 n

x[m,n]

H*() m

2 m

and
ylow [k ] = x[k ]h[2k n]
n

G*() m

2 m

where yhigh[k] and ylow[k] are the outputs of the highpass and lowpass filters, respectively, after subsampling by 2. The above procedure can be repeated for further decomposition. The outputs of the highpass and lowpass filters are called DWT coefficients and by these DWT coefficients the original image can be reconstructed. The reconstructed process is called the Inverse Discrete Wavelet Transform (IDWT). The above procedure is followed in reverse order for the reconstruction. The signals at every level are upsampled by two, passed through the synthesis filters g[n], and h[n] (highpass and lowpass, respectively), and then added. The analysis and synthesis filters are identical to each other, except for a time reversal. Therefore, the reconstruction formula becomes (for each layer)

Figure 1 DWT for two-dimensional images [2] An image can be decomposed into a pyramidal structure, which is shown in Figure 2, with various band information: low-low frequency band LL, low-high frequency band LH, high-low frequency band HL, highhigh frequency band HH.

LL2 LH2

HL2 HL1 HH2

LH1

HH1

x[n] = ( y high [k ]g[n + 2k ] + y low [k ]h[n + 2k ]).


n

To ensure the above IDWT and DWT relationship the following orthogonality condition on the filters H() and G() must hold:
| H()|2 + |G()|2 = 1

Figure 2 Pyramidal structure

3. Embedding Method based on DWT


Watermarking in the DWT domain can be split into the two procedures: embedding of the watermark and extraction of the watermark. For embedding a bit stream is transformed into a sequence w(1)...w(L) by replacing the 0 by 1, where L is the length of the bit stream and w(k) {-1,1} (k=1,...,L). This sequence is used as the watermark.

where

H ( ) = h[n]e jn
n

and
G ( ) = g[n]e jn
n

The original image is first decomposed into several bands using the discrete wavelet transformation with the pyramidal structure. Decomposition is performed through two decomposition levels using the Haar filter. The watermark is added to the largest coefficients in all bands of details which represent the high and middle frequencies of the image. Let f(m,n) denote the DWT coefficients which are not located at the approximation band LL2 of the image. The embedding procedure is performed according to the following formula: f(m,n) = f(m,n) + f(m,n)w(k), where is the strength of the watermark controlling the level of the watermark w(1)...w(L). By this, DWT coefficients at the lowest resolution which are located in the approximation band are not modified. The watermarked image is obtained by applying the inverse discrete wavelet tansform (IDWT). In the watermark extraction procedure both the received image and the original image are decomposed into the two levels. It is assumed that the original image is known for extraction. The extraction procedure is described by the formula wr(k)=(fr(m,n)-f(m,n))/(f(m,n)), where fr(m,n) are the DWT coefficients of the received image. Due to noise added to the image by attacks or transmission over the communication channel the extracted sequence wr(1)...wr(L) consists of positive and negative values. Hence, it is better to take the extracted watermark as: we(k)=sgn(wr(k)). After extraction of the watermark the bit stream is reconstructed according to the replacement rule at the beginning. Figure 3 shows the block diagram of the embedding method.
X' message encode w1...wL embedding f(m,n) DWT X-original image f(m,n) IDWT attacks Xr

4. Watermark attacks
To investigate the robustness of the encoded watermark some alterations have to be made to the watermarked image. The alterations are caused by using the MATLAB program Checkmark. Checkmark consists of six categories of attacks: Denoising, denoising followed by perceptual remodulation (DPR), denoising followed by bending, copy attack, template removal and compression [5]. We neglect the copy attack and the denoising followed by bending and focus on the remaining categories. The denoising attacks are several filtering attacks as Gaussian filter, Wiener filter etc.. The Wiener Filtering, the Hard Thresholding and the Soft Thresholding are considered as MAP estimates corresponding to a Gaussian image, gamma goes to 0 in the generalized Gaussian model, and a Laplacian image. The noise i.e. the embedded data is assumed to be Gaussian [6]. The median, midpoint and trimmed mean filtering are considered as ML estimates. The Sharpening is a high pass filter that is applied to the image to accentuate edges. And the Gaussian filters are applied to the image to blur and to remove noise [7]. By running an attack using Thresholding the image is converted from grayscale to black and white. Denoising and remodulation with different windows for Wiener filtering and denoising and remodulation assuming a correlated watermark belong to the DPR attacks. For the template removal attack the template composed of peaks and used to recover the watermark is considered. The watermark is estimated, the peaks are detected and then removed. Finally a small transformation is applied [5]. The compression attacks consist of several JPEG and wavelet compressions. By considering all these compressions we include most of the alterations of the image that result from standard image processing operations. The image is JPEG-compressed with varying quality factors where the bit rate decreases as the quality factor decreases. Compression with varying bitrates using JPEG2000 wavelet compression and, in particular, the JASPER compression program [7] is also investigated. All these attacks can be part of intentional and unintentional alterations of the watermarked image.

Xr DWT

fr(m,n) extraction f(m,n) DWT

wr1... wrL sgn(wr)

we1... weL decode

extracted message

5. Experiments and results


For the experiments a picture of the university (Fig. 4) is converted into grayscale values. The message Universitaet Duisburg is converted into ASCII code. The German umlaut is changed into ae to be able to use only seven-bit ASCII instead of eight-bit ASCII values. This allowed the use of (15,7)-BCH and Reed Soloman code. The resulting bits are embedded in four different ways: without ECC and protected by Hamming, BCH and Reed-Solomon code. The embedding is done in

original watermark w1...wL X-original image

X - watermarked image Xr - received image, distorted after attacks

Figure 3 Block diagram of the embedding method

all bands shown in the pyramidal structure except for the approximation band LL2.

errors can be obtained by using band LH2 and HL2. Conclusion from results is that the gain in robustness from Hamming is better than with BCH. According to the highest error correction capability Reed-Solomon shows the best results. If the error rate is not greater than 1%, BCH is able to reconstruct the embedded message correctly. With the Hamming code an error rate of up to 2% can be tolerated and for Reed-Solomon even rates of up to 4 and 5% allowed extraction of the correct message. The ECCs considered are not able to deal with error rates greater than 10-20%. It is possible that a shorter codeword length is more suitable for the use of ECC in watermarking. To verify or disprove this assumption more tests with shorter ReedSolomon codes are necessary.

30%

Figure 4 University of Duisburg


25%

without ECC Hamming BCH


20%

In the uncoded version we implement 147 bits according to 21 characters 7 bits. In the Hamming scheme we use a Hamming code with a codeword length of 7 bits and a message length of 4 bits. According to this code format the uncoded message is 168 bits instead of 147 bits long. The Hamming coded watermark has an amount of 294 bits. For the BCH and the Reed-Solomon code is again the 147 bit-long message used. The encoded watermark length for BCH is 315 bits, the one for Reed-Solomon is 360 bits. Both codes use a codeword length of 15 bits and a message length of 7 bits. This means that with Reed-Solomon coding more than twice as much bits have to be inserted than without ECC which may result in problems with the capacity of the watermarked image. This problem, however, can be solved by spreading the watermark over some bands. The resulting four images are manipulated by some attacks using Checkmark as described in section 4. These attacks are chosen under the prerequisite that the image size has to be kept. The extraction of the watermark is done separately for every band so that the correctness of the watermark does not depend on the other bands. The compression methods are a problem for the watermark only for higher compression rates, especially for LH2 and HL2. An error-free watermark is also obtained for the images after Template Removal, Gaussian and Wiener Filtering and Hard Thresholding. The error rate with the other attacks is so high that the capabilities of the ECCs are difficult to evaluate. Three diagrams give an overview of the impact of ECC according to the different attacks in LH2. Diagrams 1 and 2 show the compression methods and diagram 3 deals with some other attacks. Not all of the performed attacks are shown because the error amount is too high to gain useful results. The best results with the least number of

Reed-Solomon

Errors

15%

10%

5%

0% JPG50 JPG40 JPG30 JPG25 JPG15 JPG10


WVC20 WVC10

Attacks

Diagram 1 Impact of ECCs after JPEG compression


60%

without ECC
50%

Hamming BCH Reed-Solomon

40%

Errors

30%

20%

10%

0% WVC80 WVC60 WVC50 WVC40 WVC30

Attacks

Diagram 2 Impact of ECCs after Wavelet compression

60%

without ECC
50%

according to error correction capability. Additionally, convolutional codes may be part of further research.

Hamming BCH Reed-Solomon

References:
[1] [2]

40%

30%

20%

[3]

10%

0% gauss1 gauss2 sharp hard1 wien1 wien2 hard2 tprem soft1 soft2

[4]

Attacks

Diagram 3 Impact of ECCs after several other attacks

6. Conclusion and outlook


In this paper a method for improving the robustness of digital image watermarks is investigated. For small error rates and a distribution of the errors according to the chosen error capabilities the considered ECCs can be used effectively to improve the robustness of the watermark. Although the ratio of error correction capability and codeword length is almost the same BCH behaves worse than Hamming code and according to the higher ratio the Reed-Solomon code behaves best. For some applications Hamming code could be preferable because with Hamming code there are less bits to be embedded. The use of error correction codes for digital watermarking is still an open problem. It requires the design of codes which are able to take into account many different kinds of attacks. We are currently investigating the impact of different codeword lengths with same ratio

[5]

[6] [7] [8]

[9]

S. Katzenbeisser, Information Hiding (Boston, London: Artech House, 2000) X. Xia, C.G. Boncelet and G.R. Arce, Wavelet tranform based watermark for digital images, Optics Express, Vol. 3, No. 12, December 1998. R.Dugad, K.Ratakonda, and N. Ahuja, A new wavelet-based scheme for watermarking images, Proceedings of the IEEE International Conference on IImage Processing, ICIP 1998, Chicago, IL, USA, October 1998. S. Baudry, J.-F. Delaigle, B. Sankur, B. Macq and H. Matre, Analyses of error correction strategies for typical communication channels in watermarking, Signal Processing, Vol. 81, no. 6, June 2001, pp. 1239-1250. S.Voloshynovskiy, S. Pereira, V. Iquise and T. Pun, Attack Modelling: Towards a Second Generation Watermarking Benchmark, Signal Processing, Special Issue: Information Theoretic Issues in Digital Watermarking, May 2001. I. Daubechies, Ten Lectures on Wavelets, (SIAM, Philadelphia, 1992) http://watermarking.unige.ch/Checkmark/ J.R. Hermndez, F. Prez-Gonzlez and J.M. Rodrguez, The impact of channel coding on the performance of spatial watermarking for copyright protection, IEEE ICASSP '98, Seatle, USA, Vol. 5, May 1998, pp. 2973-2976. S. Voloshynovskiy, M. Madueno, S. MarchandMaillet and T. Pun, Second generation benchmarking and application oriented evaluation, Information Hiding, Third International Workshop, Pittsburg, PA, USA, April 2001.

Errors

You might also like