Keywords

1 Introduction

The modern medical system has entered the process of digitalization. A large amount of patient information is disseminated and stored on the Internet in the form of text and images, which facilitates the medical system. But it also brings more security risks due to the insecurity of the Internet [11, 14]. Patients’ information are easily be attacked and destroyed during the transmission of the network, or even stolen, with poor security. The development of digital watermarking technologies [8, 17] provides good solutions to such problems. Combining medical images with watermarks, and embedding patients’ information in the medical image in the form of watermarks can better protect patients’ information, which can greatly improve the safety and stability of medical images spreading on the network [1, 10].

The concept of digital watermarking was first formally proposed by Tirkel et al. They added the watermark information to the least significant bit (LSB). The method is simple, and the robustness is poor, especially in terms of resistance to geometric attacks [13]. At present, the research in the field of medical image watermarking is still immature. Generally, the embedding and extraction of watermarking are mainly concentrated in the spatial domain and the transform domain [6]. The spatial domain refers to directly embedding watermark information in medical images, while the transform domain refers to transforming the image, and then embedding the watermark information in the transformed data. Medical images are generally divided into regions of interest (ROI) and regions of non-interest (RONI). [4] R. Eswaraiah and E. Sreenivasa Reddy proposed a medical image watermarking technology that can locate the tampered position and restore the ROI by combining the watermark information and the ROI.And the information is embedded in the boundary area and RONI. Divide the region of interest into blocks, find the mean and variance, and determine the tampered position of the region of interest. Then use the restoration data embedded in RONI to restore the ROI. This algorithm can be very effective. Good positioning restores the ROI area information, but it is performed in the airspace. If it is subjected to geometric attacks, its robustness is poor, as the information embedded in the edge area and RONI will also be destroyed. The transform domain methods include DCT transform, Fourier transform, wavelet transform, etc. [7, 15], which have better hiding and robustness for watermark information and are more popular by researchers. Siddharth Singh et al. proposed an NSCT-DCT-SVD medical image watermarking algorithm. The algorithm decomposed the medical image and watermark into six subbands by NSCT, and then performed DCT transformation on any subband, and applied SVD on the coefficients after DCT transformation. Decompose, and finally add the weight of the two singular values to realize the embedding of the watermark [12], which has high invisibility and robustness. Compared with the spatial domain, the watermark embedding in the transform domain is more robust and effective, but whether it is the spatial algorithm in [4] or the transform domain algorithm in [12], they all need to change the pixel value or transform coefficient to realize the embedding of the watermark. This may affect the visual characteristics of the images, which is not desirable for medical images. The development of zero watermark [5, 16] solved this problem very well. It has better robustness and invisibility by finding the feature invariant vector of the image and combining it with the watermark.

Gabor texture features are mostly used in face recognition, expression recognition, fingerprint recognition, image index, etc. [3, 9]. Since the Gabor transform can extract texture features, it is also used in the watermarking algorithm. [2] In this paper, a Gabor transform-based watermarking algorithm is proposed. The watermark information is hidden by changing the DGT coefficients to represent the special low frequency. However, this method will affect the visual characteristics of medical images. In the field of medical image watermarking, there is little research on Gabor transform to extract texture features. In this paper, the texture features obtained by Gabor filter in different scales and directions are combined with DCT, which greatly improved the robustness of the watermark image against various common attacks and geometric attacks.

2 Basic Theory

2.1 Gabor Texture Features

Gabor transform is a windowed Fourier transform, which is obtained by Gaussian function and the complex sine function. It is similar to human visual cell response, sensitive to image edge, and has good direction and scale selectivity. Compared with the traditional Fourier transform, Gabor wavelet transform has good time-frequency localization characteristics, and is insensitive to illumination. It can adapt to a certain degree of image rotation and deformation.

By generating a set of self-similar Gabor filters(as shown in Fig. 1), texture features in different scales (frequencies) and different directions can be extracted(as shown in Fig. 2). If the input medical image is I(xy) and the size is \(M \times N\), then its Gabor wavelet transform is as follows:

$$\begin{aligned} W_{u v}(x, y)=\sum _{x_{1}}^{d_{1}} \sum _{y_{1}}^{d_{2}} I\left( x-x_{1}, y-y_{1}\right) g_{u v}\left( x_{1}, y_{1}\right) \end{aligned}$$
(1)

where \(W_{u v}(x, y)\) are the texture feature image after the Gabor wavelet transform, and \(d_{1},d_{2}\) are the template size of Gabor filter, which u represent a certain scale (frequency),and v represent a certain direction. \(\mathrm {g}_{u v}(x, y)\) are a group of self similar filters after scale transformation and rotation transformation of the mother wavelet g(xy).

The expression of mother wavelet is as follows:

$$\begin{aligned} \mathrm {g}(x, y)=\frac{1}{2 \pi \sigma _{x} \sigma _{y}} \exp \left( -\frac{1}{2}\left( \frac{x^{2}}{\sigma _{x}}+\frac{y^{2}}{\sigma _{y}}\right) \right) \exp (2 \pi \mathrm {j} w x) \end{aligned}$$
(2)

Where, \(\sigma _{x}\) and \(\sigma _{y}\) are the standard deviation of Gaussian function on two coordinate axes, w are the frequency of complex sine function, and the value of \(\sigma _{x}, \sigma _{y}\) is related to bandwidth and inversely proportional to w.

$$\begin{aligned} \left\{ \begin{array}{l} \mathrm {g}_{u v}(x, y)=\alpha ^{-u} g\left( x^{\prime }, y^{\prime }\right) , \quad \alpha >1 \\ x^{\prime }=\alpha ^{-u}(x \cos \theta +y \sin \theta ) \\ y^{\prime }=\alpha ^{-u}(-x \sin \theta +y \cos \theta ) \end{array}\right. \end{aligned}$$
(3)

Where \(\alpha ^{-u}\) is the scale modulation factor \((\mathrm {u}, \mathrm {v}\) are integers \(), \alpha =\left( \frac{U_{h}}{U_{l}}\right) ^{-\frac{1}{S-1}}, \quad \theta =\frac{v \pi }{K}, S\) is the number of scales, K is the number of directions, \(u=0,1,2, \ldots , S-1, v=0,1,2, \ldots , K-1, U_{h}\) is the highest spatial frequency, \(U_{l}\) is the lowest spatial frequency.

Fig. 1.
figure 1

Gabor filter kernels with different directions and scales

Fig. 2.
figure 2

Texture features of brain images with different directions and scales

The Gabor filter banks are used to extract the texture feature maps of medical images \(W_{u v}(x, y)\) in different scales and directions. As the feature dimension is too high, the feature vector \(G_{u v}\) (row vector) of each texture feature map is generally obtained by averaging in blocks, and the Eigenvector matrix H (total \(S \times K\) row, texture feature vector with one scale and one direction for each row) is constructed:

$$\begin{aligned} H=\left[ \begin{array}{l} G_{00} \\ G_{10} \\ G_{20} \\ \cdots \\ G_{(S-1)(K-1)} \end{array}\right] \end{aligned}$$
(4)

2.2 Discrete Cosine Transform

Since the discrete cosine transform (DCT) was proposed in 1974, it has been loved and recognized by many scholars. It is widely used in image processing, digital signal, and other fields. It is similar to discrete Fourier transform, but only uses the real part. Discrete cosine transform (DCT) can concentrate the data energy in the upper left corner, that is, the low-frequency region, which has the characteristic of “energy concentration”. It can realize data compression. Discrete cosine transform is used in standard JPEG, MJPEG and MPEG compression. The expression of 2D-DCT is as follows:

$$\begin{aligned} F(u, v)=c(u) c(v) \sum _{x=0}^{M-1} \sum _{y=0}^{N-1} f(x, y) \cos \frac{\pi (2 x+1) u}{2 M} \cos \frac{\pi (2 y+1) v}{2\,N} \end{aligned}$$
(5)

Among them, u = 0, 1, ..., M − 1; v = 0, 1, ..., N − 1;

$$\begin{aligned} c(u)=\left\{ \begin{array}{ll} \sqrt{\frac{1}{M}}, &{} u=0 \\ \sqrt{\frac{2}{M}}, &{} u=1,2, \ldots , M-1 \end{array} \quad c(v)=\left\{ \begin{array}{l} \sqrt{\frac{1}{N}}, \quad v=0 \\ \sqrt{\frac{2}{N}}, \quad v=1,2, \ldots , N-1 \end{array}\right. \right. \end{aligned}$$
(6)

xy is the spatial domain sampling value; uv is the frequency domain sampling value.

2.3 Logistic Map

The logistic map is a kind of nonlinear mapping. Given the initial value and parameters, the chaotic sequence can be obtained:

$$\begin{aligned} x_{k+1}=\mu \cdot x_{k} \cdot \left( 1-x_{k}\right) \end{aligned}$$
(7)

where, \(\mu \) is the growth parameter and k is the number of iterations, \(0 \le \mu \le 4, x_{k} \in (0,1)\). At that time, \(3.5699456<\mu \le 4,\) the logistic map was chaotic. In this paper, \(\mu =4,\) the number of iterations is set \(k=32\).

3 Algorithm Process

Embedding the watermark information into the spatial domain of medical images, once the image is destroyed, the embedded watermark information will be greatly affected, and the watermark restoration effect is generally poor. However, by embedding the watermark information into the feature vector which can represent the image features in the transform domain, zero watermark can be embedded and extracted when the feature vector does not change much when the image is destroyed, so as to improve the invisibility and robustness of the watermark.

3.1 Watermark Encryption

As shown in Fig. 3, firstly, the chaotic sequence is generated by chaotic mapping function. Then binary encryption matrix is obtained by binarization of perceptual hash, and the chaotic encrypted watermark is get by XOR of binary watermark W(ij) of 32 pixels \(\times \) 32 pixels and C(ij).

Fig. 3.
figure 3

Watermark encryption process

3.2 Watermark Embedding

For watermark embedding, the original medical image I(ij) with 512 pixels \(\times \) 512 pixels is transformed by Gabor to get the feature matrix H(ij). And then DCT transform is applied to get the feature vector V(j).The chaotic encryption watermark BW(ij) and the feature vector are XOR to get the logical secret key key(ij),  which is retained and used in watermark extraction,as shown in Fig. 4.

$$\begin{aligned} k e y(i, j)=V(j) \oplus B W(i, j) \end{aligned}$$
(8)
Fig. 4.
figure 4

Watermark embedding process

Fig. 5.
figure 5

Watermark extraction

3.3 Watermark Extraction

As shown in Fig. 5, watermark extraction is the inverse process of watermark embedding. According to the embedding method, the feature vector \(V^{\prime }(j)\) of the image to be tested is extracted, and then XOR processing is performed between \(V^{\prime }(j)\) and the logical secret key key(ij) to obtain the encrypted watermark \(B W^{\prime }(i, j)\). At the same time, \(B W^{\prime }(i, j)\) do XOR with the binary encryption matrix C(ij) which was obtained when embedding the watermark to obtain the restored watermark \(W^{\prime }(i, j)\)

$$\begin{aligned} W^{\prime }(i, j)=C(i, j) \oplus B W^{\prime }(i, j) \end{aligned}$$
(9)

3.4 Performance Metrics

The distortion degree of the medical image can be expressed by the peak signal-to-noise ratio (PSNR/dB), and the restoration degree of the watermark can be expressed by normalized correlation coefficient (NC);

$$\begin{aligned} P S N R=10 \log \left[ \frac{ {MNmax}_{i, j}(I(i,j))^{2}}{\sum _{i}\sum _{j}\left( I(i, j)-I^{\prime }(i, j)\right) ^{2}}\right] \end{aligned}$$
(10)
$$\begin{aligned} N C=\frac{\sum _{i} \sum _{j} W(i, j) W^{\prime }(i, j)}{\sqrt{\sum _{i} \sum _{j} W(i, j)^{2}} \sqrt{\sum _{i} \sum _{j} W^{\prime }(i, j)^{2}}} \end{aligned}$$
(11)

The lower the PSNR value is, the greater the distortion is, and the closer the NC value is to 1 ,the better the watermark restoration is.

4 Experiments and Results

Experiments were performed using Matlab r2015b for all medical images.This paper selects a 512 pixels \(\times \) 512 pixels medical image brain as the cover image of the watermark. First,a Gabor transformed are performed to obtain feature matrix H, and then do the DCT transformed to the feature matrix H, and the first 32-bit DCT coefficients in the upper left corner are obtained through the Z-scan method. The 32-bit binary sequences obtained by the coefficient sign judgment (the coefficient is positive to be 1, and the coefficient is negative to be 0) is used as the feature vector of the medical images.

As shown in Fig. 6, four different medical images are selected. Table 1 shows the feature vectors extracted from each medical image by Gabor-DCT. It can be seen from the Table 1 that the feature vectors extracted from different medical images are different.

Fig. 6.
figure 6

Different medical images

Table 1. Feature vectors of different medical images.
Table 2. PSNR and NC values based on Gabor-DCT under common attacks.
Fig. 7.
figure 7

Medical image after the common attacks and the restored watermark

4.1 Common Attacks

There are three kinds of common attacks in the experimental: Gaussian noise attacks, JPEG compression attacks and median filtering attacks. Table 2 shows the PSNR and NC values under different attacks intensities.

From Table 2, when the Gaussian noise is \(10 \%,\) the \(\mathrm {NC}\) value is 0.74. When the JPEG compression quality is \(1 \%\), the \(\mathrm {NC}\) value is 1.00. For 30 times of \(7 \times 7\) median filtering, the \(\mathrm {NC}\) value is still as high as 0.90. At the same time, it can be seen from Fig. 7 that the watermark is still visible after each attacks, that is, the algorithm proposed in this paper can well resist common attacks, especially in the aspect of JPEG compression attacks and median filtering attacks.

4.2 Geometric Attacks

Geometric attacks (rotation, scaling, translation, clipping) have a great impact on images. How to improve the robustness of images under geometric attacks have always been a difficult problem. Table 3 shows the test results of the algorithm after several geometric attacks.

Table 3. PSNR and NC values for geometric attacks based on Gabor-DCT.
Fig. 8.
figure 8

Medical image and the restored watermark under geometric attacks.

  1. (1)

    Rotation attacks: When the medical image is rotated 20 degrees, as shown in \((\mathrm {k})\) and \((\mathrm {l})\) in Fig. 8, the PSNR value is very low, but the NC value is 0.71, which still can restore the watermark well, indicating that the algorithm has good robustness against rotation attacks.

  2. (2)

    Scaling attacks: When the medical image is reduced to 0.5 times, the \(\mathrm {NC}\) value is 0.71 when the medical image is magnified by 2 times, as shown in \((\mathrm {m})\) and \((\mathrm {n})\) in Fig. 8, the \(\mathrm {NC}\) value is 0.89 , and the watermark restoration degree is high. It shows that the algorithm is robust to scaling attacks.

  3. (3)

    Translation attacks: When the left shift and right shift of medical images are all \(25 \%\), the NC values are above 0.80. As shown in \((\mathrm {o}),(\mathrm {p}),(\mathrm {q})\) and \((\mathrm {r})\) in Fig. 8, they are \(25 \%\) left shift, \(25 \%\) right shift and corresponding restored watermark. Therefore, the algorithm is robust to translation attacks.

  4. (4)

    Crop attacks: As it can be seen in Table 3, compared with the ability to resist X-axis crop, the anti Y-axis crop ability of this algorithm is worse, but the NC value is still greater than 0.50 when the Y-axis is \(25 \%\) cropped, and the NC value is as high as 0.81 when the X-axis is \(25 \%\) which indicates that the algorithm has a good anti crop ability. In Fig. 8, \((\mathrm {s})\) and \((\mathrm {t})\) are the watermarks cut by \(10 \%\) and restored by Y-axis, \((\mathrm {u})\) and \((\mathrm {v})\) are the watermarks cut by \(25 \%\) and restored by X-axis respectively.

Combined with Table 3 and Fig. 8, it can be seen that the algorithm in this paper has a good ability to resist geometric attacks.

4.3 Algorithm Comparison

This paper compared the DCT algorithm and the Gabor-DCT algorithm. It can be seen from Table 4 that under common attacks, the watermark restoration effect of the DCT algorithm and Gabor-DCT algorithm is similar, and the NC value is close. However, under geometric attacks, the anti-rotation, translation, and crop of the Gabor-DCT algorithm are performing better than the DCT algorithm. Hence the Gabor-DCT algorithm is better than DCT in the anti-geometric attacks.

Table 4. Comparison of different algorithms.

5 Conclusion

In this paper, Gabor texture feature extraction is combined with DCT algorithm to obtain a Gabor-DCT based zero watermarking algorithm for medical images. The algorithm extracted texture information of different scales and directions through Gabor transform, and used the “energy concentration” feature of the DCT algorithm to concentrate the extracted texture information. Then applied the extracted medical image features to associate with the watermark, and combined the cryptographic ideas to design the watermark algorithm. Experimental results show that the algorithm has strong robustness to both common attacks and geometric attacks, and can effectively protect the security of medical image information.