Keywords

1 Introduction

With the advent of the information age, especially the popularity of the Internet, digital technology improve dramatically. But it also brings a lot of information leakage problems [1]. For example, medical information, medical images are easily tampered with during transmission. From the perspective of security, it is necessary to introduce digital watermarking technology [2, 3] into the medical care system. Medical images are the personal privacy of patients. In order to protect these information, experts use the robustness and invisibility of digital watermarking to hide the patient’s personal information in medical images. When the information needs to be verified, it can be done by extracting the watermark [4]. Digital watermarks have the following characteristics: invisibility, digital works embedded in digital watermarks, it will not cause a significant drop in quality, and it is not easy to be noticed. Robustness, the watermark can still be extracted by the watermark extraction algorithm after the watermark carrier is attacked [5]. Medical images are important evidence for doctors to diagnose. Therefore, any operation that may modify medical information should be avoided. Wen quan et al. proposed the concept of “zero watermark” for the first time, that is, the important features of the original image are used to construct the watermark information, and the contradiction between the robustness of invisible watermark and the irreversible distortion of the original image is solved well without modifying the image features [6, 7]. Mr. P.V. Hough proposed the Hough transform in 1959, which is a reliable method for straight line detection and a good feature extraction method. Hough transform has excellent robustness and excellent anti-interference ability [8]. Traditional image watermarking methods have poor robustness, and the image watermarking information is easy to change when it get attacked.

Therefore, this paper proposes a robust watermarking algorithm for medical images based on Hough transform and discrete cosine transform (HT-DCT). This method uses Hough transform and discrete cosine transform to extract visual feature vectors of medical images for watermark embedding and extraction, and uses logical map to encrypt watermark, which greatly improves the security and robustness of medical images. Experimental results show that the proposed method is robust to geometric attacks and conventional attacks without changing the original medical images.

2 The Fundamental Theory

2.1 Hough Transform (HT)

Hough transform is an effective algorithm for finding straight lines in digital image technology [9]. It first maps the target point of the rectangular coordinate system to the polar coordinate system for accumulation, that is, first all points on any straight line on the rectangular coordinate system plane are accumulated to the same point in the polar coordinate system, and then by looking for the polar coordinate, the peak of the midpoint set is used to find the long straight line feature. Since this point set is obtained through cumulative statistics, it can tolerate the discontinuity of the straight line. The basic idea of Hough’s transformation is point-line duality. In the image space \(XY\), all straight lines passing through the point \((x,y)\) satisfy the equation:

$$y = px + q$$
(1)

Where \(p\) is the slope and \(q\) is the intercept.

Equation (1) can also be written as.

$$q = - px + y$$
(2)

Equation (2) can be regarded as a straight line that passes the point \((p,q)\) in the parameter space \(PQ\). It can be seen that the collinear points in the image space correspond to the intersecting lines in the parameter space. That is, all straight lines that intersect at the same point in the parameter space have collinear points corresponding to them in the image space. The Hough Transformation transforms the detection problem in the image space into the parameter space according to these relationships, and completes the detection task by performing simple accumulation statistics in the parameter space [10]. Equation (1) When the straight line is close to the vertical direction, both \(p\) and \(q\) will be close to infinity and the calculation will be greatly increased. Therefore, we can use the polar coordinate equation of the straight line:

$$\rho = x\cos \theta + y\sin \theta ,0 \le \theta \le \pi$$
(3)

\(\rho\) is the distance from the origin to the straight line and \(\theta\)is the angle between the normal of the straight line and the x-axis

As shown in Fig. 1(a). When all the feature points on a straight line in the image space are mapped in this way, there will be many sinusoids in the parameter space, and all these sinusoids pass through the unit \((\rho ,\theta )\), so that the parameters of this straight line are determined by The coordinates of the unit \((p,\theta )\) are expressed, as shown in Fig. 1(b)

Fig. 1.
figure 1

Hough transform diagram: (a) Linear equation (b) Hough transform of a single point.

2.2 Discrete Cosine Transform

Discrete cosine transform can divide the image into different frequencies for work, including low frequency, high frequency and intermediate frequency coefficients [11]. After the image undergoes the discrete cosine transform, most of the energy is concentrated in the low frequency part. When applied to an M × N image or matrix, the two-dimensional discrete cosine transform (DCT) is as follows:

$$\begin{array}{*{20}l} {F\left( {u,v} \right)\,\, = \,c\left( u \right)c\left( v \right)\,\sum\limits_{{x = 0}}^{{M - 1}} {\sum\limits_{{y = 0}}^{{N - 1}} {f\left( {x,\,y} \right)\,\,\cos \,\frac{{\pi \left( {2y\, + \,1} \right)v}}{{2N}}} } } \hfill \\ {u = 0,\,\,1, \cdots ,M - 1;\,\,\,v = 0,\,\,1, \cdots ,\,\,N - 1;} \hfill \\ \end{array}$$
(4)

In the formula:

$$\begin{array}{*{20}l} {c(u) = \left\{ {\begin{array}{*{20}c} {\sqrt {1/M} } \\ {\sqrt {2/M} } \\ \end{array} \,\begin{array}{*{20}l} {\,\,u\,\, = \,\,0} \hfill \\ {\,\,\,u\,\, = \,\,1,\,\,2,\,\, \cdots ,\,M - 1} \hfill \\ \end{array} \,} \right.} \hfill \\ {c(v) = \left\{ {\begin{array}{*{20}c} {\sqrt {1/N} } \\ {\sqrt {2/N} } \\ \end{array} \begin{array}{*{20}l} {\,v\,\, = \,\,0} \hfill \\ {\,v\,\, = \,\,1,\,\,2,\,\, \cdots ,\,\,N - 1} \hfill \\ \end{array} } \right.} \hfill \\ \end{array}$$
(5)

In the formula, M × N indicates the size of the image, and the formula shows that the sign of the DCT coefficient is related to the phrase of the component.

2.3 Logistic Map

Chaos is a deterministic and random-like process that appears in nonlinear dynamic systems. This process is non-periodic, non-convergent but bounded, and has an extremely sensitive dependence on the initial value. Using this property, chaotic mapping can be Provide a large number of uncorrelated, random and deterministic signals that are easy to generate and reproduce [12].

The logistic map is one of the most famous chaotic maps, which is a simple dynamic nonlinear regression with chaotic behavior [13, 14]. Its mathematical definition can be expressed as follows:

$$x_{{k + 1}} = \mu x_{k} (1 - x_{k} )$$
(6)

Where \(x_{k}\) belongs to \((0,\,\,1)\), \(0 < u \le 4\), Experiments show that when 3.5699456 < u <  = 4, the logistic map enters the chaotic state and the Logistic chaotic sequence can be used as a good key sequence.

3 Watermarking Algorithm

3.1 Acquire the Feature Vector of Medical Images

After HT-DCT transformation of medical images, low frequency coefficients are removed. The extraction method is as follows:

Step 1: Use the Canny algorithm to extract the edge of the original medical image I (i, j) to obtain the BW(i,j) edge set;

$$BW\left( {i,j} \right) = edge\left( {\left( {i,j} \right),'Canny'} \right);$$

Step 2: Perform Hough transform on BW edge set points to obtain coefficient matrix H (i, j);

$$[H,T,R] = HOUGH(BW(i,j));$$

Step 3: Perform DCT transformation on the coefficient matrix H (i, j) to obtain the coefficient matrix F (i, j);

$$F(i,j) = DCT2(H(i,j));$$

After a lot of simulation, we found that the low-frequency coefficients after HT-DCT transformation may change, but the signs of the coefficients remain unchanged. So we perform perceptual hash binarization on this part of the coefficient. Let “1” represent the coefficient greater than or equal to zero, and “0” represent the coefficient less than zero. The hash coefficient is shown in the Table 1.

Table 1. Change of HT-DCT coefficients under attacks for the original images.

As shown in the Table 1, the hash perception coefficients of the attacked medical images are basically the same. Therefore, we can use the coefficient symbols as the feature vectors of the medical images.

3.2 Watermark Embedding

The specific steps are as follows (see Fig. 2.):

Step 1. The medical image could be processed by HT-DCT.

Step 2. Select the transform coefficient (32 × 1).

Step 3. Obtain 32-bit binary feature sequence of medical image.

Step 4. Use Logistic Map to scrambling the original watermarking image.

Step 5. Get the watermarking extraction key sequence though XOR operation.

Fig. 2.
figure 2

The watermarking embedding process

3.3 Watermark Extraction

The specific steps are as follows (see Fig. 3.):

Step 1. The attacked medical image could be processed by HT-DCT.

Step 2. Use the same method to get the 32-bit binary feature sequence of the attacked medical image.

Step 3. XOR the binary feature sequence of the attacked medical image and the watermark extraction key sequence.

Step 4. Reverse the scrambled watermark image.

Step 5. Calculate the NC value of the watermark after the attack.

Fig. 3.
figure 3

The watermarking extraction process

3.4 Watermark Evaluation

We use the following formula to evaluate the normalized correlation coefficient between the attacked watermark \(W^{'} (i,j)\) and the original watermark \(W(i,j)\).

$$NC = \frac{{\sum\limits_{i} {\sum\limits_{j} {W(i,j)W'(i,j)} } }}{{\sum\limits_{i} {\sum\limits_{j} {W^{2} (i,j)} } }}$$
(7)

The peak signal-to-noise ratio formula is as follows:

$$PSNR = 10\lg \left[ {\frac{{MN\mathop {\max }\limits_{{i,j}} (I_{{(i,j)}} )^{2} }}{{\sum\limits_{i} {\sum\limits_{j} {(I_{{(i,j)}} - I_{{(i,j)}}^{'} )^{2} } } }}} \right]$$
(8)

PSNR value indicates the degree of image distortion, and the larger the PSNR value, the smaller was the distortion of the image. Where \(I_{{(i,j)}}\) and \(I_{{(i,j)}}^{'}\) represent the gray values of the original medical images and the coordinates of the embedded watermark images \((i,j)\), respectively, \(M\) and \(N\) represent the pixel values of image rows and columns.

4 Experiments and Results

We use matlab 2016a as the simulation platform in this experiment, and choose the brain slice image (512 × 512) as the original medical image, and the letter image (32 × 32) as the watermark, as hown in Fig. 4(a) and Fig. 4(b). The encrypted watermark is completely different from the watermark to ensure the security of the information. Shown in Fig. 4(c). In this experiment, the initial value of the chaotic coefficient was set to 0.2, the growth parameter was 4, and the iteration number was 32.

Fig. 4.
figure 4

Watermarks and their chaotic encrypted images: (a) Original image, (b) Watermark, (c) Watermark of chaotic encryption.

4.1 General Attacks

Median Filtering Attack

As shown in the Fig. 5(a), we performed a median filter attack on the original medical image (parameters [3 × 3], filtering repeat time 10), the picture after the attack is still clear, and the watermark also detects a higher NC value,as shown in Fig. 5(b), NC = 0.94, which shows that the proposed algorithm is robust to median filtering attacks (Table 2).

Fig. 5.
figure 5

Median filtered watermarked images and extracted watermarks: (a) Median filtering [3 × 3], 10 times (b) Extracted watermarking.

Table 2. PSNR and NC values under median filtering attack.

Gaussian Noise Attack

We use different degrees of Gaussian noise to attack the original medical image. As shown in the Fig. 6 and Table 3, the watermark extracted from the image after the 1% Gaussian noise attack is seriously distorted, and the NC value is only 0.44.

Fig. 6.
figure 6

Image attacked by Gaussian noise and extracted watermarks: (a) the Gauss noise intensity 1%, (b) Extracted watermarking.

Table 3. The PSNR and NC values under Gaussian noise

JEPG Compression Attack

The original medical image is attacked by different JPEG compression ratios as shown in Fig. 7 and Table 4. As seen from Table 4, the PSNR values increased followed with the compression ratio. When the JEPG compression rate reached 80%, the NC value is still as high as 1.00. The algorithm is robust to JEPG attacks.

Fig. 7.
figure 7

JPEG compressed 40% watermarked images and extracts watermarks: (a) JEPG compression quality 40%, (b) Extracted watermarking.

Table 4. The PSNR and NC values under compression

4.2 General Attacks

Rotation Attack

As shown in the Fig. 8, when the medical picture is rotated by 2, the watermark can still be extracted clearly, and the NC value is 0.76. The quality of the watermark increases with the degree of rotation, and when it increases to 10°, the extracted watermark is still clear It can be seen that the NC value is 0.81 (Table 5). This shows that the method is robust to rotating attacks.

Fig. 8.
figure 8

Watermark image and extraction watermark in rotation (clockwise 2°): (a) Parameter is 2°, (b) Extracted watermarking.

Table 5. The NC value under rotation attack (clockwise).

Scaling Attack

We carry out different degrees of scaling attacks on medical images and extract watermarks. From the Fig. 9 and Table 6, we can see that when the scaling factor is 2, the NC value of the watermark is 0.75. This shows that this method is robust against scaling attacks.

Fig. 9.
figure 9

Watermark image and extraction watermark in scaling: (a) Parameter is 2, (b) Extracted watermarking.

Table 6. The NC value under scaling attack (clockwise).

Moving Attack

As shown in the Fig. 10 and Table 7, when the medical image moves to the right (4%), the extracted watermark can still be identified, and the NC value is 0.79. Therefore, it can be shown that the algorithm has good robustness to mobile attacks.

Fig. 10.
figure 10

Movement (right) 4% watermark image and extract watermark: (a) Movement (right) 20%, (b) Extracted watermarking.

Table 7. The PSNR and NC values under moving attack.

5 Conclusion

This paper proposes a robust medical image watermarking algorithm based on Hough transform and discrete cosine transform (HT-DCT). This method uses HT-DCT to extract the visual feature vector of the medical image to embed and extract the watermark and the chaotic map to tamper with the watermark to improve the security of the watermark information. Experimental results prove that the algorithm not only improves the security of the medical image watermark information, but it has good robustness under both conventional attacks and geometric attacks.