digital image watermarking using discrete wavelet transform
digital image watermarking using discrete wavelet transform
digital image watermarking using discrete wavelet transform
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
DIGITAL IMAGE WATERMARKING USING DISCRETE WAVELET TRANSFORM:<br />
PERFORMANCE COMPARISON OF ERROR CORRECTION CODES<br />
Nataša Terzija, Markus Repges, Kerstin Luck, Walter Geisselhardt<br />
Faculty of Engineering Sciences, Institute of Information Technology,<br />
Gerhard-Mercator-Universität Duisburg, Duisburg, Germany<br />
{nterzija,m.repges,k.luck}@uni-duisburg.de<br />
Abstract. In this paper the influence of different error<br />
correction codes on the robustness of <strong>image</strong> watermarks is<br />
investigated. To encode the watermark three different<br />
error correction codes are considered: the Hamming, the<br />
BCH and the Reed-Solomon code. Following the idea of<br />
the JPEG2000 standard the encoded watermark is<br />
embedded by a method based on Discrete Wavelet<br />
Transform (DWT). Availability of the original <strong>image</strong> is<br />
presumed for extraction. The sensitivity against attacks on<br />
the watermarked <strong>image</strong> is investigated. The types of<br />
attacks applied are: the removal, denoising and<br />
compression attack. It is shown that the Hamming and the<br />
Reed-Solomon code yield better results than the BCH<br />
code. Due to the higher correction capability the Reed-<br />
Solomon code behaves better than the Hamming code.<br />
Keywords: Robust <strong>image</strong> <strong>watermarking</strong>, <strong>discrete</strong><br />
<strong>wavelet</strong> <strong>transform</strong>, error correction codes, attacks.<br />
1. Introduction<br />
With the development of the JPEG2000 standard <strong>digital</strong><br />
<strong>image</strong> <strong>watermarking</strong> schemes that are based on Discrete<br />
Wavelet Transform (DWT) are becoming more and more<br />
interesting. The majority of <strong>watermarking</strong> schemes<br />
consider Discrete Cosine Transform (DCT) as the method<br />
of choice. An overview can be found in [1]. Though, there<br />
is evidence that DWT could enhance robustness of the<br />
watermark against intentional and unintentional attacks,<br />
work based on DWT for <strong>watermarking</strong> is comparatively<br />
rare but exists, e.g. [2]. The reason mainly being that the<br />
former JPEG standard relied on DCT. With the advent of<br />
JPEG 2000 schemes based on DWT are gaining interest.<br />
Though, watermark robustness varies with the<br />
underlying <strong>transform</strong> algorithms, provisions must be<br />
taken to harden a watermark against attacks. Ways are,<br />
e.g. multiple embedding [3] and the application of error<br />
correction codes (ECC) [4] are in use to regain the<br />
embedded watermark.<br />
Robustness of <strong>watermarking</strong> schemes being far from<br />
satisfactory this paper investigates application of DWT in<br />
conjunction with ECC. In this paper three different error<br />
correction codes are applied to the ASCII representation<br />
of the text "Universitaet Duisburg" being used as<br />
watermark. The encoded data streams are embedded into<br />
an <strong>image</strong> by a DWT based <strong>watermarking</strong> method. After<br />
running several attacks on the watermarked <strong>image</strong> the<br />
influence of the ECCs are compared and evaluated.<br />
Error correction codes used were the (7,4)-Hamming<br />
code, the (15,7)-BCH and (15,7)-Reed-Solomon code,<br />
respectively. By considering these ECCs we try to find a<br />
tradeoff between the number of bits to be embedded and<br />
the number of bit errors that can be corrected. The<br />
advantage of the Hamming code is that the number of bits<br />
to be embedded (294) is less than that one the BCH (315)<br />
and Reed-Solomon code (360) require. Whereas the<br />
Hamming code allows to correct only one error, the BCH<br />
and Reed-Solomon code allow correction of two and four<br />
errors, respectively.<br />
After embedding the watermark several attacks were<br />
executed on the <strong>image</strong>s to investigate the influence of the<br />
error correction codes. To run the attacks the MATLAB<br />
program Checkmark has been used. Checkmark consists<br />
of about six categories of attacks [5]. We focus on<br />
template removal, denoising and compression attacks. The<br />
denoising attacks are represented by several filtering<br />
attacks <strong>using</strong>, for instance, a Gaussian or a Wiener filter.<br />
The compression attacks contain several JPEG and<br />
Wavelet compressions. Considering these compressions<br />
we include the mostly used <strong>image</strong> <strong>transform</strong>ations in our<br />
investigations.<br />
The paper is organized as follows. In section 2 the main<br />
idea of the Discrete Wavelet Transformation is<br />
introduced. Section 3 consists of the description of the<br />
<strong>watermarking</strong> method that is used to embed information<br />
into an <strong>image</strong>. The method is based on the DWT. A short<br />
overview of the attacks that are used to destroy the<br />
watermark and that are part of the program Checkmark is<br />
given in section 4. In section 5 the embedding method and<br />
the error correction codes applied are considered and their<br />
impact on the robustness of the encoded watermarks is<br />
presented. In the following section 6 we draw a<br />
conclusion and give an outlook.<br />
2. Discrete Wavelet Transform (DWT)<br />
The basic idea of DWT for one-dimensional signals is<br />
briefly described. A signal is split into two parts, usually
the high frequency and the low frequency part. This<br />
splitting is called decomposition. The edge components of<br />
the signal are largely confined to the high frequencies<br />
part.<br />
The signal is passed through a series of high pass filters<br />
to analyze the high frequencies, and it is passed through a<br />
series of low pass filters to analyze the low frequencies.<br />
Filters of different cutoff frequencies are used to analyze<br />
the signal at different resolutions. Let us suppose that x[n]<br />
is the original signal, spanning a frequency band of 0 to π<br />
rad/s. The original signal x[n] is first passed through a<br />
halfband highpass filter g[n] and a lowpass filter h[n].<br />
After the filtering, half of the samples can be eliminated<br />
according to the Nyquist’s rule, since the signal now has<br />
the highest frequency of π/2 radians instead of π. The<br />
signal can therefore be subsampled by 2, simply by<br />
discarding every second sample. This constitutes one level<br />
of decomposition and can mathematically be expressed as<br />
follows:<br />
y [ k]<br />
x[<br />
k]<br />
g[<br />
2k<br />
− n]<br />
and<br />
where yhigh[k] and ylow[k] are the outputs of the highpass<br />
and lowpass filters, respectively, after subsampling by 2.<br />
The above procedure can be repeated for further<br />
decomposition.<br />
The outputs of the highpass and lowpass filters are<br />
called DWT coefficients and by these DWT coefficients<br />
the original <strong>image</strong> can be reconstructed. The reconstructed<br />
process is called the Inverse Discrete Wavelet Transform<br />
(IDWT).<br />
The above procedure is followed in reverse order for the<br />
reconstruction. The signals at every level are upsampled<br />
by two, passed through the synthesis filters g’[n], and<br />
h’[n] (highpass and lowpass, respectively), and then<br />
added. The analysis and synthesis filters are identical to<br />
each other, except for a time reversal. Therefore, the<br />
reconstruction formula becomes (for each layer)<br />
To ensure the above IDWT and DWT relationship the<br />
following orthogonality condition on the filters H(ω) and<br />
G(ω) must hold:<br />
where<br />
∑<br />
high<br />
∑<br />
= n<br />
∑<br />
y [ k]<br />
x[<br />
k]<br />
h[<br />
2k<br />
− n]<br />
low<br />
= n<br />
x[<br />
n]<br />
( y high [ k]<br />
g[<br />
−n<br />
+ 2k]<br />
+ y<br />
= n<br />
and<br />
low<br />
2<br />
2<br />
| H( ω)|<br />
+ |G( ω)|<br />
= 1<br />
∑<br />
H ( ω ) h[<br />
n]<br />
e<br />
= n<br />
∑<br />
= n<br />
− jnω<br />
G(<br />
ω ) g[<br />
n]<br />
e<br />
[ k]<br />
h[<br />
−n<br />
+ 2k])<br />
.<br />
− jnω<br />
An example of such H(ω) and G(ω) is given by<br />
1 1 − jω<br />
H ( ω)<br />
= + e<br />
2 2<br />
and<br />
1 1 − jω<br />
G(<br />
ω)<br />
= − e<br />
2 2<br />
which is known as the Haar <strong>wavelet</strong> filters.<br />
The DWT and IDWT for an one-dimensional signal can<br />
be also described in the form of two channel treestructured<br />
filterbanks. The DWT and IDWT for a twodimensional<br />
<strong>image</strong> x[m,n] can be similarly defined by<br />
implementing DWT and IDWT for each dimension m and<br />
n separately DWTn[DWTm[x[m,n]], which is shown in<br />
Figure 1.<br />
x[m,n]<br />
Figure 1 DWT for two-dimensional <strong>image</strong>s [2]<br />
An <strong>image</strong> can be decomposed into a pyramidal<br />
structure, which is shown in Figure 2, with various band<br />
information: low-low frequency band LL, low-high<br />
frequency band LH, high-low frequency band HL, highhigh<br />
frequency band HH.<br />
LL 2<br />
LH 2<br />
H*(ω) 2 ↓<br />
m m<br />
G*(ω)<br />
m<br />
LH 1<br />
2 ↓<br />
m<br />
HL 2<br />
HH 2<br />
H*(ω) 2 ↓<br />
n n<br />
G*(ω) 2 ↓<br />
n n<br />
H*(ω) 2 ↓<br />
n n<br />
G*(ω) 2 ↓<br />
n n<br />
HL 1<br />
HH 1<br />
Figure 2 Pyramidal structure<br />
3. Embedding Method based on DWT<br />
Watermarking in the DWT domain can be split into the<br />
two procedures: embedding of the watermark and<br />
extraction of the watermark.<br />
For embedding a bit stream is <strong>transform</strong>ed into a<br />
sequence w(1)...w(L) by replacing the 0 by –1, where L is<br />
the length of the bit stream and w(k)∈ {-1,1} (k=1,...,L).<br />
This sequence is used as the watermark.
The original <strong>image</strong> is first decomposed into several<br />
bands <strong>using</strong> the <strong>discrete</strong> <strong>wavelet</strong> <strong>transform</strong>ation with the<br />
pyramidal structure. Decomposition is performed through<br />
two decomposition levels <strong>using</strong> the ”Haar filter”. The<br />
watermark is added to the largest coefficients in all bands<br />
of details which represent the high and middle frequencies<br />
of the <strong>image</strong>. Let f(m,n) denote the DWT coefficients<br />
which are not located at the approximation band LL2 of<br />
the <strong>image</strong>. The embedding procedure is performed<br />
according to the following formula:<br />
f΄(m,n) = f(m,n) + αf(m,n)w(k),<br />
where α is the strength of the watermark controlling the<br />
level of the watermark w(1)...w(L). By this, DWT<br />
coefficients at the lowest resolution which are located in<br />
the approximation band are not modified. The<br />
watermarked <strong>image</strong> is obtained by applying the inverse<br />
<strong>discrete</strong> <strong>wavelet</strong> tansform (IDWT).<br />
In the watermark extraction procedure both the received<br />
<strong>image</strong> and the original <strong>image</strong> are decomposed into the two<br />
levels. It is assumed that the original <strong>image</strong> is known for<br />
extraction.<br />
The extraction procedure is described by the formula<br />
wr(k)=(fr΄(m,n)-f(m,n))/(αf(m,n)),<br />
where fr΄(m,n) are the DWT coefficients of the received<br />
<strong>image</strong>. Due to noise added to the <strong>image</strong> by attacks or<br />
transmission over the communication channel the<br />
extracted sequence wr(1)...wr(L) consists of positive and<br />
negative values. Hence, it is better to take the extracted<br />
watermark as:<br />
we(k)=sgn(wr(k)).<br />
After extraction of the watermark the bit stream is<br />
reconstructed according to the replacement rule at the<br />
beginning.<br />
Figure 3 shows the block diagram of the embedding<br />
method.<br />
message<br />
Xr<br />
w1...wL<br />
encode embedding<br />
fr(m,n)<br />
f(m,n)<br />
DWT<br />
f(m,n)<br />
wr1... wrL<br />
f‘(m,n)<br />
X-original <strong>image</strong><br />
IDWT<br />
X-original <strong>image</strong><br />
we1... weL<br />
DWT extraction sgn(wr) decode<br />
DWT<br />
original watermark<br />
w1...wL<br />
X’ - watermarked <strong>image</strong><br />
Xr - received <strong>image</strong>, distorted after attacks<br />
extracted<br />
message<br />
Figure 3 Block diagram of the embedding method<br />
X'<br />
attacks<br />
Xr<br />
4. Watermark attacks<br />
To investigate the robustness of the encoded watermark<br />
some alterations have to be made to the watermarked<br />
<strong>image</strong>. The alterations are caused by <strong>using</strong> the MATLAB<br />
program Checkmark. Checkmark consists of six<br />
categories of attacks: Denoising, denoising followed by<br />
perceptual remodulation (DPR), denoising followed by<br />
bending, copy attack, template removal and compression<br />
[5]. We neglect the copy attack and the denoising<br />
followed by bending and focus on the remaining<br />
categories.<br />
The denoising attacks are several filtering attacks as<br />
Gaussian filter, Wiener filter etc.. The Wiener Filtering,<br />
the Hard Thresholding and the Soft Thresholding are<br />
considered as MAP estimates corresponding to a Gaussian<br />
<strong>image</strong>, gamma goes to 0 in the generalized Gaussian<br />
model, and a Laplacian <strong>image</strong>. The noise – i.e. the<br />
embedded data – is assumed to be Gaussian [6]. The<br />
median, midpoint and trimmed mean filtering are<br />
considered as ML estimates. The Sharpening is a high<br />
pass filter that is applied to the <strong>image</strong> to accentuate edges.<br />
And the Gaussian filters are applied to the <strong>image</strong> to blur<br />
and to remove noise [7]. By running an attack <strong>using</strong><br />
Thresholding the <strong>image</strong> is converted from grayscale to<br />
black and white.<br />
Denoising and remodulation with different windows for<br />
Wiener filtering and denoising and remodulation<br />
assuming a correlated watermark belong to the DPR<br />
attacks.<br />
For the template removal attack the template composed<br />
of peaks and used to recover the watermark is considered.<br />
The watermark is estimated, the peaks are detected and<br />
then removed. Finally a small <strong>transform</strong>ation is applied<br />
[5].<br />
The compression attacks consist of several JPEG and<br />
<strong>wavelet</strong> compressions. By considering all these<br />
compressions we include most of the alterations of the<br />
<strong>image</strong> that result from standard <strong>image</strong> processing<br />
operations. The <strong>image</strong> is JPEG-compressed with varying<br />
quality factors where the bit rate decreases as the quality<br />
factor decreases. Compression with varying bitrates <strong>using</strong><br />
JPEG2000 <strong>wavelet</strong> compression and, in particular, the<br />
JASPER compression program [7] is also investigated.<br />
All these attacks can be part of intentional and<br />
unintentional alterations of the watermarked <strong>image</strong>.<br />
5. Experiments and results<br />
For the experiments a picture of the university (Fig. 4) is<br />
converted into grayscale values. The message<br />
“Universitaet Duisburg” is converted into ASCII code.<br />
The German umlaut “ä” is changed into “ae” to be able to<br />
use only seven-bit ASCII instead of eight-bit ASCII<br />
values. This allowed the use of (15,7)-BCH and Reed<br />
Soloman code. The resulting bits are embedded in four<br />
different ways: without ECC and protected by Hamming,<br />
BCH and Reed-Solomon code. The embedding is done in
all bands shown in the pyramidal structure except for the<br />
approximation band LL2.<br />
Figure 4 University of Duisburg<br />
In the uncoded version we implement 147 bits according<br />
to 21 characters à 7 bits. In the Hamming scheme we use<br />
a Hamming code with a codeword length of 7 bits and a<br />
message length of 4 bits. According to this code format<br />
the uncoded message is 168 bits instead of 147 bits long.<br />
The Hamming coded watermark has an amount of 294<br />
bits. For the BCH and the Reed-Solomon code is again<br />
the 147 bit-long message used. The encoded watermark<br />
length for BCH is 315 bits, the one for Reed-Solomon is<br />
360 bits. Both codes use a codeword length of 15 bits and<br />
a message length of 7 bits.<br />
This means that with Reed-Solomon coding more than<br />
twice as much bits have to be inserted than without ECC<br />
which may result in problems with the capacity of the<br />
watermarked <strong>image</strong>. This problem, however, can be<br />
solved by spreading the watermark over some bands. The<br />
resulting four <strong>image</strong>s are manipulated by some attacks<br />
<strong>using</strong> Checkmark as described in section 4. These attacks<br />
are chosen under the prerequisite that the <strong>image</strong> size has<br />
to be kept. The extraction of the watermark is done<br />
separately for every band so that the correctness of the<br />
watermark does not depend on the other bands. The<br />
compression methods are a problem for the watermark<br />
only for higher compression rates, especially for LH2 and<br />
HL2. An error-free watermark is also obtained for the<br />
<strong>image</strong>s after Template Removal, Gaussian and Wiener<br />
Filtering and Hard Thresholding. The error rate with the<br />
other attacks is so high that the capabilities of the ECCs<br />
are difficult to evaluate.<br />
Three diagrams give an overview of the impact of ECC<br />
according to the different attacks in LH2. Diagrams 1 and<br />
2 show the compression methods and diagram 3 deals<br />
with some other attacks. Not all of the performed attacks<br />
are shown because the error amount is too high to gain<br />
useful results. The best results – with the least number of<br />
Errors<br />
Errors<br />
30%<br />
25%<br />
20%<br />
15%<br />
10%<br />
errors – can be obtained by <strong>using</strong> band LH2 and HL2.<br />
Conclusion from results is that the gain in robustness from<br />
Hamming is better than with BCH. According to the<br />
highest error correction capability Reed-Solomon shows<br />
the best results. If the error rate is not greater than 1%,<br />
BCH is able to reconstruct the embedded message<br />
correctly. With the Hamming code an error rate of up to<br />
2% can be tolerated and for Reed-Solomon even rates of<br />
up to 4 and 5% allowed extraction of the correct message.<br />
The ECCs considered are not able to deal with error rates<br />
greater than 10-20%.<br />
It is possible that a shorter codeword length is more<br />
suitable for the use of ECC in <strong>watermarking</strong>. To verify or<br />
disprove this assumption more tests with shorter Reed-<br />
Solomon codes are necessary.<br />
5%<br />
0%<br />
60%<br />
50%<br />
40%<br />
30%<br />
20%<br />
10%<br />
0%<br />
JPG50<br />
without ECC<br />
Hamming<br />
BCH<br />
Reed-Solomon<br />
JPG40<br />
JPG30<br />
Attacks<br />
Diagram 1 Impact of ECCs after JPEG compression<br />
WVC80<br />
without ECC<br />
Hamming<br />
BCH<br />
Reed-Solomon<br />
WVC60<br />
WVC50<br />
WVC40<br />
Attacks<br />
Diagram 2 Impact of ECCs after Wavelet compression<br />
JPG25<br />
WVC30<br />
JPG15<br />
WVC20<br />
JPG10<br />
WVC10
Errors<br />
60%<br />
50%<br />
40%<br />
30%<br />
20%<br />
10%<br />
0%<br />
gauss1<br />
without ECC<br />
Hamming<br />
BCH<br />
Reed-Solomon<br />
gauss2<br />
wien1<br />
wien2<br />
tprem<br />
Attacks<br />
Diagram 3 Impact of ECCs after several other attacks<br />
6. Conclusion and outlook<br />
In this paper a method for improving the robustness of<br />
<strong>digital</strong> <strong>image</strong> watermarks is investigated. For small error<br />
rates and a distribution of the errors according to the<br />
chosen error capabilities the considered ECCs can be used<br />
effectively to improve the robustness of the watermark.<br />
Although the ratio of error correction capability and<br />
codeword length is almost the same BCH behaves worse<br />
than Hamming code and according to the higher ratio the<br />
Reed-Solomon code behaves best. For some applications<br />
Hamming code could be preferable because with<br />
Hamming code there are less bits to be embedded.<br />
The use of error correction codes for <strong>digital</strong><br />
<strong>watermarking</strong> is still an open problem. It requires the<br />
design of codes which are able to take into account many<br />
different kinds of attacks. We are currently investigating<br />
the impact of different codeword lengths with same ratio<br />
sharp<br />
hard1<br />
hard2<br />
soft1<br />
soft2<br />
according to error correction capability. Additionally,<br />
convolutional codes may be part of further research.<br />
References:<br />
[1] S. Katzenbeisser, Information Hiding (Boston,<br />
London: Artech House, 2000)<br />
[2] X. Xia, C.G. Boncelet and G.R. Arce, Wavelet<br />
tranform based watermark for <strong>digital</strong> <strong>image</strong>s, Optics<br />
Express, Vol. 3, No. 12, December 1998.<br />
[3] R.Dugad, K.Ratakonda, and N. Ahuja, A new<br />
<strong>wavelet</strong>-based scheme for <strong>watermarking</strong> <strong>image</strong>s,<br />
Proceedings of the IEEE International Conference on<br />
IImage Processing, ICIP 1998, Chicago, IL, USA,<br />
October 1998.<br />
[4] S. Baudry, J.-F. Delaigle, B. Sankur, B. Macq and H.<br />
Maître, Analyses of error correction strategies for<br />
typical communication channels in <strong>watermarking</strong>,<br />
Signal Processing, Vol. 81, no. 6, June 2001, pp.<br />
1239-1250.<br />
[5] S.Voloshynovskiy, S. Pereira, V. Iquise and T. Pun,<br />
Attack Modelling: Towards a Second Generation<br />
Watermarking Benchmark, Signal Processing,<br />
Special Issue: Information Theoretic Issues in Digital<br />
Watermarking, May 2001.<br />
[6] I. Daubechies, Ten Lectures on Wavelets, (SIAM,<br />
Philadelphia, 1992)<br />
[7] http://<strong>watermarking</strong>.unige.ch/Checkmark/<br />
[8] J.R. Hermández, F. Pérez-González and J.M.<br />
Rodríguez, The impact of channel coding on the<br />
performance of spatial <strong>watermarking</strong> for copyright<br />
protection, IEEE ICASSP '98, Seatle, USA, Vol. 5,<br />
May 1998, pp. 2973-2976.<br />
[9] S. Voloshynovskiy, M. Madueno, S. Marchand-<br />
Maillet and T. Pun, Second generation benchmarking<br />
and application oriented evaluation, Information<br />
Hiding, Third International Workshop, Pittsburg, PA,<br />
USA, April 2001.