Digital Image Watermarking Scheme Using Discrete Wavelet Transform Domain, Quantization, and Genetic Algorithm

Protection of digital multimedia content has become an increasingly important issue for content owners and service providers. Watermarking is identified as a major means to achieve copyright protection. The algorithm proposed in this work, is to use a blind watermarking scheme based on the Discrete Wavelet Transform (DWT). Watermark components are embedded in the LL subband of the 4 th DWT level of the host image by quantizing coefficients of the LL subband to improve the watermark robustness. The Genetic Algorithm (GA) is used for optimizing the quantization step size parameter, and the strength of factors. The host image used is a 512×512 gray scale image and the watermark image is a 32×32 binary logo. The proposed scheme was tested against mostly known threats and it proves to give good robustness. Also, it still gives a high quality watermarked image. MATLAB Program was used to perform the watermarking task.


Introduction:
Digital watermark means embedding information into digital material in such a way that it is imperceptible to the human observer, but can be detected by computer algorithms. A digital watermark is a transparent, invisible information pattern that is inserted into a suitable component of the data source by using a specific computer algorithm [1]. This invisible watermark requires a very high level of robustness. The driving force for this application is the Web which contains millions of freely available images that the rightful owners want to protect [2].
An effective image watermarking scheme mainly includes watermark generation, watermark embedding, watermark detecting or identification, and watermark attacks. Watermark generation refers to what content and form of data a watermarking scheme adopts as a watermark [3]. Watermark embedding is an important part in a watermarking scheme and must meet the two most fundamental requirements under the condition of fixed watermark size; the imperceptibility and the robustness. The two requirements are in conflict with each other and need to reach a trade-off [4]. Watermarks can be embedded into the multimedia content in spatial domain or in frequency domain. Embedding the watermark into the spatial domain components of the original image is the straightforward method for digital watermarking [5]. Although, the spatial domain watermark embedding is simple and easy to implement, it is less robust than frequency domain watermark embedding at various attacks and noise [6].
Some methods extract the whole watermark information (decoder) and others only determine its existence (detector), such methods can be used either as ownership proof or verification [1]. The detection process decides (yes) if the watermark is found and (no) if the watermark is absent [6].
There are a number of desirable characteristics that a watermarking technique should exhibit. That is, a watermarking technique should, at least, include the following requirements [7]: 1. Robustness: It refers to the ability to detect the watermark, after the watermarked data has passed through certain signal processing operations, examples of common operations on images including resizing, linear and non-linear filters, lossy compression, contrast adjustment ... etc. 2. Imperceptibility: It refers to the perceptual similarity between the original and watermarked versions of the cover image. The imperceptibility is dependent on the characteristics of the human visual system (HVS). 3. Security: Even if attackers have full knowledge about the applied watermark procedure, a secret key is normally used to assure security. So, security is based on the use of keys and the keys should be chosen from a large key space so that searching over the space of all possible keys is impractical. 4. Capacity: It refer to the number of bits encoded within the image.
One commonly employed measure to evaluate the imperceptibility of the watermarked image is the peak signal-to-noise ratio (PSNR). Assuming that the original image X and the watermarked image X' both have image sizes M x N. The mean square error (MSE) between the original and the watermarked images can be represented by [6]: Consequently, the PSNR in decibel (dB) can be calculated by [6]: The quality of blind or non-blind extracted watermark is evaluated in terms of Correlation Coefficient (CC), for the extracted watermark W' as compared to the original watermark W as [7]: Where W and ' W are the average value of the embedded and extracted watermarks respectively, X and Y represent the dimensions of the watermark [7].
In order to embed and extract the watermark information, non-blind, Semi-blind, and blind techniques may be used. Non-blind schemes: require both the original image and the secret key(s) for watermark embedding. Semi-blind schemes: require the secret key(s) and the watermark bit sequence. Blind schemes: require only the secret key(s) [8]. Given below some of the related researches: Sanjeev Kumar et al 2009 [9] presented a digital watermarking algorithm in DWT domain for stereo image coding. A disparity-image was computed from the pair of stereo images using a frequency domain based matching criteria. Later, this disparityimage was used as a watermark and embedded into the degraded host (left stereo) image based on a modifying singular values concept. The real coded genetic algorithm was used to estimate the optimal order of Arnold transform and strength of the watermark. Experimental results had been presented to show the efficiency and applicability of proposed algorithm for the task of stereo image coding.
B.Jagadeesh et al 2010 [10] presented image watermarking scheme based on Singular Value Decomposition, Quantization and Genetic Algorithms. In an SVD based watermarking scheme the largest singular values of the host image were modified to embed the watermark data. Modifications were optimized by using GA to obtain the highest possible robustness without losing the transparency. This technique was blind watermarking. The quality of the watermarked image was good in terms of perceptibility and PSNR. The proposed method was robust to several common image processing operations.
Hanaa A. Abdallah et al 2011 [11] presented a blind wavelet-based image watermarking scheme. It was based on inserting the watermark bits into the coarsest scale wavelet coefficients of the third-level wavelet decomposition. This scheme depended on the quantization of certain wavelet coefficients within certain amplitude ranges in a binary manner to embed meaningful information in the image. Only, perceptually significant coefficients were used to embed the watermark bits. It produced watermarked images with less degradation than the traditional wavelet-based schemes.
In this paper, a blind watermarking scheme is introduced. The requirements were met by the proposed algorithm exploiting the attractive properties of the DWT. The low frequency subband of the four level wavelet decomposition (LL4) is selected to embed the logo image. Genetic Algorithm is used for optimizing the uniform scalar quantization step size parameter, and adaptive strength factors. The remainder of this paper is organized as follows: Section II describes the background of DWT, quantization, GA, and Singular Value Decomposition (SVD), section III describes the details of the proposed scheme, in section IV the experimental results are provided to demonstrate the effectiveness of the proposed scheme, and in section V the conclusions are given.

Discrete Wavelet Transform (DWT) :
DWT is used to transform the image from spatial domain to frequency domain. The basic idea in the DWT for a one dimensional signal is to split the signal into two parts, usually the high frequency and the low frequency part. This splitting is called decomposition. The edge components of the signal are largely confined to the high frequencies part. The part with the low frequencies could be split again into two parts of high and low frequencies [12].
The DWT for a two dimensional image X (m,n) can be similarly defined by implementing the one dimensional DWT for each dimension m and n separately as shown in Figure 1. Four sets of wavelet subbands result from 2D-DWT (LL, LH, HL and HH). The perfect reconstruction is also obtained by applying the 1D synthesis scheme on rows and columns successively, where (H: high-pass filtering, L: low-pass filtering) [13]. More details about wavelet transform can be found in [14].
Advantages of embedding a watermark in a Wavelet Transformed image: • It performs an analysis similar to that of the HVS. The HVS splits an image into several frequency bands and processes each band independently [13]. • As any watermarked image may be subjected to JPEG2000 compression, embedding in any DWT subband gives more robust behavior because of the compatibility with the JPEG2000 [12]. • Wavelet processes data at different scales or resolutions, highlighting both large and small features [15].

Quantization
Quantization is the process of mapping a large set of values to a smaller set. Quantization can be performed to reduce the data amount without a serious reduction in visual quality [16].
Quantization techniques can be classified into scalar quantization and vector quantization techniques. The quantization with scalar input and output is called scalar quantization, whereas that with vector input and output is referred to as vector quantization [17].
According to whether the quantization step is uniform or not, quantization techniques can be classified into uniform and non-uniform. Each cell is of the same length in the uniform scalar quantizer, while cells have different lengths in the nonuniform scalar quantizer [16].

Genetic Algorithm (GA)
The genetic algorithm (GA) is an optimization and search technique based on the principles of genetics and natural selection. GA allows a population composed of many individuals to evolve under specified selection rules to a state that maximizes the "fitness" [18].
A whole new population of possible solutions is produced by selecting the best individuals from the current generation, and mating them to produce a new set of individuals. This new generation contains a higher proportion of the characteristics possessed by the good members of the previous generation. In this way, over many generations, good characteristics are spread throughout the population, being mixed and exchanged with other good characteristics as they go. By favoring the mating of the more fit individuals, the most promising areas of the search space are explored. If the GA has been designed well, the population will converge to an optimal solution to the problem [19].
The evolutionary cycle in a GA consists of the following seven sequential steps [20]: 1. Generate random population of n chromosomes (suitable solutions for the problem). 2. Individuals are evaluated according to the fitness function. 3. Individuals are selected for reproduction on the basis of fitness; the fitter an individual, the more likely it is to be selected. A better solution implies a higher fitness. 4. Reproduction of chromosomes to produce the next generation is achieved by applying crossover operator between pairs of chromosomes. 5. Applying the mutation operator to every individual in the temporary population. 6. Replacing the old population by the new temporary generation. 7. The criterion of stop of the GA is fixed by a well determined number of generations (Max-Gen). If the end condition is satisfied, then stop and return the are best solution in current population otherwise go to step 2.

Singular Value Decomposition (SVD)
SVD is an effective numerical analysis tool used to analyze matrices. In SVD transformation, a matrix can be decomposed into three matrices that are of the same size as the original matrix. From the view point of linear algebra, an image is an array of non-negative scalar entries that can be regarded as a matrix. Without loss of generality, if A is a square image, denoted as AR n×n , where R represents the real number domain, then SVD of A is defined as [21]: Where UR n×n , VR n×n are orthogonal matrices, and SR n×n is a diagonal matrix, as [21]: s1,1>=s2,2>=s3,3……..s(n-1,n-1)>=sn,n So, a matrix A can be decomposed by using SVD to three components as given in Figure 2

The Proposed Algorithm:
A blind watermarking scheme based on multi-level DWT is proposed. The coefficients in higher levels of DWT are more robust with respect to usual attacks such as compression, low pass filtering, rescaling, and additive noise; therefore to improve the robustness, the watermark is embedded in the LL subband in the DWT domain by applying the 4-level wavelet decomposition.

Watermark Embedding Procedure:
As the approximation subband (LL4) contains high energy components of the image, and to avoid visible degradation of the watermarked image; embedding in this subband is done by the quantization method, which results in a partial change of the corresponding coefficients. The proposed scheme is characterized with parameters (quantization step, and adaptive strength factors), the Genetic Algorithm is used to find the optimum values of these parameters. A large uniform scalar quantization step makes the watermark robust, but it will destroy the quality of the watermarked image. To perform its embedment, the DWT (4-level) is implemented by Daubechies-4 wavelet filter for the cover image. Both the logo image and the LL4 subband are converted from two dimensions to one dimension form Ci, and Wi respectively, where i = 1 to 1024 (as LL4 dimensions are 32×32).
Then, a pseudo random key with size equals to the size of Ci is generated. The pseudo random key is generated by random permutation function in MATLAB, where this key represents the indices of coefficients locations (Ci). The Ci coefficients used for embedding are randomly selected by a secret pseudo random key as follows: Where, is the index of the coefficient that is selected through the secret random key. Figure 3 shows block diagram of the embedding scheme. For watermark embedding, the watermark bit is embedded into the selected coefficient by quantization method. The quantization function is given as follows:    Watermark embedding: • Read the cover image, and logo image.
• Implement the DWT (4-level) by Daubechies-4 wavelet filter for cover image. • Select LL4 subband for embedding the logo image.
• Convert LL4 subband from two dimensions to one dimension form Ci. Also convert logo image from two dimensions to one dimension form Wi. • Generate pseudo random key.
• Select of Ci coefficients by the random key.
• Apply embedding rule for ( ) coefficient as follows: • Reconstruct the modified ' from one dimension to two dimensions, then apply the inverse DWT on the modified coefficient matrix to obtain the watermarked image.

Optimization of Parameters Using GA:
Genetic algorithm is utilized to find the best parameters (Q , 1 S , and 2 S ) for data embedding. The GA-based watermarking algorithm is summarized below: Step 1: Generate population of the chromosomes randomly. The chromosomes are encoded as real values. Population size has been chosen to be 12 chromosomes for each generation. Number of generations is 50.
Step 2: Produce watermarked images by using the chromosomes (each chromosome includes uniform scalar quantization step, and adaptive strength factors) in the population by means of embedding process.
Step 3: In order to measure quality of the watermarked image, luminance of the watermarked image is computed instead of PSNR measure as given in [9], because the luminance of the watermarked image is affected when embedding a logo image in the LL4 subband. The luminance of the image is measured by taking the SVD transform for the LL4 subband, and then calculating the average value of the whole SVs (Singular Value matrix elements) of LL4 subband of the watermarked image. This procedure enhances the watermarking results regarding imperceptibility, and robustness.
The fitness function can be defined as follows [9]: Where the number of types of watermark attacks, is the luminance of the cover image, is the luminance of the watermarked image. Also and are the weight factors for the luminance of watermarked image and the correlation coefficient ( measure, respectively, since their total value should be equaled to (1) [9], here is put equal to (0.4), is equal to (0.6).

a+ =1 …(8)
Step 4: The steady state selection is used here for selecting the best chromosomes.
Step 5: Crossover and Mutation: Crossover operation is used to generate the new population from the parent's population; here crossover for real values method is used. Mutation operation is performed by a randomly selected gene which can be replaced by generating a random gene; the mutation probability has been taken 0.09. More details about crossover for real values method can be found in [18].
Step 6: After the operation of mutation, a new population is generated. GA process is run until the termination criteria is achieved. The best chromosome in the last generation is used for embedding the watermark. Three different types of attacks are used in order to analyze the potential of the proposed algorithm. The attacks are JPEG compression 35%, resizing in bicubic with ratio (1/4): 512 ➔ 128 ➔ 512, and wiener filtering with window 3×3. The optimal values of the parameters are shown in Table 1.

Watermark Extraction Procedure:
The extraction algorithm does not need the original image, as depicted in the block diagram in Figure 5. The watermark is extracted from LL4 subband, by performing four-level DWT decomposition by Daubechies-4 wavelet filter for the watermarked image, then LL4 subband is selected to extract the logo. The LL4 subband is converted from two dimensions to one dimension form Ci, by using the same method in the embedding procedure.
The same key that is used in the embedding scheme is generated to select the coefficient ( ) from Ci coefficients.
Extracting the embedded watermark from any coefficient ( ) is as follows: Figure 5. Block Diagram for the Extracting Algorithm's Procedures.

(9) …
Where: is the coefficient in which the logo bit is embedded, Q is the quantization step, and i represents the number of watermark bits. The quantization step is divided by 2, because by noting Table (1 Finally, reconstruct and convert the bits of logo image from one dimension to two dimensions. The extracting scheme is given in Figure 6. Extracting logo image from the watermarked image requires certain information related to the embedding procedure, these are: the value of uniform scalar quantization step ( Q ), and the random key which gives the locations of the coefficients, where the watermark image was embedded. The adaptive strength factors ( 1 S , and 2 S ) are not required to extract the logo image. Watermark extracting: • Read the watermarked image.
• Implement the DWT (4-level) by Daubechies-4 wavelet filter for watermarked image. • Convert LL4 subband from two dimensions to one dimension form Ci • Generate pseudo random key.
• Select the coefficient ( ) from (Ci) by the random secret key.
• Apply extracting rule as follows:   Table 1.
Various attacks are used to test the robustness of the watermark. All the attacks except image tampering and JPEG2000 attack were tested by using MATLAB R2010a. JPEG2000 attack is tested by using MORGAN JPEG2000 tool box, and image tampering is applied with PAINTBRUSH.  Figure 7. Two test images watermarked using 32×32 binary watermarks.

Conclusions:
1. Extracting the logo pixels requires the availability of two items: quantization step, and the key value for embedding locations. 2. Size of the logo image can be 32×32 or less, because the LL4 subband dimensions are 32×32 pixels. 3. This scheme gives good results, as shown in Table 2. This assures the advantage of using the GA principles for making a compromise between host imperceptibility and watermark strength. 4. Advantage of using the SVD transform with GA is given high quality watermarked image. Because the singular values represent the luminance of the image, and the luminance of the watermarked image is affected when embedding a logo in the LL4 subband. 5. The watermarked images have PSNR, as compared to the original ones with values more than 40 dB (this is the limit for human eye to distinguish any change). 6. The proposed watermarking scheme achieves the lowest distortion in the watermarked images (high PSNR quality), and at the same time, the result of extracted logo image gives good robustness against many attacks like: Gaussian Noise, JPEG compression, JPEG 2000 compression, and wiener filtering. 7. The proposed watermarking scheme is less robust to attacks that change the intensity level as image cropping, because the LL4 subband in which embedding is done represents the image energy contents. Any major change in it may cause coefficients values to change in a way, so that logo bits cannot be retrieved correctly.