An Improved Algorithm of Digital Watermarking Based on Wavelet Transform Using Learning Automata Oleg Evsutin, Roman Meshcheryakov, Viktor Genrikh, Denis Nekrasov
Nikolai Yugov Department of Mathematics Tomsk State University of Control Systems and Radioelectronics Tomsk, Russia
[email protected]
Department of Security of Information Systems Tomsk State University of Control Systems and Radioelectronics Tomsk, Russia
[email protected],
[email protected],
[email protected]
In the present paper, the algorithm of digital watermark embedding based on DWT presented in [7] is studied; and some modifications of the given algorithm with higher performance in terms of faultlessness and quality of embedding are offered.
Abstract—In this paper, we present an algorithm for embedding digital watermarks in digital images. Embedding is based on block quantization of DWT coefficients. A distinctive feature of this paper is the use of learning automata for the optimal redistribution of energy in blocks of DWT coefficients during the quantization. The obtained algorithm is highly efficient in terms of the quality criteria for embedding and can be used both for embedding digital watermarks and for arbitrary messages. Keywords—information security; watermarking; learning automata
I.
digital
The article is organised as follows. Section II contains a theoretical part of our research. In Subsection II.A, a description of algorithm [7] is given, and it is shown that, in some cases, the given algorithm distorts the embedded digital watermark. In Subsection II.B, the algorithm eliminating the revealed defect is offered. In Subsection II.C, a computing model of learning automata is described; these automata are used to enhance the quality of embedding. The algorithm based on the given computing model is presented in Subsection II.D. The results of computing experiments with the obtained algorithms and their discussion are presented in Section III. The conclusion sums up the paper and specifies directions of the future research.
steganography;
INTRODUCTION
The development of the technologies of processing and transmission of digital information caused the problem of multimedia copyright protection. An approach to the solution of the given problem is based on digital watermark embedding in digital objects. A watermark is a special and usually invisible mark which contains the information on owners of a given object. Besides being used for authentication of owners of digital objects, digital watermarks are also used for authentication of digital objects themselves, as well as for detection of falsifications [1].
II. ALGORITHMS OF DIGITAL WATERMARK EMBEDDING IN THE FREQUENCY DOMAIN OF DISCRETE WAVELET TRANSFORM A. Algorithm of Digital Watermark Embedding Based on Block Quantization The algorithm of digital watermark embedding presented in [7] is based on block quantization of DWT coefficients in the quadrant of middle-frequency sub-band LH2. One bit of a digital watermark is embedded the block of k DWT coefficients. Embedding consists in the modification of combined energy of block coefficients so that it would meet certain condition depending on the value of the embedded bit. In order to improve the quality of embedding, the authors of the given paper apply certain optimisation methods for matrix functions. The step-by-step description of the algorithm is given further.
In the present research, digital images are considered as digital objects – carriers of digital watermarks. There are two classes of methods to embed a digital watermark in a digital image: methods operating in a spatial domain, and those operating in a frequency domain. The latter possess certain advantage as frequency embedding enables to better choose data elements which can be used to imperceptibly record additional information in a digital object. There are known methods of digital watermark embedding in the frequency area of digital images based on discrete Fourier transform (DFT) [2, 3], discrete cosine transform (DCT) [4, 5], Walsh-Hadamard transform (WHT) [6], and discrete wavelet transform (DWT) [7–9].
Input:
978-1-5386-3592-6/17/$31.00 ©2017 IEEE 49
image and the robustness when resizing the block of DWT coefficients. It permits to embed both digital watermarks that are resistant against distortions and arbitrary messages.
Cover image I ; confidential message (digital watermark) M ; weighting matrix W ; quantization size S ; block size of DWT coefficients k .
The examination of the given algorithm showed that in some cases there appear errors in separate bits during extraction of the embedded information. The errors are caused by incorrect modification of combined energy of some blocks of DWT coefficients at the stage of embedding. It happens when small positive coefficients are decreased. Hereinafter the energy of DWT coefficient is understood as its absolute value.
Output: Stego-image I c containing the confidential message (digital watermark). Step 1. Carry out the DWT of the cover image and obtain the LH2 quadrant. Step 2. Divide LH2 quadrant on N of non-overlapping blocks Ci
ªc i «¬ 1
c2i
i ck º »
As an example let us consider a bit with value 0 being embedded in the block of DWT coefficients
T
¼
with length k .
C >2 1 18 19@T . Let the weighting matrix and quantization size be equal to W >1 1 1 1@ and S 60 . Then, according to algorithm [7], the block of DWT coefficients after off-bit embedding will become ~ C > 4.25 5.25 11.75 12.75@T . Combined energy of the ~ coefficients in block C corresponds to a bit with value 1.
Step 3. For i 1, N , carry out the following. Step 3.1. Compute auxiliary values A0 and A1 using the following formulas:
A0
A1
«k i «¦ c j «j 1 S « « ¬
» » »S 1 S » 4 » ¼
«k i «¦ c j «j 1 S « « ¬
» » »S 3 S » 4 » ¼
Extracting of distorted digital watermarks is admissible; however, it is supposed that the distortions happen owing to external effects on the cover image. Emergence of distortions at the stage of embedding of a digital watermark is a serious deficiency. Besides, the considered algorithm can also be used to embed arbitrary messages. Before embedding, such messages are usually compressed or encoded, therefore even insignificant integrity violation can lead to the impossibility to restore the whole message.
Further modifications of the algorithm [7] eliminating noted deficiency and ensuring the faultlessness of extraction of the embedded information are offered.
Step 3.2. Embed bit mi in the block of DWT coefficients using the following formula:
~ Ci
Di WT WWT
where d ij
1
>mi A1 1 mi A0 WDi @
B. Algorithm 1: Proportional Change of Energy of DWT Coefficients When analysing formulas (1)–(4), one can see that embedding of a bit in the block of DWT coefficients consists in the modification of coefficients so that combined energy of the changed coefficients complies with the ratio (4). For this purpose each coefficient in the block is increased or decreased by a certain value.
c ij , j 1, k .
If the weighting matrix is given by W >1 1 1 1@ , all coefficients vary equally. Another type of matrix W leads to non-uniform distribution of energy on block coefficients. The energy can be insufficient or be redundant. However, in both cases, the weighting matrix is set equal to all blocks of embedding area. In original research [7] the reference values of coefficients of the modified block do not influence the selection of a weighting matrix. This causes errors in some cases.
Step 4. Carry out inverse DWT. Step 5. Return stego-image I c and complete the algorithm. The extraction algorithm is based on the following formula:
mi
°0, °° ® ° °1, ¯°
§ k if ¨ ¦ ¨j 1 © § k if ¨ ¦ ¨j 1 ©
· c~ ji ¸ mod S ¸ ¹ · c~ ji ¸ mod S t ¸ ¹
S , 2 S . 2
To ensure the faultlessness of embedding, we offer to modify formula (3) and distribute the additional (or to eliminate redundant) energy on block coefficients proportionally to reference values of these coefficients.
The step-by-step description of extraction algorithm is obvious enough; therefore it is not given in the present paper.
The corresponding algorithm is presented below.
A distinctive feature of the considered algorithm is the possibility to control the ratio between the capacity of the cover
Input:
The work was funded by the Russian Federation Ministry of Education and Science (grant 2.3583.2017/4.6).
50
Cover image I ; confidential message (digital watermark) M ; quantization size S ; block size of DWT coefficients k .
unknown probability distribution. The automaton then updates its action probability vector depending upon the reinforcement signal at that stage and evolves to some final desired behaviour [10].
Output: Stego-image I c containing the confidential message (digital watermark).
The learning automaton is described by the three A, B, T , where A is a set of actions, B is a set of inputs, and T is a learning algorithm. The set of actions A is associated with probability vector P defining probabilities of the choice of separate operations. The algorithm of learning updates the probability vector at each instant of time, depending on the response of environment to automaton’s actions.
Step 1. Carry out DWT of the cover image and obtain LH2 quadrant. Step 2. Divide LH2 quadrant into N non-overlapping blocks Ci
ªc i «¬ 1
T
c2i c k º of length k . »¼ i
Further, the following algorithm of learning is used. If in the set A ^a1 , a2 , , ak ` at the moment of time t action ai is chosen, the vector of probabilities P at the moment of time t 1 is updated as follows:
Step 3. For i 1, N carry out the following. Step 3.1. Compute auxiliary values A0 and A1 using formulas (1) and (2) accordingly.
Step 3.2. Compute elements of the weighting matrix of block Wi using formula
wij
c ij k
¦ c ij
, j 1, k .
Step 3.3. Embed bit mi in the block of DWT coefficients using the following formula:
~ Ci where d ij
if i
j,
if i z j,
if the reaction of environment to the action of automaton is positive ( E 0 ),
j 1
k ª º Di Wi «mi A1 1 mi A0 ¦ c ij » j 1 «¬ »¼
° p j t a 1 p j t , p j t 1 ® °¯ p j t a p j t ,
p j t 1
p j t 1 b , ° ® b p j t 1 b , ° ¯ k 1
if i
j,
if i z j,
if the reaction of environment to the action of automaton is negative ( E 1 ).
c ij , j 1, k .
Here a and b are parameters of the learning algorithm and 0 b a 1 .
Step 4. Carry out inverse DWT. Step 5. Return stego-image I c and complete the algorithm.
D. Algorithm 2: Change of Energy of DWT Coefficients by Means of Learning Automata The algorithm constructed using a computing model of learning automata is presented below.
The algorithm of extracting will be the same as for initial algorithm of embedding. The presented solution allows one to avoid the errors analogous to that considered in the example in Subsection II.A.
Input: Cover image I ; confidential message (digital watermark) M ; quantization size S ; block size of DWT coefficients k .
C. Learning Automata Proportional distribution of energy on DWT block of coefficients makes it possible to avoid distortion of the embedded information but does not guarantee the best quality of embedding. Both the best embedding quality and faultlessness can be reached with some arbitrary redistribution of energy on the block coefficients without changing the total value. However, a problem of optimisation arises in such case. In order to solve this problem, in the present paper the computing model of learning automata is applied.
Output: Stego-image I c containing the confidential message (digital watermark). Step 1. Carry out DWT of the cover image and obtain the LH2 quadrant. Step 2. Divide the LH2 quadrant into N non-overlapping
The given model is based on the paradigm of an automaton operating in an unknown environment. In a simple form, the automaton has a finite set of actions to choose from and at each stage its choice (action) depends upon its action probability vector. For each action chosen by the automaton, the environment gives a reinforcement signal with the fixed
blocks Ci
ªc i «¬ 1
T
c2i c k º of length k . »¼ i
Step 3. For i 1, N carry out the following.
51
Step 2.1.1. Remember the state of block C and carry out the action of learning automaton LAp , having selected the
Step 3.1. Compute auxiliary values A0 and A1 using formulas (1) and (2) accordingly.
given action according to probability vector P .
Step 3.2. Compute elements of the weighting matrix of block Wi using formula
wij
c ij k
¦
c ij
Step 2.1.2. If the carried out action has led to the increase of the PSNR value, then assign E 0 and update probability vector P according to the formula (4), otherwise assign E 1 and update probability vector P according to formula (5).
, j 1, k .
j 1
Step 2.1.3. If E 1 , then return block C in the previous state. ~ Step 3. Return the modified block C , and complete the algorithm.
Step 3.3. Embed bit mi in the block of DWT coefficients using the following formula:
~ Ci where d ij
k ª º Di Wi «mi A1 1 mi A0 ¦ c ij » j 1 «¬ »¼
The algorithm of extracting is the same as for the initial algorithm of embedding.
c ij , j 1, k .
Further results of experiments with algorithm [7] and with the obtained modifications of the given algorithm are presented.
Step 3.4. Carry out energy redistribution in the block of DWT coefficients by means of learning automata.
COMPUTING EXPERIMENTS AND THEIR DISCUSSION
III.
Step 4. Carry out inverse DWT.
Computing experiments were carried out on the sampling that includes 6 grayscale images with the resolution of 256u 256 pixels. The given sampling was formed from the base of images [11]. The test images are shown in Fig. 1.
Step 5. Return stego-image I c and complete the algorithm. For convenience, the offered algorithm of energy redistribution in the block of DWT coefficients on the basis of learning automata is presented separately and is as follows. Input: The block of DWT coefficients C >c1 c2 c k @T ; parameters of learning automata x , t , a , b . Output: ~ C
The modified block >c~1 c~2 c~ k @T .
of
DWT
coefficients
Step 1. Create k of learning automata of type LAp ^A, B, T ` , p 1, k where A ^a1 , a2 ` , P ^0.5, 0.5` ,
B ^0, 1` and actions of each automaton are set by the following formulas:
a1 : q 1, k cq
a2 : q 1, k cq
°cq x, ® x °¯cq k 1,
°cq x, ® x °¯cq k 1,
if q
p,
if q z p,
if q
Fig. 1. Test images.
Table 1 shows the number of errors arising at embedding of messages with different volume by means of the initial algorithm. The given values are received by averaging the results on all test set. In the given experiment the following values of parameters of the embedding algorithm were used: k 4 , S 60 .
p,
if q z p,
TABLE I.
THE NUMBER OF ERRORS OF EMBEDDING FOR ALGORITHM [7]
Length of a message, bit 168 336 504 672 840 1024
Step 2. For i 1, t carry out the following. Step 2.1. For p 1, k carry out the following.
52
Number of errors, % 6.05 7.14 7.04 6.99 7.42 7.79
The results of embedding quality comparison of the initial algorithm and two received modifications are shown in Table 2. For embedding quality evaluation the standard metrics peak signal-to-noise ratio (PSNR) is used. TABLE II. Length of a message, bit 168 336 504 672 840 1024
The embedding algorithm employing learning automata has comparable quality of embedding and provides faultlessness of embedding of digital watermarks. The further research will be conducted in two directions:
THE RESULTS OF EMBEDDING QUALITY COMPARISON Algorithm [7] 47.10 44.82 43.31 42.17 41.08 39.89
x development of new algorithms of digital watermarks embedding based on wavelet functions of other types;
PSNR value, dB Algorithm 1 Algorithm 2 45.70 46.31 43.16 43.86 41.53 42.28 40.30 41.12 39.08 39.90 37.87 38.62
x application of other implementations of computing model of learning automata for optimization of embedding.
REFERENCES [1]
J. Fridrich, Steganography in Digital Media: Principles, Algorithms, and Applications. Cambridge: Cambridge University Press, 2010. [2] V. Solachidis and I. Pitas, “Circularly symmetric watermark embedding in 2-D DFT domain,” IEEE T. Image Process, vol. 10, pp. 1741-1753, November 2001. [3] O.O. Evsutin, A.S. Kokurina, R.V. Mescheryakov, and O.O. Shumskaya, “An adaptive algorithm for the steganographic embedding information into the discrete fourier transform phase spectrum,” in Advances in Intelligent Systems and Computing, vol. 451, A. Abraham, S. Kovalev, V. Tarassov, and V. Snášel, Eds. Springer International Publishing, 2016, pp. 47-56. [4] J. Zhao and E. Koch, “Embedding Robust labels into images for copyright protection,” in International Congress on Intellectual Property Rights for Specialized Information, Knowledge and New Technologies, August 1995, pp. 242–251. [5] S. Dogan, T. Tuncer, E. Avci, and A. Gulten, “A new watermarking system based on discrete cosine transform (DCT) in color biometric images,” J. Med. Syst, vol. 36, pp. 2379-2385, August 2012. [6] Z. Pakdaman, S. Saryazdi, and H. Nezamabadi-pour, “A prediction based reversible image watermarking in Hadamard domain,” Multimed. Tools. Appl, vol. 76, pp. 8517-8545, March 2017. [7] S.T. Chen, H.N. Huang, W.M. Kung, and C.Y. Hsu, “Optimizationbased image watermarking with integrated quantization embedding in the wavelet-domain,” Multimed. Tools. Appl, vol. 75, pp. 5493-5511, May 2016. [8] Y.H. Chen and H.C. Huang, “Coevolutionary genetic watermarking for owner identification,” Neural Comput. & Applic, vol. 26, pp. 291-298, February 2015. [9] M.J. Khosravi and A.R. Naghsh-Nilchi, “A novel joint secret image sharing and robust steganography method using wavelet,” Multimedia Systems, vol. 20, pp. 215-226, March 2014. [10] H. Beigy and M.R. Meybodi, “A mathematical framework for cellular learning automata,” Advs. Complex Syst, vol. 7, pp. 295-319, September & December 2004. [11] SIPI Image Database, Website: http://sipi.usc.edu/database/.
The presented values are also received by averaging of the results of all test samplings. The parameters of the embedding defined in the initial algorithm were identical in all cases: k 4 , S 60 . The parameters of learning automata were the following: x 1 , t 15 , a = 0.9 , b = 0.1 . It can be seen that the initial algorithm has the best quality of embedding; and Algorithm 1 has the worst quality. Algorithm 2 has better quality of embedding than algorithm 1, but lower quality of embedding than the initial algorithm. However, the difference in PSNR value between algorithm 2 and the initial algorithm is insignificant. Also, Algorithm 2 has the faultlessness of embedding as does algorithm 1, therefore is the best of the three considered algorithms in terms of two given criteria IV.
CONCLUSION
In the present paper, the study is made of an existing algorithm of digital watermarks embedding into digital images based on block quantization in the frequency area of discrete wavelet transform [7]. It is shown that in some cases the given algorithm distorts separate bits of the digital watermark that is embedded. To eliminate the found defect, two modifications of the initial algorithm are offered. The first offered algorithm is based on proportional alteration of DWT block coefficients when a bit of a digital watermark is embedded. The second algorithm is based on computing model of learning automata, which allows us to raise the quality of embedding.
53