You are on page 1of 5

An Optimal Wavelet-based Image Watermarking via Genetic Algorithm

Ning Zhong, Zunwen He, Jingming Kuang, Zhihai Zhuo


(The Advanced Communication Lab, Department of Electronic Engineering, School of
Information Science and Technology, Beijing Institute of Technology, Beijing 100081, China)


Abstract

In watermarking system designing, there are always
encounter two conflicting objectives: robustness and
invisibility. It is difficult to satisfy them at same time.
Traditional watermarking algorithm often solve this
problem by choosing parameters via experience, it always
be inefficient. We resolve the problem by using genetic
algorithm (GA) to obtain the optimized solution. With a
proper fitness function in the watermarking system, GA
search for the optimal parameters to improve the
performance of watermarking algorithm. The simulation
results show that both watermark robustness and
invisibility can be achieved under different attack
schemes.


1. Introduction

With the rapid development of computer networks,
multimedia distribution via the Internet has become very
popular. Ironically, because Internet is an open
environment, if these multimedia items are not protected
with some effective mechanism, they may easily be
illegally embezzled and altered by attackers
[1]
. Therefore,
the enforcement of multimedia copyright protection has
become a very important issue. Digital watermarking has
been developed to protect various kinds of digital contents
against illegal use as a promising technique
[2]
, and it has
been regarded as an effective solution. An effective image
watermarking requires for robustness and invisibility.
Unfortunately, since they conflict with each other, a
watermarking system is difficult to satisfy each other. In
our study, we found the performance of image
watermarking promotion can be viewed as an
optimization problem. A way to improve the performance
of watermarking schemes is to make use of artificial
intelligence techniques. Genetic Algorithm is an
optimization and search technique based on the principles
of genetics and natural selection
[3]
. It start with an initial
population of chromosomes (individuals) generated at
random. The individuals evolve though successive
iterations, called generations. During each generation,
each individual in the population is evaluated using a
fitness function. The procedure continues until the
termination condition is satisfied
[4]
. Many previous works
have shown that the digital wavelet transform (DWT)
provides a good spatial-frequency characteristic
[5-6]
, it can
enhance the robust performance of the watermark
efficiently, and DWT provides an excellent tool to model
the Human Visual System (HVS)
[7]
. Therefore, in our
work, we embed watermark in DWT domain, with a
proper fitness function, GA are employed to search for the
optimal parameter of embedding strength and times of
Arnold transform to improve the performance of
watermarking. The simulation results show that the
proposed algorithm can improve both quality of
watermarked image and robustness of watermark.
This paper is organized as follows: After proposing an
image watermarking algorithm in DWT domain combined
with Arnold transform in section 2, we demonstrate the
Optimization with Genetic Algorithm in section 3.
Section 4 illustrates the simulation results. The
experimental result using various watermark attacks show
that our proposed method can improve the quality of the
watermarked image and give almost the same robustness
of watermarking. We conclude this paper in Section 5.

2. Watermarking Algorithm

2.1 Watermark embedding algorithm

Let N
I
N
I
be the size of original image I, and let N
w

N
w
be the size of embedded binary-valued watermark W.
In order to enhance the safety and robustness, we
process the original image I with Arnold transform to
obtain the scrambled image
'
I . The transform is a process
of clipping and splicing that realign the pixel matrix of
digital image. The Arnold transform is shown as follow
[8]

( )
' 1,1
mod
' 1, 2
x x
N
y y
=



, (1)
where x and y are the pixel position of original image,
' x and ' y are the pixel position of scrambled image. N is
the height or width of the image processed. The transform
Third International Conference on Natural Computation (ICNC 2007)
0-7695-2875-9/07 $25.00 2007
Authorized licensed use limited to: CENTRE FOR DEVELOPMENT OF ADVANCED COMPUTING. Downloaded on March 10,2010 at 06:58:34 EST from IEEE Xplore. Restrictions apply.
changes the pixel position for several times, a scrambled
image can be generated as follow
1
', ' ,
(mod )
T T
x y x y
p p N
+
= A , (2)
where
,
T
x y
p and
1
', '
T
x y
p
+
are pixel of original image and
scrambled image respectively, A is Arnold transform
matrix, T is times of Arnold transform.
A scrambled image is shown in Figure 1.


(a) Original image (b) Scrambled image
(For 3 times)

Figure 1. Original Lena image and the scrambled image

With a secret key, we get two pseudo-random
sequences p and q:
{ } { }
r
| 1, 1 , 0 1
k k
p p p k c = (3)
{ } { }
r
| 1, 1 , 0 1
k k
q q q k c = (4)
where
2
r I w
( / 4 ) c N N = is the length of pseudo-random
sequence.
We shape p and q into square matrix P and Q by Z
scan and modulated W using P and Q. The expression for
modulated matrix M is written
w
w
w w w w
11 12 1
21 22 2
1 2
N
N
N N N N



=






M

"
"
# # # #
"
, (5)
w w
, , 1, 2,..., ; 1, 2,...,
, 0
,
, 1
ij ij
ij
ij
ij
i N j N
w
w
w
= =
=
=

W M M
P
M
Q
,
(6)
We perform 2-level wavelet decomposition with the
Haar wavelet on the scrambled image
'
I . To balance of
robustness and invisibility, we embed the watermark into
subbands HL2 and LH2. 2-level horizontal coefficient
matrix H denotes subband HL2, and 2-level vertical
coefficient matrix L denotes subband LH2. H and L are
divided into
2
w
N non-overlapping blocks
ij
H and
ij
L
w w
( =1,2,..., ; =1,2,..., ) i N j N respectively. Watermark are
embedded into blocks
ij
H and
ij
L , we then have
2
w
N new
non-overlapping blocks
'
ij
H and
'
ij
L as follow
w w
'
=1, 2, ..., ; =1, 2, ..., ,
ij ij ij
i N j N = + H H M , (7)
w w
'
ij
=1, 2, ..., ; =1, 2, ..., ,
ij ij
i N j N = + L L M , (8)
where is embedding strength of the watermark.
The watermarked matrix
'
H and
'
L are written
w
w
w w w w
' ' '
11 12 1
' ' '
21 22 2 '
' ' '
1 2
...
...
...
N
N
N N N N



=




H H H
H H H
H
H H H
# # # #
, (9)
w
w
w w w w
' ' '
11 12 1
' '
21 22 2 '
'
1 2
...
...
...
N
N
N N N N



=




'
' '
L L L
L L L
L
L L L
# # # #
, (10)
A 2-level inverse DWT and an inverse Arnold
transform are performed to generate the watermarked
image.

2.2 Watermark extraction algorithm

The watermark extraction process is the inverse
procedure of the watermark embedding process. At the
receiver end, the secrete key is required during watermark
extraction process. With the key, p and q are reproduced.
Thus, square matrix P, Q can be obtained. An Arnold
transform is performed on watermarked image. 2-level
wavelet decomposition with the Haar wavelet is
performed on the scrambled watermarked image. We
divide 2-level horizontal coefficient matrix
''
H and 2-level
vertical coefficient matrix
''
L into
2
w
N non-overlapping
blocks
''
ij
H and
''
ij
L
w w
( =1,2,..., ; =1,2,..., ) i N j N
respectively.
Watermark extraction is completed by calculating the
correlation between coefficient matrix and square matrix
P, Q respectively. The correlation property
0
ij
c and
1
ij
c are
defined as
w w
''
=0 =0
0
''
, { , }
N N
ij
ij ij ij ij
i j
c

=


P F
F H L
P P
, (11)
w w
'' ''
=0 =0
1
, { , }
N N
ij
ij ij ij ij
i j
c

=


Q F
F H L
Q Q
, (12)
The extracted value
'
ij
w can be evaluated as follow
Third International Conference on Natural Computation (ICNC 2007)
0-7695-2875-9/07 $25.00 2007
Authorized licensed use limited to: CENTRE FOR DEVELOPMENT OF ADVANCED COMPUTING. Downloaded on March 10,2010 at 06:58:34 EST from IEEE Xplore. Restrictions apply.
w w
0 1
1 0
'
1, 2, ... ; 1, 2,...
0,
,
1,
ij ij
ij ij
ij
i N j N
c c
w
c c
= =
>
=
>

, (13)
The extracted watermark matrix
e
W is written
w
w
w w w w
' ' '
11 12 1
' ' '
21 22 2
e
' ' '
1 2
...
...
...
N
N
N N N N
w w w
w w w
w w w



=




W
# # # #
. (14)
The watermark embedding and extraction process is
described in Figure 2.


Figure 2. watermark embedding and extraction process

3. Optimization with Genetic Algorithm

In our work, we apply GA to obtain the optimized
watermarking performance. There are two parameters to
be considered: embedding strength ( ) and times of
Arnold transform (T ). We need to balance the impacts
caused by both factors. Therefore, the searching objective
function is designed by using two factors related to
robustness and invisibility of a watermarking algorithm.
The detail of the GA training process is described as
follow:
1) Chromosome Encoding: There are 20 chromosomes
used in this work. The chromosomes are encoded using
binary string encoding scheme. Each chromosome
consists of two parameters and T to be searched.
2) Fitness function: By properly selecting the fitness
function in GA training, we can optimize both the
watermarked image quality and the robustness of the
watermarking algorithm. For the invisibility measure, we
calculate peak signal-to-noise Ratio (PSNR) value of the
watermarked image. The higher the PSNR value, the
better the invisibility of watermark. We calculate the
Normalized Cross-correlation (NC) between the
embedded watermark and the extracted one which has
been attacked. The higher the NC value, the better the
robustness of the watermark. PSNR and NC lie on
parameters and T, the higher the value, the lower the
PSNR value but the higher the NC value. In Arnold
transform, higher T value is used to gain high robustness
performance, but if the error is arisen during watermark
extraction process, high T value may lower the quality of
the watermarked image. Therefore, the proper and T
should be searches. In the GA training process, the fitness
function can be evaluated as follow
p PSNR NC
1
i
i
n
i
f = r ( ,T ) + v ( ,T )
n

, (15)
where n is the number of attacking schemes,
PSNR
r is
value of PSNR,
NC
i
v is value of NC,
p
and
i
are the
weight factor for
PSNR
r and
NC
i
v respectively. (The
relationship
p
1
1.0
n
i
i

=
+ =

must hold). Each weighting


factor represents how important each index is during the
searching process of GA. In our work, three attacks are
chosen to evaluate the robustness and invisibility of the
embedded watermark. They are JPEG2000, Gaussian
noise addition and cropping. Since both robustness and
invisibility are equally important in our work, we assign
the value of 0.0217 to
p
, and the value of 0.3261 to
i
(i=1, 2, 3). In order to gain the optimal performance of
the watermarking system, we should maximize f after
GA training.
3) Selection, crossover and mutation: In our work, the
fitness-proportionate selection is employed for the
selection process of GA. Crossover operation is mainly
for exchanging information from two chromosomes. If the
crossover operation can provide a good offspring, a
higher fitness value can be reached in less iteration.
Mutation operation is to change genes of chromosomes.
For each generation, the best chromosomes are partially
replaced. After the operation of selection, crossover and
mutation, a new population is generated. GA training
process is repeated until the most fitness chromosomes
(parameters and T) are found. The diagram of our
proposed optimal algorithm of applying GA is shown in
Figure 3.
Third International Conference on Natural Computation (ICNC 2007)
0-7695-2875-9/07 $25.00 2007
Authorized licensed use limited to: CENTRE FOR DEVELOPMENT OF ADVANCED COMPUTING. Downloaded on March 10,2010 at 06:58:34 EST from IEEE Xplore. Restrictions apply.
PSNR
r
1
NC
v
2
NC
v
NCn
v
Figure 3. Algorithm of applying GA

4. Simulation results and Discussions

4.1. Results of GA Optimization

To verify the performance of the proposed algorithm,
we perform simulation on five well-known images with
size of 512512 and a watermark with size of 3232.
The probability of crossover and mutation is chosen to be
0.8 and 0.005 respectively. After training for 50
generations in GA, we obtain the optimal embedding
strength and times of Arnold transform T . The
resulting parameters from GA optimization of five test
images are shown in the Tab.1. These parameters are
varied to achieve the most suitable for different
characteristics.

Tab.1. Resulting parameters from GA optimization

4.2. Invisibility and Robustness Test

We test the invisibility and robustness of the watermark
by embedding the watermark into the original image with
the resulting parameters from GA training. Then the
watermarked images go through three attacking methods
mentioned above. The Original image Lena and test
results of it are shown in Figure 4. The results of
experiments on other testing images are shown in Tab.2
and the watermarked versions of these images are shown
in Figure 5.


(a) original image (b) watermarked image
and Watermark and extracted watermark
PSNR=41.7570dB, NC=0.9628


(c)Gaussian noise addition (d) JPEG2000
(m=0, var=0.5) (Compress ration=0.25)
PSNR=5.5136dB, NC=0.7135 PSNR=37.0937dB, NC=0.9416


(e)Cropping test
PSNR= 9.0989dB, NC=0.9177

Figure 4. Original image of Lena and test results

Tab.2.PSNR and NC values of four testing


(a) Lake, (b) Baboon,
PSNR=40.5785dB PSNR=39.7114dB
NC=0.9611 NC=0.9495

(c) Milkdrop, (d) Woman,
PSNR=40.7171dB PSNR=41.0440dB
NC=0.9680 NC=0.9670
Figure 5. Watermarked versions of different testing
images
Image
T
Lena
9.0582 2.9103
Lake
9.2733 2.0264
Baboon
8.6917 2.1320
Milk drop
9.3015 2.0261
Woman
8.9726 2.9737
NC
v
Image

PSNR
(dB) r

Gaussian
Noise
addition
JPEG2000
compression

Cropping
Lake 40.5785 0.7030 0.9203 0.9127
Baboon 39.7114 0.7099 0.9087 0.9003
Milk
drop
40.7171 0.6909 0. 9143 0.9159
Woman 41.0440 0.7018 0.9406 0.8991
Third International Conference on Natural Computation (ICNC 2007)
0-7695-2875-9/07 $25.00 2007
Authorized licensed use limited to: CENTRE FOR DEVELOPMENT OF ADVANCED COMPUTING. Downloaded on March 10,2010 at 06:58:34 EST from IEEE Xplore. Restrictions apply.

4.3. Compare with previous works

The results obtained from our proposed method, which
is called GA_opt, is compared with the results of optimal
algorithm
[9]
, which is called Verge_opt. Figure 6 shows
watermarked versions of different methods and extracted
watermarks of compression attack. It shows that the result
of GA_opt with PSNR 41.7570dB is not distinguishable
from the original one. Although the quality of Verge_opt
watermarked image is little better than our algorithm, the
Compression testing of GA_opt method gains more
compression resisting stability.

Verge_opt GA_opt
PSNR=42.9048dB PSNR= 41.7570dB
NC= 0.7012 NC=0.9416
Figure 6. Watermarked versions of different methods and
extracted watermarks of compression attack

5. Conclusions

A wavelet-based watermarking technique via GA is
proposed in our study. The motivation of proposing the
algorithm is to improve the performance of watermarking
algorithm. Different from traditional inefficient method,
during GA optimization process, our method can search
for optimal parameters of each given image according to
different application requirements. So the genetic
watermarking system could be used in practice. The
simulation result using various watermark attacks show
that the proposed method can improve the quality of the
watermarked image and give almost the same robustness
of the watermarking.

References

[1] Jonathan K. S, Bernd G. Power-spectrum condition for
energy-efficient watermarking. IEEE Transactions on
Multimedia, 2002, 4(4):551-560
[2] Dipti P. M, Subhamoy M, Scott T. A. Spatial domain
digital watermarking of multimedia objects for buyer
authentication. IEEE Transactions on Multimedia, 2004,
6(1):1-15
[3] XIA F. Z, HUANG D.H, FANG C.Y. Structural
optimization design of -shaped arched aqueduct based
on genetic algorithm. Journal of Wuhan University of
Hydraulic and Electric Engineering, 2005, 38(1): 23-26
(in Chinese)
[4] Prayoth. K, Kitti. A, Arthit. S. A new approach for
optimization in image watermarking by using genetic
algorithms. IEEE Transaction on Signal Processing, 2005,
53(12): 4707-4719
[5] Felix C. A, Rutger L. C, Sidney B. A new framework
for complex wavelet transforms. IEEE Transactions on
Signal Processing, 2003, 51(7): 1825-1837
[6] LIU Q, NI G. Q. Automatic Image Registration
Algorithm Based on Wavelet Transform. Journal of
Beijing Institute of Technology, 2006, 15(4): 437- 442
[7] Jose F, Elias S. M. Discrete wavelet transform: data
dependence analysis and synthesis of distributed memory
and control array architectures. IEEE Transactions on
Signal Processing, 1997, 45(5): 1291-1308
[8] Yang Y. L, Cai N, Ni G. Q. Digital Image Scrambling
Technology Based on the Symmetry of Arnold Transform.
Journal of Beijing Institute of Technology, 2006, 15(2):
216-219
[9] Ma Miao, The watermarking algorithm based on
MATLAB http://www.9fh.com/lunwen/wa-ok/jsj4/1-
36.htm.2005. (In Chinese).

Third International Conference on Natural Computation (ICNC 2007)
0-7695-2875-9/07 $25.00 2007
Authorized licensed use limited to: CENTRE FOR DEVELOPMENT OF ADVANCED COMPUTING. Downloaded on March 10,2010 at 06:58:34 EST from IEEE Xplore. Restrictions apply.

You might also like