Keywords

1 Introduction

With the rapid development of quantum communication network, in order to achieve safe and efficient transmission of quantum image information in quantum communication network, people began to study using quantum states to store and transfer digital image information in the decades. Moreover, with widespread applications of quantum image in quantum communication network, quantum watermark also has emerged to protect copyright of quantum image, which is fulfilled by embedding watermark image consisting of the information related to copyright owner into carrier image. So far, quantum image representation methods and quantum watermark algorithms have made a lot of achievements.

At present, the major achievements of quantum image representation methods, i.e., Qubit Lattice [1], Entangled Image [2], Real Ket [3], flexible representation of quantum images (FRQI) [4], novel enhanced quantum representation (NEQR) [5], quantum log-polar image (QUALPI) [6] and novel quantum representation of color digital images (NCQI) [7], have been proposed. Among of them, quantum images of QUALPI representation can easily perform some complex geometric transformations, such as rotation and scaling. With the increasing importance of images in people’s daily life, color image analysis by quaternion Zernike moments (QZMs) [8], content-based image retrieval (CBIR) [9] and digital image forensics [10] also have been widely studied.

In the aspect of quantum watermark algorithms, analysis and improvement of the watermark strategy for quantum images based on quantum Fourier transform [11] was proposed by Yang et al. In 2013 and 2014, Song et al. put forward two dynamic watermarking schemes for quantum image based on quantum wavelet transform [12] and Hadamard transform [13], respectively. This two quantum watermark algorithms have a larger capacity and good transparency. The least significant bit (LSB [14]) modification is one of the most important methods in classical digital watermark, which has advantages of easy operation and large amount of information hiding. In 2016, a least significant qubit (LSQb) algorithm for quantum image based on NCQI representation [15] was proposed by Sang.

From the achievements given above, it can be found out that the current quantum watermark technology is still on the early stage of its development. Most of algorithms have not yet begun to discuss the robustness of watermark image, especially on geometric attacks. In view of widespread applications and universality of geometric distortion attacks in quantum image processing, most of watermarked quantum images are invulnerable to resist this kind of attacks. In order to make up for the drawbacks of existing quantum watermark algorithms, this paper proposes a novel robust quantum watermark algorithm based on the QUALPI representation. By combining the QUALPI representation model with the LSQb modification technique, the new algorithm enables to effectively resist geometric distortions or attacks, so as to better protect copyright of quantum image.

The rest of the paper is organized as follows. Section 2 introduces the preliminary knowledge related to the new algorithm. In Sect. 3, the novel robust quantum watermark algorithm is described in detail. The simulation results and performance analysis are given in Sect. 4. Finally, a conclusion and the future work are provided in Sect. 5.

2 Preliminaries

2.1 The QUALPI Image Representation and Rotation Transformation

In QUALPI, the sampling resolutions of the log-radius and the angular orientations of a log-polar image are assumed to be 2m and 2n respectively. For this image, the quantum image representation can be expressed as shown in the following equation:

$$ \left| I \right\rangle = \frac{1}{{\sqrt {2^{m + n} } }}\sum\limits_{\rho = 0}^{{2^{m} - 1}} {\sum\limits_{\theta = 0}^{{2^{n} - 1}} {\left( {\left| {g\left( {\rho ,\theta } \right)} \right\rangle \otimes \left| \rho \right\rangle \otimes \left| \theta \right\rangle } \right)} } $$
(1)

The position information of a pixel is represented by \( \left( {\rho ,\theta } \right) \), where \( \rho \) denotes the log-radius and \( \theta \) represents the angular position. The gray scale of the corresponding pixel is represented by \( g\left( {\rho ,\theta } \right) \). The gray range of this image is assumed to be 2q. Thus the gray scale can be encoded by binary sequence \( C_{q - 1} C_{q - 2} \cdots C_{1} C_{0} \) as follow:

$$ g\left( {\rho ,\theta } \right) = C_{q - 1} C_{q - 2} \cdots C_{1} C_{0} ,g\left( {\rho ,\theta } \right) \in \left[ {0,2^{q - 1} } \right] $$
(2)

Reference [6] discusses the quantum arbitrary rotation transformation of the QUALPI quantum image model. Assume that a rotation transformation R x for quantum image will be operated and the rotation angle can be encoded by binary sequence \( r_{n - 1} r_{n - 2} \cdots r_{1} r_{0} \) as follow:

$$ R_{x} = r_{n - 1} r_{n - 2} \cdots r_{1} r_{0} ,r_{i} \in \{ 0,1\} ,R_{x} \in \left[ {0,2^{n} - 1} \right] $$
(3)

Thus, when R x rotation is performed, the procedure can be divided into n sub-operations. If r i  = 0, none operation will be done for the ith sub-operation. Otherwise, a 2i rotation \( R_{{2^{i} }} \) will be performed on quantum image.

The quantum 2k rotation \( U_{{2^{k} }} \) will add the angular positions of every pixel by 2k (mod 2n). Specifically, this operation aims to make a unit shift for the highest (n − q) qubits of the angular sequence \( \left| \theta \right\rangle \) in the QUALPI quantum image.

2.2 Quantum Bit Comparator

In order to embed watermark image into carrier image by using LSQb modification, it is necessary to compare the state of the last qubit of a pixel in the same position of those two images by using quantum bit comparator. According to the results of the comparator, the corresponding unitary operation is performed on carrier image. Consequently, this section describes a specific quantum bit comparator.

In 2012, Wang et al. gave a quantum comparator to judge whether two qubits are same or not in Ref. [16]. As shown in Fig. 1, \( \left| a \right\rangle ,\left| b \right\rangle \) are the input qubits and \( \left| c \right\rangle ,\left| d \right\rangle \) denote the outputs of the corresponding states.

Fig. 1.
figure 1

Two qubit comparator.

If \( \left| c \right\rangle \left| d \right\rangle = \left| 1 \right\rangle \left| 0 \right\rangle \) or \( \left| c \right\rangle \left| d \right\rangle = \left| 0 \right\rangle \left| 1 \right\rangle \), then quantum state \( \left| a \right\rangle \) is not equal to quantum state \( \left| b \right\rangle \). If \( \left| c \right\rangle \left| d \right\rangle = \left| 0 \right\rangle \left| 0 \right\rangle \), then quantum state \( \left| a \right\rangle \) is equal to quantum state \( \left| b \right\rangle \).

3 A Robust Quantum Watermark Algorithm

In this section, the main steps of new algorithm including embedding watermark process and extracting watermark process are presented in details. The embedding process is mainly based on the QUALPI representation and the LSQb modification technique, and the extracting process is the inverse of the embedding process.

3.1 Embedding Watermark Process

The flow chart of the embedding process is shown in Fig. 2 and steps of the embedding process are given as follows:

Fig. 2.
figure 2

The flow chart of embedding watermark process.

Step (1): In this paper, the size of carrier image is equal to the size of watermark image. The QUALPI expressions of carrier image and watermark image are shown in Eqs. (4) and (5), respectively:

$$ \left| C \right\rangle = \frac{1}{{\sqrt {2^{m + n} } }}\sum\limits_{\rho = 0}^{{2^{m} - 1}} {\sum\limits_{\theta = 0}^{{2^{n} - 1}} {\left| {c_{q - 1} c_{q - 2} \cdots c_{1} c_{0} } \right\rangle } } \left| {\rho \theta } \right\rangle $$
(4)
$$ \left| W \right\rangle = \frac{1}{{\sqrt {2^{m + n} } }}\sum\limits_{\rho = 0}^{{2^{m} - 1}} {\sum\limits_{\theta = 0}^{{2^{n} - 1}} {\left| {w_{0} } \right\rangle \left| {\rho \theta } \right\rangle } } $$
(5)

where \( \left| {c_{{0_{ji} }} } \right\rangle \) and \( \left| {w_{{0_{ji} }} } \right\rangle \) denotes the state of the last qubit of the \( \left( {\rho_{j} ,\theta_{i} } \right) \) pixel in carrier image and watermark image, respectively, which are used as inputs into the quantum comparator. According to the results of the comparator, the corresponding unitary operation is performed on carrier image to complete the LSQb modification.

Step (2): If the outputs from the quantum comparator are equal, then it will do nothing about carrier image. In this case, the following unitary transformation will be performed.

$$ U_{{s_{ji} }} = I^{ \otimes q} \otimes \left( {\sum\limits_{\rho = 0}^{{2^{m} - 1}} {\sum\limits_{\theta = 0}^{{2^{n} - 1}} {\left| {\rho \theta } \right\rangle \left\langle {\rho \theta } \right|} } } \right) $$
(6)

Step (3): However, if the outputs are different, the following unitary transformation will be performed on the state of quantum carrier image.

$$ U_{{D_{ji} }} = I^{ \otimes q - 1} \otimes U \otimes \left| {ji} \right\rangle \left\langle {ji} \right| + I^{ \otimes q} \otimes \left( {\sum\limits_{\rho = 0}^{{2^{m} - 1}} {\sum\limits_{\theta = 0,\rho \theta \ne ji}^{{2^{n} - 1}} {\left| {\rho \theta } \right\rangle \left\langle {\rho \theta } \right|} } } \right) $$
(7)

where

$$ U = \sigma_{X} = \left[ {\begin{array}{*{20}c} 0 & 1 \\ 1 & 0 \\ \end{array} } \right] $$
(8)

It is obvious that the unitary U is the CNOT gate. Next, the concrete derivation process is given.

$$ \begin{aligned} U_{{D_{ji} }} \left( {\left| C \right\rangle } \right) = & \left( {I^{ \otimes q - 1} \otimes U \otimes \left| {ji} \right\rangle \left\langle {ji} \right| + I^{ \otimes q} \otimes \sum\limits_{\rho = 0}^{{2^{m} - 1}} {\sum\limits_{\theta = 0,\rho \theta \ne ji}^{{2^{n} - 1}} {\left| {\rho \theta } \right\rangle \left\langle {\rho \theta } \right|} } } \right) \\ & \left( {\frac{1}{{\sqrt {2^{m + n} } }}\sum\limits_{\rho = 0}^{{2^{m} - 1}} {\sum\limits_{\theta = 0}^{{2^{n} - 1}} {\left| {c_{q - 1} c_{q - 2} \cdots c_{1} c_{0} } \right\rangle } } \left| {\rho \theta } \right\rangle } \right) \\ & = \frac{1}{{\sqrt {2^{m + n} } }}\left( {I^{ \otimes q - 1} \otimes U \otimes \left| {ji} \right\rangle \left\langle {ji} \right| + I^{ \otimes q} \otimes \sum\limits_{\rho = 0}^{{2^{m} - 1}} {\sum\limits_{\theta = 0,\rho \theta \ne ji}^{{2^{n} - 1}} {\left| {\rho \theta } \right\rangle \left\langle {\rho \theta } \right|} } } \right) \\ & \left( {\left| {c_{q - 1}^{ji} c_{q - 2}^{ji} \cdots c_{1}^{ji} c_{0}^{ji} } \right\rangle \left| {ji} \right\rangle + \sum\limits_{\rho = 0}^{{2^{m} - 1}} {\sum\limits_{\theta = 0,\rho \theta \ne ji}^{{2^{n} - 1}} {\left| {c_{q - 1} c_{q - 2} \cdots c_{1} c_{0} } \right\rangle \left| {\rho \theta } \right\rangle } } } \right) \\ & = \frac{1}{{\sqrt {2^{m + n} } }}\left( {\left| {c_{q - 1}^{ji} c_{q - 2}^{ji} \cdots c_{1}^{ji} \overline{c}_{0}^{ji} } \right\rangle } \right.\left| {ji} \right\rangle + \\ & \left. {\sum\limits_{\rho = 0}^{{2^{m} - 1}} {\sum\limits_{\theta = 0,\rho \theta \ne ji}^{{2^{n} - 1}} {\left| {c_{q - 1} c_{q - 2} \cdots c_{1} c_{0} } \right\rangle } } \left| {\rho \theta } \right\rangle } \right) \\ \end{aligned} $$
(9)

where

$$ \left| {\overline{c}_{0}^{ji} } \right\rangle = \left\{ \begin{aligned} \left| 0 \right\rangle ,\left| {c_{0}^{ji} } \right\rangle = 1 \hfill \\ \left| 1 \right\rangle ,\left| {c_{0}^{ji} } \right\rangle = 0 \hfill \\ \end{aligned} \right. $$
(10)

Step (4): By repeating the three steps above, watermark image is embedded into carrier image by the LSQb modification. Finally, as it is described in Sect. 2.1, stego image will be made a rotation transformation R x . The rotation angle can be determined according to the key, named as K 1, shared by two parties of communication in advance.

3.2 Extracting Watermark Process

The flow chart of the extracting process is shown in Fig. 3. Its main steps can be described as follows.

Fig. 3.
figure 3

The flow chart of extracting watermark process.

Step (1): According to the K 1, two parties of communication will share an another key, named as K 2, in order to restore the original stego image. Another rotation transformation can be performed on stego image.

Step (2): It is clear that the LSQb of stego image is a complex vector in Hilbert space which the size is 2q+m+n. So let decompose the vector into the direct product of color and correspondingly position firstly. Taking a \( 2^{1} \times 2^{2} \) log-polar image with gray rang 2q as an example, the stego image vector is Q. Then the disintegrated vector Q is given as the following form:

$$ Q = a_{0} \otimes \left( {\begin{array}{*{20}c} 1 \\ 0 \\ 0 \\ \vdots \\ 0 \\ 0 \\ \end{array} } \right) + a_{1} \otimes \left( {\begin{array}{*{20}c} 0 \\ 1 \\ 0 \\ \vdots \\ 0 \\ 0 \\ \end{array} } \right) + \cdots + a_{6} \otimes \left( {\begin{array}{*{20}c} 0 \\ 0 \\ 0 \\ \vdots \\ 1 \\ 0 \\ \end{array} } \right) + a_{7} \otimes \left( {\begin{array}{*{20}c} 0 \\ 0 \\ 0 \\ \vdots \\ 0 \\ 1 \\ \end{array} } \right) $$
(11)

Obviously, this step can be realized because the vector Q and the binary encoding of position are known. After converting every first part (color information) of the direct product to binary data, the number of binary bit is equivalent to the number of bits of the stego image’s color encoding. In this example, it means converting \( a_{0} ,a_{1} , \cdots ,a_{6} ,a_{7} \) to the appropriate binary data \( a_{{0_{b} }} ,a_{{1_{b} }} , \cdots ,a_{{6_{b} }} ,a_{{7_{b} }} \). The \( a_{{i_{b} }} \) stands for the gray’s binary sequence of the ith pixel in stego image.

Step (3): The last step is to extract the last bit of every binary data. According to the preparation of QUALPI state in Ref. [6], these bits information is restored to the original watermark image.

In general, the extracting process of watermark image is an inverse process of embedding watermark.

4 The Experiment Result and Performance Analysis

This section gives some simulation-based experiments and analysis of the results and performance of the proposed quantum watermark algorithm. All experiments are simulated on the MATLAB R2012a.

There are three factors of performance evaluation for quantum watermark algorithms, including robustness, transparency and capacity, respectively. Robustness shows that watermark image can be extracted effectively from stego image after various attacks. Transparency represents the similarity between carrier image and stego image. Capacity is the maximum amount of watermark information embedded into carrier image without affecting its normal use. It can be represented by the number of bits of watermark information contained in the unit carrier image pixel. Three images “Baboon”, “Cameraman” and “Lena” are used in the experiments as carrier images. Four images “Eagle”, “Recycling”, “Thumbs-up” and “HTC” are used as watermark images. The image sizes for carrier and watermark are all \( 2^{7} \times 2^{8} \).

4.1 Robustness

In defending various geometric attacks, the new algorithm effectively utilizes two important properties of log-polar sampling, i.e., rotation and scale invariances. These invariances make quantum watermark image extracted have a good robustness when stego image was subjected to various geometric attacks, such as rotation, vertical axisymmetry, horizontal axisymmetry and scaling.

In order to prove the above argument, Figs. 4, 5, 6 and 7 are given respectively to represent above-mentioned geometric attacks. The experimental results show that watermark image can be extracted effectively after a variety of attacks, and has a high image quality. It means that the new algorithm has good robustness.

Fig. 4.
figure 4

Rotation attack. (a) The stego image attacked by rotation, (b) the stego image restored by the quantum image registration algorithm, (c) the watermark image extracted from (b).

Fig. 5.
figure 5

Vertical axisymmetry. (a) The stego image attacked by horizontal axisymmetry, (b) the stego image restored, (c) the watermark image extracted from (b).

Fig. 6.
figure 6

Horizontal axisymmetry. (a) The stego image attacked by vertical axisymmetry, (b) the stego image restored, (c) the watermark image extracted from (b).

Fig. 7.
figure 7

Scaling attack. (a) The stego image attacked by scaling, (b) the stego image restored, (c) the watermark image extracted from (b).

4.2 Transparency

At present, there is no specific evaluation standard for visual quality index of the quantum image. Therefore, in this paper, the classical PSNR (Peak Signal-to-Noise Ratio) is applied to evaluate transparency of the quantum watermark.

Assuming there are two \( 2^{m} \times 2^{n} \) images I and J with gray range 2q (I is the original carrier image, J is the embedded carrier image). \( I\left( {\rho ,\theta } \right) \) and \( J\left( {\rho ,\theta } \right) \) represents the pixel values of the \( \left( {\rho ,\theta } \right) \) pixel. MSE (Mean Squared Error) and PSNR are defined as Eqs. (12) and (13), respectively:

$$ MSE = \frac{1}{mn}\sum\limits_{\rho = 0}^{{2^{m} - 1}} {\sum\limits_{\theta = 0}^{{2^{n} - 1}} {\left[ {I\left( {\rho ,\theta } \right) - J\left( {\rho ,\theta } \right)} \right]} }^{2} $$
(12)
$$ PSNR = 20 \times \log_{10} \left( {\frac{{MAX_{I} }}{{\sqrt {MSE} }}} \right) $$
(13)

Here, MAX I is the maximum possible pixel value of the image.

From the experimental results in Fig. 8, it is easy to know that stego image and the original carrier image are incapable to be identified by the naked eye of human being.

Fig. 8.
figure 8

In three groups of pictures, the left are the original carrier images, the middle are the watermark images, the right are the embedded carrier images.

Table 1 lists out the PSNR values of stego image obtained by embedding different watermark images into the same carrier image, respectively. And Fig. 9 shows the change of PSNR values of Table 1. It can be found that the PSNR values of stego images are much higher than the image quality standard of 38 dB, which proves they have high image qualities. Therefore, the new algorithm can obtain good transparency.

Table 1. PSNR values of stego images in our simulation.
Fig. 9.
figure 9

The change of PSNR values of Table 1.

4.3 Capacity

Capacity can be accurately calculated by the embedding rate, which is denoted by the number of bits embedded divided by all the least significant qubits of the carrier image in this paper. It is easy to know the embedding rate of the new algorithm is equal to 1. Furthermore, based on LSQb modification in our algorithm, the modifying rate of the algorithm is 0.5, which means that half of the qubits need to be modified, and the other half is not. Comparing with the previous achievements, the embedding rate and them modifying rate of our algorithm is rather good.

5 Conclusion

In this paper, a novel robust watermarking algorithm is proposed. By combining the QUALPI representation model with the LSQb modification technique, new algorithm enables to effectively resist geometric distortion or rotation attacks, so as to better protect the copyright of quantum image. The simulation results based on MATLAB show that the new algorithm has a good performance in robustness and transparency. On the basis of the capacity analysis to the new algorithm, the embedding rate of our algorithm is 1 and the modification rate is 0.5.

The robustness of the quantum watermark image against geometric attacks has been improved in this paper. But it does not discuss more complex attacks, such as geometric zooming and tailoring. Therefore, the next research will be focused on the design of quantum robust watermark algorithm to deal with these complex attacks in the future.