You are on page 1of 6

50 (IJCNS) International Journal of Computer and Network Security,

Vol. 2, No. 3, March 2010

Implementation of Watermarking for a Blind Image


using Wavelet Tree Quantization
S.M.Ramesh1, Dr.A.Shanmugam2, B.Gomathy3
1
Senior Lecturer, Dept.of ECE,
Bannari Amman Institute of Technology, Erode- 638401, India
smrameshme@yahoo.co.in
2
Professor, Dept.of ECE,
Bannari Amman Institute of Technology, Erode-638401, India
dras_bit@yahoo.com
3
Lecturer, Dept.of CSE,
Bannari Amman Institute of Technology, Erode- 638401, India
gomramesh@gmail.com

mid-frequency to ensure the transparency and robustness of


Abstract: This paper proposes implementation of
watermarking for a blind image using wavelet tree quantization the watermarked image. For suggested inserting the
for copyright protection. In such a quantization scheme, there watermark into the perceptually significant portion of the
exists a large significant difference while embedding a whole DCT transformed image, wherein a predetermined
watermark bit 1 and a watermark bit 0; it then does not require range of low frequency components excludes the DC
any original image or watermark during the watermark component.
extraction. As a result, the watermarked images look lossless in
This watermarking scheme has been shown to be robust
comparison with the original ones, and the proposed method can
effectively resist common image processing attacks; especially
against common attacks such as compression, filtering, and
for JPEG compression and low-pass filtering. Moreover, by cropping. The proposed a watermarking method, in
designing an adaptive threshold value in the extraction process, accordance with the multi-threshold wavelet coding
our method is more robust for resisting common attacks such as (MTWC), the successive subband quantization (SSQ) is
median filtering, average filtering, and Gaussian noise. adopted to search for the significant coefficients. The
Experimental results show that the watermarked image looks watermark is added by quantizing the significant coefficient
visually identical to the original, and the watermark can be
in the significant band by using different weights. The
effectively extracted even after either an unintentional image
processing or intentional image attacks. proposed a watermarking method based on the qualified
significant wavelet tree (QSWT). The QSWT is derived
Keywords - Wavelet tree quantization, JPEG compression, from the embedded zerotree wavelet algorithm (EZW). The
Low-pass filtering, Discrete Wavelet Transform.
watermark is embedded in each of the two subbands of the
wavelet tree. Several watermarking methods used two sets of
1. Introduction
coefficients, one to represent the watermark bit 0, and the
The Internet has popularized tremendously fast in our life in other to represent the watermark bit 1. According to the
the last decade. Due to the digitalization of documents, embedded watermark bit, only a set of coefficients are
images, music, videos, etc, people can access and propagate quantized each time. The proposed a blind watermarking
them easily via the network. The watermarking technique approach called differential energy watermarking. A set of
has been widely applied to digital contents for copyright several 8×8 DCT blocks are composed and divided into two
protection, image authentication, proof of ownership, etc. parts to embed a watermark bit. The high frequency DCT
This technique embeds information so that it is not easily coefficients in the JPEG/MPEG stream are selectively
perceptible; that is, the viewer cannot see any information discarded to produce energy differences in the two parts of
embedded in the contents. The issue here is the detection of the same set.
the existence of watermarks in the digital contents to prove The wavelet coefficients of the host image are grouped
ownership. The spatial and spectral domains are two into wavelet trees, and each watermark bit is embedded
common methods for watermarking. In the spatial domain, using two trees. One of the two trees is quantized with
the watermark is embedded in the selected areas on the respect to a quantization index, and both trees exhibit a
texture of the host image. In the spectral domain, since the large statistical difference between the quantized tree and
spread spectrum communication is robust against many the unquantized tree; the difference can later be used for
types of interference and jamming, the host image is watermark extraction. EL [10] improved SHW [11] method
transformed to the frequency domain using methods such as by adding the Human Visual System (HVS) to effectively
Discrete Cosine Transform (DCT) or Discrete Wavelet resist geometric attack. BKL [9] improved SHW [11]
Transform (DWT); then the watermark is embedded in the method by using four trees to represent two watermark bits
(IJCNS) International Journal of Computer and Network Security, 51
Vol. 2, No. 3, March 2010

to improve visual quality. One of the four trees is quantized difference is greater than the adaptive threshold value;
according to the binary value of the two embedded otherwise, a watermark bit 0 is extracted. Experimental
watermark bits. But these methods [9-11] cannot effectively results show that the proposed method is very efficient for
resist the attacks of low-pass filtering for JPEG resisting various kinds of attacks.
compression. In this paper, propose a blind watermarking
method based on wavelet tree quantization. 2. Watermarking by Quantization of Wavelet
Trees

2.1 Wavelet Trees


A host image of size n by n is transformed into wavelet
coefficients using the 4-level discrete wavelet transform
(DWT).With 4-level decomposition and have 13 frequency
bands as shown in Fig. 1. The parent-child relationship can
be connected between these sub nodes to form a wavelet
tree. If the root consists of more than one node, then an
image will have many wavelet trees after the DWT. In this
case, we have 3 sub bands LH4, HL4, and HH4 as roots, and
the total wavelet trees are 3×(n/24×n/24) after an image of
size n by n is transformed by a 4-level wavelet transform. A
higher resolution level (such as level 3 in Fig.1) has more
significant coefficients than a lower resolution level (such as
level 2 in Fig.1). As we can see, when n = 512, there are 85
Figure 1. The watermark embedding procedure.
coefficients for a wavelet tree constructed from a node in
LH4 to LH1 following the parent-child relationship. For
A watermarking technique is denoted as blind if the
avoiding attacks such as low pass filters, in our proposed
original image is not needed for extraction. In previous
method we only need the largest two coefficients; these two
research, the watermark embedded in the significant
coefficients are selected from one coefficient of LH4 and
coefficients was found to be robust. The common issue is the
four coefficients of the same orientation in the same spatial
use of blind detection to find out whether the extracting
location in LH3 as shown in Fig. 2.
order is the same as the embedding order. Hence, propose a
watermarking method which embeds a watermark bit in the
maximum wavelet coefficient of a wavelet tree. The 2.2 The Preprocess
With a four-level DWT and have 13 frequency bands as
proposed method is different from others, which use two
shown in Fig.1. A higher level subband is more significant
trees or two blocks to embed a watermark bit. We embed the
than a lower subband. Using the LL4 subband as a root is
watermark by scaling the magnitude of the significant
not suitable for embedding a watermark, since it is a low
difference between the two largest wavelet coefficients in a
frequency band that contains important information about
wavelet tree to improve the robustness of the watermarking
an image and easily causes image distortions. Embedding a
watermark in the HH4 subband is also not suitable, since the
subband can easily be eliminated, for example by a lossy
compression. The LH4 subband is more significant than the
HL4 subband, hence the LH4 subband has a higher priority
than the HL4 subband in the selection. A binary watermark
image W comprised of size Nw (≤ S = n/24×n/24) bits is
embedded. We represent each watermark bit as 1 or 0, and
use a 90 pseudorandom function with another seed to shuffle
Nw bits. According to the watermark bits embedded later, we
select Nw non-overlapping wavelet trees and compute the
global average significant difference of the total number of
the Nw wavelet trees using Eq.(1).

Figure 2. The watermark extraction procedure. 1 Nw


ε = { ------ ∑ (maxi – seci)} (1)
The trees are so quantized that they exhibit a sufficiently Nw i = 1
large enough energy difference between a watermark bit 1
and a watermark bit 0, which is then used for watermark Where ε is the global average significant difference in all
extraction. During extraction, an adaptive threshold value is Nw wavelet trees; {⋅} is the floor function; maxi is the local
designed. A watermark bit 1 is extracted if the significant maximum wavelet coefficient of the ith wavelet tree; seci is
52 (IJCNS) International Journal of Computer and Network Security,
Vol. 2, No. 3, March 2010

the local second maximum wavelet coefficient of the ith Otherwise, the embed a watermark bit 0 according to Eq. (7)
wavelet tree, 1≤ i ≤ Nw. If the embedded watermark bit is 1, as follows:
the local maximum coefficient is not quantized under if (seci < 0 ), than maxinew = 0, secinew = 0;
Maximum (ε ,T) Δi ≥ ε and is quantized under Δi <
Maximum (ε ,T) . If the embedded watermark bit is 0, the otherwise maxinew = seci (7)
local maximum coefficient is quantized by setting the local
maximum coefficient = local second maximum coefficient. Where secinew denotes the new second maximum coefficient
in the ith wavelet tree after embedding the watermark bit 0.
When embedding a watermark bit 1, the maximum local
2.3 Watermark Embedding
Let maxi and seci be the local maximum wavelet significant coefficient is quantized and added by an
incremental β if Δi < Maximum (ε, T); otherwise (i.e., Δi ≥
coefficient and the local second maximum wavelet
Maximum (ε, T)), it is kept the same as before. The reason
coefficient in a wavelet tree; the difference between both of
for not quantizing the maximum local significant coefficient
them is named as the local significant difference. The select is that we won’t increase the distortion of the image. Some
a threshold value β as an increment for quantization. The images having small ε imply that their significant difference
larger the β is, the better robustness but the worse distortion is not obvious. We need an extra parameter T to improve the
of the watermarked image will be. Each time at embed a robustness. The larger the T is, the higher probability the
watermark bit and quantize the maximum coefficient in a maxi is quantized to a larger value; but, in the meanwhile,
wavelet tree. the more distortion of the image will be as well. For
example, let ε =12 and Δi = 13. Suppose T is set to be less
if (maxi < 0), then maxi = 0 (2) than ε, such as T =11, maxi will not be quantized as Δi >ε
=12. On the other hand, if T is set to be larger than ε, such
Δi = maxi − seci, (3) as T =14, maxi will be quantized and increased by β as Δi
<T=14. On the contrary, when embedding a watermark bit
Where Δi denotes the significant difference between the 0, the value of maxi is quantized by decreasing to the local
maximum coefficient and the second maximum coefficient second maximum seci and hence the new Δi will be equal to
in the ith wavelet tree of Nw. Because some maximum 0. Based on this strategy, there exists a large 91 energy
coefficients in a wavelet tree may be a negative value, and a difference between embedding watermark bit 1 and
positive value has higher robustness than a negative value watermark bit 0.
under attacks, it will result in Δi more significant if we
modify the maximum coefficient from a negative value to a 3. Design of Watermark Decoder
positive value. When the Δi is more significant, it will be
more accurate at extracting watermark. To achieve the new 3.1 The Decoder Design
maximum coefficient be positive and to decrease the In the proposed method, neither an original image nor an
original watermark image is required for the extraction
distortion of watermarked image due to quantization, the
process. During the embedding process, embed a watermark
new maximum coefficient is set to a smallest positive value
bit 1 by adding an energy β (or β × γ ) to the local maximum
zero here.
wavelet coefficient in the wavelet tree, and embed a
When embed a watermark bit 1, the maxi is quantized by watermark bit 0 by setting maxi = seci Hence, if the
wavelet tree was embedded a watermark bit 0, the local
maxinew = maxi ,if (Δi ≥ Maximum (ε, T)) (4) significant difference between the largest two coefficients
will be close to zero; otherwise, if the wavelet tree was
maxinew = maxi + β, if (Δi < Maximum (ε ,T) embedded a watermark bit 1, the local significant difference
and maxi is root) (5) between the largest two coefficients will be greater than β.
In order to extract watermark bits correctly and the value
maxinew = maxi + β × γ , if (Δi < Maximum(ε ,T) of y by Eq. (8).
and maxi is root) (6)
1 Nw × α
Where maxinew denotes the new maximum coefficient in y = --------- ∑ ϕ j ------ (8)
the ith wavelet tree after embedding the watermark bit. The Nw × α j = 1
maxi located at lower resolution level (child node) is less
robust than those located at higher resolution levels (root Where φ = {max1 - sec1 ,max2 - sec2 ,…..,maxi - seci }, for
node). The reason has been stated in Section II-B. i=1,2,…,N; the sorted φ is denoted as ϕ (φ) = { ϕ1,ϕ 2
According to the band sensitivity, the coefficients quantized ...ϕ Nw }, ϕ1 < ϕ 2 < .... < ϕ Nw ; α is the scale
at different resolution level are given different weights. The parameter, 0 < α ≤ 1; α is crucial to y and is used to
quantized coefficient at the lower resolution level is given a determine how many percentages of the significant
heavier weight than that at the higher resolution level. difference in φ can be used for the average. Hence, α marks
Hence, if the maxi does not locate at the highest resolution the minimal y value for extracting the watermark. The
level, we will quantize the maxi by adding γ times of β larger α is, the larger the y will be. Suppose all embedded
energy, here γ is a scale parameter and we set γ =1.5. watermark bits are 1 in the watermark. This means that the
(IJCNS) International Journal of Computer and Network Security, 53
Vol. 2, No. 3, March 2010

difference between the maximum wavelet coefficients and The peak signal-to-noise ratio (PSNR) to evaluate the
the second maximum wavelet coefficients for any embedded quality between the attacked image and the original image.
wavelet tree is greater than β. The value of α should be set After extracting the watermark, the normalized correlation
as small as possible to avoid extraction errors (see Eq. coefficient (NC) is computed using the original watermark
(9),(10)); the reason for this is that it can exclude those big and extracted watermark to judge the existence of the
significant differences of the embedded wavelet trees in Eq. watermark. The value of the NC coefficient is defined as
(8). On the other hand, if all embedded watermark bits are 0 follows:
in the watermark, the value of α must be set as large as
possible. Therefore, α is sensitive to the content of the 1 w h -1 w w -1
watermark. NC = ----------- ∑ ∑ w (i, j) × w ' (i, j) (11)
wh ×ww i = 0 j = 0
3.2 Watermark Extraction
Following Eqs. (8),(9) and (10), it would be easy to extract Where wh and ww are the height and width of the
the watermark. If the local significant difference is greater watermark. w (i, j) and w' (i, j) are the values of the
than or equal to y, where 0 < y ≤ β, then the embedded coordinate (i, j) in the original watermark and the extracted
watermark bit could be 1; otherwise, the embedded watermark, respectively. Here w (i, j) is set to 1 if it is a
watermark bit could be 0. The watermark bit can be watermark bit 1; otherwise, it is set to -1. w' (i, j) is set in
extracted based on Eq. (9) and (10) as follows: the same way. So the value of w(i, j) × w' (i, j) is either -1 or
1.
watermark bit = 1, if (maxi - seci ) > y (9)
Table 1: Normalized Correlation Coefficients (NC) after
watermark bit = 0, otherwise (10) Attacks by JPEG Compression with the Quality Factors
(QF) 10, 20, 30, 40, 50, 60, 70, 80, 90, AND 100.

Normalized
Quality Factors Correlation Extracted
(QF) Coefficients Watermark
(NC)

10 0.33

20 0.65 E

30 0.78 ES

40 0.82 E A

ESHA 50 0.89 ES
(a) (b)
60 0.96 ESH
Figure 3. (a) The original image of Lena of size 512×512.
(b) The original binary watermark of size 32×16. 70 1 ESHA

80 1 ESHA

90 1 ESHA

100 1 ESHA

The Lena (512×512 pixels, 8 bits/pixel) obtained from


attacking the Stir mark benchmark and Photo Impact 11
software tools to simulate common image attacks. While
there is no attack, for the sake of brevity only the Lena
image and the binary watermark are shown in Fig. 3. Fig. 4
shows the watermarked image and the extracted result. Pre-
ESHA determine the scale parameter T at 10, β =7, γ =1.5, and α
(a) (b) =0.7. In the following, consider both geometric and
nongeometric attacks. Nongeometric attacks include JPEG
Figure 4. (a) Watermarked Lena with PSNR = 41.88dB compression, low pass filtering, histogram equalization, and
(b) The extracted watermark with NC = 1 sharpening. From Table 1, the proposed method can
correctly extract the watermark while the quality factors are
greater than 70 and it becomes worse if the quality factor is
4. Experimental Results
54 (IJCNS) International Journal of Computer and Network Security,
Vol. 2, No. 3, March 2010

decreased. The less the quality factor is, the more vague the In this paper, propose a wavelet-tree-based blind
extracted watermark is. watermarking method by quantizing the maximum wavelet
coefficient in a wavelet tree. Embed a watermark bit by
quantizing the maximum wavelet coefficient in a wavelet
tree. The trees are so quantized that they exhibit a
4.1 Experiment Analysis sufficiently large enough energy difference between a
Compare the proposed method with BKL [9], EL [10], watermark bit 0 and a watermark bit 1, which difference,
and SHW [11] using the Lena image. The watermark denoted as significant difference, is then useful for later
consists of 256 bit 1and 256 bit 0. The results are shown in watermark extraction. During extraction, an adaptive
Table 2. From Table 2, the PSNR of the proposed method is threshold value is designed. The magnitude of the
better than those of [11]. In this method, it is not so good for significant difference in a wavelet tree is compared to the
the rotation attacks with degree greater than ± 0.70; but it is adaptive threshold value. Furthermore, regarding each
far better than the listed methods; especially for low pass wavelet tree embedded with a watermark bit, we not only
filtering attacks for JPEG compression. can embed more bits in an image but can extract the
watermark without any need of the original image and
Table 2: Comparison of the Proposed Method and the watermark. Moreover by designing an adaptive threshold
Methods in [9], 10] and [11]. value in the extraction process. In addition to the copyright
protection, the proposed method can also be applied to data
hiding and image authentication.
Attacks / SHW EL BKL Proposed
NC PSNR = PSNR= PSNR= Method
38.2dB 40.6dB 41.54dB PSNR =
References
41.88dB
[1] D. P. Mukherjee, S. Maitra, and S. T. Acton, "Spatial
JEPG NA 0.15 0.17 0.33 domain digital watermarking of multimedia objects for
(QF = buyer authentication," IEEE Trans. Multimedia, vol. 6,
10) pp. 1-15, Feb. 2004.
[2] N. Nikolaidis and I. Pitas, "Robust image watermarking
JEPG NA 0.34 0.61 0.65 in the spatial domain," Signal Processing, vol. 66, pp.
(QF = 385-403, 1998.
20)
[3] A. K. Mahmood and A. Selin,"Spatially adaptive
JEPG 0.15 0.52 0.79 0.78
wavelet thresholding for image
(QF = watermarking,"presented at Proc.IEEE ICME, Toronto,
30) 2006 of Conference.
[4] J. R. Hernandez, M. Amado, and F. Perez- Gonzalez,
JEPG 0.23 0.52 0.83 0.82 "DCT- omain watermarking techniques for still images:
(QF = detector performance analysis and a new structure,"
40) IEEE Trans.Image Processing, vol. 9, pp.55- 68, Jan.
2000.
JEPG 0.28 0.52 0.89 0.89 [5] L. Sin-Joo and J. Sung-Hwan, "A survey of
(QF =
watermarking techniques applied to multimedia," in
50)
Proc. IEEE ISIE 2001, pp. 272-277
JEPG 0.46 0.59 0.94 0.96 [6] V. M. Potdar, S. Han, and E. Chang,"A survey of digital
(QF = image watermarking techniques,"presented at Proc.
60) IEEE INDIN 2005 of Conference.
[7] H. J. Wang, P. C. Su, and C. C. J. Kuo, "Wavelet-based
JEPG 0.57 0.63 0.97 1 digital image watermarking," Optics Express,vol.3, pp.
(QF = 491- 496, Dec. 1998.
70) [8] M. Hsieh, D. Tseng, and Y. Huang, "Hiding digital
watermarks using multiresolution wavelet transform,"
JEPG 0.89 0.71 0.99 1
IEEE Trans. Ind. Electron., vol. 48, pp. 875-882, Oct.
(QF =
80)
2001.
[9] B. K. Lien and W. H. Lin,"A watermarking method
JEPG 1 0.78 1 1 based on maximum distance wavelet tree
(QF = quantization," presented at 19th Conf. Computer
90) Vision, Graphics and Image Processing, 2006 of
Conference.
JEPG 1 0.88 1 1 [10] E. Li, H. Liang, and X. Niu,"An integer wavelet based
(QF = multiple logo-watermarking scheme," presented at
100) Proc. IEEE WCICA, 2006 of Conference.
[11] S. H. Wang and Y. P. Lin, "Wavelet tree quantization
5. Conclusion for copyright protection watermarking," IEEE Trans.
(IJCNS) International Journal of Computer and Network Security, 55
Vol. 2, No. 3, March 2010

Image Processing, vol. 13, pp. 154-165, Feb. 2004. Guide Award” five times from Tamil Nadu state Government. He
[12] G. C. Langelaar and R. L. Lagendijk, "Optimal is also the recipient of “Best Outstanding Fellow Corporate
differential energy watermarking of DCT encoded Member Award” by Institution of Engineers (IE),India -2004 and
“Jewel of India” Award by International Institute of Education and
images and video,"IEEE Trans. Image Processing,
Management, New Delhi–2004 and “Bharatiya Vidya Bhavan
vol. 10, pp. 148-158, Jan.2001. National Award for Best Engineering College Principal 2005” by
Indian Society for Technical Education (ISTE). “Education
[13] F. A. P. Petitcolas, Weakness of existing watermark Excellence Award” by All India Business& Community
Scheme 1997[online] Available: Foundation, New Delhi.
http://www.petitcolas.net/fabien/watermarking/stirma
rk/index.html.
[14] PhotoImpact 11 software, http://www.ulead.com,
Ulead system, Inc.

Authors Profile

S.M.Ramesh received the B.E degree


in Electronics and Communication
Engineering from National Institute of
Technology
(Formerly Regional Engineering
College), Trichy, Bharathidhasan
University, India in the year 2001 and
the M.E, degree in Applied Electronics
from RVS College of Engineering and
Technology, Dindugal, Anna
University, India in the year 2004. From 2004 to 2005, he served
as a Lecturer in the Department of Electronics and Communication
Engineering, Maharaja Engineering College, Coimbatore, India.
From 2005 to 2006, he served as a Lecturer in the Department of
Electronics and Communication Engineering, Nandha Engineering
College, Erode, India. Since June 2006, he served as Senior
Lecturer, in the Department of Electronics and Communication
Engineering, Bannari Amman Institute of Technology,
Sathyamangalam, and Erode, India. He is currently pursuing the
Ph.D. degree in Anna University, Chennai-India, working closely
with Prof. Dr.A.Shanmugam and Prof Dr.R.Harikumar.

Dr.A.Shanmugam received the B.E,


degree in Electronics and
Communication Engineering from PSG
College of Technology., Coimbatore,
Madras University, India in the year
1972 and the M.E, degree in Applied
Electronics from College of
Engineering, Guindy, Chennai, Madras
University, India in the year 1978 and
received the Ph.D. in Computer
Networks from PSG College of
Technology., Coimbatore, Bharathiyar University, India in the year
1994.From 1972 to 1976, he served as a Testing Engineer at Test
and Development Center, Chennai, India. From 1978 to 1979, he
served as a Lecturer in the Department of Electrical Engineering,
Annamalai University, India. From 1979 to 2002, he served
different level as a Lecturer, Asst.Professor, Professor and Head in
the Department of Electronics and Communication Engineering of
PSG College of Technology, Coimbatore, India. Since April
2004.He assumed charge as the Principal, Bannari Amman
Institute of Technology, Sathyamangalam, Erode, India.

He works in field of Optical Networks, broad band computer


networks and wireless networks, Signal processing specializing
particularly in inverse problems, sparse representations, and over-
complete transforms.Dr.A.Shanmugam received “Best Project

You might also like