Circular Domain. Yongqing Xin ... the embedded information can be decoded at low error rates, ... The first one is based on the idea that a registration pattern is.
1
Geometrically Robust Image Watermarking on a Circular Domain Yongqing Xin, Student Member, IEEE, Simon Liao, Member, IEEE, and Miroslaw Pawlak, Member, IEEE
Abstract— In image watermarking, the watermark’s vulnerability to geometric transformations has long been a difficult problem. Using invariant image features to carry the watermark is an effective approach to addressing this problem. In this paper, a multibit geometrically robust image watermarking algorithm using Zernike moments (ZMs) and pseudo-Zernike moments (PZMs) is proposed. Unlike its counterparts in literature, this algorithm is based on our finding that not all the ZMs/PZMs are suitable for invariant watermarking. We distinguish the ’good’ ZMs/PZMs from the ’bad’ ones. By avoiding embedding watermarks onto the ’bad’ ZMs/PZMs, we have achieved impressively good watermarking results. For some selected ’good’ ZMs/PZMs of an image, dither modulation is employed to quantize their magnitudes in order to embed an array of bits. The watermarked image is obtained via reconstruction from the modified moments and those left intact. In watermark extraction, the embedded bits are estimated from the invariant magnitudes of the ZMs/PZMs using a minimum distance decoder. Simulation results show that the embedded information can be decoded at low error rates, robust against image rotation, scaling, flipping, and as well, a variety of other processes such as additive noise and lossy compression. Index Terms— Data hiding, digital watermarking, geometric distortion, robustness, pseudo-Zernike moment, Zernike moment.
I. I NTRODUCTION Digital watermarking has drawn a lot of attention in the past decade because it is recognized as a potential solution to a number of issues related to multimedia works, such as authorship identification, content authentication, fingerprinting, and secondary data delivery [1]. The fundamental task in designing a watermarking system is to address some conflicting requirements including watermark transparency, watermark robustness and information capacity etc [2]. As an important subarea of digital watermarking, image watermarking has been widely explored. Among various problems to be solved in image watermarking, robustness against geometric transformations such as image rotation and scaling is a most challenging one, to which many existing image watermarking algorithms are vulnerable [3]. Some researchers have been trying to address the issue of watermark robustness to geometric transformations. Roughly the proposed algorithms can be divided into three categories. The first one is based on the idea that a registration pattern is inserted into the host signal along with the watermark [4], [5], or the watermark is designed with a special structure [6], so that in the stage of watermark detection the involved geometric distortions can be identified and thus the distortions can be removed by an inversion process. The second category is based on image normalization [7], [8]. Prior to watermark
insertion, the host image is normalized to certain position, orientation and size, which should be invariant to image translation, rotation and scaling. After the watermark insertion, the image is denormalized back to its original look. Like watermark insertion, watermark detection is performed in the normalized state of the test image. The third category, which we are most interested in and the current algorithm falls into, is based on the invariance property of some image features. O’Ruanaidh et al.[9] first reported rotation-scaling-translation (RST) invariant watermarks in the Fourier-Mellin domain in 1998. Lin et al.[10] used a similar idea to design their 1-D RST-robust watermark without using any explicitly invariant features. In [11], the well-known set of seven RST invariants of central moments[12] was utilized. Zernike moments were first reported as watermark features by Farzam et al.[13] to achieve watermark robustness to rotation, additive noise and JPEG compression. More recently, in [14] the watermark is embedded by modifying the Zernike feature vector consisting of some Zernike moments with orders less than 5. Along with image normalization, the algorithm realised RST-invariant watermarking. In this paper, we will focus on the investigation of embedding a multibit watermark in the magnitudes of Zernike moments up to a higher order, in an attempt to achieve a bigger payload size and better watermark robustness to geometric distortions of images, in particular, rotation, scaling and flipping, and as well some other forms of attacks such as additive noise and lossy compression. The key idea behind the algorithm comes from our finding that for discrete images, some Zernike moments are accurate and thus suitable for data hiding, while others not. Unlike other watermarking algorithms aimed at geomtric robustness, most of which focus on zero bit watermarks, our algorithm works with multibit watermarks. This is realized by quantizing the magnitudes of the selected Zernike moments by using quantization index modulation[15] to embed an array of bits. Due to the orthogonality of Zernike polynomials, we obtain the watermarked image by combining the reconstructed components from the modified moments and those left intact. In watermark extraction, the same group of selected Zernike moments are computed from the possibly manipulated image, and the array of bits are retrieved from the invariant magnitudes of the Zernike moments using minimum distance decoder. This paper is orgnized as follows. In Section II, some preliminaries will be given, including the introduction of Zernike polynomials and Zernike moments, the invariance properties of Zernike moments. Based on the theory in Section II, we’ll describe our watermark embedding and extraction
2
algorithm in Section III and Section IV respectively. Section V will be dedicated to the description of a variety of simulation experiments, which will illustrate the effectiveness of the proposed algorithm. Subsequently in Section VI we will discuss some issues related to our algorthm. Finally conclusions and recommendations of future work will be briefed in Section VII. II. P RELIMINARIES A. Zernike and Pseudo-Zernike Polynomials
(p)
where Anm is the pseudo-Zernike moment of order n with repitition m, whose definition is Z Z n+1 (p)∗ f (x, y)Vnm (x, y)dxdy (8) A(p) = nm π 2 2 x +y ≤1 It should be pointed out that in case of digital images, (6) and (8) cannot be applied directly, but rather, their approximate versions have to be employed. For instance, given a digital image of size M × M , its ZMs are computed as M
M
1) Zernike Polynomials: The Zernike basis is a set of complete and orthogonal functions on the unit disk defined as [16], [17], [18]:
n + 1 XX hnm (xi , yj )f (xi , yj ), Aˆnm = π i=1 j=1
Vnm (x, y) = Rnm (ρ)ejmθ ,
where the values of i and j are taken such that x2i + yj2 ≤ 1, and
(1)
p where ρ = x2 + y 2 , θ = tan−1 (y/x). Here n is a nonnegative integer and m is an integer that takes positive, negative , or zero values such that n − |m| is even and nonnegative. The radial Zernike polynomial Rnm (ρ) is defined by the following formula (n−|m|)/2
X
Rnm (ρ) =
s=0
(−1)s (n − s)!ρn−2s s!( n+|m| 2
− s)!( n−|m| − s)! 2
.
(2)
2) Pseudo-Zernike Polynomials: A modified version of Zernike basis is the so-called pseudo-Zernike basis, which is also a set of complete and orthogonal functions on the unit disk, defined as [18]: (p) (p) Vnm (x, y) = Rnm (ρ)ejmθ ,
(3)
where ρ and θ are the same notations as in (1) and n is also a non-negative integer. But unlike in Zernike polynomials, here m is only restricted to be |m| ≤ n and the radial pseudo(p) Zernike polynomial Rnm (ρ) is defined as the following n−|m| (p) Rnm (ρ) =
X s=0
(−1)s (2n + 1 − s)!ρn−s . (4) s!(n + |m| + 1 − s)!(n − |m| − s)!
B. Zernike Moments and Pseudo-Zernike Moments Like any other orthogonal and complete basis, the Zernike basis can be used to decompose an analog image function f (x, y): f (x, y) =
∞ X
X
Anm Vnm (x, y)
(5)
n=0 {m:n≥|m|,n−|m|=even}
where Anm is the Zernike moment of order n with repitition m, which is defined as Z Z n+1 ∗ Anm = f (x, y)Vnm (x, y)dxdy (6) π x2 +y 2 ≤1 where * denotes complex conjugate. Similarly, using pseudo-Zernike basis, an image function f (x, y) can be represented by f (x, y) =
∞ X
X
n=0 {m:|m|≤n}
(p) A(p) nm Vnm (x, y)
(7)
Z hnm (xi , yj ) =
xi + ∆x 2
xi − ∆x 2
Z
yj + ∆y 2
yj − ∆y 2
∗ Vnm (x, y)dxdy,
(9)
(10)
2 where ∆x = ∆y = M . hnm (xi , yj ) can be computed by using a number of techniques introduced in [19] to address the nontrivial issue of accuracy. In this research, we adopt the following formulas which are most commonly used in literature to compute ZMs and PZMs of discrete images: M
M
n + 1 XX ∗ Aˆnm = V (xi , yj )f (xi , yj )∆x∆y π i=1 j=1 nm M
(11)
M
n + 1 X X (p)∗ V (xi , yj )f (xi , yj )∆x∆y, Aˆ(p) nm = π i=1 j=1 nm
(12)
on which all the results and conclusions are based in the following sections. We have to point out that the ZMs and PZMs of discrete images computed via (11) and (12) are not accurate in a strict sense. As analyzed in [19], [20], there exist two sources of errors, namely geometric error and numerical approximation error. The former is due to the fact that the areas covered by the pixels involved in the computation of moments never sum up exactly to the area of the unit disk. The latter comes from the approximation of hnm (xi , yj ), which is ∗ hnm (xi , yj ) = Vnm (xi , yj )∆x∆y for ZMs and hnm (xi , yj ) = (p)∗ Vnm (xi , yj )∆x∆y for PZMs in our case. For simplicity of notations and descriptions, we use the following two conventions in the remainder of this paper. Firstly, since we are primarily concerned with digital images, (p) we deal with Aˆnm and Aˆnm defined in (11) and (12), rather (p) than Anm and Anm defined in (6) and (8). However, we (p) (p) shall simply use Anm and Anm to mean Aˆnm and Aˆnm , unless otherwise stated. Secondly, due to the close similarity of Zernike moments and pseudo-Zernike moments, the same properties of our interest and the methodologies of applying them in data hiding are the same, and so we are going to use (p) Anm to mean both Anm and Anm , and Vnm (·) to mean both (p) Vnm (·) and Vnm (·) herafter, unless otherwise stated.
3
C. The Invariance Properties of ZMs/PZMs The reason we use ZMs/PZMs for image watermarking is that they have some very important properties, i.e., their magnitudes are invariant under image rotation and image flipping. We now elaborate on these properties. 1) Rotation Invariance: If image f (x, y) is rotated α degrees counterclockwise, it can be shown that the ZMs/PZMs of the resulting image are −jmα A(α) . nm = Anm e
(13)
(α) |Anm |
This leads to = |Anm |. Therefore, if a watermark is inserted in the magnitudes of ZMs/PZMs, it is robust to rotation. We have to note that this property is derived from the analog version of ZMs/PZMs. For the discrete version of ZMs/PZMs, typically obtained via (11) and (12), this property has to be compromised to some extent [21]. However, a judicious selection of moments makes this property hold quite well, which will be detailed shortly. 2) Flipping Invariance: Another invariance property of ZMs/PZMs, which has not been mentioned in literature so far, is that the magnitudes of ZMs/PZMs are invariant to image flipping, either horizontal or vertical. This property holds for both analog version and discrete version of ZMs/PZMs. Theorem 1: If we define horizontal flipping of an image as f (hf ) (x, y) = f (−x, y) whose ZMs/PZMs are denoted by (hf ) Anm , vertical flipping of an image as f (vf ) (x, y) = f (x, −y) (hf ) (vf ) whose ZMs/PZMs are denoted by Anm , then Anm = A∗nm (vf ) (hf ) ∗ if m even, and Anm = −Anm if m odd; Anm = A∗nm for m even or odd. In either case, the magnitudes of ZMs/PZMs (vf ) (hf ) do not change, i.e., |Anm | = |Anm | and |Anm | = |Anm |.
graylevel 127. Based on (11) and (12), we have calculated its ZMs and PZMs up to order 12, whose magnitudes are shown in table I and table II respectively. In theory, all the (p) ZMs and PZMs of this image except A00 and A00 should be zero, but in fact we can see from these tables that a number of moments deviate from zero, and some of them even have considerable magnitudes. In general, we have the following results. Theorem 2: ZMs/PZMs of a discrete image, as computed based on (11) and (12), are not all accurate. Those Anm with m = 4i, i integer, which are not accurate and hence |Anm | not invariant, are not suitable for invariant watermarking. We defer the proof of Theorem 2 to Appendix 1. This theorem is significant for invariant watermarking intended for robustness against geometric distortions, as is shown in the following sections. III. WATERMARK E MBEDDING The major components of the watermark embedder are depicted in Fig. 1. The main ideas are explained below.
K1
[( p1 , q1) ... ( pL , qL)]
f ( xi , y j )
The proofs of Theorem 1 can be found in Appendix I. This property is of much interest to the watermarking community, since image flipping is a very easy form of attack to perform, however it is very effective and introduces zero distortion to image contents. 3) Scaling Invariance: In the case of image scaling, if the unit disk is made to cover the same contents of the image, the ZMs/PZMs should remain unchanged. It is worth noting that this property holds perfectly for continuous images, but it has to be compromised to some extent for digital images, particularly when scaled smaller, due to the loss of information. However, if an image is scaled moderately, as is true in the watermarking scenario, the invariance property holds quite well, which will be seen subsequently.
Z. moment computation ( Ap1q1 L ApL qL )
Dither modulation
~ ~ ( A p1q1 L A p L q L )
+ -
(b1 LbL )
K2 Dither vectors generation
[dK1 2 (0)LdKL2 (0)] [dK1 2 (1)LdKL2 (1)]
Σ
Watermark + signal reconstruction -
w( xi , y j )
+
+
Σ ~ f ( xi , y j )
D. Discrimination of ZMs/PZMs As stated above, for digital images, we can only obtain an approximate version of ZMs/PZMs, and hence the invariance property of the moment magnitudes only holds approximately. What we are concerned with is how close this approximation is. We argue that the magnitude invariance of a particular ZM/PZM depends on its computation accuracy. We have observed that under (11) and (12), different moments have different levels of computation accuracy. Let’s look at an example. Assume we have an 128 × 128 image of a constant
Z. moment selection
Fig. 1.
The structure of watermark embedder
A. Selection of ZMs/PZMs The invariance property of ZMs/PZMs of digital images have to be compromised to some extent due to geometric error of unit disk clipping, approximation error of Zernike/pseudoZernike polynomial integration and interpolation error of the
4
TABLE I M AGNITUDES OF Z ERNIKE MOMENTS UP TO ORDER 12 WITH m ≥ 0 FOR A 128 × 128 CONSTANT IMAGE
n= 0 1 2 3 4 5 6 7 8 9 10 11 12
m=0 127.24
1
2
3
4
5
6
7
10
11
12
0.0000 0.0000
1.1689
0.0000 0.0000
0.0000 1.6117
0.0049 0.0000
0.0000 0.0000
2.0287
0.0000 0.0000
0.0000 2.4110
0.0000
0.0000
0.0000 0.0000
0.0136
0.0000
2.7487
0.0000 0.0004 0.0000 0.0375
0.0000 0.0000
0.0000 0.0000
m=0 127.24 0.4728 0.7044 0.9329 1.1482 1.3682 1.5486 1.7667 1.8816 2.1156 2.1188 2.4006 2.2284
0.2140 0.0000
0.0000 0.0000
0.0757
0.0000 0.2169
0.0000 0.0000
0.0000 0.0000
0.1900
WITH
0.0000 0.0000
0.0153
m ≥ 0 FOR A 128 × 128 CONSTANT IMAGE
1
2
3
4
5
6
7
8
9
10
11
12
0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
0.0049 0.0002 0.0080 0.0203 0.0377 0.0612 0.0918 0.1305 0.1785
0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
0.2140 0.1993 0.1704 0.1252 0.0614
0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000
0.0000 0.0000
0.0153
image rotation and scaling. As a result, some ZMs/PZMs can be computed more accurately, hence more suitable for data hiding than others. We consider two major factors in selection of moments for data hiding. Firstly, the moments with order higher than a certain value Nmax cannot be obtained accurately, and thus have to be ruled out for data hiding. In our experiments, we set Nmax = 44 for Zernike moments and set Nmax = 23 for pseudo-Zernike moments. Totally there are 1 2 2 (Nmax + 1)(Nmax + 2) Zernike moments and (Nmax + 1) pseudo-Zernike moments up to the order Nmax , however only about half of them have independent magnitudes due to conjugate symmetry A∗nm = An,−m . Secondly, according to Theorem 2, the moments with repetition m = 4i, i interger, cannot be computed accurately, thus not suitable for data hiding. Let S = {Anm , n ≤ Nmax , m ≥ 0, m 6= 4i}, which is the set of all the eligible ZMs/PZMs for data hiding. The cardinalities of S can readily be obtained as in (14) and (15).
|S|ZM
9
0.0000 0.7083
TABLE II M AGNITUDES OF PSEUDO -Z ERNIKE MOMENTS UP TO ORDER 12
n= 0 1 2 3 4 5 6 7 8 9 10 11 12
8
3N 2 +8N max max , if Nmax 16 2 +10Nmax +3 3Nmax , if Nmax 16 = 3N 2 +8N max +4 max , if Nmax 16 2 3Nmax +10Nmax +7 , if Nmax 16
where i is any nonnegative integer.
= 4i = 4i + 1 = 4i + 2 = 4i + 3
(14)
|S|P ZM
3N 2 +6N max max , if Nmax 8 2 3Nmax +6Nmax −1 , if N max 8 = 3N 2 +6N max max , if Nmax 8 2 3Nmax +6Nmax +3 , if Nmax 8
= 4i = 4i + 1 = 4i + 2
(15)
= 4i + 3
where i is any nonnegative integer. B. Modification of ZMs/PZMs We adopt dither modulation for the modification of ZMs/PZMs. Dither modulation is a special form of quantization index modulation, which was first proposed for data hiding in [15]. With a base quantizer q(·), the dither modulation function is defined as fDM (x; m) = q(x + d(m)) − d(m)
(16)
where x is a scalar variable to be quantized, m is a message symbol to be embedded in x, and d(m) is the dither scalar associated with m. Dither modulation has the property that the quantization cells and reconstruction points of any given quantizer are shifted versions of the quantization cells and reconstruction points of any other quantizer. Due to this special structure of quantizers, dither modulation has the advantage of easy implementation. As well, with the help of distortion compensation [15], it has the capability to reach the information capcity. For this paper, we use binary dither modulation, i.e., m ∈ {0, 1}, and one independent magnitude of ZM/PZM
5
is to carry one bit information. In practice one independent magnitude of ZM/PZM can be used to carry more than one bits, or more than one independent magnitude of ZM/PZM to carry one bit, which we will discuss later. Assume there is a bit sequence b = (b1 , ..., bL ), L < |S|, to be embedded in an image f (xi , yj ), i, j = 1, 2, ..., M . For the sake of security, we use a secret key K1 to pseudorandomly choose L ZMs/PZMs from S to form a moment vector Z = (Ap1 q1 , ..., ApL qL ), where Api qi is some Anm in S. Now each bit from b is to be embedded into an element of Z via dither modulation. The magnitude of Api qi , i = 1, ..., L ˜ = (A˜p q , ..., A˜p q ), is quantized, producing a new vector Z 1 1 L L ˜ where Api qi is the modified version of Api qi satisfying fDM (|Api qi |, bi ) = |A˜pi qi | # " |Api qi | − diK2 (bi ) ∆ + diK2 (bi ), i = 1, ..., L = ∆
fZ ˜ (·) =
+
L X
[Api qi Vpi qi (·) + Api ,−qi Vpi ,−qi (·)] (23)
i=1
where εpi qi = A˜pi qi − Api qi and εpi ,−qi = A˜pi ,−qi − Api ,−qi are the quantization noise signals of the moments Api qi and Api ,−qi respectively, and w(·) =
L X
[εpi qi Vpi qi (·) + εpi ,−qi Vpi ,−qi (·)]
is the reconstructed watermark signal, which results from the quantization noise of the selected ZMs/PZMs. Therefore (22) turns into f˜(xi , yj ) = frem (xi , yj ) + fZ (xi , yj ) + w(xi , yj ) = f (xi , yj ) + w(xi , yj ). (25)
K1
(18)
Z. moment selection
f ′( xi , y j )
(( p1 , q1) ... ( pL , qL))
Z. moment computation
Scaled to standard size
( A′p1q1 L A′pL qL )
Dither vectors generation
(19)
( d K1 2 (0) L d KL2 (0)) (d K1 2 (1)Ld KL2 (1))
where the second term is the image components contributed by the selected moments before they are changed,
Quantization with both dithers
(| A′p1q1 |0 L | A′pL qL |0 ) (| A′p1q1 |1 L | A′pL qL |1 )
K2
(20)
i=1
vs.
(| A′pi qi |1 − A′pi qi ) 2
(21)
i=1
Therefore we obtain the watermarked image by combining the two parts f˜(xi , yj ) = frem (xi , yj ) + fZ ˜ (xi , yj ).
Comparator
(| A′pi qi |0 − A′pi qi ) 2
The other part is the image components contributed by those modified moments L X [A˜pi qi Vpi qi (·) + A˜pi ,−qi Vpi ,−qi (·)]. fZ ˜ (·) =
(24)
i=1
The reconstructed watermarked image is composed of two parts. One part is the image components contributed by those unchanged moments, which is
L X [Api qi Vpi qi (·) + Api ,−qi Vpi ,−qi (·)].
L X (Api ,−qj + εpi ,−qj )Vpi ,−qi (·)
=w(·) +
C. Formation of the Watermarked Image
fZ (·) =
(Api qj + εpi qj )Vpi qi (·)
i=1
It is worth noting that in quantizing each Api qi , if qi 6= 0, its conjugate Api ,−qi must be quantized simultaneously to ensure they always have the same magnitudes, so that the reconstructed image is real.
frem (xi , yj ) = f (xi , yj ) − fZ (xi , yj ),
L X i=1
(17)
where [·] is the rounding operation, ∆ is the step size of quantization, and diK2 (·) is the dither function for the ithe i quantizer satisfying diK2 (1) = ∆ 2 + dK2 (0). The dither L 1 vector (dK2 (0), ..., dK2 (0)), whose elements are uniformly distributed over [0, ∆], is pseudorandomly generated with another key K2 , which is used to further increase the secrecy and security of the embedded signal. The modified ZMs/PZMs are now readily calculated as |A˜pi qi | A˜pi qi = Ap q , i = 1, ..., L |Api qi | i i
Due to the linearity of the image reconstruction process, (21) can be rewritten as
(22)
(bˆ1 L bˆL ) Fig. 2.
The structure of watermark extractor
6
(a)
(b)
(c)
Fig. 3. An example of using the proposed algorithm. (a) Original Lena of size 256 × 256. (b) Lena watermarked with 128 bits. (c) Exaggerated difference of (b) and (a).
∆=0.8 ∆=1.0 ∆=1.2 ∆=1.4 ∆=1.6 ∆=1.8 ∆=2.0
50
PSNR(dB)
48 46 44
50
∆=0.8 ∆=1.0 ∆=1.2 ∆=1.4 ∆=1.6 ∆=1.8 ∆=2.0
48 46
PSNR(dB)
52
44 42
42 40
40 64 80 96 112 128 144 160 176 192 208 224 240 256 Number of bits embedded
64
80
(a)
96 112 128 144 Number of bits embedded
160
(b)
Fig. 4. The quality of watermarked images is affected by the number of bits embedded and the quantization step size. (a) ZM-based watermarking results. (b) PZM-based watermarking results.
IV. WATERMARK E XTRACTION The process of watermark extraction is shown in Fig. 2. Assume there is a test image f 0 (xi , yj ), which comes from f˜(xi , yj ) after some possible manipulations, such as rotation ˆ = (ˆb1 , ..., ˆbL ), and scaling. Our goal is to get an estimate, b 0 of the hidden bit sequence from f (xi , yj ) at a low error rate. First, to make the watermark robust to image scaling and to guarantee a certain level of accuracy of moment computation, we take a possibly scaled watermarked image and resize it to a standard size, which is 256 × 256 in this paper. Then with the same key K1 as in the process of watermark insertion, we locate and compute the moments that carry the watermark information, thus forming a moment vector Z0 = (A0p1 q1 , ..., A0pL qL ). Next with the same key K2 as in the embedder, the two same dither vectors (d1K2 (0), ..., dL K2 (0)) and (d1K2 (1), ..., dL (1)) are generated. Using the same quantizer K2 as in (17), we quantize the magitude of each A0pi qi with the
two corresponding dithers respectively, # " |A0pi qi | − diK2 (j) 0 ∆ + diK2 (j), |Api qi |j = ∆
(26)
where i = 1, ..., L and j = 0, 1 and [·] is the rounding operation. By comparing the distances between |A0pi qi | and its two quantized versions, we obtain the estimate of the bit embedded on |Api qi | ˆbi = arg min(|A0 |j − |A0 |)2 , p i qi pi qi
i = 1, ..., L
(27)
j∈{0,1}
which is so-called minimum distance decoder. V. S IMULATION R ESULTS A series of experiments have been carried out. As an example, Fig.3 is the result of applying our algorithm for data embedding in an image. Fig.3(a) is an original image Lena, which is of size 256×256 and 256 graylevels. Fig.3(b) is the
7
watermarked version of Fig.3(a), in which an array of 128 bits is embedded, while Fig.3(c) is the absolute difference between Fig.3(a) and Fig.3(b), multiplied by 25 for better display. A. The quality of Watermarked Images In this work, we use peek signal-to-noise ratio (PSNR) to measure the quality of watermarked images. It is defined as 2552 M 2 , 2 ˜ i=1 j=1 [f (xi , yj ) − f (xi , yj )] (28) where f is the original image and f˜ is the watermarked version, both with dimensions M × M . The PSNR of a watermarked image is determined by two main factors. On the one hand, given a fixed number of bits to be embedded, the PSNR is determined by the quantization step size ∆ of the dither modulation imposed on the magnitudes of ZM/PZM. A larger ∆ leads to a stronger watermark, but results in a lower PSNR, and vice versa. On the other hand, given a fixed ∆ or watermark strength, the number of bits to be embeded decides the PSNR of the watermarked image. The more bits embedded, the lower value of PSNR, and vice versa. The relationship between PSNR and these two factors is clearly reflected in Fig. 4(a) and Fig. 4(b), which are the results from ZM-based and PZM-based algorithms respectively. In all our experiments, we chose quantization step size ∆ such that the resulting PSNR > 40dB, which guarantees a good watermark transparency. PSNR(f, f˜) = 10 log PM PM
256 × 256 watermarked image was scaled to smaller sizes, ranging from 128 × 128 to 248 × 248 with an interval 8 of side length. Fig. 6(a) is an example of the scaled images. Prior to watermark extraction, the scaled images were scaled back to the size 256 × 256. It is worth noting that although the they were scaled back to their original sizes, the images were quite different from their unscaled versions due to the double scaling transforms they underwent. The scaling operation was performed via bilinear interpolation. Fig. 6(b) shows the results for embedding 128 bits and 256 bits by ZM-based watermarking, while Fig. 6(c) gives the results for embedding 128 bits and 160 bits by PZM-based watermarking. Each data point in the figures is the average of 50 test results on different randomly generated bit sequences. The figure shows a trend that BER decreases as the scaling lessens and information amount drops. D. Robustness to Image Flipping Image flipping, either horizontal or vertical, is a very easy attack to perform, however it is so effective that it fails many existing watermarking algorithms. Shown in Fig. 7(a) is a watermarked image. Fig. 7(b) is the horizontally flipped version of Fig. 7(a), while Fig. 7(c) is the vertically flipped version of Fig. 7(a). As mentioned above, the proposed approach is inherently robust against such an attack. In all the experiments with this kind of attack, both for ZM-based scheme and PZMbased scheme, BER=0.
B. Robustness to Image Rotation
E. Robustness to Image Compression
We are particularly interested in the watermark performance, i.e., the bit error rate (BER), under the attack of image rotation. We used Fig.5(a) as the test image, and 160-bit long random sequences as the information to embed. The quantization step sizes ∆ were set such that an average PSNR ≈ 42.5 and 46.4 for ZM-based and PZM-based algorithms respectively. Fifteen different rotation angles θ = {3◦ , 6◦ , ..., 45◦ } were tried. The rotated version of each watermarked image was computed via bilinear interpolation and the resulting additional black borders were partially cropped so that the image sizes remained the same. Fig. 5(b) is an example of the rotated images. To obtain the BER at a certain rotation angle θ, 50 different randomly generated bit sequences were tried and the the BER was taken as the average of the 50 cases. Fig.5(c) shows the simulation results, both for ZMbased algorithm and the PZM-based algorithm, illustrated by the dotted line and the solid line respectively, from which we see an excellent watermark robustness to image rotation with the maximum BER at O(10−3 ). It should be pointed out that there is a tradeoff between BER and ∆-determined PSNR. If ∆ is increased, a lower PSNR and lower BER result. It can also be seen from the figure that BER is related irregularly with θ.
With the wide-spread use of image compression standard JPEG, lossy compression is a highly common form of image processing. We looked at BERs under 20 different JPEG compression levels with quality factors from 50 to 95 with an interval of 5. Fig.8(b) shows the results for embedding 64, 128 and 256 bits respectively in the image of Fig.3(a) by means of ZM-based algorithm while Fig.8(c) shows the results for embedding 64, 128 and 160 bits respectively in the same source image via PZM-based scheme. Each data point in the figures is the average of 50 individual results, which were obtained from 50 different randomly generated bit sequences. It can be seen that BERs decrease rapidly as the quality factor increases and the number of bits embedded drops. Considering that a JPEG quality factor less that 50 gives an obviously degraded image and hence is unlikely to be used by an attacker in pratice, the robustness to JPEG lossy compression is remarkable in our algorithm.
C. Robustness to Image Scaling Image scaling is another common form of geometric attacks. We looked at BERs under 16 different scaling levels. A
F. Robustness to Lowpass Filtering Lowpass filters are a family of filters that are commonly applied in image processing [22], including averaging filters and Gaussian filters etc., and therefore, lowpass filters are of interest to watermark designers. We introduce here the test results on the watermarked images undegoing Gaussian filters. The test image is Lena image, the payload is 128 bits, and the average PSNR≈41.7dB. Shown in Fig. 9(a) is an example of Gaussian filtered watermarked image with 5×5 window and
8
−3
5
x 10
ZM−based PZM−based bit error rate (BER)
4
3
2
1
0 0
(a)
10
(b)
20 30 40 θ:rotation angle in degrees
50
(c)
Fig. 5. Watermark robustness to rotation. (a) Original Baboon of size 256 × 256. (b) Baboon watermarked with 160 bits followed by a 15◦ rotation. (c) BER as a function of rotation angles.
0.01
0.008
0.006
0.006
0.004
0.004
0.002
(a)
160 bits embedded 128 bits embedded
Bit error rate (BER)
Bit error rate (BER)
0.008
0 100
0.01
256 bit watermark 128 bit watermark
0.002
150 200 Side length of scaled images
(b)
250
0 100
150 200 Side length of scaled images
250
(c)
Fig. 6. Watermark robustness to image scaling. (a) A scaling example: watermarked Lena scaled by 75% of side length. (b) BER as a function of scaled image size in the case of ZM-based watermarking. (c) BER as a function of scaled image size in the case of PZM-based watermarking.
(a) Fig. 7.
(b)
(c)
Watermark robustness to image flipping. (a) Watermarked F16. (b) Fig. (a) horizontally flipped. (c) Fig. (a) vertically flipped
σgf = 0.9, which is apparently blurred. We recorded BERs under different levels of filter strength, σgf , ranging from 0.5 to 2 with an interval of 0.1. Fig.9(b) shows the results for the
ZM-based watermarking scheme, while Fig.9(c) illustrates the results for the PZM-based algorithm. In both cases, 3×3, 5×5 and 7×7 window sizes of the Gaussian filters were tried. For
9
0.02
0.01
256 bit watermark 128 bit watermark 64 bit watermark
64 bits embedded 128 bits embedded 160 bits embedded
0.008
0.015
BER
BER
0.006
0.01
0.004
0.005 0.002
0 20
(a)
40
60 80 JPEG quality factor
100
0 20
40
60 80 JPEG quality factor
(b)
100
(c)
Fig. 8. Watermark robustness to JPEG lossy compression. (a) A compression example: watermarked Lena compressed by JPEG with quality factor 20. (b) BER as a function of JPEG quality factor in the case of ZM-based watermarking. (c) BER as a function of JPEG quality factor in the case of PZM-based watermarking.
every data point in the figures, 50 different bit sequences were generated and tested on the watermarked images, and then the average of 50 individual results was taken. The results display excellent watermark robustness to lowpass filtering. No error was observed when σgf < 0.9. G. Robustness to Additive Noise Additive Gaussian noise is another attack a watermarked image often undergoes. We recorded BERs under different levels of noise whose standard deviations range from 0 to 15 with an interval of 0.5. Fig.10(b) and Fig.10(c) show the results for ZM-based and PZM-based algorithms respectively, embedding 64, 96 and 128 bits in the image of Fig.3(a), with PSNR≈42dB in each case. For every data point in the figures, 100 different matrices of pseudo-random Gaussian noise were tested on the watermarked image, and then the average of 100 individual results was taken. The figures show that the algorithm has an outstanding performance on the attack of additive Gaussian noise. In all our tests, we found no error when σ < 5. Even with σ = 10, BER ≤ O(10−4 ) if the payload is 128 bits or less. It is worth noting that when σ = 5, the attacked image displays obvious quality degradation, as shown in Fig. 10(a), which means that an attacker has to control the noise strength such that σ < 5 in order to keep the value of the watermarked image. VI. D ISCUSSION A. Extension to M -ary Dither Modulation In case of large payload, e.g., 512 bits, we can use one independent ZM/PZM magnitude to carry more than 1 bit information. The dither modulation does not have to be binary, as what we have shown in previous sections, but rather, it can be M -ary in general, i.e., a set of M quantizers have to be used, for which equation (16) still applies, and m ∈ {0, 1, ..., M − 1}. Obviously with M -ary dither modulation, an independent magnitude of ZM/PZM carries log(M ) bits of information. There is a price to pay for this gain of payload. At the same level of watermark-induced distortion, M -ary
dither modulation gives higher bit error rates than binary dither modulation. On the other hand, in case of small payload, more than one ZM/PZM magnitudes can combine to carry 1 bit information in order to gain extra watermark robustness. If l independent moment magnitudes are employed to carry one bit, and binary dither modulation is performed on each of magnitude, then the 1-D minimum distance decoder represented by eq. (27) would be replaced by an l-D minimum distance decoder. As a result, the watermark robustnessc(BER) is improved.
B. Implementation issue of the proposed algorithm Although the proposed ZM/PZM watermarking algorithm is quite straightforward, the amount of computation is considerable. The bottleneck of speed lies in the computation of Zernike/pseudo-Zernike polynomials at all the grid points of an image inside the unit disk. In particular, the computation of the radial polynomial Rnm (ρ) and the exponential factor ejmθ is very time-consuming. For the simulations we reported in this paper, all the radial polynomials and the exponential factors to be used were computed and stored as tables in computer memory in advance. In this fashion, most of the computation was reduced to table lookup, and the speed was greatly improved. For example, in a 1.8G Pentium 4-based computer, the time for embedding a 128 bit sequence into a 256 × 256 image requires about 10.9 seconds, while the watermark extraction process takes about 5.3 seconds. In applications where computer memory is limited, fast algorithms [23] can be adopted to improve the situation.
C. About Robustness to Translation We have not considered the watermark robustness to image translation in this paper, primarily for the reason that this issue has been well addressed by some authors by means of image normalization. The reader can refer to [7], [8], [14] and references therein for details.
10
0.1
0.12
7 × 7 window size 5 × 5 window size 3 × 3 window size Bit error rate
0.08
7 × 7 windows size 5 × 5 windows size 3 × 3 windows size
0.1
Bit error rate
0.06
0.04
0.02
0.08 0.06 0.04 0.02
0 0.5
(a)
1 1.5 σgf : standard deviation of Gaussian filter
0 0.5
2
1 1.5 σgf : standard deviation of Gaussian filter
(b)
2
(c)
Fig. 9. Watermark robustness to Gaussian filtering. (a) An example: Watermarked Lena after a Gaussian filter with a 5×5 window size and σgf = 0.9. (b) BER as a function of the standard deviation of the filter in the case of ZM-based watermarking. (c) BER as a function of the standard deviation of the filter in the case of PZM-based watermarking.
−3
6
0.02 128 bits embedded 96 bits embedded 64 bits embedded
x 10
128 bits embedded 96 bits embedded 64 bits embedded
5
Bit error rate
Bit error rate
0.015
0.01
4 3 2
0.005
1 0 5
(a)
10 σ: standard deviation of AWGN
15
0 5
10 σ: standard deviation of AWGN
(b)
15
(c)
Fig. 10. Watermark robustness to additive Gaussian noise. (a) An example: Watermarked Lena with Gaussian noise, σ = 5. (b) BER as a function of the standard deviation of AWGn in the case of ZM-based watermarking. (c) BER as a function of the standard deviation of AWGn in the case of PZM-based watermarking.
VII. C ONCLUDING R EMARKS
We have investigated the problem of embedding a multibit watermark in images by using Zernike and pseudo-Zernike moments. We found that for digital images, some ZMs/PZMs can be accurately computed while others not. The accurate ZMs/PZMs have good invariance property and are thus suitable for watermarking while those inaccurate ones should be avoided. By quantizing the magnitudes of a group of selected ZMs/PZMs, hundreds of bits can be hidden imperceptibly. The embedded bit sequence can be extracted later at low or even zero error rates in the presence of geometric distortions, such as image rotation, scaling and flipping. The watermark also has good robustness against other attacks such as lossy compression, additive noise and lowpass filtering. As future research efforts, we are going to extend the work reported in this paper to cover a wider spectrum of attacks such as image cropping and more generally, the general affine transformations.
A PPENDIX I
A. Proof of Theorem 1 Here we give the proof of Theorem 1 in the case of discete version ZM/PZM based on (11) and (12). ) A(hf nm = k
X
∗ Vnm (xu , yv )f (hf ) (xu , yv )
{(xu ,yv )∈D}
=k
X
Rnm (ρ)e−jmθ f (−xu , yv )
{(xu ,yv )∈D}
=k
X
Rnm (ρ)e−jm(π−θ) f (xu , yv )
{(xu ,yv )∈D}
=k
X
(−1)m Rnm (ρ)ejmθ f (xu , yv )
{(xu ,yv )∈D}
= (−1)m A∗nm
(29)
11
where k =
(n+1)∆x∆y π
Next we are concerned with the property of Anm when m is even. Let’s group all the pixel points inside the unit circle in another way, to form pairs like (A,B) and (C,D), and then X ∗ Anm = k T Vnm (xu , yv )
and D is the unit disk. Similarly, X ∗ Vnm (xu , yv )f (vf ) (xu , yv )
) A(vf nm = k
{(xu ,yv )∈D}
X
=k
Rnm (ρ)e−jmθ f (xu , −yv )
{(xu ,yv )∈D}
{(xu ,yv )∈D}
X
=k
−jm(−θ)
Rnm (ρ)e
= kT
f (xu , yv )
=k
jmθ
Rnm (ρ)e
= kT
f (xu , yv )
X
Rnm (ρ)e−jmθ [1 + (−j)m ]
(32)
{All pairs}
{(xu ,yv )∈D}
= A∗nm .
π
Rnm (ρ)e−jmθ + Rnm (ρ)e−jm( 2 +θ)
{All pairs}
{(xu ,yv )∈D}
X
X
(30)
which is zero if m is even but not divisible by 4, and nonzero in general if m is a multiple of 4.
Similar proofs can be given for the analog version of ZM/PZM. ACKNOWLEDGEMENTS B. Proof of Theorem 2 Assume we have an image with constant intensity T . For an arbitrary pixel point A(x, y) within the unit circle in Fig. 11, there must be 3 other pixel points whose coordinates have a fixed relationship with A(x, y): B(−y, x), C(−x, −y) and D(y, −x). Equivalently in polar coordinates, they are: A(ρ, θ), B(ρ, π2 + θ), C(ρ, π + θ) and D(ρ, 3π 2 + θ).
1
B
A(x,y)
ρ θ -1
1 C
D
-1
Fig. 11.
The pixel points on a circle
First let’s group all the pixel points inside the unit circle into pairs like (A,C) and (B,D), and then X ∗ Anm = k T Vnm (xu , yv ) {(xu ,yv )∈D}
= kT
X
Rnm (ρ)e−jmθ + Rnm (ρ)e−jm(π+θ)
{All pairs}
= kT
X
Rnm (ρ)e−jmθ [1 + (−1)m ]
{All pairs}
which is zero if m is odd, unknown otherwise.
(31)
This research is supported by TRLabs and University of Manitoba Graduate Fellowship. R EFERENCES [1] I. J. Cox, M. L. Miller, and J. A. Bloom, Digital Watermarking. Morgan Kaufmann Publishers, 2001. [2] F. Hartung and M. Kutter, “Multimedia watermarking technique,” Proceedings of IEEE, vol. 87, no. 7, pp. 1079–1107, 1999. [3] F. A. P. Petitcolas, R. J. Anderson, and M. G. Kuhn, “Attacks on copyright marking systems,” in Proc. Workshop Information Hiding, 1998, pp. 218–238. [4] S. Pereira and T. Pun, “Robust template matching for affine resistant image watermarks,” IEEE Transations on Image Processing, vol. 9, no. 6, pp. 1123–1129, 2000. [5] G. Csurka, F. Deguillaume, J. J. K. O’Ruanaidh, and T. Pun, “A bayessian approach to affine transformation resistant image and video watermarking,” in Proc. 3rd Int. Information Hiding Workshop, 1999, pp. 315–330. [6] M. Kutter, “Watermarking resisting to translation, rotation, and scaling,” in Proc. SPIE Multimedia Systems Applications, 1998, pp. 423–431. [7] M. Alghoniemy and A. H. Tewfik, “Geometric distortion correction through image normalization,” in IEEE Int. Conf. Multimedia and Expo, 2000, pp. 1291–1294. [8] P. Dong and N. P. Galasanos, “Affine transform resistant watermarking based on image normalization,” in IEEE Int. Conf. Image Pro., 2002, pp. 489–492. [9] J. O’Ruanaidh and T. Pun, “Rotation, scale and translation invariant spread spectrum digital image watermarking,” Signal Processing, vol. 66, no. 8, pp. 303–317, 1998. [10] C. Y. Lin, M. Wu, J. A. Bloom, I. J. Cox, M. L. Miller, and Y. M. Liu, “Rotation, scale, and translation resilient watermarking for images,” IEEE Trans. Image Processing, vol. 10, no. 5, pp. 767–782, 2001. [11] M. Alghoniemy and A. H. Tewfik, “Image watermarking by moment invariants,” in IEEE Conference on Image Processing, 2000, pp. 73–76. [12] M. K. Hu, “Visual pattern recognition by moment invariants,” IRE Trans. Information Theory, vol. 8, pp. 179–187, 1962. [13] M. Farzam and S. Shirani, “A robust multimedia watermarking technique using Zernike transform,” in IEEE Int. Workshop Multimedia Signal Processing, 2001, pp. 529–534. [14] H. S. Kim and H. K. Lee, “Invariant image watermark using Zernike moments,” IEEE Trans. Circuits and Systems for Video Tech., vol. 13, no. 8, pp. 766–775, 2003. [15] B. Chen and G. W. Wornell, “Quantization index modulation methods: a class of provably good methods for digital watermarking and information embedding,” IEEE Trans. Information Theory., vol. 47, no. 4, pp. 1423– 1443, 2001. [16] F. Zernike, “Beugungstheorie des schneidenverfahrens und seiner verbesserten form, der phasenkontrastmethode,” Physica, vol. 1, no. 6, pp. 689–704, 1934. [17] M. Born and E. Wolf, Principles of Optics. Pergamon, Oxford, 1959. [18] A. Khotanzad and Y. H. Hong, “Invariant image recognition by Zernike moments,” IEEE Trans. Pattern Anal. Mach. Intell., vol. 12, no. 5, pp. 489–497, 1990.
12
[19] S. X. Liao and M. Pawlak, “On the accuracy of Zernike moments for image analysis,” IEEE Trans. PAMI, vol. 20, no. 12, pp. 1358–1364, 1998. [20] M. Pawlak and S. X. Liao, “On the recovery of a function on a circular domain,” IEEE Transactions on Information Theory, vol. 48, no. 10, pp. 2736–2753, 2002. [21] T. H. Reiss, Recognizing Planar Objects Using Invariant Image Features. Springer-Verlag, 1993. [22] R. Gonzalez and R. Woods, Digital Image Processing. Prentice-Hall, Inc., 2002. [23] R. Mukundan, Moment Functions in Image Analysis: Theory and Applications. World Scientific, 1998.