**Image Watermarking in Higher-Order Gradient Domain**

Ehsan N. Arya, Z. Jane Wang and Rabab K.••Ward *The University of British Columbia, Vancouver, Canada* 

### **1. Introduction**

474 Advances in Wavelet Theory and Their Applications in Engineering, Physics and Technology

X.Q.Jiang, L.Blunt, K.J.Stout (2000) "Development of a lifting wavelet representation for surface characterization", Proc. R. Soc. Lond. A (2000) 456, 2283-2313. Z. Wang and D. Hang. (1999) " Progressive Switching Median Filter for the Removal of

Impulse Noise from Highly Corrupted Images," IEEE Trans. on Circuits and Systems-II: Analog and Digital Signal processing, vol. 46, no. 1, pp. 78-80 Jan. 1999.

> With the widespread use of Internet and digital multimedia technologies, the interest in copyright protection of digital content has been rapidly increased. Digital watermarking has emerged as a possible solution for intellectual property rights protection. Watermarking has also proven to be a promising tool in many applications such as broadcast monitoring, fingerprinting, authentication and device control. In digital watermarking, additional information, called the *watermark*, is *imperceptibly* embedded into the original digital content.

> Different applications pose different requirements on watermarking. For example, fragile watermarking is required in content authentication applications, while in applications such as copyright control the watermark should be robust to attacks1. In each application, the watermarking method makes a trade-off between the perceptual invisibility, robustness, security, data capacity and availability of side information. For instance, to increase the robustness of a watermark, the watermark strength needs to be increased, which in turn may make the watermark more visible. The invisibility requirement of watermarking limits the maximum amount of watermark bits (watermarking capacity) that can be embedded into a digital signal.

> In the last two decades, a lot of work has been done in the field of image watermarking. The reader may refer to (Cox, 2008) for a survey of watermarking methods. Watermarking approaches can generally be classified into two categories (Wu & Liu, 2003): *spread spectrum* (SS) based watermarking (Cox et al., 1997; Podilchuk & Zeng, 1998) and *quantization* based watermarking (Chen & Wornell, 2001; Kundur & Hatzinakos, 2001; Moulin & Koetter, 2005). Below, these two approaches are discussed with some detail.

### **1.1 Spread spectrum watermarking**

In general, any watermarking system that spreads the host signal over a wide frequency band can be called *spread spectrum* watermarking (Barni, 2003). In most SS type methods, a pseudo-random noise-like watermark is added (or multiplied) to the host feature sequence (Cox et al., 1997). While SS watermarking methods are robust to many types of attacks, they suffer from the host interference problem (Cox et al., 1999). This is because the host signal itself acts as a source of interference when extracting the watermark, and this may reduce the detector's performance.

<sup>1</sup> The attacks are defined as the processes that may impair the detection of the watermark.

The first approach to alleviate this problem is through designing better embedders at the encoder side. For example, the improved SS (ISS) method proposed in (Malvar & Florencio, 2003) exploits the information about the projection of the signal on the watermark. This knowledge is then used in the embedding process to compensate the signal interference.

• The third type of methods estimate the scaling factor based on the structure of the received data (Eggers, Bäuml & Girod, 2002; Lagendijk & Shterev, 2004; Shterev & Lagendijk, 2006). • The fourth type of methods embed the watermark in the gain-invariant

Image Watermarking in Higher-Order Gradient Domain 477

Among these methods, watermarking in a gain-invariant domain seems to be the best

The aim of this chapter is to describe how to insert robust, imperceptible and high-capacity watermark bits using a gain-invariant domain. Towards that goal we describe the *gradient direction watermarking* (GDWM) method (N. Arya et al., 2011). In this method, the watermark bits could be inserted into the angles of vectors of a higher-order gradient of the image, using the *angle quantization index modulation* (AQIM) method (Ourique et al., 2005). The AQIM has the advantages of QIM watermarking, but it also renders the watermark robustness to amplitude scaling attacks. In the GDWM method, the imperceptibility requirement is fulfilled

• By embedding the watermark in the significant (i.e. large) gradient vectors, the watermark becomes less perceptible. This is due to the observation that the human visual system (HVS) is less sensitive to distortions around the significant edges (i.e. represented by the significant gradient vectors) than to distortions in smooth areas (Barni et al., 2001). • It is well known from comparing the additive with the multiplicative SS watermarking methods, that a disturbance proportional to the signal strength is more difficult to perceive (Langelaar et al., 2000). Therefore, by showing that a gradient change introduced by AQIM is proportional to the gradient magnitude, we can conclude that this method

Assume that the angle of the gradient vector is altered by Δ*θ*. As the gradient vector *g* equals to *r* exp(*iθ*), it is easy to obtain the absolute gradient change |Δ*g*| due to the angle

where *r* denotes the gradient magnitude. It can be seen that the value of |Δ*g*| is proportional to *r* (i.e. *d* ∝ *r*) and therefore AQIM results in a less perceptible watermark. • The change in the higher order gradient vectors is less perceptible than the change in the

To increase the watermark capacity, the watermark bits are embedded in gradient vectors extracted from the multiscale wavelet coefficients of the image. This is accomplished by using a multiscale wavelet transform. For example, to embed a 256-bit watermark, 128, 64 and 64 bits can be embedded in the gradient fields obtained from scales 3, 4 and 5 of the wavelet

The rest of this chapter is organized as follows: a brief overview of the discrete wavelet transform (DWT), multi-scale gradient estimation, quantization index modulation (QIM) and angle quantization watermarking is given in Section 2. The watermark embedding scheme, called *gradient direction watermarking (GDWM)* (N. Arya et al., 2011), is described in Section 3. In this scheme, the image is first mapped to the wavelet domain from which the gradient

Δ*θ*

<sup>2</sup> )<sup>|</sup> (1)


domains (Ourique et al., 2005; Perez-Gonzalez et al., 2005).

solution (Perez-Gonzalez et al., 2005).

by the following three mechanisms:

yields a less perceptible watermark.

**1.3 The outline**

change Δ*θ*:

first order gradients.

transform of the image.

Another approach to improve the performance of SS watermarking methods is to use the statistics of the host signal in the watermark detection (Zhong & Huang, 2006). Based on the distribution of the coefficients in the watermark domain, different types of optimum and locally optimum decoders have been proposed (Akhaee et al., 2010; Barni et al., 2003; Cheng & Huang, 2001; Hernandez et al., 2000; Kalantari et al., 2010).

#### **1.2 Quantization-based watermarking**

To overcome the host-interference problem, the quantization (random-binning-like) watermarking methods have been proposed. Chen and Wornell (Chen & Wornell, 2001) introduced *quantization index modulation* (QIM) as a computationally efficient class of data-hiding codes which uses the host signal state information to embed the watermark. In the QIM-based watermarking methods, a set of features extracted from the host signal are quantized so that each watermark bit is represented by a quantized feature value2. It has been shown that the QIM methods yield larger watermarking capacity than SS methods (Barni et al., 2003). The high capacity of these methods makes them more appropriate for data hiding applications.

Researchers have proposed different quantization-based watermarking methods. Gonzalez and Balado proposed quantized projection method that combines QIM and SS (Perez-Gonzlez & Balado, 2002). Chen and Lin (Chen & Lin, 2003) embedded the watermark by modulating the mean of a set of wavelet coefficients. Wang and Lin embedded the watermark by quantizing the super trees in the wavelet domain (Wang & Lin, 2004). Bao and Ma proposed a watermarking method by quantizing the singular values of the wavelet coefficients (Bao & Ma, 2005). Kalantari and Ahadi proposed a logarithmic quantization index modulation (LQIM) (Kalantari & Ahadi, 2010) that leads to more robust and less perceptible watermarks than the conventional QIM. Recently, a QIM-based method, that employs quad-tree decomposition to find the visually significant image regions, has also been proposed (Phadikar et al., 2011).

Since QIM methods do not suffer from the host-interference problem, their robustness to additive Gaussian noise is higher than that of SS methods. However, they are very sensitive to amplitude scaling attacks. Even small changes in the image brightness can significantly increase the bit error rate (BER) (Li & Cox, 2007). During the last few years, many improved techniques have been proposed to deal with this issue. These methods can be classified into the following main categories (Perez-Gonzalez et al., 2005):


<sup>2</sup> The QIM method is discussed with more detail in subsection 2.5


Among these methods, watermarking in a gain-invariant domain seems to be the best solution (Perez-Gonzalez et al., 2005).

#### **1.3 The outline**

2 Will-be-set-by-IN-TECH

The first approach to alleviate this problem is through designing better embedders at the encoder side. For example, the improved SS (ISS) method proposed in (Malvar & Florencio, 2003) exploits the information about the projection of the signal on the watermark. This knowledge is then used in the embedding process to compensate the signal interference.

Another approach to improve the performance of SS watermarking methods is to use the statistics of the host signal in the watermark detection (Zhong & Huang, 2006). Based on the distribution of the coefficients in the watermark domain, different types of optimum and locally optimum decoders have been proposed (Akhaee et al., 2010; Barni et al., 2003;

To overcome the host-interference problem, the quantization (random-binning-like) watermarking methods have been proposed. Chen and Wornell (Chen & Wornell, 2001) introduced *quantization index modulation* (QIM) as a computationally efficient class of data-hiding codes which uses the host signal state information to embed the watermark. In the QIM-based watermarking methods, a set of features extracted from the host signal are quantized so that each watermark bit is represented by a quantized feature value2. It has been shown that the QIM methods yield larger watermarking capacity than SS methods (Barni et al., 2003). The high capacity of these methods makes them more

Researchers have proposed different quantization-based watermarking methods. Gonzalez and Balado proposed quantized projection method that combines QIM and SS (Perez-Gonzlez & Balado, 2002). Chen and Lin (Chen & Lin, 2003) embedded the watermark by modulating the mean of a set of wavelet coefficients. Wang and Lin embedded the watermark by quantizing the super trees in the wavelet domain (Wang & Lin, 2004). Bao and Ma proposed a watermarking method by quantizing the singular values of the wavelet coefficients (Bao & Ma, 2005). Kalantari and Ahadi proposed a logarithmic quantization index modulation (LQIM) (Kalantari & Ahadi, 2010) that leads to more robust and less perceptible watermarks than the conventional QIM. Recently, a QIM-based method, that employs quad-tree decomposition to find the visually significant image regions, has also been

Since QIM methods do not suffer from the host-interference problem, their robustness to additive Gaussian noise is higher than that of SS methods. However, they are very sensitive to amplitude scaling attacks. Even small changes in the image brightness can significantly increase the bit error rate (BER) (Li & Cox, 2007). During the last few years, many improved techniques have been proposed to deal with this issue. These methods can be classified into

• The first type of methods embed a pilot sequence in the signal (Eggers, Baeuml & Girod, 2002; Shterev & Lagendijk, 2005; 2006). Since the sequence is known to the decoder, it can

• The second type of methods rely on designing amplitude-scale invariant codes, such as Trellis codes (Miller et al., 2004), orthogonal dirty paper codes (Abrardo & Barni, 2004) and

Cheng & Huang, 2001; Hernandez et al., 2000; Kalantari et al., 2010).

**1.2 Quantization-based watermarking**

appropriate for data hiding applications.

proposed (Phadikar et al., 2011).

the following main categories (Perez-Gonzalez et al., 2005):

be used to estimate any change in the signal amplitude.

<sup>2</sup> The QIM method is discussed with more detail in subsection 2.5

order-preserving lattice codes (Bradley, 2004).

The aim of this chapter is to describe how to insert robust, imperceptible and high-capacity watermark bits using a gain-invariant domain. Towards that goal we describe the *gradient direction watermarking* (GDWM) method (N. Arya et al., 2011). In this method, the watermark bits could be inserted into the angles of vectors of a higher-order gradient of the image, using the *angle quantization index modulation* (AQIM) method (Ourique et al., 2005). The AQIM has the advantages of QIM watermarking, but it also renders the watermark robustness to amplitude scaling attacks. In the GDWM method, the imperceptibility requirement is fulfilled by the following three mechanisms:


Assume that the angle of the gradient vector is altered by Δ*θ*. As the gradient vector *g* equals to *r* exp(*iθ*), it is easy to obtain the absolute gradient change |Δ*g*| due to the angle change Δ*θ*:

$$|\Delta \mathbf{g}| = |r \exp(i(\theta + \Delta \theta)) - r \exp(i\theta)| \approx r|\sin(\frac{\Delta \theta}{2})|\tag{1}$$

where *r* denotes the gradient magnitude. It can be seen that the value of |Δ*g*| is proportional to *r* (i.e. *d* ∝ *r*) and therefore AQIM results in a less perceptible watermark.

• The change in the higher order gradient vectors is less perceptible than the change in the first order gradients.

To increase the watermark capacity, the watermark bits are embedded in gradient vectors extracted from the multiscale wavelet coefficients of the image. This is accomplished by using a multiscale wavelet transform. For example, to embed a 256-bit watermark, 128, 64 and 64 bits can be embedded in the gradient fields obtained from scales 3, 4 and 5 of the wavelet transform of the image.

The rest of this chapter is organized as follows: a brief overview of the discrete wavelet transform (DWT), multi-scale gradient estimation, quantization index modulation (QIM) and angle quantization watermarking is given in Section 2. The watermark embedding scheme, called *gradient direction watermarking (GDWM)* (N. Arya et al., 2011), is described in Section 3. In this scheme, the image is first mapped to the wavelet domain from which the gradient fields are obtained. The gradient field at each wavelet scale is then partitioned into blocks. The watermark bits are embedded by changing the angles of the significant gradient vectors in each block using the AQIM method. The resultant (watermarked) wavelet coefficients of the image are computed. Finally the watermarked coefficients are inversely mapped to obtain the watermarked image. The decoding steps are discussed in Section 4, where the watermark bits are decoded following the reverse encoding steps, and the summary is given in Section 6.

#### **2. Preliminaries**

#### **2.1 Notation**

In this chapter, bold lower case letters, e.g. *x*, and bold capital letters, e.g. *X*, denote vectors (or discrete signals) and matrices, respectively. The vector or matrix elements are denoted by lower case letters with an index, e.g. *xi* or *xij*. The vector at pixel (*i*, *j*) in the discrete vector field is represented as *fi*,*<sup>j</sup>* .

#### **2.2 Continuous wavelet transform (CWT)**

Wavelet transform decomposes a signal into shifted and scaled versions of a mother wavelet. The *continuous wavelet transform (CWT)* (Mallat, 1997) of a 1-dimensional continuous signal *x* is defined by

$$\mathcal{W}\_{\mathbf{s},\boldsymbol{\mu}}\mathbf{x} = \langle \mathbf{x}, \boldsymbol{\psi}\_{\mathbf{s},\boldsymbol{\mu}} \rangle = \frac{1}{\sqrt{\mathfrak{s}}} \int\_{-\infty}^{\infty} \mathbf{x}(t) \boldsymbol{\psi} \left( \frac{t - \boldsymbol{\mu}}{\mathfrak{s}} \right) dt \tag{2}$$

where *aJ*[*n*] and *dj*[*n*] are called *approximation* and *detail wavelet coefficients* at scales *J* and *j*,

Image Watermarking in Higher-Order Gradient Domain 479

For an *orthogonal* DWT The approximation and detail coefficients *aJ*[*n*] and *dj*[*n*], are obtained

DWT can also be extended to 2-dimensional images by decomposing the continuous image *x*(*t*1, *t*2) using 2-dimensional scaling functions *φJ*,*n*1,*n*<sup>2</sup> (*t*1, *t*2) and bandpass wavelets

As can be seen, at each scale *j*, the 2D DWT decomposes an image into 3 highpass subbands HL, LH and HH (denoted by superscript *k* = 1, 2, 3) and one lowpass subband LL. The approximation and detail wavelet coefficients in an orthogonal 2-dimensional DWT (2D

*<sup>j</sup>* [*n*1, *<sup>n</sup>*2] =

(*t*1, *t*2) = *ψj*,*n*<sup>1</sup> (*t*1)*φJ*,*n*<sup>2</sup> (*t*2),

(*t*1, *t*2) = *φJ*,*n*<sup>1</sup> (*t*1)*ψj*,*n*<sup>2</sup> (*t*2),

*φJ*,*n*1,*n*<sup>2</sup> (*t*1, *t*2) = *φJ*,*n*<sup>1</sup> (*t*1)*φJ*,*n*<sup>2</sup> (*t*2),

*j*,*n*1,*n*<sup>2</sup>

1,0 ⊗*ϕ*1,0 =

1,0 ⊗ *ψ*1,0 =

1,0 ⊗ *ψ*1,0 =

where ⊗ and superscript *T* denote the *tensor product* and *matrix transpose*, respectively.

Eqs. (3)-(9) can also be written in the discrete domain. For example, the 2-dimensional discrete time Haar wavelet transform uses the 1D discrete-time Haar lowpass vector *ϕ*1,0 = [+1, +1]

> <sup>−</sup><sup>1</sup> <sup>+</sup><sup>1</sup> −1 +1

> +1 +1 −1 −1

 <sup>−</sup><sup>1</sup> <sup>+</sup><sup>1</sup> +1 −1

 ,

 ,

, *dj*[*n*] =

3 ∑ *k*=1

*J* ∑ *j*=1

, *φJ*,*n*(*t*) = 2−*J*/2*φ*

*x*, *ψj*,*<sup>n</sup>* 

<sup>∑</sup>*<sup>n</sup>*1,*n*2∈**<sup>Z</sup>**

*x*, *ψ<sup>k</sup> j*,*n*1,*n*<sup>2</sup> 

*dk*

*<sup>j</sup>* [*n*1, *<sup>n</sup>*2]*ψ<sup>k</sup>*

*<sup>j</sup>*,*n*1,*n*<sup>2</sup> are usually obtained from tensor products

(*t*1, *t*2) are respectively the *horizontal*, *vertical*

. (10)

(*t*1, *t*2) = *ψj*,*n*<sup>1</sup> (*t*1)*ψj*,*n*<sup>2</sup> (*t*2). (9)

*<sup>T</sup>* to calculate the 2D discrete-time wavelets **Ψ**1, **Ψ**<sup>2</sup> and

 2−*<sup>J</sup> t* − *n* 

(5)

. (6)

*j*,*n*1,*n*<sup>2</sup>

, 1 ≤ *k* ≤ 3 (8)

(*t*1, *t*2), (7)

*T*

respectively. In Eq. (4), the wavelets *ψj*,*n*(*t*) and *φJ*,*n*(*t*) can be expressed as

*x*, *φJ*,*<sup>n</sup>* 

*aJ*[*n*1, *n*2]*φJ*,*n*1,*n*<sup>2</sup> (*t*1, *t*2) +

 , *d<sup>k</sup>*

 2−*<sup>j</sup> t* − *n* 

*aJ*[*n*] =

*x*, *φj*,*n*1,*n*<sup>2</sup>

*ψ*1 *j*,*n*1,*n*<sup>2</sup>

*ψ*2 *j*,*n*1,*n*<sup>2</sup>

*ψ*3 *j*,*n*1,*n*<sup>2</sup>

(*t*1, *t*2) and *ψ*<sup>3</sup>

**Ψ**<sup>1</sup> = *ψ<sup>T</sup>*

**Ψ**<sup>2</sup> = *ϕ<sup>T</sup>*

**Ψ**<sup>3</sup> = *ψ<sup>T</sup>*

and *diagonal* continuous-time 2D wavelets that are shifted to the point (*n*1, *n*2).

*j*,*n*1,*n*<sup>2</sup>

*ψj*,*n*(*t*) = 2−*j*/2*ψ*

by projecting *x*(*t*) onto *φj*,*n*(*t*) and *ψj*,*n*(*t*) as

(*t*1, *t*2), such that

*<sup>x</sup>*(*t*1, *<sup>t</sup>*2) = <sup>∑</sup>*<sup>n</sup>*1,*n*2∈**<sup>Z</sup>**

DWT) can be obtained as

where *ψ*<sup>1</sup>

**Ψ**3, as

*j*,*n*1,*n*<sup>2</sup>

(*t*1, *t*2), *ψ*<sup>2</sup>

and bandpass vector *ψ*1,0 = [−1, +1]

*aj*[*n*1, *<sup>n</sup>*2] =

The 2-dimensional (2D) wavelets *φJ*,*n*1,*n*<sup>2</sup> and *ψ<sup>k</sup>*

of 1-dimensional (1D) orthogonal wavelets as

*ψk j*,*n*1,*n*<sup>2</sup>

where *ψ* represents a *bandpass* wavelet function, called the *mother wavelet*, �.� denotes the inner product and the parameters *s* and *u* denote the *scale* and *translation (shift)*, respectively.

Similarly, the 2-dimensional *continuous wavelet transform (2D CWT)* of a continuous image *x*(*t*1, *t*2) can be defined as

$$\mathcal{W}\_{\rm s, \mu\_1, \mu\_2} \mathbf{x} = \langle \mathbf{x}, \psi\_{\rm s, \mu\_1, \mu\_2} \rangle = \frac{1}{\sqrt{s}} \int\_{-\infty}^{\infty} \int\_{-\infty}^{\infty} \mathbf{x}(t\_1, t\_2) \psi \left( \frac{t\_1 - \mu\_1, t\_2 - \mu\_2}{s} \right) dt\_1 \, dt\_2 \tag{3}$$

where *u*<sup>1</sup> and *u*<sup>2</sup> denote the *horizontal* and *vertical* shifts, respectively.

#### **2.3 Discrete Wavelet Transform (DWT)**

Since the continuous wavelet transform is highly redundant, it is more efficient to sample the continuous shift-scale plane *u* − *s*, to obtain the *discrete wavelet transform* (DWT). In the dyadic DWT (i.e. *Wj*,*nx*), the scale and translation components, *s* and *u*, are respectively sampled at intervals of {2*<sup>j</sup>* }*j*∈**<sup>Z</sup>** and {*n*2*<sup>j</sup>* }*n*∈**Z**, where *j* and *n* denote the discrete scale and translation parameters, respectively, and **Z** denotes the set of integer numbers.

The multiscale discrete wavelet transform represents a continuous signal *x*(*t*) (or a discrete signal) in terms of bandpass filters *ψj*,*n*(*t*) and shifted versions of a scaled lowpass filter *φ*(*t*) (called the *scaling function* (Mallat, 1997)) as

$$\mathbf{x}(t) = \sum\_{n \in \mathbb{Z}} a\_I[n] \boldsymbol{\phi}\_{I,n}(t) + \sum\_{j=1}^{J} \sum\_{n \in \mathbb{Z}} d\_j[n] \boldsymbol{\psi}\_{j,n}(t) \tag{4}$$

4 Will-be-set-by-IN-TECH

fields are obtained. The gradient field at each wavelet scale is then partitioned into blocks. The watermark bits are embedded by changing the angles of the significant gradient vectors in each block using the AQIM method. The resultant (watermarked) wavelet coefficients of the image are computed. Finally the watermarked coefficients are inversely mapped to obtain the watermarked image. The decoding steps are discussed in Section 4, where the watermark bits are decoded following the reverse encoding steps, and the summary is given in Section 6.

In this chapter, bold lower case letters, e.g. *x*, and bold capital letters, e.g. *X*, denote vectors (or discrete signals) and matrices, respectively. The vector or matrix elements are denoted by lower case letters with an index, e.g. *xi* or *xij*. The vector at pixel (*i*, *j*) in the discrete vector

Wavelet transform decomposes a signal into shifted and scaled versions of a mother wavelet. The *continuous wavelet transform (CWT)* (Mallat, 1997) of a 1-dimensional continuous signal *x*

> ∞ −∞

*x*(*t*)*ψ*

*x*(*t*1, *t*2)*ψ*

 *<sup>t</sup>* <sup>−</sup> *<sup>u</sup> s*

 *<sup>t</sup>*<sup>1</sup> <sup>−</sup> *<sup>u</sup>*1, *<sup>t</sup>*<sup>2</sup> <sup>−</sup> *<sup>u</sup>*<sup>2</sup> *s*

}*n*∈**Z**, where *j* and *n* denote the discrete scale and translation

*dt* (2)

*dt*<sup>1</sup> *dt*<sup>2</sup> (3)

*dj*[*n*]*ψj*,*n*(*t*) (4)

√*s*

where *ψ* represents a *bandpass* wavelet function, called the *mother wavelet*, �.� denotes the inner product and the parameters *s* and *u* denote the *scale* and *translation (shift)*, respectively.

Similarly, the 2-dimensional *continuous wavelet transform (2D CWT)* of a continuous image

Since the continuous wavelet transform is highly redundant, it is more efficient to sample the continuous shift-scale plane *u* − *s*, to obtain the *discrete wavelet transform* (DWT). In the dyadic DWT (i.e. *Wj*,*nx*), the scale and translation components, *s* and *u*, are respectively sampled at

The multiscale discrete wavelet transform represents a continuous signal *x*(*t*) (or a discrete signal) in terms of bandpass filters *ψj*,*n*(*t*) and shifted versions of a scaled lowpass filter *φ*(*t*)

> *J* ∑ *j*=1 ∑ *n*∈**Z**

*aJ*[*n*]*φJ*,*n*(*t*) +

 ∞ −∞

**2. Preliminaries**

field is represented as *fi*,*<sup>j</sup>*

*x*(*t*1, *t*2) can be defined as

intervals of {2*<sup>j</sup>*

.

*Ws*,*ux* <sup>=</sup> �*x*, *<sup>ψ</sup>s*,*u*� <sup>=</sup> <sup>1</sup>

√*s*

where *u*<sup>1</sup> and *u*<sup>2</sup> denote the *horizontal* and *vertical* shifts, respectively.

parameters, respectively, and **Z** denotes the set of integer numbers.

*x*(*t*) = ∑ *n*∈**Z**  ∞ −∞

**2.2 Continuous wavelet transform (CWT)**

*Ws*,*u*1,*u*<sup>2</sup> *<sup>x</sup>* <sup>=</sup> �*x*, *<sup>ψ</sup>s*,*u*1,*u*<sup>2</sup> � <sup>=</sup> <sup>1</sup>

}*j*∈**<sup>Z</sup>** and {*n*2*<sup>j</sup>*

(called the *scaling function* (Mallat, 1997)) as

**2.3 Discrete Wavelet Transform (DWT)**

**2.1 Notation**

is defined by

where *aJ*[*n*] and *dj*[*n*] are called *approximation* and *detail wavelet coefficients* at scales *J* and *j*, respectively. In Eq. (4), the wavelets *ψj*,*n*(*t*) and *φJ*,*n*(*t*) can be expressed as

$$
\psi\_{j,n}(t) = 2^{-j/2} \psi \left( 2^{-j} t - n \right), \quad \phi\_{l,n}(t) = 2^{-l/2} \phi \left( 2^{-l} t - n \right) \tag{5}
$$

For an *orthogonal* DWT The approximation and detail coefficients *aJ*[*n*] and *dj*[*n*], are obtained by projecting *x*(*t*) onto *φj*,*n*(*t*) and *ψj*,*n*(*t*) as

$$a\_{\!\!\!\!-1}[n] = \langle \mathfrak{x}, \mathfrak{q}\_{\!\!\!-1,n} \rangle , \quad d\_{\!\!\!\!-1}[n] = \left\langle \mathfrak{x}, \mathfrak{q}\_{\!\!\!-1,n} \right\rangle . \tag{6}$$

DWT can also be extended to 2-dimensional images by decomposing the continuous image *x*(*t*1, *t*2) using 2-dimensional scaling functions *φJ*,*n*1,*n*<sup>2</sup> (*t*1, *t*2) and bandpass wavelets *ψk j*,*n*1,*n*<sup>2</sup> (*t*1, *t*2), such that

$$\text{tr}(t\_1, t\_2) = \sum\_{n\_1, n\_2 \in \mathbb{Z}} a\_f[n\_1, n\_2] \phi\_{f, n\_1, n\_2}(t\_1, t\_2) + \sum\_{k=1}^3 \sum\_{j=1}^J \sum\_{n\_1, n\_2 \in \mathbb{Z}} d\_j^k[n\_1, n\_2] \psi\_{f, n\_1, n\_2}^k(t\_1, t\_2), \tag{7}$$

As can be seen, at each scale *j*, the 2D DWT decomposes an image into 3 highpass subbands HL, LH and HH (denoted by superscript *k* = 1, 2, 3) and one lowpass subband LL. The approximation and detail wavelet coefficients in an orthogonal 2-dimensional DWT (2D DWT) can be obtained as

$$a\_j[n\_1, n\_2] = \left\langle \mathbf{x}, \phi\_{j, n\_1, n\_2} \right\rangle, \quad d\_j^k[n\_1, n\_2] = \left\langle \mathbf{x}, \psi\_{j, n\_1, n\_2}^k \right\rangle, \ 1 \le k \le 3 \tag{8}$$

The 2-dimensional (2D) wavelets *φJ*,*n*1,*n*<sup>2</sup> and *ψ<sup>k</sup> <sup>j</sup>*,*n*1,*n*<sup>2</sup> are usually obtained from tensor products of 1-dimensional (1D) orthogonal wavelets as

$$\begin{aligned} \phi\_{\overline{l},n\_1,n\_2}(t\_1, t\_2) &= \phi\_{\overline{l},n\_1}(t\_1)\phi\_{\overline{l},n\_2}(t\_2), \\ \psi\_{\overline{j},n\_1,n\_2}^1(t\_1, t\_2) &= \psi\_{\overline{j},n\_1}(t\_1)\phi\_{\overline{l},n\_2}(t\_2), \\ \psi\_{\overline{j},n\_1,n\_2}^2(t\_1, t\_2) &= \phi\_{\overline{l},n\_1}(t\_1)\psi\_{\overline{j},n\_2}(t\_2), \\ \psi\_{\overline{j},n\_1,n\_2}^3(t\_1, t\_2) &= \psi\_{\overline{j},n\_1}(t\_1)\psi\_{\overline{j},n\_2}(t\_2). \end{aligned} \tag{9}$$

where *ψ*<sup>1</sup> *j*,*n*1,*n*<sup>2</sup> (*t*1, *t*2), *ψ*<sup>2</sup> *j*,*n*1,*n*<sup>2</sup> (*t*1, *t*2) and *ψ*<sup>3</sup> *j*,*n*1,*n*<sup>2</sup> (*t*1, *t*2) are respectively the *horizontal*, *vertical* and *diagonal* continuous-time 2D wavelets that are shifted to the point (*n*1, *n*2).

Eqs. (3)-(9) can also be written in the discrete domain. For example, the 2-dimensional discrete time Haar wavelet transform uses the 1D discrete-time Haar lowpass vector *ϕ*1,0 = [+1, +1] *T* and bandpass vector *ψ*1,0 = [−1, +1] *<sup>T</sup>* to calculate the 2D discrete-time wavelets **Ψ**1, **Ψ**<sup>2</sup> and **Ψ**3, as

$$\begin{aligned} \mathbf{^1} \Psi^1 &= \Psi^T\_{1,0} \otimes \mathfrak{p}\_{1,0} = \begin{pmatrix} -1 + 1 \\ -1 + 1 \end{pmatrix}, \\ \mathbf{^2} \Psi^2 &= \mathfrak{p}\_{1,0}^T \otimes \mathfrak{p}\_{1,0} = \begin{pmatrix} +1 + 1 \\ -1 - 1 \end{pmatrix}, \\ \mathbf{^3} \Psi^3 &= \mathfrak{p}\_{1,0}^T \otimes \mathfrak{p}\_{1,0} = \begin{pmatrix} -1 + 1 \\ +1 - 1 \end{pmatrix}. \end{aligned} \tag{10}$$

where ⊗ and superscript *T* denote the *tensor product* and *matrix transpose*, respectively.

Δ

Image Watermarking in Higher-Order Gradient Domain 481

Fig. 1. Illustration of the 2-D uniform quantization index modulation (QIM). Lattices Λ<sup>0</sup> and

watermarked vector *x<sup>w</sup>* is then obtained as the closest lattice point in Λ<sup>0</sup> to *x* when *b* = 0,

<sup>Q</sup>0(*x*) if *<sup>b</sup>* <sup>=</sup> <sup>0</sup>

�*x*� − Q*b*(*x*�

<sup>Q</sup>1(*x*) if *<sup>b</sup>* <sup>=</sup> <sup>1</sup> (17)

1 if �*θ*/Δ� is odd (19)

*b* is extracted from the received vector *x*�

)�. (18)

Λ<sup>1</sup> in Eq. (16) are marked by × and ◦, respectively.

At the decoder side, the value of the watermark bit ˆ

**2.6 Angle quantization watermarking**

assigned to a binary number 0 or 1.

*θ* to a binary number as follows:

following rules are used:

ˆ *b* = B(*x*�

Two angle quantization watermarking methods are now described:

**2.6.1 Angle Quantization Based Watermarking Method (AQWM)**

or as the closest one in Λ<sup>1</sup> when *b* = 1. This can be expressed as

*x<sup>w</sup>* =

by finding whether the nearest lattice point to the point *x<sup>w</sup>* belongs to Λ<sup>0</sup> or Λ1, i.e.

) = arg min *<sup>b</sup>*∈{0,1}

As mentioned in subsection 1.2, the QIM method is fragile to amplitude scaling attacks. To address this concern, *angle quantization watermarking* embeds the watermark bit in the angle of the 2-dimensional vector. In angle quantization watermarking, the angle *θ* of vector *x* is

In this section, we only describe the *uniform* angle quantization, in which the quantization circle is divided into a number of equiangular sectors in the range (−*π*,*π*], as shown in Fig. 2.

The first method we consider is the angular version of the method proposed in (Kundur & Hatzinakos, 1999). The *quantization function*, denoted by *Q*(*θ*), maps a real angle

*<sup>Q</sup>*(*θ*) = 0 if �*θ*/Δ� is even

where the positive real number Δ represents the *angular quantization step size* and �.� denotes the floor function. To embed a watermark bit *b* = 0 or 1 into an angle *θ* ∈ [−*π*,*π*], the

Δ

#### **2.4 Multiscale gradient estimation Using 2D CWT**

In this subsection, the relationship between the *p*-th order gradient vector of a continuous image and the 2-D wavelet coefficients is obtained.

Let us assume that the unshifted (i.e. *u*<sup>1</sup> = *u*<sup>2</sup> = 0) *horizontal* and *vertical* wavelets *ψ*1(*t*1, *t*2) and *ψ*2(*t*1, *t*2) have *p* vanishing moments, i.e.

$$\int\_{-\infty}^{+\infty} t\_1^k \,\psi^1(t\_1, t\_2) \, dt\_1 = 0 \quad \text{and} \quad \int\_{-\infty}^{+\infty} t\_2^k \,\psi^2(t\_1, t\_2) \, dt\_2 = 0 \quad \text{for} \quad 0 \le k \le p. \tag{11}$$

It was shown in (Mallat & Hwang, 1992) that *ψ*1(*t*1, *t*2) and *ψ*2(*t*1, *t*2) with *p* vanishing moments can be written as

$$\psi^1(t\_1, t\_2) = (-1)^p \frac{\partial^p \rho(t\_1, t\_2)}{\partial t\_1^p}, \ \psi^2(t\_1, t\_2) = (-1)^p \frac{\partial^p \rho(t\_1, t\_2)}{\partial t\_2^p} \tag{12}$$

where *ρ*(*t*1, *t*2) is a smoothing function whose double integral is nonzero. Let *ψ*<sup>1</sup> *<sup>s</sup>* (*t*1, *t*2) and *ψ*2 *<sup>s</sup>* (*t*1, *t*2) denote the scaled versions of *ψ*1(*t*1, *t*2) and *ψ*2(*t*1, *t*2), respectively, given as

$$
\psi\_s^1(t\_1, t\_2) = \frac{1}{s^2} \psi^1(\frac{t\_1}{s}, \frac{t\_2}{s}), \quad \psi\_s^2(t\_1, t\_2) = \frac{1}{s^2} \psi^2(\frac{t\_1}{s}, \frac{t\_2}{s}) \tag{13}
$$

where *s* denotes the continuous wavelet scale . Using Eqs. (12) and (13), it is easy to show that the horizontal and vertical wavelet components of the 2-D image *x*(*t*1, *t*2) can be obtained as

$$\begin{aligned} \mathcal{W}\_s^1 \mathbf{x} &= \mathbf{x}(t\_1, t\_2) \ast \psi\_\mathbf{s}^1(t\_1, t\_2) = (-s)^p \frac{\partial^p(\mathbf{x}(t\_1, t\_2) \ast \rho\_\mathbf{s}(t\_1, t\_2))}{\partial t\_1^p} \\ \mathcal{W}\_s^2 \mathbf{x} &= \mathbf{x}(t\_1, t\_2) \ast \psi\_\mathbf{s}^2(t\_1, t\_2) = (-s)^p \frac{\partial^p(\mathbf{x}(t\_1, t\_2) \ast \rho\_\mathbf{s}(t\_1, t\_2))}{\partial t\_2^p} \end{aligned} \tag{14}$$

where ∗ denotes the *convolution operator*, and

$$\rho\_s(t\_1, t\_2) = \frac{1}{s^2} \rho(\frac{t\_1}{s}, \frac{t\_2}{s}) \quad \text{and} \quad \mathcal{W}\_s^1 \mathbf{x} = \{ \mathcal{W}\_{s, \mu\_1, \mu\_2}^1 \mathbf{x} \mid \forall (\mu\_1, \mu\_2) \in \mathbb{R}^2 \}. \tag{15}$$

where *W*<sup>1</sup> *<sup>s</sup>*,*u*1,*u*<sup>2</sup> *x* denotes the horizontal wavelet coefficient of *x* at scale *s* and point (*u*1, *u*2).

Eq. (14) shows that the vector of wavelet coefficients *Ws*,*u*1,*u*<sup>2</sup> *x*=[*W*<sup>1</sup> *<sup>s</sup>*,*u*1,*u*<sup>2</sup> *<sup>x</sup>*, *<sup>W</sup>*<sup>2</sup> *<sup>s</sup>*,*u*1,*u*<sup>2</sup> *x*] *<sup>T</sup>* can be interpreted as the *<sup>p</sup>th*-order gradient vector of *<sup>x</sup>* <sup>∗</sup> *<sup>ρ</sup><sup>s</sup>* at point (*u*1, *<sup>u</sup>*2).

#### **2.5 Quantization Index Modulation (QIM)**

To embed a watermark bit *b* in vector *x*, the QIM method quantizes *x* using the quantizer Q0(.) when *b* = 0 and Q1(.) when *b* = 1. The possible values of the quantizers Q0(.) and Q1(.) belong to the lattices Λ<sup>0</sup> and Λ1, respectively:

$$
\begin{aligned}
\Lambda\_0 &= 2\Delta \mathbb{Z}^2 \\
\Lambda\_1 &= 2\Delta \mathbb{Z}^2 + \Delta [1,1]^T
\end{aligned}
\tag{16}
$$

where Δ and Z<sup>2</sup> denote the *quantization step size* and the 2D set of integer values, respectively. for For the two-dimensional (2-D) QIM, the lattices Λ<sup>0</sup> and Λ<sup>1</sup> are shown in Fig. 1. The 6 Will-be-set-by-IN-TECH

In this subsection, the relationship between the *p*-th order gradient vector of a continuous

Let us assume that the unshifted (i.e. *u*<sup>1</sup> = *u*<sup>2</sup> = 0) *horizontal* and *vertical* wavelets *ψ*1(*t*1, *t*2)

It was shown in (Mallat & Hwang, 1992) that *ψ*1(*t*1, *t*2) and *ψ*2(*t*1, *t*2) with *p* vanishing

<sup>2</sup> *<sup>ψ</sup>*2(*t*1, *<sup>t</sup>*2) *dt*<sup>2</sup> <sup>=</sup> 0 for 0 <sup>≤</sup> *<sup>k</sup>* <sup>≤</sup> *<sup>p</sup>*. (11)

*∂t p* 2

*<sup>s</sup>*,*u*1,*u*<sup>2</sup> *<sup>x</sup>* | ∀(*u*1, *<sup>u</sup>*2) <sup>∈</sup> <sup>R</sup>2}. (15)

*<sup>s</sup>*,*u*1,*u*<sup>2</sup> *<sup>x</sup>*, *<sup>W</sup>*<sup>2</sup>

*<sup>T</sup>* (16)

*<sup>s</sup>*,*u*1,*u*<sup>2</sup> *x*]

(12)

(14)

*<sup>T</sup>* can be

*<sup>s</sup>* (*t*1, *t*2) and

*<sup>s</sup>* ) (13)

, *<sup>ψ</sup>*2(*t*1, *<sup>t</sup>*2)=(−1)*<sup>p</sup> <sup>∂</sup>pρ*(*t*1, *<sup>t</sup>*2)

*<sup>s</sup>*<sup>2</sup> *<sup>ψ</sup>*2( *t*1 *s* , *t*2

> *∂t p* 1

> *∂t p* 2

*<sup>s</sup>* (*t*1, *<sup>t</sup>*2) = <sup>1</sup>

*<sup>s</sup>* (*t*1, *<sup>t</sup>*2)=(−*s*)*<sup>p</sup> <sup>∂</sup>p*(*x*(*t*1, *<sup>t</sup>*2) <sup>∗</sup> *<sup>ρ</sup>s*(*t*1, *<sup>t</sup>*2))

*<sup>s</sup>* (*t*1, *<sup>t</sup>*2)=(−*s*)*<sup>p</sup> <sup>∂</sup>p*(*x*(*t*1, *<sup>t</sup>*2) <sup>∗</sup> *<sup>ρ</sup>s*(*t*1, *<sup>t</sup>*2))

*<sup>s</sup> <sup>x</sup>* <sup>=</sup> {*W*<sup>1</sup>

*<sup>s</sup>*,*u*1,*u*<sup>2</sup> *x* denotes the horizontal wavelet coefficient of *x* at scale *s* and point (*u*1, *u*2).

To embed a watermark bit *b* in vector *x*, the QIM method quantizes *x* using the quantizer Q0(.) when *b* = 0 and Q1(.) when *b* = 1. The possible values of the quantizers Q0(.) and

Λ<sup>1</sup> = 2ΔZ<sup>2</sup> + Δ[1, 1]

where Δ and Z<sup>2</sup> denote the *quantization step size* and the 2D set of integer values, respectively. for For the two-dimensional (2-D) QIM, the lattices Λ<sup>0</sup> and Λ<sup>1</sup> are shown in Fig. 1. The

Λ<sup>0</sup> = 2ΔZ<sup>2</sup>

 +∞ −∞ *t k*

*∂t p* 1

*<sup>s</sup>*<sup>2</sup> *<sup>ψ</sup>*1( *t*1 *s* , *t*2 *<sup>s</sup>* ), *<sup>ψ</sup>*<sup>2</sup>

where *ρ*(*t*1, *t*2) is a smoothing function whose double integral is nonzero. Let *ψ*<sup>1</sup>

*<sup>s</sup>* ) and *<sup>W</sup>*<sup>1</sup>

Eq. (14) shows that the vector of wavelet coefficients *Ws*,*u*1,*u*<sup>2</sup> *x*=[*W*<sup>1</sup>

interpreted as the *<sup>p</sup>th*-order gradient vector of *<sup>x</sup>* <sup>∗</sup> *<sup>ρ</sup><sup>s</sup>* at point (*u*1, *<sup>u</sup>*2).

*<sup>s</sup>* (*t*1, *t*2) denote the scaled versions of *ψ*1(*t*1, *t*2) and *ψ*2(*t*1, *t*2), respectively, given as

where *s* denotes the continuous wavelet scale . Using Eqs. (12) and (13), it is easy to show that the horizontal and vertical wavelet components of the 2-D image *x*(*t*1, *t*2) can be obtained as

**2.4 Multiscale gradient estimation Using 2D CWT**

image and the 2-D wavelet coefficients is obtained.

<sup>1</sup> *<sup>ψ</sup>*1(*t*1, *<sup>t</sup>*2) *dt*<sup>1</sup> <sup>=</sup> 0 and

*<sup>ψ</sup>*1(*t*1, *<sup>t</sup>*2)=(−1)*<sup>p</sup> <sup>∂</sup>pρ*(*t*1, *<sup>t</sup>*2)

*<sup>s</sup>* (*t*1, *<sup>t</sup>*2) = <sup>1</sup>

*<sup>s</sup> <sup>x</sup>* <sup>=</sup> *<sup>x</sup>*(*t*1, *<sup>t</sup>*2) <sup>∗</sup> *<sup>ψ</sup>*<sup>1</sup>

*<sup>s</sup> <sup>x</sup>* <sup>=</sup> *<sup>x</sup>*(*t*1, *<sup>t</sup>*2) <sup>∗</sup> *<sup>ψ</sup>*<sup>2</sup>

*<sup>s</sup>*<sup>2</sup> *<sup>ρ</sup>*( *t*1 *s* , *t*2

Q1(.) belong to the lattices Λ<sup>0</sup> and Λ1, respectively:

and *ψ*2(*t*1, *t*2) have *p* vanishing moments, i.e.

*ψ*1

*W*<sup>1</sup>

*W*<sup>2</sup>

where ∗ denotes the *convolution operator*, and

*<sup>ρ</sup>s*(*t*1, *<sup>t</sup>*2) = <sup>1</sup>

**2.5 Quantization Index Modulation (QIM)**

 +∞ −∞ *t k*

moments can be written as

*ψ*2

where *W*<sup>1</sup>

Fig. 1. Illustration of the 2-D uniform quantization index modulation (QIM). Lattices Λ<sup>0</sup> and Λ<sup>1</sup> in Eq. (16) are marked by × and ◦, respectively.

watermarked vector *x<sup>w</sup>* is then obtained as the closest lattice point in Λ<sup>0</sup> to *x* when *b* = 0, or as the closest one in Λ<sup>1</sup> when *b* = 1. This can be expressed as

$$\mathbf{x}^w = \begin{cases} \mathcal{Q}\_0(\mathbf{x}) \text{ if } b = 0\\ \mathcal{Q}\_1(\mathbf{x}) \text{ if } b = 1 \end{cases} \tag{17}$$

At the decoder side, the value of the watermark bit ˆ *b* is extracted from the received vector *x*� by finding whether the nearest lattice point to the point *x<sup>w</sup>* belongs to Λ<sup>0</sup> or Λ1, i.e.

$$\hat{b} = \mathcal{B}(\mathbf{x}') = \arg\min\_{b \in \{0, 1\}} ||\mathbf{x}' - \mathcal{Q}\_b(\mathbf{x}')||. \tag{18}$$

#### **2.6 Angle quantization watermarking**

As mentioned in subsection 1.2, the QIM method is fragile to amplitude scaling attacks. To address this concern, *angle quantization watermarking* embeds the watermark bit in the angle of the 2-dimensional vector. In angle quantization watermarking, the angle *θ* of vector *x* is assigned to a binary number 0 or 1.

In this section, we only describe the *uniform* angle quantization, in which the quantization circle is divided into a number of equiangular sectors in the range (−*π*,*π*], as shown in Fig. 2. Two angle quantization watermarking methods are now described:

#### **2.6.1 Angle Quantization Based Watermarking Method (AQWM)**

The first method we consider is the angular version of the method proposed in (Kundur & Hatzinakos, 1999). The *quantization function*, denoted by *Q*(*θ*), maps a real angle *θ* to a binary number as follows:

$$Q(\theta) = \begin{cases} 0 \text{ if } \lfloor \theta/\Delta \rfloor \text{ is even} \\ 1 \text{ if } \lfloor \theta/\Delta \rfloor \text{ is odd} \end{cases} \tag{19}$$

where the positive real number Δ represents the *angular quantization step size* and �.� denotes the floor function. To embed a watermark bit *b* = 0 or 1 into an angle *θ* ∈ [−*π*,*π*], the following rules are used:

Fig. 2. The angle quantization circle with a fixed quantization step Δ.

Fig. 3. Illustration of different angle quantization watermarking methods: (a) AQWM and (b) AQIM. Vectors before and after watermarking are represented by "thick black" and "thin gray" arrows, respectively.


These rules are illustrated in Fig. 3(a) and can be formulated as:

$$\theta^w = \begin{cases} \theta & \text{if } Q(\theta) = b \\ \theta - \Delta \text{ if } Q(\theta) \neq b \text{ and } \theta > 0 \\ \theta + \Delta \text{ if } Q(\theta) \neq b \text{ and } \theta \le 0 \end{cases} \tag{20}$$

Fig. 4. The block diagram of the watermark embedding scheme.

watermark bit *b* into an angle *θ*:

sectors, whichever is closer to *θ*.

**3. The gradient watermark embedding method**

shown in Fig. 4. The embedding steps are summarized as follows:

These rules are shown in Fig. 3(b).

subsection 3.1.

close to sector boundaries, even a small amount of noise could be enough to make the angle

Image Watermarking in Higher-Order Gradient Domain 483

To overcome these two drawbacks, the angle quantization index modulation (AQIM) method forms a possible alternative. AQIM (Ourique et al., 2005) is an extension of the QIM (Chen & Wornell, 2001) method, where the following rules are used to embed a

• If *Q*(*θ*) = *b*, then *θ* takes the value of the angle at the center of one of the two adjacent

The block diagram of the gradient watermark embedding strategy (N. Arya et al., 2011) is

**Step 1** To embed the watermark in the gradient of the image, first a domain that represents the gradient must be obtained. As shown in Eq. (14), the horizontal and vertical wavelet coefficients could be used to calculate the horizontal and vertical gradients of the image. Thus, based on the selected gradient order (e.g. 2nd, 3rd, 4th or 5th-order gradient), the image is transformed to the wavelet domain using the corresponding wavelet (e.g. Symlet2, Symlet3, Symlet4 or Symlet5). Thus, Symlet2 is used to obtain the 2nd-order gradient, Symlet3 to obtain the 3rd-order gradient and so on. The gradient field at a certain wavelet scale is then obtained using the the wavelet coefficients at the same scale. For example, (for gradient order 3) the gradient fields of image Lena at scales 3, 4 and 5 are obtained from the wavelet coefficients (obtained using Symlet3) at corresponding scales 3, 4 and 5, as shown in Fig. 5. The wavelet-based gradient estimation is described in

**Step 2** To embed the bits of the watermark, the gradient field at each scale is partitioned into blocks (see Fig. 6(a)). The number of blocks depends on the number of bits to be embedded. Thus, bits can be embedded in the gradient fields corresponding to more than one scale. **Step 3** The positions of the gradient vectors are uniformly scrambled at each scale, as illustrated in Fig. 6(b). The watermark bits are inserted into the significant gradient

pass the boundary and thus generate an error when the watermark bit is decoded.

• If *Q*(*θ*) = *b*, then *θ* takes the value of the angle at the center of the sector it lies in.

where *θ<sup>w</sup>* denotes the watermarked angle.

#### **2.6.2 Angle Quantization Index Modulation (AQIM)**

One drawback associated with AQWM is that if *Q*(*θ*) �= *b*, the angle is not necessarily modified toward the *nearest sector* having bit *b*. In other words, AQWM may change the angle more than required and this could lead to a perceptible watermark. Another drawback of AQWM is its low robustness to small angle perturbations. If the watermarked angle *θ<sup>w</sup>* is 8 Will-be-set-by-IN-TECH

(a) (b) Fig. 3. Illustration of different angle quantization watermarking methods: (a) AQWM and (b) AQIM. Vectors before and after watermarking are represented by "thick black" and "thin

*θ* if *Q*(*θ*) = *b*

One drawback associated with AQWM is that if *Q*(*θ*) �= *b*, the angle is not necessarily modified toward the *nearest sector* having bit *b*. In other words, AQWM may change the angle more than required and this could lead to a perceptible watermark. Another drawback of AQWM is its low robustness to small angle perturbations. If the watermarked angle *θ<sup>w</sup>* is

*θ* − Δ if *Q*(*θ*) �= *b* and *θ >* 0 *θ* + Δ if *Q*(*θ*) �= *b* and *θ* ≤ 0 (20)

• If *Q*(*θ*) �= *b*, then *θ* is decreased by Δ if *θ >* 0, and increased by Δ if *θ* ≤ 0.

These rules are illustrated in Fig. 3(a) and can be formulated as:

⎧ ⎨ ⎩

*θ<sup>w</sup>* =

Fig. 2. The angle quantization circle with a fixed quantization step Δ.

gray" arrows, respectively.

• If *Q*(*θ*) = *b*, then *θ* is not changed.

where *θ<sup>w</sup>* denotes the watermarked angle.

**2.6.2 Angle Quantization Index Modulation (AQIM)**

Fig. 4. The block diagram of the watermark embedding scheme.

close to sector boundaries, even a small amount of noise could be enough to make the angle pass the boundary and thus generate an error when the watermark bit is decoded.

To overcome these two drawbacks, the angle quantization index modulation (AQIM) method forms a possible alternative. AQIM (Ourique et al., 2005) is an extension of the QIM (Chen & Wornell, 2001) method, where the following rules are used to embed a watermark bit *b* into an angle *θ*:


These rules are shown in Fig. 3(b).

### **3. The gradient watermark embedding method**

The block diagram of the gradient watermark embedding strategy (N. Arya et al., 2011) is shown in Fig. 4. The embedding steps are summarized as follows:


(a) Partitioned gradient field at scale 4. (b) Scrambled gradient field

Image Watermarking in Higher-Order Gradient Domain 485

Fig. 6. Illustration of different steps during embedding a pseudo-random binary watermark of size 8 × 8 into image Lena. A 64-bit watermark is inserted into the gradient field obtained

(d) Enhanced watermarked gradient

(f) Watermarked image of Lena

field

(c) Watermarked scrambled gradient

(e) Descrambled watermarked gradient

using Symlet3 at scale 4.

field

field

Fig. 5. Image Lena and its representations in the gradient domain. The Symlet3 wavelet is used to obtain the gradient vectors.

vectors of each block. Significant gradient vectors are the gradient vectors with large magnitudes. Embedding the watermark bits in the significant vectors makes it robust to many attacks. As some blocks do not contain significant gradients, and as a watermark bit is inserted into each block, scrambling the locations of the significant gradient vectors is used. The scrambling used should guarantee that statistically each block contains at least one significant gradient vector. More details about the scrambling method are given in subsection 3.2.

**Step 4** The significant gradient vectors of each block are calculated.

**Step 5** For security reasons, the binary watermark message is scrambled using a secret key.


10 Will-be-set-by-IN-TECH

(a) Original image (b) Gradient fields at scales 3, 4 and 5.

Fig. 5. Image Lena and its representations in the gradient domain. The Symlet3 wavelet is

**Step 5** For security reasons, the binary watermark message is scrambled using a secret key. **Step 6** In each block, one bit of the watermark is embedded in the angle of the most significant gradient vectors, using angle quantization index modulation (AQIM) (see Fig. 6(c)). It is preferred however to embed the same bit using 2 (or even more) gradient vectors. The number of the most significant gradient vectors as the bit is embedded in is denoted by

**Step 7** The correct detectability of the watermarked gradient vectors is enhanced by increasing their magnitudes relative to the nonsignificant (unwatermarked) vectors, as

**Step 8** The watermarked gradient fields at each scale are descrambled, using the descrambling method associated with the scrambling method in step 3 (cf. Fig. 6(e)). The

**Step 9** The watermarked wavelet coefficients are obtained from the watermarked gradient

**Step 10** Finally, the watermarked image is obtained using the inverse wavelet transform on

*BR*. The AQIM method in the gradient domain is discussed in subsection 3.3.

illustrated in Fig. 6(d). More explanations are given in subsection 3.4.

descrambling method is explained in subsection 3.2.

the watermarked wavelet coefficients.

**Step 4** The significant gradient vectors of each block are calculated.

vectors of each block. Significant gradient vectors are the gradient vectors with large magnitudes. Embedding the watermark bits in the significant vectors makes it robust to many attacks. As some blocks do not contain significant gradients, and as a watermark bit is inserted into each block, scrambling the locations of the significant gradient vectors is used. The scrambling used should guarantee that statistically each block contains at least one significant gradient vector. More details about the scrambling method are given in

used to obtain the gradient vectors.

subsection 3.2.

vectors.


(c) Watermarked scrambled gradient field


(e) Descrambled watermarked gradient field



(d) Enhanced watermarked gradient field

(f) Watermarked image of Lena

Fig. 6. Illustration of different steps during embedding a pseudo-random binary watermark of size 8 × 8 into image Lena. A 64-bit watermark is inserted into the gradient field obtained using Symlet3 at scale 4.

#### **3.1 Higher-order multiscale gradient transform**

To obtain the gradient vector *g<sup>j</sup>* [*m*] = *gh <sup>j</sup>* [*m*] + *i gv <sup>j</sup>* [*m*] at pixel *m* = (*m*1, *m*2) and wavelet scale *j*, the horizontal and vertical wavelet coefficients *d*<sup>1</sup> *<sup>j</sup>* [*m*] and *<sup>d</sup>*<sup>2</sup> *<sup>j</sup>* [*m*] are used:

$$
\begin{pmatrix} \mathcal{g}\_{hj}[m] \\ \mathcal{g}\_{vj}[m] \end{pmatrix} = A\_j \begin{pmatrix} d\_j^1[m] \\ d\_j^2[m] \end{pmatrix} \tag{21}
$$

and using Eq. (14) matrix *A<sup>j</sup>* is obtained as

$$A\_j = \begin{pmatrix} 1 \ 0 \\ 0 \ 1 \end{pmatrix} \tag{22}$$

In a gradient field of size *M* × *M*, let the coordinate vectors of each vector in the original

Image Watermarking in Higher-Order Gradient Domain 487

where *a*, *b*, *c*, *d*, *e* and *f* are scrambling parameters. If the absolute value of the determinant of the matrix *S* = [*a*, *b*; *c*, *d*] equals to 1 (i.e. *det*(*S*) = |*ad* − *bc*| = 1), the transform is area preserving and one-to-one mapping. For a given positive integer *M*, the *necessary* and *sufficient* condition for the *periodicity* of the affine modular transform is that *det*(*S*) and *M* are primal to

By using the periodicity property of the affine modular transform, the original image can be recovered from the scrambled image. Let the smallest period of this map be denoted by *tM*. If the scrambled image is constructed by applying this transformation *t* times, the descrambled image can be exactly recovered after consecutively applying the same transformation *tM* − *t* times (Xue Yang & Jia, 2010). To reduce the number of parameters needed in embedding and to make it an area preserving transform, the elements of the mapping matrix *S* are assigned

the values *a* = 1, *b* = *p*, *c* = *q* and *d* = 1 + *pq*. The mapping matrix *S* is then given by

 1 *p <sup>q</sup>* <sup>1</sup> <sup>+</sup> *pq*

As mentioned before, to insert the watermark bits, the angles of the significant gradient vectors are changed. The amount of change Δ*θ* in the angle is obtained by Eq. (**??**). To rotate a

> cos (Δ*θ*) <sup>−</sup> sin (Δ*θ*) sin (Δ*θ*) cos (Δ*θ*)

*<sup>j</sup>* [*m*] = *R*<sup>Δ</sup>*θg<sup>j</sup>*

• The attack may result in a change in the angle of a significant gradient vector, such that the

• The attack may result in a reduction in the magnitude of a significant gradient vector, such that the decoder can no longer identify it as a significant vector. In this case, a watermark bit is extracted from a gradient vector that was not amongst the BR most significant vectors.

*S* =

gradient vector by <sup>Δ</sup>*<sup>θ</sup>* <sup>=</sup> *<sup>θ</sup><sup>w</sup>* <sup>−</sup> *<sup>θ</sup>*, the *rotation matrix <sup>R</sup>*Δ*<sup>θ</sup>* (of size 2 <sup>×</sup> 2) is used:

*gw*

*R*Δ*<sup>θ</sup>* =

**3.4 Enhancing the detectability of the watermarked gradient vectors** Attacks may change the watermark bits in one of the following ways:

extracted bit is different from the embedded one.

*<sup>T</sup>* is defined as

*<sup>T</sup>* and [*m*�

<sup>1</sup>, *m*� 2]

*<sup>T</sup>*, respectively. The *affine*

mod(*M*) (23)

. (24)

. (25)

[*m*] (26)

and scrambled gradient fields be denoted by [*m*1, *m*2]

 *m*� 1 *m*� 2 =

*<sup>T</sup>* to [*m*�

<sup>1</sup>, *m*� 2]

*c d <sup>m</sup>*<sup>1</sup> *m*<sup>2</sup> + *e f*

*a b*

*modular mapping* from [*m*1, *m*2]

each other (Zou et al., 2005).

**3.2.2 Descrambling method**

**3.3 AQIM in the gradient domain**

Thus, the watermarked gradient is obtained as

Based on the type of the gradient operator used to calculate the gradient vectors, other versions of matrix *A<sup>j</sup>* can also be used (N. Arya et al., 2011). In this chapter, the identity matrix is used to obtain the higher-order gradient vectors at each scale. This means that the horizontal and vertical wavelet coefficients are the same as the gradient vector components.

#### **3.2 Scrambling and descrambling the gradient fields**

As mentioned before, to embed the watermark bits, the gradient fields of the image are obtained. The straightforward way to embed the watermark bits is to partition the gradient fields into non-overlapping blocks and each watermark bit is then embedded into each block. The bit is inserted into the BR most significant gradient vectors of the block, since embedding the watermark in the significant vectors makes it robust to attacks. However in natural images, the spatial distribution of the significant gradient vectors in the gradient fields is non-uniform (as some parts of the image may have all or most of the significant gradient vectors, while other parts may have no significant gradient vectors). If a bit is embedded into a block with no significant gradient vectors, then the robustness of the watermark bit to noise and other attacks is reduced. Therefore the straightforward uniform embedding may reduce the robustness of the watermark bits in the image areas with no significant gradient vectors.

To solve this problem, the locations of all gradient vectors are uniformly scrambled, so that each block contains at least one significant gradient vector. As shown in Fig. 6(c), the positions of the gradient vectors at each scale are uniformly scrambled over the gradient field. At each block, the watermark bits are inserted into the angles of significant gradient vectors, using AQIM method. The gradient vectors are then descrambled so they are located back at their original positions.

#### **3.2.1 Scrambling method**

The scrambling method should be a geometric transform that would ideally result in a uniform distribution of the locations of the significant gradient vectors. Different geometric image scrambling methods have been proposed. These include the Fibonacci transformation (Zou et al., 2004), Arnold Cat transformation (Ming & Xi-jian, 2006) and Gray Code transformation (Zou & Ward, 2003). It has been shown in (Xue Yang & Jia, 2010) that most of the geometric transforms are special cases of the *affine modular transformation* (Zou et al., 2005). Therefore, the affine modular transform is employed, due to its generality.

In a gradient field of size *M* × *M*, let the coordinate vectors of each vector in the original and scrambled gradient fields be denoted by [*m*1, *m*2] *<sup>T</sup>* and [*m*� <sup>1</sup>, *m*� 2] *<sup>T</sup>*, respectively. The *affine modular mapping* from [*m*1, *m*2] *<sup>T</sup>* to [*m*� <sup>1</sup>, *m*� 2] *<sup>T</sup>* is defined as

$$
\begin{pmatrix} m\_1'\\ m\_2' \end{pmatrix} = \left[ \begin{pmatrix} a \ b\\ c \ d \end{pmatrix} \begin{pmatrix} m\_1\\ m\_2 \end{pmatrix} + \begin{pmatrix} e\\ f \end{pmatrix} \right] \text{mod}(M) \tag{23}
$$

where *a*, *b*, *c*, *d*, *e* and *f* are scrambling parameters. If the absolute value of the determinant of the matrix *S* = [*a*, *b*; *c*, *d*] equals to 1 (i.e. *det*(*S*) = |*ad* − *bc*| = 1), the transform is area preserving and one-to-one mapping. For a given positive integer *M*, the *necessary* and *sufficient* condition for the *periodicity* of the affine modular transform is that *det*(*S*) and *M* are primal to each other (Zou et al., 2005).

#### **3.2.2 Descrambling method**

12 Will-be-set-by-IN-TECH

[*m*] + *i gv <sup>j</sup>*

= *A<sup>j</sup>*

 1 0 0 1 

Based on the type of the gradient operator used to calculate the gradient vectors, other versions of matrix *A<sup>j</sup>* can also be used (N. Arya et al., 2011). In this chapter, the identity matrix is used to obtain the higher-order gradient vectors at each scale. This means that the horizontal

As mentioned before, to embed the watermark bits, the gradient fields of the image are obtained. The straightforward way to embed the watermark bits is to partition the gradient fields into non-overlapping blocks and each watermark bit is then embedded into each block. The bit is inserted into the BR most significant gradient vectors of the block, since embedding the watermark in the significant vectors makes it robust to attacks. However in natural images, the spatial distribution of the significant gradient vectors in the gradient fields is non-uniform (as some parts of the image may have all or most of the significant gradient vectors, while other parts may have no significant gradient vectors). If a bit is embedded into a block with no significant gradient vectors, then the robustness of the watermark bit to noise and other attacks is reduced. Therefore the straightforward uniform embedding may reduce the robustness of the watermark bits in the image areas with no significant gradient vectors. To solve this problem, the locations of all gradient vectors are uniformly scrambled, so that each block contains at least one significant gradient vector. As shown in Fig. 6(c), the positions of the gradient vectors at each scale are uniformly scrambled over the gradient field. At each block, the watermark bits are inserted into the angles of significant gradient vectors, using AQIM method. The gradient vectors are then descrambled so they are located back at their

The scrambling method should be a geometric transform that would ideally result in a uniform distribution of the locations of the significant gradient vectors. Different geometric image scrambling methods have been proposed. These include the Fibonacci transformation (Zou et al., 2004), Arnold Cat transformation (Ming & Xi-jian, 2006) and Gray Code transformation (Zou & Ward, 2003). It has been shown in (Xue Yang & Jia, 2010) that most of the geometric transforms are special cases of the *affine modular transformation* (Zou et al., 2005). Therefore, the affine modular transform is employed, due

*A<sup>j</sup>* =

and vertical wavelet coefficients are the same as the gradient vector components.

*<sup>j</sup>* [*m*] and *<sup>d</sup>*<sup>2</sup>

 *d*<sup>1</sup> *<sup>j</sup>* [*m*] *d*2 *<sup>j</sup>* [*m*]

[*m*] at pixel *m* = (*m*1, *m*2) and wavelet scale

(21)

(22)

*<sup>j</sup>* [*m*] are used:

[*m*] = *gh <sup>j</sup>*

 *gh <sup>j</sup>* [*m*] *gv j* [*m*]

**3.1 Higher-order multiscale gradient transform**

and using Eq. (14) matrix *A<sup>j</sup>* is obtained as

*j*, the horizontal and vertical wavelet coefficients *d*<sup>1</sup>

**3.2 Scrambling and descrambling the gradient fields**

To obtain the gradient vector *g<sup>j</sup>*

original positions.

to its generality.

**3.2.1 Scrambling method**

By using the periodicity property of the affine modular transform, the original image can be recovered from the scrambled image. Let the smallest period of this map be denoted by *tM*. If the scrambled image is constructed by applying this transformation *t* times, the descrambled image can be exactly recovered after consecutively applying the same transformation *tM* − *t* times (Xue Yang & Jia, 2010). To reduce the number of parameters needed in embedding and to make it an area preserving transform, the elements of the mapping matrix *S* are assigned the values *a* = 1, *b* = *p*, *c* = *q* and *d* = 1 + *pq*. The mapping matrix *S* is then given by

$$\mathbf{S} = \begin{pmatrix} 1 & p \\ q \ 1 + pq \end{pmatrix}. \tag{24}$$

#### **3.3 AQIM in the gradient domain**

As mentioned before, to insert the watermark bits, the angles of the significant gradient vectors are changed. The amount of change Δ*θ* in the angle is obtained by Eq. (**??**). To rotate a gradient vector by <sup>Δ</sup>*<sup>θ</sup>* <sup>=</sup> *<sup>θ</sup><sup>w</sup>* <sup>−</sup> *<sup>θ</sup>*, the *rotation matrix <sup>R</sup>*Δ*<sup>θ</sup>* (of size 2 <sup>×</sup> 2) is used:

$$\mathcal{R}\_{\Delta\theta} = \begin{pmatrix} \cos\left(\Delta\theta\right) - \sin\left(\Delta\theta\right) \\ \sin\left(\Delta\theta\right) \quad \cos\left(\Delta\theta\right) \end{pmatrix}. \tag{25}$$

Thus, the watermarked gradient is obtained as

$$\mathbf{g}\_{j}^{w}[\![m]\!] = \mathbf{R}\_{\Lambda \theta} \mathbf{g}\_{j}[\![m]\!] \tag{26}$$

#### **3.4 Enhancing the detectability of the watermarked gradient vectors**

Attacks may change the watermark bits in one of the following ways:


Fig. 7. The block diagram of the watermark decoding scheme.

In the first case, to increase the watermark robustness, a larger angle quantization step size Δ is preferred. Note that the maximum step size is constrained by the imperceptibility constraint on the embedded watermark. In the second case, one solution is to enhance the detectability of the watermarked gradient vectors by increasing the magnitude *r* of such a vector.

Let us denote the magnitude of the gradient vector *g<sup>j</sup>* by *r*. To increase the magnitude of each watermarked vector, *dr* can be calculated by:

$$dr = \frac{\alpha}{r} e^{-(r - r\_{LIS})} \tag{27}$$

Image Δ<sup>3</sup> (rad) Δ<sup>4</sup> (rad) Δ<sup>5</sup> (rad) *α* PSNR (dB) Lena *π*/10 *π*/22 *π*/24 0.05 42 dB Barbara *π*/12 *π*/20 *π*/26 0.5 42 dB Baboon *π*/12 *π*/16 *π*/18 0.60 42 dB Peppers *π*/12 *π*/22 *π*/26 0.25 42 dB

Image Watermarking in Higher-Order Gradient Domain 489

where *BR* denotes the number of watermarked significant gradient vectors in each block, *γ* is a constant that represents the importance of magnitude weighting vs. angle weighting. Based on the weights determined by Eq. (28), the watermark bit in each block after

1 if *<sup>b</sup><sup>w</sup>* <sup>≥</sup> 0.5

*BR* ∑ *k*=1 *ak*

*ak*B(*θ<sup>k</sup>* )

*BR* ∑ *k*=1

**Step 6** Since the extracted watermark is the scrambled version of the original message, it

Different pseudo-random binary watermarks of size 256 are embedded in the grayscale images *Lena*, *Barbara*, *Baboon* and *Peppers*. All the images are of size 512 × 512. To obtain the 2nd, 3rd, 4th and 5th order gradients, Symlet2, Symlet3, Symlet4 and Symlet5 wavelets are used, respectively. The Symlet wavelets are chosen because of their near-symmetrical shapes. Irrespective of the order of the gradient used, for a 256-bit watermark, 128, 64 and 64 bits are embedded in the gradient fields at scales 3, 4 and 5 using the block sizes 4 × 8, 4 × 4 and 2 × 2,

The parameters (*p*, *q*) for images Pappers, Baboon, Barbara and Lena are set to (3, 4), (1, 1), (2, 3) and (2, 1), respectively. The value of the parameter *γ* in Eq. (28) is set to 4. Each bit is embedded in the 2 most significant (largest) gradient vectors of each block, i.e. BR=2. The angular quantization step size Δ and the gradient magnitude enhancement coefficient *α*, given in Eq. (27), are obtained separately for each image and gradient transform. Table **??** shows the optimum values of Δ for each image. To evaluate the robustness of the scheme, each watermarked image is distorted by different types of attacks. After the attacks, each watermark is extracted and is compared with the original watermark to estimate the *bit error rate* (BER). The overall BER is obtained by averaging over 100 runs with 100 different

The BER (%) results of the *gradient direction watermarking* (GDWM) method, under amplitude scaling, Gaussian filtering, median filtering and JPEG compression is shown in Table **??**. It can be seen that GDWM is robust to amplitude scaling attack, no matter which gradient transform

0 Otherwise (29)

(30)

Table 1. Values of the quantization step size Δ, the gradient magnitude enhancement

ˆ *b* =

*b<sup>w</sup>* =

should be descrambled using the same key used in the embedding process.

coefficient *α*, and the PSNR of the watermarked image.

where the function B(*θ*) is as defined in Eq. (18).

decoding is given the value

where *b<sup>w</sup>* is defined as

**5. Example**

respectively.

pseudo-random binary watermarks.

where *α* is a constant that adjusts the overall gradient magnitude change in the image and *rLIS* is the magnitude of the *largest insignificant* gradient vector in each block.

#### **4. The watermark decoding method**

The block diagram of the watermark decoding method is shown in Fig. 7. The decoding steps are as follows:


**Step 4** The significant gradient vectors of each block are detected.

	- A watermark bit extracted from a large gradient vector is given more weight than a bit extracted from a small gradient vector.
	- A watermark bit extracted from an angle close to the center of a sector, is given more weight than a bit extracted from an angle close to a sector boundary.

Based on these two rules, each watermark bit is weighted by

$$a\_k = r^\gamma. \left[\frac{\Delta}{2} - \left| |\theta| - \left(\Delta \lfloor \frac{|\theta|}{\Delta} \rfloor + \Delta / 2\right) \right|\right], \ k = 1, \dots, BR \tag{28}$$


Table 1. Values of the quantization step size Δ, the gradient magnitude enhancement coefficient *α*, and the PSNR of the watermarked image.

where *BR* denotes the number of watermarked significant gradient vectors in each block, *γ* is a constant that represents the importance of magnitude weighting vs. angle weighting. Based on the weights determined by Eq. (28), the watermark bit in each block after decoding is given the value

$$
\delta = \begin{cases} 1 \text{ if } b^w \ge 0.5\\ 0 \text{ Otherwise} \end{cases} \tag{29}
$$

where *b<sup>w</sup>* is defined as

$$b^w = \frac{\sum\_{k=1}^{BR} a\_k \mathcal{B}(\theta\_k)}{\sum\_{k=1}^{BR} a\_k} \tag{30}$$

where the function B(*θ*) is as defined in Eq. (18).

**Step 6** Since the extracted watermark is the scrambled version of the original message, it should be descrambled using the same key used in the embedding process.

#### **5. Example**

14 Will-be-set-by-IN-TECH

In the first case, to increase the watermark robustness, a larger angle quantization step size Δ is preferred. Note that the maximum step size is constrained by the imperceptibility constraint on the embedded watermark. In the second case, one solution is to enhance the detectability

Let us denote the magnitude of the gradient vector *g<sup>j</sup>* by *r*. To increase the magnitude of each

where *α* is a constant that adjusts the overall gradient magnitude change in the image and *rLIS*

The block diagram of the watermark decoding method is shown in Fig. 7. The decoding steps

**Step 1** Step 1 of watermark embedding process is repeated. That is the watermarked image is mapped to the gradient domain using the multiscale gradient transform, discussed in

**Step 2** As in step 2 of the watermark embedding, the gradient field at each scale is partitioned into blocks. The blocks should be of the same size as those used in the embedding process. **Step 3** The positions of the gradient vectors are uniformly scrambled with the same method

**Step 5** The bits of the *BR* most significant gradient vectors of each block are decoded, using the AQIM decoder, as discussed in subsection 2.6. If all the *BR* decoded bits have the same

• A watermark bit extracted from a large gradient vector is given more weight than a bit

• A watermark bit extracted from an angle close to the center of a sector, is given more

 

*b*), the decoded watermark bit will also be the same bit (i.e. ˆ

bits have different values, they are assigned weights based on the following rules:

weight than a bit extracted from an angle close to a sector boundary.

<sup>−</sup>(*r*−*rLIS*) (27)

*b*). In the case, the

, *k* = 1, . . . , *BR* (28)

of the watermarked gradient vectors by increasing the magnitude *r* of such a vector.

*dr* <sup>=</sup> *<sup>α</sup> r e*

is the magnitude of the *largest insignificant* gradient vector in each block.

and parameters used in step 3 of the the embedding process. **Step 4** The significant gradient vectors of each block are detected.

Based on these two rules, each watermark bit is weighted by

 Δ 2 − |*θ*| − Δ� |*θ*| <sup>Δ</sup> � <sup>+</sup> <sup>Δ</sup>/2

extracted from a small gradient vector.

*ak* = *rγ*.

Fig. 7. The block diagram of the watermark decoding scheme.

watermarked vector, *dr* can be calculated by:

**4. The watermark decoding method**

are as follows:

subsection 3.1.

value (e.g. ˆ

Different pseudo-random binary watermarks of size 256 are embedded in the grayscale images *Lena*, *Barbara*, *Baboon* and *Peppers*. All the images are of size 512 × 512. To obtain the 2nd, 3rd, 4th and 5th order gradients, Symlet2, Symlet3, Symlet4 and Symlet5 wavelets are used, respectively. The Symlet wavelets are chosen because of their near-symmetrical shapes. Irrespective of the order of the gradient used, for a 256-bit watermark, 128, 64 and 64 bits are embedded in the gradient fields at scales 3, 4 and 5 using the block sizes 4 × 8, 4 × 4 and 2 × 2, respectively.

The parameters (*p*, *q*) for images Pappers, Baboon, Barbara and Lena are set to (3, 4), (1, 1), (2, 3) and (2, 1), respectively. The value of the parameter *γ* in Eq. (28) is set to 4. Each bit is embedded in the 2 most significant (largest) gradient vectors of each block, i.e. BR=2. The angular quantization step size Δ and the gradient magnitude enhancement coefficient *α*, given in Eq. (27), are obtained separately for each image and gradient transform. Table **??** shows the optimum values of Δ for each image. To evaluate the robustness of the scheme, each watermarked image is distorted by different types of attacks. After the attacks, each watermark is extracted and is compared with the original watermark to estimate the *bit error rate* (BER). The overall BER is obtained by averaging over 100 runs with 100 different pseudo-random binary watermarks.

The BER (%) results of the *gradient direction watermarking* (GDWM) method, under amplitude scaling, Gaussian filtering, median filtering and JPEG compression is shown in Table **??**. It can be seen that GDWM is robust to amplitude scaling attack, no matter which gradient transform


Table 2. The BER (%) results of GDWM under different types of attacks.

is used. For the Gaussian filtering, median filtering and JPEG compression attacks, Symlet5 (i.e. the 5th-order gradient of the image) gives the best results.

(a) Symlet2, SSIM=0.9944 (b) Symlet3, SSIM=0.9935

Image Watermarking in Higher-Order Gradient Domain 491

(c) Symlet4, SSIM=0.9958 (d) Symlet5, SSIM=0.9963

The results clearly demonstrate that the GDWM method consistently outperforms the Wang's

In Table 4 the GDWM is compared with the non-blind method proposed in (Akhaee et al., 2010). In both methods, a 128-bit pseudo-random binary message is embedded in the images Baboon and Barbara with PSNRs 39.53 dB and 36.63 dB, respectively. To embed 128 bits, 64, 32 and 32 bits are inserted in the gradient fields at scales 3, 4 and 5, respectively. Symlet5 wavelet is used to obtain the 5th-order gradient fields. It can be seen that the GDWM method outperforms Akhaee's method (Akhaee et al., 2010) under the spatial scaling, JPEG compression and AWGN noise attacks. However, GDWM is slightly less robust under the salt

Fig. 8. Test image Lena watermarked using different gradient transforms in the GDWM

method. In each case, a 256-bit watermark is embedded with PSNR=42dB.

method under all considered attacks.

& pepper noise attacks.

Fig. 8 presents the image Lena watermarked with the GDWM method, using Symlet2, Symlet3, Symlet4 and Symlet5 wavelets. To compare the original and watermarked images, the SSIM metric is employed due to its compatibility with the human visual system (Wang et al., 2004). As shown in Fig. 8, the GDWM method yields imperceptible watermarks at PSNR=42 dB. Based on visual inspection, Symlet4 (i.e. the gradient of order 4) gives the most imperceptible watermark. However, the best SSIM value is obtained by Symlet5 (i.e. the gradient of order 5).

Table 3 compares the BER results of the GDWM method with the method in (Wang et al., 2002) under median filtering, JPEG compression, AWGN and salt & pepper noise attacks. As in (Wang et al., 2002), the watermark length in both methods is 256 bits and the PSNR of all the watermarked test images is 42 dB. Symlet5 wavelet is used to implement the GDWM method.


Table 3. The BER comparisons between the GDWM and Wang's method (Wang et al., 2002) under different types of attacks (Message length=256 bits, PSNR=42 dB)

16 Will-be-set-by-IN-TECH

Image Wavelet Amplitude Scaling Gaussian Filter Median Filter JPEG (*Q*)

Lena Sym2 0 1.19 4.99 0.66 5.23 8.17 0.45 Lena Sym3 0 0 3.23 0.33 4.61 7.79 0.48 Lena Sym4 0 6.36 15.78 0.51 9.42 16.95 4.20 Lena Sym5 0 **0 0**.**95 0 2**.**83 6**.**67 0**.**32** Barbara Sym2 0 0.64 2.20 0 3.46 7.57 0.49 Barbara Sym3 0 0.59 1.74 **0** 2.57 7.35 **0**.**28** Barbara Sym4 0 3.10 11.84 1.57 16.50 19.20 5.55 Barbara Sym5 0 **0**.**09 1**.**22** 0.41 **2**.**41 6**.**62** 0.32 Baboon Sym2 0 0.94 5.95 2.27 14.81 **6**.**92** 0.16 Baboon Sym3 0 1.23 **4**.**65** 1.91 18.33 7.59 **0**.**13** Baboon Sym4 0 4.40 16.26 7.29 28.16 18.83 5.99 Baboon Sym5 0 **0**.**18** 5.70 **0**.**98 14**.**80** 8.15 0.15 Peppers Sym2 0 0.93 5.66 0.51 4.43 7.72 0.79 Peppers Sym3 0 2.28 6.59 **0**.**01** 3.81 7.69 **0**.**36** Peppers Sym4 0 24.97 37.16 1.07 10.95 21.13 5.91 Peppers Sym5 0 **0**.**92 3**.**25** 0.22 **2**.**81 7**.**50** 0.48

is used. For the Gaussian filtering, median filtering and JPEG compression attacks, Symlet5

Fig. 8 presents the image Lena watermarked with the GDWM method, using Symlet2, Symlet3, Symlet4 and Symlet5 wavelets. To compare the original and watermarked images, the SSIM metric is employed due to its compatibility with the human visual system (Wang et al., 2004). As shown in Fig. 8, the GDWM method yields imperceptible watermarks at PSNR=42 dB. Based on visual inspection, Symlet4 (i.e. the gradient of order 4) gives the most imperceptible watermark. However, the best SSIM value is obtained by

Table 3 compares the BER results of the GDWM method with the method in (Wang et al., 2002) under median filtering, JPEG compression, AWGN and salt & pepper noise attacks. As in (Wang et al., 2002), the watermark length in both methods is 256 bits and the PSNR of all the watermarked test images is 42 dB. Symlet5 wavelet is used to implement the GDWM method.

Image Method Median Filter JPEG AWGN S&P

Lena Wang 30.80 29.80 1.45 2.45 Lena GDWM **0 5**.**54 0**.**29 1**.**67** Barbara Wang 24.95 16.45 1.45 2.25 Barbara GDWM **0**.**41 4**.**73 0**.**16 2**.**12** Baboon Wang 31.65 16.95 1.30 1.95 Baboon GDWM **0**.**98 4**.**61 0**.**11 1**.**60** Peppers Wang 29.35 26.10 1.25 **2**.**00** Peppers GDWM **0**.**22 5**.**67 0**.**40** 2.60

Table 3. The BER comparisons between the GDWM and Wang's method (Wang et al., 2002)

under different types of attacks (Message length=256 bits, PSNR=42 dB)

3 × 3 *Q* = 11 *σ* = 10 *p* = 0.01

Table 2. The BER (%) results of GDWM under different types of attacks.

(i.e. the 5th-order gradient of the image) gives the best results.

Symlet5 (i.e. the gradient of order 5).

(scale=2) 7 × 7 9 × 9 3 × 3 5 × 5 10 20

(a) Symlet2, SSIM=0.9944 (b) Symlet3, SSIM=0.9935

(c) Symlet4, SSIM=0.9958 (d) Symlet5, SSIM=0.9963

Fig. 8. Test image Lena watermarked using different gradient transforms in the GDWM method. In each case, a 256-bit watermark is embedded with PSNR=42dB.

The results clearly demonstrate that the GDWM method consistently outperforms the Wang's method under all considered attacks.

In Table 4 the GDWM is compared with the non-blind method proposed in (Akhaee et al., 2010). In both methods, a 128-bit pseudo-random binary message is embedded in the images Baboon and Barbara with PSNRs 39.53 dB and 36.63 dB, respectively. To embed 128 bits, 64, 32 and 32 bits are inserted in the gradient fields at scales 3, 4 and 5, respectively. Symlet5 wavelet is used to obtain the 5th-order gradient fields. It can be seen that the GDWM method outperforms Akhaee's method (Akhaee et al., 2010) under the spatial scaling, JPEG compression and AWGN noise attacks. However, GDWM is slightly less robust under the salt & pepper noise attacks.

Cox, I., Kilian, J., Leighton, F. & Shamoon, T. (1997). Secure spread spectrum watermarking

Image Watermarking in Higher-Order Gradient Domain 493

Cox, I., Miller, M. & McKellips, A. (1999). Watermarking as communications with side

Eggers, J. J., Baeuml, R. & Girod, B. (2002). Estimation of amplitude modifications

Eggers, J. J., Bäuml, R. & Girod, B. (2002). Estimation Of Amplitude Modifications before

Hernandez, J., Amado, M. & Perez-Gonzalez, F. (2000). Dct-domain watermarking techniques

Kalantari, N. & Ahadi, S. (2010). A logarithmic quantization index modulation for perceptually better data hiding, *IEEE Trans. on Image Proces.* 19(6): 1504 –1517. Kalantari, N., Ahadi, S. & Vafadust, M. (2010). A robust image watermarking in the ridgelet

Kundur, D. & Hatzinakos, D. (1999). Digital watermarking for telltale tamper proofing and

Kundur, D. & Hatzinakos, D. (2001). Diversity and attack characterization for improved robust

Lagendijk, R. & Shterev, I. (2004). Estimation of attacker's scale and noise variance for qim-dc

Langelaar, G., Setyawan, I. & Lagendijk, R. (2000). Watermarking digital image and video data. a state-of-the-art overview, *IEEE Signal Proces. Mag.* 17(5): 20 –46. Li, Q. & Cox, I. (2007). Using perceptual models to improve fidelity and provide

Mallat, S. & Hwang, W. (1992). Singularity detection and processing with wavelets, *Information*

Malvar, H. & Florencio, D. (2003). Improved spread spectrum: a new modulation technique for robust watermarking, *IEEE Transactions on Signal Processing* 51(4): 898 – 905. Miller, M., Doerr, G. & Cox, I. (2004). Applying informed coding and embedding to design a robust high-capacity watermark, *IEEE Trans. on Image Proces.* 13(6): 792 –807. Ming, C. & Xi-jian, P. (2006). Image steganography based on arnold transform, *Computer appl.*

*IEEE Transactions on Information Forensics and Security* 2(2): 127 –139.

Moulin, P. & Koetter, R. (2005). Data-hiding codes, *Proc. of the IEEE* 93(12): 2083 –2126. N. Arya, E., Wang, Z. & Ward, R. (2011). Robust image watermarking based on multiscale

Mallat, S. (1997). *A Wavelet Tour of Signal Proces.*, AP Professional, London.

*Theory, IEEE Transactions on* 38(2): 617 –643.

resistance to valumetric scaling for quantization index modulation watermarking,

gradient direction quantization, *Information Forensics and Security, IEEE Transactions*

embedding scheme robust against amplitude scaling distortions, *Proc. IEEE Int. Conf.*

Ourique, F., Licks, V., Jordan, R. & Perez-Gonzalez, F. (2005). Angle qim: a novel watermark

*on Acoust., Speech, and Signal Proces. (ICASSP '05)* 2: ii/797 – ii/800 Vol. 2.

watermarking, *IEEE Trans. on Signal Proces.* 49(10): 2383 –2396.

before scs watermark detection, *Security and Watermarking of Multimedia Contents IV*

SCS Watermark Detection, *Proceedings of SPIE Security and Watermarking of Multimedia*

for still images: detector performance analysis and a new structure, *Image Processing,*

domain using universally optimum decoder, *IEEE Trans. on Circ. and Sys. for Video*

for multimedia, *IEEE Trans. on Image Proces.* 6(12): 1673 –1687.

information, *Proceedings of the IEEE* 87(7): 1127 –1141.

authentication, *Proc. of the IEEE* 87(7): 1167 –1180.

4675(1): 387–398.

*Contents IV* 4675: 387–398.

*Tech.* 20(3): 396 –406.

*research* 1: 235–237.

*on* (99): 1.

*IEEE Transactions on* 9(1): 55 –68.

watermark embedding, 1: 55–58.


Table 4. The BER comparison between the GDWM method and Akhaee's method (Akhaee et al., 2010) under different types of attacks (Message length=128 bits)

#### **6. Conclusion**

This chapter describes a gradient-based image watermarking method, called gradient direction watermarking (GDWM). In this method, the watermark bits are embedded in the angles of the gradient vectors of the image. The gradient vectors correspond to a higher-order gradient of the image. The gradient fields are obtained from the wavelet coefficients of the image at different scales. To embed the watermark bit in the gradient angle, the angle quantization index modulation (AQIM) method is used. AQIM makes the watermark both imperceptible and robust to amplitude scaling attack.

The GDWM method is tested on different real images. The experimental results show that implementing the GDWM method in the 5th-order gradient domain (obtained using using Symlet5 wavelet) yields both robust and imperceptible watermarks. It is also shown that the GDWM outperforms other watermarking methods and it is robust to a wide range of attacks.

#### **7. References**


18 Will-be-set-by-IN-TECH

(*s* = 0.8) (*Q* = 20) (*σ* = 20) (*p* = 0.05)

Image Method Scaling JPEG AWGN S&P

Barbara Akhaee 2.34 0.40 0.10 **1**.**48** Barbara GDWM **000** 1.61 Baboon Akhaee 3.20 1.80 0.30 **2**.**89** Baboon GDWM **0 0**.**22 0**.**16** 4.31

method (Akhaee et al., 2010) under different types of attacks (Message length=128 bits)

This chapter describes a gradient-based image watermarking method, called gradient direction watermarking (GDWM). In this method, the watermark bits are embedded in the angles of the gradient vectors of the image. The gradient vectors correspond to a higher-order gradient of the image. The gradient fields are obtained from the wavelet coefficients of the image at different scales. To embed the watermark bit in the gradient angle, the angle quantization index modulation (AQIM) method is used. AQIM makes the watermark both

The GDWM method is tested on different real images. The experimental results show that implementing the GDWM method in the 5th-order gradient domain (obtained using using Symlet5 wavelet) yields both robust and imperceptible watermarks. It is also shown that the GDWM outperforms other watermarking methods and it is robust to a wide range of attacks.

Abrardo, A. & Barni, M. (2004). Orthogonal dirty paper coding for informed data hiding,

Akhaee, M., Sahraeian, S. & Marvasti, F. (2010). Contourlet-based image watermarking using

Bao, P. & Ma, X. (2005). Image adaptive watermarking using wavelet domain singular value decomposition, *IEEE Trans. on Circ. and Sys. for Video Tech.* 15(1): 96 – 102. Barni, M. (2003). What is the future for watermarking? (part ii), *Signal Processing Magazine,*

Barni, M., Bartolini, F., De Rosa, A. & Piva, A. (2003). Optimum decoding and detection of multiplicative watermarks, *IEEE Trans. on Signal Proces.* 51(4): 1118 – 1123. Barni, M., Bartolini, F. & Piva, A. (2001). Improved wavelet-based watermarking through

Bradley, B. A. (2004). Improvement to cdf grounded lattice codes, *Security, Steganography, and*

Chen, B. & Wornell, G. (2001). Quantization index modulation: a class of provably good

Chen, L.-H. & Lin, J.-J. (2003). Mean quantization based image watermarking, *Image and Vision*

Cheng, Q. & Huang, T. (2001). An additive approach to transform-domain information hiding and optimum detection structure, *IEEE Trans. on Multimedia* 3(3): 273 –284. Cox, I. (2008). *Digital watermarking and steganography*, The Morgan Kaufmann series in multimedia information and systems, Morgan Kaufmann Publishers.

methods for digital watermarking and information embedding, *IEEE Trans. on*

pixel-wise masking, *IEEE Trans. on Image Proces.* 10(5): 783 –791.

*Watermarking of Multimedia Contents VI* 5306(1): 212–223.

*Information Theory* 47(4): 1423 –1443.

*Computing* 21(8): 717 – 727.

*Security, Steganography, and Watermarking of Multimedia Contents VI* 5306(1): 274–285.

optimum detector in a noisy environment, *IEEE Trans. on Image Proces.* 19(4): 967 –980.

Table 4. The BER comparison between the GDWM method and Akhaee's

imperceptible and robust to amplitude scaling attack.

**6. Conclusion**

**7. References**

*IEEE* 20(6): 53 – 59.


**21** 

**Signal and Image** 

Burhan Ergen *Frat University* 

*Turkey* 

**Denoising Using Wavelet Transform** 

The wavelet transform (WT) a powerful tool of signal and image processing that have been successfully used in many scientific fields such as signal processing, image compression, computer graphics, and pattern recognition (Daubechies 1990; Lewis and Knowles 1992; Do and Vetterli 2002; Meyer, Averbuch et al. 2002; Heric and Zazula 2007). On contrary the traditional Fourier Transform, the WT is particularly suitable for the applications of nonstationary signals which may instantaneous vary in time (Daubechies 1990; Mallat and Zhang 1993; Akay and Mello 1998). It is crucial to analyze the time-frequency characteristics of the signals which classified as non-stationary or transient signals in order to understand the exact features of such signals (Rioul and Vetterli 1991; Ergen, Tatar et al. 2010). For this reason, firstly, researchers has concentrated on continuous wavelet transform (CWT) that gives more reliable and detailed time-scale representation rather than the classical short time Fourier transform (STFT) giving a time-frequency representation (Jiang 1998; Qian and Chen

The CWT technique expands the signal onto basis functions created by expanding, shrinking and shifting a single prototype function, which named as mother wavelet, specially selected for the signal under considerations. This transformation decomposes the signal into different scales with different levels of resolution. Since a scale parameter shrinking or expanding the mother wavelet in CWT, the result of the transform is time-scale representation. The scale parameter is indirectly related to frequency, when considered the

A mother wavelet has satisfy that it has a zero mean value, which require that the transformation kernel of the wavelet transform compactly supports localization in time, thereby offering the potential to capture the spikes occurring instantly in a short period of

A wavelet expansion is representation of a signal in terms of an orthogonal collection of real-valued generated by applying suitable transformation to the original selected wavelet. The properties and advantages of a family of wavelets depend upon the mother wavelet features. The expansion is formed by two dimensional expansion of a signal and thus provides a time-frequency localization of the input signal. This implies that most of the energy of the signal will be captured a few coefficient. The basis functions in a wavelet

time (Mallat 1989; Rioul and Vetterli 1991; Akay and Mello 1998).

**1. Introduction** 

1999).

center frequency of mother wavelet.

