A new quaternion color image watermarking algorithm

2 downloads 0 Views 1MB Size Report
Many color image watermarking algorithms that do not use .... where d > 0 is the watermarking depth. It is a free parameter of the algorithm; the higher d, the better robustness and poorer .... 2005, available online at: http://qtfm.sourceforge.net/.
The 8th IEEE International Conference on Intelligent Data Acquisition and Advanced Computing Systems: Technology and Applications 24-26 September 2015, Warsaw, Poland

A new quaternion color image watermarking algorithm Abstract – A new quaternion color image watermarking algorithm is presented. Firstly, mathematical background is introduced. Then the algorithm itself is described in detail, followed by results of experiments performed to date. At the end, conclusions are drawn and areas of possible further research are indicated. The algorithm is capable of embedding an arbitrary size binary watermark in a color image of any size. Watermarking is peformed in Quaternion Fourier Transform domain. A block of the transform pixels is assigned to every pixel (bit) of the watermark. If the logical value of the block is 1, the quaternion modulus of every pixel in the block is modified. The watermark detection scheme uses the average value taken over the QFT blocks in order to increase the algorithm’s robustness. Keywords – image processing; signal processing algorithms;

I. I NTRODUCTION Many color image watermarking algorithms that do not use quaternions, for instance [1], split the image into separate channels and insert the watermark into one or more of them. A widespread approach is to modify only the luminance component of a color image [2]. Such methods can be easily implemented but they do not make use of the dependencies between color channels. Modification of the luminance component can only influence the imperceptibility of the algorithm as the human visual system is more sensitive to changes of luminance than to changes of color. Recently, a lot of efforts have been put in development of new quaternion algorithms that split the watermark between all color channels [3]–[7]. Quaternions are a useful mathematical tool that enables such approach since a color image is converted into a 2D array containing exactly one quaternion in each point. The main objective of presented research was to develop algorithm being simple and fast yet fulfilling the following conditions: • arbitrary size of the image to be watermarked, • arbitrary size of the binary watermark, algorithm should also be able to convert (’binarize’) the watermark if the one given as input is not binary, • watermark smoothly distributed over the whole image - no blocks visible, • high imperceptibility and robustness.

II. D ESCRIPTION OF PROPOSED ALGORITHM A. Mathematical background A basic introduction to quaternions and more general quaternion transforms can be found in numerous publications, for example [8]. We will therefore introduce specific mathematical tools used in the algorithm. We define mapping from image pixels to pure (zero real part) quaternions in the following way: Q(i, j) = R(i, j)i + G(i, j)j + B(i, j)k

(1)

where Q – quaternion image, i = 0 . . . (M − 1), j = 0 . . . (N −1) – pixel indices, i, j, k – quaternion imaginary parts [9], R, G, B – red, green and blue components of the color image, respectively. Watermark is embedded in Quaternion Fourier Transform (QFT) domain defined by Ell [10]: M −1 N −1 X X vj ui 1 e−2πµ( M + N ) Q(i, j) M N i=0 j=0 (2) where we √ will use the widespread convention µ = (i + j + k)/ 3. Any unit pure quaternion can be chosen as µ and the result depends on that choice. The corresponding inverse transform (IQFT) is as follows:

QF T (u, v) = √

−1 M −1 N X X vj ui 1 e2πµ( M + N ) QF T (u, v) M N u=0 v=0 (3) Note that IQF T (QF T (Q)) = Q. The straightforward implementation of QFT and IQFT is not possible in practice due to its O(n4 ) complexity. The execution time is also worsened by the fact that quaternion algebra requires more standard operations than real or complex computations. However, there exists a solution proposed by Ell and Sangwine [11]. Every quaternion of the form q = w+xi+yj+zk can be decomposed due to quaternion algebra properties into a complex number with complex coefficients in the following way:

IQF T (i, j) = √

q = w + xi + (y + zi)j

(4)

We can now use this decomposition in the Quaternion Fourier Transform: M −1 N −1 X X vj ui 1 QF T (u, v) = √ e−2πµ( M + N ) Q(i, j) M N i=0 j=0

=√

M −1 N −1 X X vj ui 1 e−2πµ( M + N ) (0 + Ri + (G + Bi)j) M N i=0 j=0

=√

+√

M −1 N −1 X X vj ui 1 e−2πµ( M + N ) (0 + Ri) M N i=0 j=0

M −1 N −1 X X vj ui j e−2πµ( M + N ) (G + Bi) M N i=0 j=0

(5)

To maintain the compact size of this paper we skip identical derivation for IQFT. After the decomposition, QFT is structurally identical with two 2D complex discrete Fourier transforms. Therefore QFT can be implemented using two 2D complex Fast Fourier Transforms. This implementation is discussed in detail in [12]. We assume that two RGB 8-bit images constitute the algorithm input. The watermark dimensions shall not exceed the dimensions of the watermarked image. We will also denote: M , N - height and width of the watermarked image (in pixels), Q, R - height and width of the watermark. By ”averaging” we understand calculating the arithmetic mean. B. Watermark embedding scheme Watermark is embedded in several steps described below. 1) Quaternion representation: A quaternion is assigned to every RGB pixel of the watermarked image using mapping described in introductory definitions so that MxNx3 image is converted into MxNx1 pure quaternion array. 2) Quaternion Fourier Transform: QFT is performed on the whole image as described in introductory definitions leading to MxNx1 array of quaternion coefficients. Note that QFT coefficients, unlike quaternions in spatial domain, are not pure. 3) Watermark ’binarization’: For every pixel of the watermark, R+G+B is calculated. If it is greater than half of 3 ∗ 255 the logical value 0 is assigned. Otherwise, 1 is assigned. 4) Block determining: A block of the watermarked image is assigned to every pixel of the watermark. This is done in the following way: • • •

each block has equal size and is assigned to one and only one pixel of the watermark the height h and width w are calculated as follows: N h = bM Q c and w = b R c the image is filled with blocks starting from upperleft corner. The blocks neighbour each other. The only pixels not assigned to any block can lie on the right or at the bottom of the watermarked image. For convenience of the reader, this block assigment is visualised on Figure 1.

Figure 1. Block determining scheme. Clockwise from the upper-left corner: 1. watermark layout, 3x4 pixels watermark chosen for illustration; 2. the watermarked image; 3. the watermarked image with blocks corresponding to watermark pixels. Margins visible on the right and at the bottom are due to the fact that generally height/width of the watermarked image is not divisible by height/width of the watermark.

5) Quaternion amplitude modification: For every block of the watermarked image, if logical value 1 is assigned to the watermark pixel corresponding to the block, the quaternion modulus of each pixel in the block is modified in the following way: Q(i, j) 7→ (1 + d)Q(i, j)

(6)

where d > 0 is the watermarking depth. It is a free parameter of the algorithm; the higher d, the better robustness and poorer imperceptibility. 6) Inverse Quaternion Fourier Transform: IQFT is performed on the whole image. Note that after IQFT, the quaternions in spatial domain not necessarily remain pure. If there is any real part, it is omitted – quaternion pixel of the form w + Ri + Gj + Bk and 0 + Ri + Gj + Bk are treated equally. C. Watermark decoding scheme 1) Quaternion Fourier Transform: QFT is performed on the whole image. 2) Block determining: Watermarked and original images are divided into blocks in the same way as it was done during embedding. 3) Decision: The modulus of every quaternion pixel in both original and watermarked image is calculated. Then, the modulus of every pixel of the watermarked image is divided by corresponding modulus of original image. Resultant quotients are averaged over blocks selected in the previous step. For every watermark pixel, if the quotient averaged over corresponding block is less than 1 + d/2, the logical value 1 is detected. Otherwise 0 is detected.

III. E XPERIMENTAL RESULTS The algorithm was implemented in Matlab using quaternion toolbox by Nicolas Le Bihan and Stephen J. Sangwine [13]. Presented experimental study is not at the final stage of completion. Further research is necessary to fully evaluate the algorithm’s performance. Results of those will be included in the final version of the conference paper. A. Qualitive results Figures 2,3,4,5 illustrate the effect of the algorithm applied to standard test image ”Peppers” 512x512 px watermarked with a 8x8 binary watermark prepared for the tests. Figure 4. Watermarked image

Figure 2. Original image (512x512 pixels). Figure 5. The difference between watermarked and non-watermarked image multiplied by 1000.

B. Robustness against quantization noise

Figure 3. Binary watermark (8x8pixels). The scale is such that each of the two ”eyes” of the smile is a single pixel. Black pixels correspond to logical 1 and white pixels to logical 0.

We observe (Fig. 4) that the watermark image is completely invisible. The difference between the original and watermarked image is displayed in Fig. 5. It has been multiplied by 1000 to make it observable.

Each pixel of the color image is a vector of three RGB coefficients. Each of them can only take 256 discrete integer values. Therefore when the image is watermarked in QFT domain the change should be strong enough so that after taking IQFT the discrete values of the RGB channels coefficients will actually be modified in comparison with the original image. The experimental results are shown on Figure 6. We see that depth of around 0.0025 is needed to ensure that the watermark will be detectable in 8-bit RGB 512x512 image. C. Robustness against JPEG compression An important step in determining algorithm’s performance is testing its robustness against compression. The JPEG format was chosen for tests as it is the most popular image compression method. The watermarked image underwent compression using popular GIMP image

Quantization noise

IV. C ONCLUSIONS

Experimental data 0.4

BER

0.3

0.2

0.1

0

0

0.0005

0.001

0.0015 0.002 Depth paramerer

0.0025

0.003

0.0035

Figure 6. Bit error rate against the depth parameter. There was no distortion to the watermarked image; quantization of RGB coefficients is the sole source of non-zero BER for small watermarking depths.

manipulation software. GIMP enables the user to choose compression quality in range from 0 to 100. During the tests, watermarked image was compressed with qualities 5, 10, . . . , 95 for two depths: d = 0.0025 and d = 0.01. The bit error rate of the watermark recovered from each of compressed images was determined. Experimental results are illustrated on Figure 7. As expected, we observe JPEG compression 0.6

d=0,0025 d=0,01

0.5

ACKNOWLEDGMENT W.R. wants to kindly acknowledge Moongu Jeon and Jeonghwan Gwak for fruitful discussions and supervision during an image watermarking internship at Gwangju Institute of Science and Technology, Gwangju, Republic of Korea. R EFERENCES

0.4

BER

The results of experiments performed to date indicate that the algorithm succesfully performs its function. The possible areas of further research include but are not limited to: • developing an adaptive watermark detection scheme such that the decision threshold depends on the input data. This may mean the dependence on the watermarked image, embedded watermark or expected nature of distortion applied to watermarked image. Machine learning, fuzzy logic or neural networks seem to be worth considering; • finding a way not to omit the real part of quaternions obtained after taking IQFT in the embedding process; • finding a more sophisticated yet fast method of selecting the QFT blocks assigned to watermark pixels such that after transforming to the spatial domain the watermark is mainly embedded in places where it is less visible due to properties of the human visual system; • developing plug-ins to popular image manipulation software that implement proposed algorithm.

0.3

0.2

0.1

0 0

10

20

30

40

50

60

70

80

90

100

Quality parameter

Figure 7. Bit error rate against the quality parameter of JPEG compression. The test was performed for two watermarking depths: 0.0025 and 0.01.

that for larger watermarking depth, BER drops faster as JPEG quality rises. We see that depth of 0.0025 is not robust against compression despite the fact that as shown in section III-B it was enough to make the watermark robust against 8-bit quantization. However, d = 0.01 made the watermark absolutely (BER=0) robust against JPEG compression with qualities 85, 90 and 95. Hence, d = 0.01 is enough for common use if possible compression is expected – lower compression qualities are rarely used since they cause easily observable distortion of the image.

[1] A. M. Reed and B. T. Hannigan, “Adaptive color watermarking,” Proc. SPIE, April 2002. [2] J. A. Hussein, “Spatial domain watermarking scheme for colored images based on log-average luminance,” J. of Computing, vol. 2, January 2010. [3] J. M. C. P. Bas, N. Le Bihan, “Color image watermarking using quaternion Fourier transform,” 2003 IEEE International Conference on Acoustics, Speech, and Signal Processing, 2003. Proceedings. (ICASSP ’03)., vol. 3, 2003. [4] J. Sun and J. Y. Yang, “Quaternion frequency watermarking algorithm for color images,” 2010 International Conference on Multimedia Technology, pp. 1–4. [5] X. Ma, Y. Xu, L. Song, X. Yang, and H. Burkhardt, “Color image watermarking using local quaternion Fourier spectral analysis,” 2008 IEEE International Conference on Multimedia and Expo, pp. 233–236. [6] T. K. Tsui, V. Street, and D. Androutsos, “Quaternion image watermarking using the spatio-chromatic Fourier coefficients analysis,” ACM Multimedia, pp. 149–152, October 2006. [7] W. Xiang-yang, W. Chun-peng, Y. Hong-ying, and N. Pan-pan, “A robust blind color image watermarking in quaternion Fourier transform domain,” J. Syst. Software, vol. 86, pp. 255–277, 2013. [8] B. Witten and J. Shragge, “Quaternion-based signal processing,” 76th SEG meeting, New Orleans, Louisiana, pp. 2862–2866, 2006. [9] W. R. Hamilton, Elements of Quaternions. Longmans Green, London, 1843. [10] T. A. Ell, Hypercomplex spectral transformations. PhD Thesis. University of Minessota, 1992. [11] T. A. Ell and S. J. Sangwine, “Decomposition of 2D hypercomplex Fourier transforms into pairs of complex Fourier transforms,” Proc. Eusipco, pp. 151–154, 2000.

[12] S. Pei, J. Ding, and J. Chang, “Efficient implementation of quaternion Fourier transform, convolution, and correlation by 2-D complex FFT,” IEEE Trans. Signal Process., vol. 49, pp. 2783– 2797, 2001. [13] S. J. Sangwine and N. L. Bihan, “Quaternion toolbox for Matlab,” 2005, available online at: http://qtfm.sourceforge.net/.

Suggest Documents