Watermark Extraction Optimization Using Pso Algorithm

In this study we propose an improved method for watermarking based on ML detector that in comparison with similar methods this scheme has more robustness against attacks, with the same embedded length of logo. Embedding the watermark will perform in the low frequency coefficients of wavelet transform of high entropy blocks (blocks which have more information). Then in the watermark extraction step by using PSO algorithm in a way that maximum quality in comparison with previous methods obtain, by optimizing the Lagrange factor in the Neyman-Peyrson test, we extract the watermark. Finally, performance of proposed scheme has been investigated and accuracy of results are shown by simulation.


INTRODUCTION
Digital watermark is a process in which some information is embedded within a digital media, so that the inserted data becomes part of the media (Akhaee et al., 2009).Watermark is classified in two categories.First category uses the watermark as a transmission code.In this case the decoder should detect the whole transmitted information correctly (Cox et al., 1999;Ramkumar and Akansu, 2001).In the second category, the watermark is used for authorizing the originality of the medium.In this system, detector should recognize the existence of certain pattern (Kutter, 1998).
There are some ways to embed watermark data in a host image such as additive or multiplicative methods (Bi et al., 2007).For additive methods optimum detection has been investigated in some literatures (Wang et al., 2002;Donoho and Johnsone, 1994).Since multiplicative methods depend on the content of image, these methods are more robust against attacks so they are preferred to additive methods (Akhaee et al., 2010).The correlation detector for multiplicative watermarking has been utilized in Bi et al. (2007).A robust detector for multiplicative method in DCT, DWT and DFT domain was proposed in Akhaee et al. (2010).Distribution of high frequency coefficients of DCT and DWT are generalized Gaussian however, the distribution of amplitude of DFT coefficients are weibull (Kalantari et al., 2010).In (Ramkumar and Akansu, 2001), a method based on selection of optimum region for watermarking has been proposed.Based on the distribution of watermarked image coefficients, varieties of optimal and locally optimal detectors have been proposed (Akhaee et al., 2010;Kalantari et al., 2010).In Akhaee et al. (2009) a multiplicative and semi-blind method for watermarking was proposed.It utilized the low frequency wavelet coefficients in order to increase the robustness of the algorithm.Then it designed an optimum ML detector with consideration of Gaussian distribution for coefficients and it used a multi-objective optimization technique in order to have a balance between robustness and accuracy of watermarked image.Ng and Garg (2005) detect digital watermark in the transform domain by using maximum-likelihood, the threshold value is obtained by means of Neyman-Pearson criterion.
Maximum-Likelihood (ML) detection schemes based on Bayes' decision theory have been considered for image watermarking in transform domain (Barni et al., 2001;Kwon et al., 2002;Ng and Garg, 2004).The Neyman-Pearson criterion is used to derive a decision threshold to minimize the probability of missed detection subject to a given probability of false alarm.To achieve optimum behavior of the ML detector, a Probability Distribution Function (PDF) that correctly models the distribution of the transform coefficients is required.
The Particle Swarm Optimizer (PSO) (Eberhart and Kennedy, 1995;Kennedy and Eberhart, 1995) is a relatively new technique.Although PSO shares many similarities with evolutionary computation techniques, the standard PSO does not use evolution operators such as crossover and mutation.PSO emulates the swarm behavior of insects, animals herding, birds flocking and fish schooling where these swarms search for food in a collaborative manner.Each member in the swarm adapts its search patterns by learning from its own experience and other members' experiences.These phenomena are studied and mathematical models are constructed.In PSO, a member in the swarm, called a particle, represents a potential solution which is a point in the search space.The global optimum is regarded as the location of food.Each particle has a fitness value and a velocity to adjust its flying direction according to the best experiences of the swarm to search for the global optimum in the D-dimensional solution space.The PSO algorithm is easy to implement and has been empirically shown to perform well on many optimization problems.
A brief review of PSO algorithm: In the bird community algorithm, particles' position will be change according to the history of particle motion and their neighbors.Each particle has a position that we show it with ‫ݔ‬ Ԧ ‫.)ݐ(‬It represents position of ܲ th particle in the time ‫.ݐ‬In addition to have a position, each particle needs a velocity (Bird and Li, 2006): The stages of this algorithm are as follow: • First we form an initial population randomly • Determining eligibility of particles using their current position • Comparison of the particle's current competence and their best experience and required replacement if F(P ୧ ) > ‫‪t‬ݏܾ݁‬ ୧ then: Comparing the current competence of each particle with the best previous result of all particles and required replacement as follow if ‫ܲ(ܨ‬ ) > ‫ݐݏܾ݁݃‬ then: • Set the velocity vector for each particle: where in the above equation, ‫ݓ‬ is the inertia weight, ‫ܥ‬ ଵ and ‫ܥ‬ ଶ are learning factors and ‫݀݊ܽݎ‬ is a random number in the interval (0,1).To avoid divergence of algorithm, the final velocity of each particle is limited.
• Move particles to their new position: • Go to step 2 and repeat the algorithm to reach convergence In this study with PSO algorithm for optimizing the threshold value in the obtained detecting equation, output error rate reduces much.

PROPOSED METHOD
The method proposed in this study is a semi-blind technique which is obtained from modifying the detector of Akhaee et al. (2009).In this model we design the detector based on PSO algorithm that in addition to have high quality it has more robustness against attacks in comparison with (Akhaee et al., 2009) and previous methods.
Embedding method: For embedding information such as a logo or a series of bits in an original image we use the following approach.First we divide image into nonoverlapped blocks of size 2 × 2 (݊ = 2,3,4) and then we choose high entropy blocks (i.e., blocks with high information) according to a threshold which determine the bit rate.Then, two dimensional discrete wavelet transform applies to these determined blocks.Now assume in one block, ‫ݓ‬ 's are considered as wavelet coefficients with mean ߤ and variance ߪ ଶ .For embedding the watermark, we multiply coefficients by ߙ to insert bit "1" or we multiply them by 1/ߙ to insert bit "0", i.e., watermarking will be done via scaling the coefficients according to the following process: In the above equation, ߙ is a factor with the value greater than one and named as strength factor.Also ݅ is the block index.

Watermark decoding:
As mentioned because of the Gaussian coefficients we can use ML detector in the detecting process.In this process we assume position, mean and variance of watermarked blocks are available in the receiver.Thus, we optimize the receiver according to this information (Akhaee et al., 2009).
In the receiver after noise or other attacks, we receive ‫ݕ‬ 's which are wavelet coefficients of received image.These coefficients are a mixture of wavelet coefficients ‫ݓ‬ and zero mean additive white Gaussian noise.Since wavelet coefficients and noise are both Gaussian and are uncorrelated with each other and themselves, the distribution of ‫ݕ‬ is as follow: and similarly for bit "0" we have: where, and in these equation ߪ ଶ is the variance of noise.
Because wavelet coefficients are decimated in each level of decomposition, we assumed that they are i.i.d in our proposed method.Let Y be the vector of received wavelet coefficients and we want to determine whether Y belongs to ‫ݓ‬ or ‫ݓ‬ ଵ .
where, ‫ݓ‬ : Wavelet coefficients distribution if bit "0" embedded ‫ݓ‬ ଵ : Wavelet coefficients distribution if bit "1" embedded A decision rule based on the probabilities may be written as: By using the Bayes theorem, we can calculate the a posteriori probability ‫(ݍ‬ ‫ݓ‬ |ܻ) from the a priori probability ܲ and the conditional density function P i (Y) = P( Y| w i ) as: We can eliminate P(Y) from the both side of the decision rule.So: We take the minus logarithm of both sides: -Ln(P( Y| w )) + Ln(P( Y| w ଵ )) Because the P( Y| w i )s' have Gaussian distribution with expected values ߤ ௬ and ߪ ௬ and by using the definition of Gaussian distribution and distance function, Eq. ( 13) simplifies as: where, Σ 0 = ߪ ଶ ௬| × ‫ܫ‬ ே×ே ∶ Covariance matrix for received coefficients if "0" has been embedded.Σ 1 = ߪ ଶ ௬|ଵ × ‫ܫ‬ ே×ே ∶ Covariance matrix for received coefficients if "1" has been embedded.Substituting the covariance matrices, after some simplifications, Eq. ( 10) converted to: Then after some simplification we have: Through ( 5) and ( 14), the best decision depends on estimation of the noise variance ߪ ଶ .
Consider the detector at the limiting values for high SNR, that is ߪ → 0. So, we can simplify Eq. ( 14) as: The threshold value of ( 15) can be optimized based on the minimum detection error.In practice, the optimum value obtained empirically with numerical algorithm.In this study, we multiply ݇ named detection factor by the right side of Eq. ( 15) and use PSO optimization algorithm to set the optimum ݇ .In the other words, the threshold value of discriminant function can be modeled as Lagrange multiplier (ߣ) in the Neyman-Pearson test: From this point of view, we use PSO algorithm to optimize Lagrange multiplier in our discriminant function: Priori probabilities in Eq. ( 17) depend on white and black pixel ratio in watermark data.These parameters with other side information should be available to the receiver.

SIMULATION RESULTS
Simulation results show performance of our proposed method against various kinds of attacks, such as resize, lossy compression, i.e., JPEG, rotation, median filter and additive white Gaussian noise The following results obtained via averaging through 100 runs for each test that are represented by error percentage for different attacks.Figure 1 shows extracted logo after popular attacks.As one can see this approach is a robust method against attacks and the extracted logo can be recognized easily.Among these attacks, watermarked image shows a weak performance against median filter that we could reduce detected errors from 13 bits to just 3 bits by means of PSO algorithm and adjusting ‫ܭ‬ .
Figure 2 to 8 shows optimum Lagrange coefficient for different attacks.As we can see from these figures, PSO algorithm converges in low repetitions.
To show the improvement of our approach we present Table 1 as a comparison between our method and method proposed in Akhaee et al. (2009).To have a fair comparison we set the parameters of our method similar to Akhaee et al. (2009) as α = 1.0238, block size of 16×16 and code length (the length of  So, in the proposed method embedding data within a selected image by using priori known parameters according to the optimum condition, not only enhances robustness against attacks but also makes our method more secure.

Fig. 1 :
Fig. 1: Robustness of our proposed method against attacks

Table 1 :
Comparison between proposed method by optimizing ‫ܭ‬ using PSO algorithm and Akhaee's method White rows and highlighted rows are related to Akhaee's method and our approach, respectively information which is embedded in an image as logo) of 128 bits.As this table shows in all these attacks we reduced BER using this new approach by means of PSO algorithm.