Journal of Software Engineering and Applications, 2013, 6, 58-61
doi:10.4236/jsea.2013.63b013 Published Online March 2013 (http://www.scirp.org/journal/jsea)
Copyright © 2013 SciRes. JSEA
A Watermarking Algorithm Based on Wavelet and
Hadamard Transform for Color Image
Hongshou Yan, Weimin Yang
College of Computer and Information Engineering, Central South University of Forestry & Technology, Changsha 410004, Hunan,
China.
Email: 165393586@qq.com, luan_yang@126.com
Received 2013
ABSTRACT
Digital image watermarking is a useful solution to the problem of information security, copyright and network secur ity.
In this paper, we propose a watermarking algorithm for color image based HT and DWT. A binary image as watermark
is embedded into green component or blue component of color image. The algorithm can satisfy the transparence and
robustness of the watermarking system very well. The experiment based on this algorithm demonstrates that the water-
marking is robust to the common signal processing techniques including JPEG compressing, adding noise, low pass
filter, and mosaic.
Keywords: Digital Watermarking; Hadamard Transform(HT); Discrete Wavelet Transform(DWT); Color Image;
Copyright Protection
1. Introduction
Today, as the digitization develops day by day, the pro-
tection of digital information becomes an urgent problem.
In order to resist different kinds of infringement, a new
technology that called watermarking had been put for-
ward to in the international scope. Watermark is se-
quence carrying information about the copyright owner
to embed into th e digital image [1], audios and vid eos in
order that owners can read it out while unauthorized us-
ers cannot1 easily remove it.
There are many methods to embed the watermark. It
can be divided into two classes: spatial-domain water-
marks and transform-domain watermarks. The spatial
domain is so simple that the watermark can be damaged
easily, but the transform-domain algorithm can be resist
intensity attack, watermark information can’t be dam-
aged easily. The transform algorithm includes chiefly
DWT, DFT and DCT[2,3,4]. Wavelet transform is supe-
rior to time-frequency transform for its inner predomi-
nance. For example, wavelet has the character of
multi-resolution, which can avoid the rectangle brought
by DCT. In fact, it has more application fields in engi-
neering and computer science. In this paper, a new blind
watermarking algorithm that embeds a meaningful binary
image into the color images is proposed based HT-DWT
according to HT and DWT characteristics.
The rest of the paper is organized as follows. Section 2
introduces the hadamard transform and discrete wavelet
transforms analysis in briefly. In section 3, a new blind
watermark algorithm for color image based HT-DWT
domain is presented in detail. Experimental results are
described in section 4. Finally, in section 5 the conclu-
sion is given.
2. Watermark Embedding Principles
2.1. Hadamard Transform Analysis
Hadamard transform by two values, namely 1 and -1,as a
basic function expand made that it satisfies the complete
orthogonal. Hadamard function is binary orthogonal
functional corresponding to the two states in digital logic,
and therefore more suitable for image processing hard-
ware to achieve a faster rate than other transform. It has
been widely used in the area of image processing and
image compression. Dimensional discrete Hadamard
transform positive transform and inverse transform, such
as the definition of formula (1) and (2) [5]:
1
0
11 (()() ()())
00
1
(,)(, )(1)
N
ii ii
i
NN bxbu bybv
xy
Huvf xy
N



 (1)
1
0
11 (()() ()())
00
1
(, )(,)(1)
N
ii ii
i
NN bxbu bybv
uv
fxy Huv
N



 (2)
(0,0)H is called image block the DC component ha-
damard transform domain. Using an interactive relation-
ship can generate higher order transform matrix of Ha-
A Watermarking Algorithm Based on Wavelet and Hadamard Transform for Color Image
Copyright © 2013 SciRes. JSEA
59
damard transform ,such as the formula (3) below.
122
2222
11
,,1,2,3,...
1
kk
k
kk
HH
HH k
HH







 
 (3)
2.2. Discret Wavelet Transform Principles
Wavelet transform is a time-frequency domain combined
analysis method. It has multi—resolution analysis fea-
tures. Each level of the wavelet decomposition has four
sub-images with same size. Let the k
LL stands for the
approximation sub-image and k
LH , k
H
L, k
H
Hstand
for the horizontal, vertical and diagonal direction high-
frequency detail sub-image respectively. Where the
variable 1,2,3,...( )kkN is the scale or the level of
the wavelet decomposition.
After wavelet decomposition, many signal processing,
such as compression and filter are likely to change the
high-frequency wavelet coefficients. If the watermark
sequence is embedded into this part, its information may
be lost in the processing in sequence, which will reduce
the robustness of the watermark [3]. In order to ensure
the watermark has a better imperceptibility and robust-
ness, the approximation sub-image 3
LL coefficients are
chosen to embed watermark. We can achieve the trans-
form of the separable wavelet as in Figure 1.
3. Proposed Watermarking Algorithm
Here, the readable watermark is a qq binary image.
We arrange the binary image to 0, 1 watermark sequence
wm. And the length of wm is the pq. Original image
is a mn color image.
3.1. Watermark Embedding Scheme
Step1 `A one-dimension chaotic sequence is originated
from a logistic mapping 1(1 )
nnn
X
uX X
 [4]. The
sequence has the same size as the length of the wm. Ap-
ply a threshold value, and then get 0-1 sequences A*.
The program performs a
X
OR operation of this wm
with the binary watermark image. 0
X
and u are pass-
word. The sequence of the binary watermark image after
encrypting is:
LL3 LH3
HL3 HH3
LH2
HL2 HH2
LH1
HL1 HH1
Figure 1. Three level wavelet decomposition.
(*,){() {0,1}|1}WXORAwmwii pq
  (4)
Step2 Extracting the green components (G) and the
from original color image. It is divided into square
blocks of size 88
pixels. Then the HT is applied in
each block. Then the DC value ,(1,1)
ij
H of each block
is collected together to get a new matrix
I
.
1, 111, 1
1,1 1,2
2,12,22, 1 12, 1
21121,221,1121,1
2,12,22, 112, 1
(1,1)(1,1) ...(1,1)(1,1)
(1,1)(1,1) ...(1,1)(1,1)
...... .........
, (1,1)(1,1)...(1,1)(1,1)
(1,1)(1,1) ...(1,1)
kk
kk
kk kkkk
kkkk kk
HHHH
HHH H
I
HHH H
HHHH
 
(1,1)
(5)
where, 1/8,2 /8knk m
Step3 Make the new matrix I to do a one-scale
two-dimension discrete wavelet transform with haar.
According to quantization step value s, make the low
coefficient LL to qualified adjustment, then embed the
watermark value. The detailed process is as follows:
The quantified value (, )qi j of the low-frequency
wavelet coefficient can be obtained by :
(, )(, )/qi jLLi js
(6)
The process of embedding watermark information is as
follows:
If mod((,),2)()qi jWk
, adjust the low-frequency
wavelet coefficient to
2/),(),(' ssjiqjiLL 
(7)
If mod( (,),2)()qi jWk
, adjust the low-frequency
wavelet coefficient to
If (,)(, )(0,/2)LLijqi jss

then '( ,)(( ,)1)/2LLijq ijss

else '(,)((,) 1)/2LLijq ijss

where, 1,2,...,/16,1,2,..., /16imjn
, 1, 2, 3, ...,kpq.
Step 4 Make wavelet inverse transform.
Step 5 The (1,1)
ij
H of each block can be obtained by
extracting the corresponding value the wavelet inverse-
transform matrix, then make HT inverse-transform each
sub-block. Chan ging the double-precision real number to
unsigned 8-bit integer. Thus, obtain the color compo-
nents in which watermark are embedded. Finally, we
transform the image from three-basic-color image into
true color RGB space. Then we will get the watermarked
color image.
3.2. Watermark Extracting Scheme
The processes of watermark extracting and embedding
are reverse. When extracting watermark, the detailed
ways is as follows:
Step1 Extracting the green components (G), it is di-
vided into 88
sub-block. Then the HT is applied in
each block. Then the DC value ,(1,1)
ij
H of each block
A Watermarking Algorithm Based on Wavelet and Hadamard Transform for Color Image
Copyright © 2013 SciRes. JSEA
60
is collected together to get a new matrix '
I
.
1,2,...,/8,1,2,..., /8imjn.
1,11,21, 111, 1
2,12,22, 1 12,1
2 1121,22 1, 112 1, 1
2,1 2,22
' (1,1)'(1,1)...'(1,1)'(1,1)
' (1,1)'(1,1)...'(1,1)'(1,1)
...... .........
'
',(1,1)'(1,1)...'(1,1)'(1,1)
'(1,1) '(1,1)...
kk
kk
kkkk kk
kk kk
HHH H
HHH H
I
HHH H
HH H
 
,11 2,1
(1,1)' (1,1)
kkk
H








(8)
where, 1/8,2 /8knk m
.
Step2 Make the matrix '
I
to do a one-scale
two-dimension discrete wavelet transform with haar, and
extract the watermark from low-frequency wavelet coef-
ficient LL. The detailed way is as follows:
(, )(,)/qi jLLi js

(9)
'( )mod( (,),2)Wk qij (10)
where, 1,2,...,/16,1,2,..., /16imjn, 1,2,3,...,kpq.
The word s refers to quantization step value, and
'( )Wk refers to extracted watermark sequences.
Step3 The watermark sequences which is extracted
carry on chaotically decryption. Then it can be trans-
formed into a binary image.
Here we use the normalized correlation (NC) to meas-
ure the similarity between original image W and the
detected watermark image 'W [6].
11
11
(, )'(, )
(, )(, )
nn
IJ
NN
ij
WijW ij
NC
Wij Wij



 (11)
In order to get rid of the impact of subjective factor,
this paper adopts peak signal-to-noise ratio (PSNR) to
measure the fidelity between the original image and the
image which watermark is embedded.
4. Experiment Results
In this paper, 400 512 3 true color lena image and
baboon image are selected as the original image and a
20 40 binary image is selected as the watermark im-
age. Lena image is embedded watermark in the blue
components after contrasting the green components with
the blue components. The quantization step value s is
106 in lena image.
Watermark image is embedded into the blue compo-
nents of lena image. The PSNR value of watermarked
image (Figure 2(c)) is 42.05, the NC value of extracted
watermark (Figure 2(d)) is 1.0. From Figure 2, the hu-
man eye may feel no difference between the original im-
age and the watermarked image. The algorithm can sat-
isfy the transparence.
In order to investigate the robustness of the water-
marking scheme, the watermarked image was attacked
by various signals processing technique, such as JPEG
compression, Additive gaussian noise, Additive salt
noise, Median filtering, image enhancement, mosaic and
other kinds of image processing approaches to attack the
watermarked image. Table 1 show the results of our
simulations and Figure 3 shows that it be extracted wa-
termark from being attacked watermarked lena image.
(a) (b)
(c) (d)
Figure 2. (a) original lena image ; (b) original watermark ;
(c) watermarked image; (d) extracted watermark.
Table 1. Test results of watermarked image.
lena
Test Methodparameter PSNR NC
Q=80 32.68 1.0000
Q=50 31.23 0.9936
JPEG
compression
Q=30 30.01 0.9488
Salt&pepper 1% 26.06 0.9981
Salt&pepper 2% 23.15 0.9855
Speckle noise 0.02 22.41 0.9976
Noise adding
Gaussian noise 0.01 21.19 0.9617
Gaussian lowpass (3×3) 32.01 1.0000
Median filtering (2×2) 28.62 0.9272Filtering
Median filtering (3×3) 31.84 0.9939
Edge sharppen 28.72 1.0000
Gaussian blurring 31.80 1.0000
image
enhancement
Moving blurring 27.10 0.9607
2×2 31.36 1.0000
3×3 28.04 1.0000Image mosaic
4×4 27.18 1.0000
A Watermarking Algorithm Based on Wavelet and Hadamard Transform for Color Image
Copyright © 2013 SciRes. JSEA
61
(a) (b) (c) (d) (e)
Figure 3. (a) JPEG compression Q=30; (b) Salt &pepper
noise 2%; (c) Gaussian noise 0.01; (d) Median filtering 2×2;
(e) Moving blurring.
5. Conclusions
In this paper, a new blind technique for embedding a
binary image into color digital image based on HT and
DWT has been propo sed, which is robu st to the common
signal processing techniques including JPEG compress-
ing, noise, low pass filter, median filter, image enhance
and mosaic. The algorithm is not only simply but also
valid. This blind watermarking algorithm can broaden its
application area.
6. Acknowledgment
This work was supported by the Science and technology
projects in Hunan Province(No.2010TZ4012)
REFERENCES
[1] I.J.Cox, J.Kilian, F.T.Leighton, and T.Shamoon, “Secure
spread spectrum watermarking for multimedia”, IEEE
Trans. Image Processing , vol .6, pp. 1673-1687, Decem-
ber 1997.
[2] G.Langelaarand, R.Lagendijk, “Optimal differential en-
ergy watermarking of DCT encoded images and video”,
IEEE Trans., vol .10,pp.148-158,January 2001.
[3] J.W.Huang, Yun Q.SHI, W.D.Cheng, “Image water-
marking in DCT: an embedding strategy and
algorithm” ,Journal of Electronic, vol .28,pp.57-60, April
2000
[4] Z.M.Zhang, L.Wang, “Semiblind image watermarking
algorithm in DCT domain with chaotic encryption”,
Computer Engineering, vol.29,pp. 9-11, October 2003.
[5] Pankaj U.Lande, Sanjay N.Talbar., “FPGA Implementa-
tion of Adaptive Watermarking Using Human Visual
Model”,.ICGST-PDCS Journal, vol.9,pp.17-21,January
2009
[6] L.C.Li, Z.Y.Lu, “Desynchronization attack on digital
watermarks and their counte measures,” Journal of image
and graphics, vol .10,pp.403-409, October 2005.