Generating Pattern from Image using Genetic Algorithm as Invisible Watermark

Digital watermarking is a technique that embedded watermark in a different types of digital contents such that video, audio, and image to preservation these contents from reproduction or unauthorized copying. There are many mechanisms that contrived to optimized the robustness and imperceptible, newly genetic algorithm become very general in the area of artificial intelligence because their evolution naturally and their specially importance for improvement in several domains. This paper is proposed a trail system that embedded a unique pattern generated from image used as a watermark and embed this pattern in the original cover image instead of embedding the whole watermarking image inside the cover image. This pattern is 64-bit generated using genetic algorithm and selected after passing the five randomness test of security measures. This pattern is embedding in the main diagonal of the cover image and the result the watermarked image is imperceptible without any tamper, and the pattern that is generated is unique and robust enough so it's generated secure communication between sender and receiver.


Introduction
Watermark means hiding information, and can be represented as any data that identify the authorize person or any different information in multimedia data such as images , audio or video , this process insert the information in these multimedia in a way that is difficult to remove by attacker .when the watermark inserted in the data, the original data will change and there are two conditions must be satisfied when embedded or hide the information in multimedia data, These conditions are robustness and fidelity, Robustness mean the strength of watermark to different processing attack, Fidelity the factor which determine the quality of the image when the watermark is inserted [1].
The digital watermarking can be classified in two types [2]: • Visible Watermark: data is appear in digital content look like the watermark, Such as logo or a text that indicate to a digital medium' proprietor.• Invisible Watermark: The data don't appear invisible in digital content, such as audio and inaudible content.
Genetic algorithm is a metaheuristic algorithm that works on the natural selection that related to huge class of evolutionary algorithms (EA), almost GA is used to produce solutions that have highly precision for search problems depending on the parameters of bio inspired such as selection, crossover and mutation.In this work the genetic algorithm is used to generate the strong pattern from the watermark image to hide it in the cover image [3] The aim of this paper is to generate a unique pattern for watermark image by using genetic algorithm to embed it in cover image and then retrieved it by receiver to protect it from attackers.

Related work
Digital watermarking must give results with high quality like fidelity, robustness and security of cover image.There are many numbers of techniques that are develop in both frequency and spatial domain such as hiding watermark in the least significant bit (LSB) [4], or using the coefficients of discreet cosine transform (DCT) blocks to embedded watermark [5], increasing the strength for watermarking by utilize discrete wavelet transform (DWT) mechanism [6], utilize (radial basis function RBF) neural network to produce watermark with high strength [7], and embedding watermark in the discrete components (DC) of transformed blocks [8].Dengeun Lee.Takeyung Kim، Seongwon and Joonki Paik (2006) [9] introduced a new algorithm for extracting the watermark depending on Discreet Wavelet Transform (DCT) and (GA).Zhicheng ,Hao Li , Jufeng Dai and Sashuang Wang (2006) [10] present watermarking rely on (GA) to satisfy the strength and fidelity to watermark algorithm for image spread spectrum ,which is a novel way in (8x8) domain utilize (GA) for optimization.
Chien-Chang chen and Chien-Shian Lin (2007) [11] proposition the (GA) depend on the authentication of image manner to satisfy the quality for the protected image.
Ali Al-Haj (2007) [12] proposed an accurate and strong digital image watermarking algorithm that combine both of discrete cosine transform (DCT) and discrete wavelet transform (DWT) This algorithm extracted watermarks for images by utilize combination of (DWT and DCT).Franco and Juan carlos (2008) [13] produced a digital watermarking by using discreet wavelet transform to satisfy the robustness and fidelity evaluation but, the problem of this technique is that it's give unsatisfactory values of robustness and fidelity to various attacks.Sachin Goyal and Roopam Gupta and Ashish Bansal (2009) [14] proposed a conceptual approach that use genetic algorithm to satisfy robustness and fidelity for watermarked image they use genetic (GA) to find the appropriate location in a cover image to insert the watermark in it and this may be optimize the robustness and fidelity .
Cauvery N. K. (2011) [1] proposed a way that is utilize genetic algorithm to satisfy robustness and fidelity he divided the image into three parts that is refer to its color (R,G,B) and use gentic algorithm to generate key of 64bit,the set of bits inside key represent positions in image that indicate the embedded watermark.
Venkatesan and K.Kannan and S.Raja Balachandar (2012) [15] produced a way for (GA) that rely on center of mass selection operator (CMGA) that is obtained optimal location to insertion watermark in cover image, by concentration on fidelity optimization.
T.Sridevi and S Semeen Fatima (2013) [16] proposed watermark algorithm that utilize (GA) and discrete wavelet transformation to improved robustness and fidelity of watermarked image.and used fuzzy inference system to satisfy the strength of embedding rely on human visual system(HVS) properties for image.The algorithm give better results and good quality for the watermark image.N.Mohananthini and G.Yamuna (2015) [17] produced a comparison of digital watermarking techniques using genetic algorithms.This method explains the main three categories of multiple watermarking techniques like segmented, successive, and composite watermarking.They are using genetic algorithm to optimize (maximize performance) the results of both peak signal to noise ratio (PSNR) and normalized correlation (NC) in multiple watermarking techniques.The result proved that the multiple watermarking techniques be realized more robustness when it compared with single watermark techniques and also give good robustness and fidelity against attackers by using genetic algorithm.

Genetic Algorithm
The Genetic algorithms are search models depend on basis of the naturaly selection and genetics.Genetic algorithm in the first stage encode the variables of the problem to the limited length string of alphabets of the same problem, the string that is selected as a solution to the search problem is called chromosome and the alphabets is referred to the genes and the content of the genes or its value are called alleles.toexplain that the problem like traveling salesman the chromosome is the transmission from city to city and the gene is the city.
Genetic algorithm work by encoding the parameters of problem instead of the parameters themselves like in the traditional optimization techniques to reach best solution of the problems need a measure that evaluate the all solutions that is produced and choose or reminded just the solutions that are near to the best solution of the problem, this can be done by a mathematical or objective function called fitness function that is used by genetic algorithm to guide the work to be near the best solution or to obtain the best solution for the problem.Another thing important in the genetic algorithm is the population of the problem, unlike the traditional methods the genetic algorithm depend on the population selected solutions.The size of the population that is usually determined by the user is considering one of the important factors that effected to the work of the genetic algorithm and its performance.7-Repeat the steps from 2 to 6 until termination condition is met [18].

The Proposed Work
In the proposed work the histogram of watermarked image and its properties is computed (probability, mean, standard derivation, entropy and the energy), after converted these values to binary representation to get a string with length of 40 bit, each value of property is represented as a binary string with length.Then apply mean and median filters on watermarked image to get a string with length of 24 bit, this string is combined with string of length 40 bit to get string with length of 64 bit.The whole string divides to eight chromosomes with length of 8 bit for each chromosome; by this the population of genetic algorithm is generated.After that, the genetic algorithm operators are applied (selection, crossover and mutation).then string will be tested by applying the randomness tests, if the result of tests being pass all five in this case the string (pattern) will be ready to use and can be embedded in the cover image, and if it is not pass all of tests the string a new population of genetic algorithm in this moment rework again until get strong pattern or string will require.

The Proposed System
The system is composed of three stages are: The pattern generation stage, watermarking embedding stage and watermarking verification stage.

The Proposed Pattern
The pattern is generated from the image will used as a watermark and will embedded in the original cover image; this is done by using genetic algorithm.In the beginning the first population is generated by compute the image histogram with its properties and two other filters indicated by the mean and the median filters to generate population with 64 bit length, Step 1-Compute the histogram of the watermark image.
Step 3-Convert the values from step 2 to binary representations to get string with 40 bit of length.
Step 4-Apply mean and median filters on watermark image to get string with 24 bit of length and then combine it with the string that have 40 bit of length to get string with 64 bit of length.
Step 5-Divided the final string to eight chromosomes with length of 8 bit to be the first population to genetic algorithm.
Step 6-Applying the genetic algorithm operators (selection, crossover and mutation) to generate new population.
Step 7-Testing the new population with the five randomness tests: Step 8-If this population pass all these tests then stop.
Else genetic algorithm is repeated again until it finds the pattern that passed the five tests of randomness.

The Proposed Embedding Process
In our work, the main diagonal of the cover image is selected to hold the pattern of 64-bit, this mean only the pixels of the main diagonal will contain the watermark.The generated pattern will be embedded in the least significant bit by converting the value of LSB to binary representation and replace the first bit with one bit of pattern, then convert this new value to decimal and return it to pixel value.Output: Watermarked image.

Process:
Step 1-Read and display the cover image and determine its size.
For i=1 to image height For j=1 to image width

LOOP
Step 2-if I = J and k< = 64 Step 3-Read the binary pattern string (p(k)).

Next i
Next j

END LOOP
Step 5-Show the Watermarked image.

Watermark Extracting and Verification Process
In this stage all the mentioned steps of pattern generation is inverted by the second party to extract the watermark and verify it.

Watermark Extracting and Verification Algorithm
The aim of this stage is to extract the embedding watermarking from the image.In this algorithm, we will inverse the previous steps of algorithm (2): Step 4-Convert these values from step 2 to binary representation to get string with 40 bit length.
Step 5-Apply mean and median filters on watermark image to get string with 24 bit of length and then combine it with the string that have 40 bit of length to get string with 64 but of length.
Step 6-Divide this final string to eight chromosomes with length 8 bit to be the first population to genetic algorithm.
Step 7-Apply genetic algorithm operators (selection, crossover, mutation) to generate new population.
Step 8-Test the new population with randomness tests.
Step 9-If the pattern passing all the randomness tests, then, the result of step 1 is matching with the result of GA to retrieve the watermark.
Figure 2 shows the mechanism of the proposed work: in this figure the (baby image) is used as a watermark where the pattern should be generated from it using genetic algorithm, then it will be embedded in the (Lena image) which is used as a cover image.

Experiment and result
To implement our proposed watermarking system: the sender selects the image that used as

Conclusions
Genetic algorithm is very desirable in area of optimization applications, so they may be used in digital watermarking fields also to achieve its optimal characteristics.In this paper, genetic algorithm is used to generate a unique pattern for image watermarking.The strength of this pattern residing in passing all randomness tests and this made it robust enough against attackers.The receiver on the second party can retrieve the pattern and invert the process to verify the originality of the image, and if the third party tries to tamper the embedded watermark it will be ambiguity and secure enough to suggest it.

Algorithm 1 -
Initialization step: initial population is generating randomly through the search space.2-Evaluation step: after initialization step of the population the fitness values for filtered solutions are evaluating.3-Selection step: combines more copies of solutions that have the best fitness values and then select best solution from the candidate solutions.

4 -
Recombination step: incorporate two or more parental solutions to generate new solutions, may be better solutions.5-Mutationstep: is randomly modifies a solution.There are several distinctions of mutation, but it generally includes one or more changed to the individual's trait or traits.57 Vol: 13 No:4 , October 2017 DOI : http://dx.doi.org/10.24237/djps.step: in this step the population that is generated from selection, recombination and mutation is replace with original parental population.There are several techniques of replacement like generation-wise replacement, steady-state replacement methods and elitist replacement.

Figure ( 1 )Figure 1 :
Figure (1) shows the main block diagram of the proposed work.
the first population to genetic algorithm to generate unique, robust and more stochastic that pass all the randomness tests.Pattern Generation algorithm: Input: watermark image Output: robust Pattern of 64-bit as binary representation Vol: 13 No:4 , October 2017 DOI : http://dx.doi.org/10.24237/djps.
cover image and the binary pattern, k=1

(
Watermark image), then computing its histogram, applied mean and median filters, and compute the histogram properties as shown in figure (2), the values of histogram properties is shown in figure (3), and then applying genetic algorithm to generate pattern 64-bit of length, this pattern is selected after passing all the five randomness tests of security measures .

Figure( 4 )
Figure(4) shows the whole process of pattern generation.The result of security randomness

Figure 2 Figure3: the resulted values of the histogram that used in pattern generationFigure 4 :Vol
Figure 2.a : the watermark image