Multipurpose Watermarking Algorithm for Medical Images

Considering the existing medical image watermarking algorithms, a single function often has limitations, and a multipurpose watermarking algorithm for medical images is proposed. First, medical images are divided into regions of interest (ROIs) and regions of noninterest (RONIs). ,en, the authentication watermark produced for each subblock of the ROI is embedded into the correspondingmapping subblock.,e visible watermark is embedded into the RONI, and, finally, the watermark information and constructed authentication information in each subblock of the ROI are embedded into the corresponding RONI subblock. Simulation results show that the embedded visible watermark can protect and facilitate medical image management. In addition, the proposed algorithm has strong robustness and very good visual quality. It can simultaneously realize copyright protection and content authentication and also has high tamper localization capability.


Introduction
In early image watermarking algorithms, a single watermark is embedded into the original image to provide copyright protection [1]. However, with the further development of image watermarking technology, researchers found that embedding a single watermark into the original image for copyright protection and content integrity authentication is not very effective. Its application has some limitations.
Due to the particularity of medical images, medical image information is vulnerable to tampering, illegal copying, patient privacy disclosure, and other information security problems in the network transmission. erefore, it is necessary to verify the authenticity and integrity of medical image data [2,3]. Compared with ordinary images, medical images have some unique requirements for watermark embedding: (1) Because of the particularity of medical images, the changes in the image must be very small when embedding watermark; in particular, some key parts (such as lesions) cannot be changed. (2) e information security of the embedded watermark has strict requirements. In particular, the medical records of some special patients are thought to be state and enterprise secrets and should definitely not be disclosed, so illegal extraction of the watermark should be infeasible. (3) Medical records as watermark should be extracted completely and accurately when needed; that is, the embedded watermark should have a certain robustness.
Zhang et al. [4] proposed a dual reversible watermarking algorithm with tamper detection based on multiscale decomposition. e algorithm has high tamper localization ability, but it cannot provide copyright protection. Berchtold et al. [5] proposed using MSERs (maximal stable extremal regions) to extract the ROI to construct a robust watermark. Although the MSERs are used to ensure that the selected region has a certain degree of robustness, this method cannot completely find the exact substantive region for strong protection in medical images. Arsalan et al. [1] proposed using genetic programming (GP) algorithm to embed watermark. e algorithm finds a suitable compression method through GP algorithm, which makes the embedded watermark invisible and has a stable impact on the visual quality when the amount of embedding is increased. e study in [6] presented a secure multiple watermarking method based on discrete wavelet transform (DWT), discrete cosine transform (DCT), and singular value decomposition (SVD). e proposed method can withstand a variety of signal processing attacks, and the technique is robust against Checkmark attacks. is algorithm is mainly aimed at robustness and does not have a function of content authentication. At the same time, the algorithm is irreversible, which is not allowed for medical images. To resist geometric attacks, the study in [7] proposed a robust multiwatermarking algorithm suitable for medical images.
e proposed algorithm has good performance in terms of robustness and resistance to geometric attacks and conventional attacks, especially in geometric attacks. However, this algorithm is mainly aimed at robustness against attacks and does not have a content authentication function. e above algorithms can only provide a single function, either for copyright protection or for content authentication.
To solve the problem of the limited function of a single watermarking, some researchers proposed embedding two or more watermarks into the carrier image. Ye [8] proposed a dual-function watermarking based on copyright protection and content authentication. e algorithm has high tamper localization accuracy and good visual quality, but its antiattack ability is not strong. A medical image watermarking based on ROI and contourlet transform was proposed in [9]. e algorithm embeds watermark in the background area using the improved difference expansion and selects a greater energy part of the high-order directional subband from the contours of medical images. e authentication watermark is embedded using the comparison algorithm between the direction subband coefficient and 8-neighbourhood mean. e watermark can be blindly extracted, but the tamper localization accuracy and robustness are not high. Literature [10] proposed a dual watermarking algorithm based on the fractional Fourier transform. e algorithm has high location accuracy and strong antiattack ability, but finding a suitable watermark embedding method is difficult.
In [11], a region adaptive dual watermarking algorithm was proposed. Firstly, the carrier image is transformed by integer wavelet transform (IWT), and then the transformed coefficients are divided into different regions. A gray image is embedded in the robust watermark area, and the binary image of the gray watermark is embedded in the fragile watermark area. e algorithm not only realizes the multifunction watermarking but also enhances the robustness of the extracted watermark. e study in [12] proposed a new fragile watermarkingbased scheme for image authentication and self-recovery for medical applications. A host image is broken into 4 × 4 blocks and SVD is applied by inserting the traces of blockwise SVD into the least significant bit (LSB) of the image pixels to figure out the transformation in the original image. e proposed scheme is tested against different types of attacks such as text removal attack, text insertion attack, and copy and paste attack. Compared with the state-of-the art methods, the proposed scheme greatly improves both tamper localization accuracy and the peak signal-to-noise ratio of self-recovered image.
In [13], the carrier image was transformed by IWT; then, the robust watermark was embedded in the low-frequency subband, and the fragile watermark was embedded in the high-frequency subband. e algorithm has good performance in copyright protection and content authentication.
Hurrah et al. [14] proposed a new dual watermarking for copyright protection, data security, and content authentication.
e experimental results reveal that the proposed framework offers high degree of robustness against single/ dual/triple attacks; the fragile watermark embedding makes the system capable of the tamper detection and localization with average bit error rate (BER) more than 45% for all signal processing/geometric attacks.
In [15], tamper recognition and authenticity were obtained by concealing the dual watermark into the RONI blocks of the medical image. ese blocks are chosen by the characteristics of Human Visual System (HVS) with the integration of DWTand Schur transform along with the Particle Swarm Bacterial Foraging Optimization (PSBFO) algorithm. e major focus of the PSBFO is to select the threshold value for obtaining optimum results in terms of imperceptibility and robustness against attacks. Simulation outcomes conducted on different types of medical images disclose that the proposed scheme demonstrates superior transparency and robustness against signal and compression attacks. e study in [16] proposed a watermarking algorithm based on dual fragile watermark: diffusion watermark and authentication watermark. e scrambled authentication watermark and diffusion watermark are arbitrarily embedded into two LSB layers through a random sequence controlled by a secret key. e design aims to enhance the security of fragile watermarking, and the statistical results and security analysis show that this scheme can resist chosen cover-image attacks. e multipurpose watermarking algorithms proposed by researchers basically involve embedding the invisible watermark but no visible watermark [17], so classifying a large number of watermarked medical images is difficult for hospitals when the medical images only have invisible watermark embedded. Extraction of the watermark for classifying medical images by a special watermarking system every time requires too much work. In this paper, we use image fusion technology to embed a visible watermark, which is equivalent to the signature of the medical image.
is indicates that the source of the medical image is official and can be used as the first line of protection and verification for the original medical image.
A multipurpose watermarking with copyright protection and content authentication is proposed instead of an algorithm based on single watermarking or semifragile watermarking [18], which is imperfect for medical images and cannot provide good copyright protection and tamper localization. Because of the characteristics of medical images, completely restoring the ROI when the watermark is extracted is necessary. erefore, a reversible image watermarking is used to embed watermark in ROI. us, in this paper, a triple watermarking algorithm based on IWT, general difference extension, and image fusion is studied.

Medical Image Segmentation.
e ROI usually refers to the region in medical images with large pixels and complicated textures, while the RONI usually refers to continuous black regions.
Edge detection is the most basic treatment for all edgebased segmentation methods.
e Laplacian operator [19,20] is a second-order differential operator independent of the edge direction and is linear and rotational invariant. For a continuous function f (x, y), its Laplacian operator expression at position (x, y) is (1) After edge detection, the medical image can be segmented using the level set, which is first introduced by Osher and Sethian [21]. e basic idea is not to operate on the contour directly but to set the n-dimensional contour as the (n + 1-dimensional) zero-level set of a higher-dimensional function. is higher-dimensional function is called the level set function φ(X, t). At time t, the motion contour can be obtained by extracting the zero-level set c((X), t) � φ(X, t) � 0 from the differential equation.
In the two-dimensional case for example, the level set method views the closed curve C(t) in the two-dimensional plane as the {φ � 0} zero-level plane in the continuous function surface φ in the three-dimensional space; namely, where t represents time. Take the partial derivative with respect to time on both sides of the following equation: To solve this equation, assume that the movement speed function in the normal direction of the surface is F(x, y): where n is the unit normal vector: where ∇φ is the gradient φ of the two-dimensional plane; then, Hence, is equation is the level set equation. Finally, to solve the problem of curve evolution, solve equation (7), where the initial condition is In equation (8), d(x, y) is the signed distance function, signifying the shortest distance from pixel (x, y) to closed curve C (t). e sign is determined according to the position of the pixel. If the pixel falls outside of the closed curve, then the sign is positive; otherwise, the sign is negative. At any moment, the points on the curve are the set of points for which the distance function value is 0, which is the zero-level set.
Finally, the image segmentation contour is acquired based on the zero-level set on the level set function surface. e original image ( Figure 1) is first subjected to Laplacian edge detection (Figure 2), and then we obtain a better contour by conducting the level set segmentation ( Figure 3).

Image Fusion.
Two images with different types of properties can be fused into one image by image fusion [22]. ree kinds of image fusion techniques can be utilized: pixellevel fusion, feature-level fusion, and decision-level fusion. More information from the original two images is retained with pixel-level fusion, whose accuracy is higher. erefore, the pixel-level fusion is used to embed the visible watermark into the carrier image in this paper.
I is the original image, and w is the visible watermark. Visible watermark embedding is the fusion of the local region of the image so that a visible watermark image F can be obtained: In equation (9), m I and m W are the multiplication factors of I and W, where m I + m W � 1. e process of eliminating the visible watermark is the inverse of the image fusion process described above, and the carrier image I is recovered from image F: To ensure the visibility of the visible watermark, when the multiplication factors are selected, they can be increased or decreased as much as possible to obtain better results.
In this paper, a greyscale image of size 512 × 512 is used as the original image I (Figure 4), and a greyscale image of size 48 × 24 is used as the visible watermark W 1 ( Figure 5).

Scientific Programming
Images with a visible watermark ( Figure 6) can be obtained by embedding W 1 in the upper left area of the image I with the same size according to equation (9).

Algorithm Design
e algorithm in this paper is composed of three modules: watermark generation, watermark embedding, and watermark extraction and tamper localization.

Authentication Watermark Generation.
e singular value [23] of the image has good stability, so its singular value will not greatly change when the image is slightly disturbed. erefore, the authentication watermark embedded by this algorithm is generated by extracting singular values of image blocks.       Scientific Programming Each subblock I p of the ROI segmented by the Laplacian edge detection and level set method is subjected to SVD; namely, I p � U p S p V T p . Its norm is as follows: where σ i p is the i-th singular value of subblock I p . Equation (12) is used to calculate the ratio between the maximum singular value σ i p and the norm Cou p of each subblock I p : where k p1 is used as the logistic chaotic map [24], the range of k p1 is within (0, 1), and the range of logistic map is within (−1, 1). We choose k p2 � k p1 − 1 as the second key to expanding the key space. e key is finally k p � k p2 + k p1 . Taking k p as the initial value, a real-valued chaotic sequence x i p , i ∈ 1, 2, 3, 4 { } of 4 in length is generated. Since the mean value of the sequence generated is zero, zero is selected as the threshold for the binarization of and sgn(·) is a symbolic function that completes the process of authentication watermark generation. e authentication watermark generated in each subblock of the ROI is represented by a 4-bit binary number.

Watermark Embedding.
e process of watermark embedding in the medical image is shown in Figure 7, which includes visible watermark embedding, robust watermark embedding, and authentication watermark embedding. First, the medical image is segmented using the Laplacian edge detection and level sets and divided into ROI I 1 and RONI I 2 . To reduce the amount of embedded edge information and improve the invisibility of the algorithm, the segmented image is corrected, and the image is divided into 8 × 8 blocks. Subblocks at the boundary line are incorporated into the ROI of the image. After that, the visible watermark is embedded in the RONI I 2 by the image fusion algorithm.
en, the robust watermark information and the authentication watermark information generated by ROI I 1 are embedded in RONI I 2 with the embedded visible watermark. Finally, the self-generated authentication watermark information is embedded in ROI I 1 to complete watermark information embedding.

Visible Watermark Embedding.
A coordinate is set in RONI I 2 as the visible watermark embedding position (its top left corner (0, 0) is usually selected as the starting position for embedding). e visible watermark information mainly includes the hospital logo icon, the serial number of the computed tomography (CT) image, the type of examination subject, and the examination time.
e inspection time automatically generated by the system and other information included in the visible watermark information is embedded in RONI I 2 using equation (9).

Robust Watermark Embedding
Step 1. Arnold transform is used to scramble the robust watermark information W that needs to be embedded, and the scrambled image is transformed into a onedimensional vector.
Step 2. After the two-level IWT is applied on each subblock of RONI I 2 (as shown in Figure 8), the four subband coefficients of HL1, LH1, HL2, and LH2 are carried out by SVD.
Step 3. e authentication watermark for each subblock in ROI I 1 is generated by SVD and logistic chaotic mapping.
Step 4. A mapping function between ROI subblocks and RONI subblocks is established by logistic chaotic mapping based on key KI1. Since most of the regions in medical CT images are ROIs, the embedding space of the RONI may be insufficient if the authentication watermark of ROI subblocks is one-to-one embedded in each subblock of the RONI. erefore, in this paper, the subblocks of the RONI and ROI are sorted from left to right and from top to bottom, and two consecutive subblocks in the ROI are mapped to each subblock of the RONI as a large block (Figure 9). e watermark information after scrambling is divided and integrated according to the number of RONI subblocks, and the authentication watermark mapped to the current subblock of the RONI is embedded as a robust watermark. Assume that the relationship between a ROI subblock and a RONI subblock is established by a logistic chaotic map, as shown in Figure 9. e 4-bit binary authentication watermark information generated by two subblocks in each large subblock of the ROI is operated by XOR, and the 4-bit binary information generated by XOR is regarded as the authentication watermark generated by each block and embedded in the corresponding subblock of the RONI. If the authentication watermark generated by ROI subblock 3 is 1011 and the authentication watermark generated by subblock 4 is 1001, then the authentication watermark information embedded in RONI subblock 4 is 0010.
Step 5. A new singular value of the IWT coefficient is obtained by embedding watermark using an odd-even quantization. e first singular value and the remaining singular value of the diagonal matrix of each of the subblocks HL1, LH1, HL2, and LH2 in the RONI are sequentially taken, compared, and judged to embed a watermark. An 8-bit binary watermark can be embedded using the four subband coefficients of HL1, LH1, HL2, and LH2. When αs i (j, j)/s i (1, 1) is even, Scientific Programming When αs i (j, j)/s i (1, 1) is odd, where ⌊⌋ is the floor function, W i is the watermark information, α is the embedding adjustment coefficient, S ij is the j-th singular value of the i-th subblock, and 2 ≤ j ≤ 15.
Step 6. RONI I ' 2 with watermark information is generated by inverse SVD and inverse 2-layer IWT, combining ROI I 1 with the watermark image with robust watermark information and authentication watermark information is obtained.

Authentication Watermark Embedding
Step 1. ROI I 1 is redivided into 4 × 4 nonoverlapping blocks, and the authentication watermark is generated   in each subblock of I 1 by SVD and logistic chaotic mapping.
Step 2. e overflow map is constructed. Since the difference expansion is used, the embedding information will go beyond the pixels in the image gray value range, and the overflow map is labelled. e compressed overflow map and authentication watermark are embedded in the corresponding mapping blocks through the generalized difference expansion mode. In this algorithm, the authentication watermark generated by the smooth block is embedded into the corresponding smooth block based on the generalized difference expansion algorithm [25]. Each smooth block is embedded with a 15-bit watermark, wherein the authentication watermark occupies 4 bits, and the remaining bits are used to store overflow map information and related auxiliary information.
Step 3. Based on key KI2, a mapping function for the ROI I 1 subblocks is established by logistic chaotic mapping. e watermark authentication information generated by its block is embedded in the corresponding mapping block, and the logistic chaotic mapping key KI2 is saved for the watermark information extraction and detection.
e authentication watermark and other information are embedded into the corresponding subblocks of ROI I 1 by general difference expansion to generate a new ROI I 1 ′ .
e final watermarked medical image is obtained by combining ROI I 1 ′ and generated RONI I 2 ′ .

Watermark Extraction and Tamper Localization.
e flowchart of watermark extraction and tamper localization for watermarked medical images in this paper is shown in Figure 10. e specific steps are as follows.

Watermark Extraction.
Watermark extraction is mainly the extraction of robust watermark information, and the visible watermark does not need to be extracted. e specific operation is as follows: Step 1. According to the method of robust watermark embedding, the watermarked medical image is segmented by the Laplacian edge detection and level set method.
e segmented image is divided into 8 × 8 blocks. Subblocks at the boundary line are incorporated into the image ROI, and the image is divided into ROI I 1 and RONI I 2 .
Step 3. After the two-layer IWT is applied on every subblock of RONI I 2 , the four coefficients of HL1, LH1, HL2, and LH2 obtained by the transform are carried out by SVD.
Step 4. e first value of each diagonal matrix is removed in turn to judge and extract the watermark. If the value of αs i (j, j)/s i (1, 1) is close to an even number, then the watermark information 0 is extracted; if the value is close to an odd number, then the watermark information 1 is extracted. e watermark information in each subblock is extracted by this method.
Step 5. e authentication watermark incorporated into the watermark information is removed, and then the original robust watermark is restored by the Arnold scrambling inverse transform.

Tamper Localization.
Medical images require the image to be authentic and complete, and any changes cannot cause image distortion, especially to the ROI in the image.
erefore, the watermark image should be authenticated to determine whether it has been tampered with: Step 1.
e medical image is segmented using the Laplacian edge detection and level sets and divided into ROI I 1 and RONI I 2 .
Step 2. RONI I 2 is divided into nonoverlapping subblocks of size 8 × 8. e authentication watermark contained in the robust watermark information in each subblock is extracted by the above watermark extraction algorithm.
Step 3. ROI I 1 is divided into 4 × 4 nonoverlapping subblocks; each block is operated on by inverse general difference expansion, and the authentication watermark hidden in the subblock is obtained.
Step 4. e authentication watermark information is extracted from each subblock of ROI I 1 , and the feature watermark of each subblock is generated by SVD and logistic mapping.
Step 5. Based on the key KI2, the corresponding mapping subblock for each small block in ROI I 1 is found by logistic mapping, and the feature watermark is compared with the authentication watermark extracted from the mapping subblock. If the values of the authentication watermark in the two subblocks are equal, then the watermark has not been tampered with; otherwise, the watermark has been tampered with, and the tampered region needs to be located.
Step 6. ROI I 1 is redivided into 8 × 8 nonoverlapping blocks. e corresponding subblocks of RONI I 2 for the ROI I 1 subblocks are found by logistic chaotic mapping based on key KI1. In this paper, each subblock of the RONI and ROI is sorted in order from left to right and from top to bottom, respectively, and two consecutive subblocks in the ROI are mapped into each subblock of the RONI as a large block. For the ROI that has not been tampered with, according to Step 5, the subblock authentication watermark is extracted and compared with the corresponding authentication watermark hidden in each subblock of RONI I 2 . If the values are equal, then the watermark has not been tampered with; otherwise, the watermark has been tampered with, and the tampered region needs to be located.

Experimental Results and Analysis
In this experiment, the standard images of the skull, mediastinum, and liver, the size of which is 512 × 512 and 8-bit greyscale, are randomly selected as the original medical images. All images are from the data centre of Suzhou University Affiliated Hospital. Due to limited space, this article takes three images as examples, as shown in Figure 11. e visible watermark to be embedded is composed of medical image identification and basic information, and the robust watermark is composed of basic patient information and diagnostic information (Figure 12). e experiment focuses on the reversibility of the algorithm, the visual quality of the watermarked image, the accuracy of tamper detection, and the accuracy of regional positioning. All the experiments in this paper are based on MATLAB R2012b in the Windows XP operating system. Image fusion theory was used to embed visible watermark, which is equivalent to adding digital signatures to carrier images. Only on the basis of the digital signature (visible watermark) can the receiver extract the invisible watermark by using the key. erefore, the analysis of the experimental results in this paper is based on medical images with visible watermark as the carrier images.
When the watermarked medical image is not attacked or tampered with, the ROI recovered by extracting the authentication watermark embedded in the ROI using the watermark extraction algorithm is exactly the same as the original ROI. at is, I 1 (x, y) − I 1 ′ (x, y) � 0. (x, y) indicates the position of the image pixels in the image, I 1 represents the ROI before the watermark is embedded, and I 1 ′ represents the recovered ROI. us, the reversibility of the algorithm is verified.
In this paper, the medical image with a visible watermark, as shown in Figure 13, is used as the carrier image, and basic information, such as the binary image shown in Figure 12(b), is selected as the watermark information. Figure 14 shows the experimental results of watermark embedding and extraction without attack. rough observation by the human eye, image distortion cannot be perceived. In this paper, the peak signal-to-noise ratio (PSNR) and structural similarity (SSIM) are used as measures of the embedding distortion, and the normalized correlation (NC) is used as a measure of the watermarking robustness. Figures 14(a)-14(c) show the watermarked images obtained (including embedded robust watermark and authentication watermark) by this algorithm whose PSNR values are 37.5 dB, 38.57 dB, and 36.21 dB, and SSIM values are 0.985, 0.987, and 0.982, indicating that the algorithm has low distortion and good visual quality. e details are shown in Table 1. Figures 14(d)-14(f ) show the three watermark images extracted by this algorithm whose NC values are all 1, which shows that the algorithm can extract the watermark completely without being attacked or tampered with.
Form Table 1, compared with the algorithms in [1,14,26], the visual quality of the proposed algorithm is higher than those of [14,26] but slightly lower than that of [1]. e visual quality of this algorithm is slightly lower than that of [1]. e main reason is that both robust watermark and authentication watermark are embedded in this algorithm, while only a single watermark is embedded in the algorithm in [1]. Both robust watermark and authentication watermark are embedded in this algorithm and the algorithms in [14,26], but the PSNR and SSIM values generated by this algorithm are significantly higher than those generated by the algorithms in [14,26].
When the proposed algorithm is used to embed the watermark in the RONI, not only is the robust watermark embedded but also the authentication watermark is embedded, which makes the embedding capacity slightly larger. e RONI in medical images is smooth, so blocking artefacts can be easily caused after embedding too much information, which leads to a decrease in the image quality. e PSNR values of the three watermarked images after embedding the robust watermark in the RONI are only 40.55 dB, 41.61 dB, and 39.73 dB. e visual quality exhibits little difference compared with that when embedding both the robust watermark and the authentication watermark in the RONI. To   improve the accuracy of tamper localization, reducing the visual quality slightly is worthwhile.
Since the visible watermark is visible to the human eye, an attack on a visible watermark may be a shear attack or an elimination attack. Since the invisible watermark (robust watermark and authentication watermark) is invisible to the human eye, an attack on it may be a JPEG compression attack, a noise attack, a rotation attack, etc. In this paper, a robust watermark is embedded into the RONI for copyright protection and has no impact on medical diagnosis. A Scientific Programming variety of attacks are applied to the three visible watermarked images shown in Figure 13 after embedding the robust watermark shown in Figure 12(b) to compare the robustness (as shown in Table 2). Many kinds of attacks are included in this paper. To verify the antiattack robustness, the use of experimental data from other studies as a reference is necessary. Because the focus of each paper is different, the experimental data it contains may be insufficient; thus, this paper draws on the data from [14,[26][27][28] for comparison. e experimental results in Table 2 show that the proposed algorithm has higher robustness than the other algorithms in [14,[26][27][28]. e "-" in Table 2 indicates that the corresponding experimental measurement has not been carried out. IWT has an excellent effect in gathering energy and is very robust against noise, filtering, and other removal attacks. By using two-layer IWT on the image to obtain more concentrated energy, the robustness can be improved effectively. In addition, the image singular value has good stability, and it is particularly robust against rotation attacks. e paper selects the NC value of the other algorithms that have better resistance to some attacks as the NC value of the whole other algorithms, but, overall, this algorithm has high robustness against attacks on the basis of high invisibility.
Compared with the other algorithms in [14,[26][27][28], the algorithm in this paper is less robust to some attacks, mainly because the other algorithms are composed of multiple algorithms, and some algorithms are more robust to certain attacks. Although under certain attacks, the robustness of the proposed algorithm is lower than that of some algorithms in [14,[26][27][28]; on the whole, the antiattack ability of the algorithm in this paper is stronger than any algorithm in [14,[26][27][28].
In this paper, both robust and authentication watermarks are embedded in the same carrier image (such as Figure 13). erefore, not only the impact of various attacks on robustness but also the impact of the embedded authentication watermark on robustness should be considered. In Table 3, only a robust watermark is embedded in Algorithm 1, and a robust watermark and an authentication watermark are embedded and authenticated in Algorithm 2. e watermarked image (Figure 15(a)) is tampered with, and the tampered image is as shown in Figure 15(b). e tampered image is subjected to tamper detection. e detection result is shown in Figure 15(c), and the position of the tampered region is marked in white. Figure 15 Similarly, the liver image with an embedded authentication watermark is tampered with in the experiment, as shown in Figure 16(b). e tamper detection effect is shown in Figure 16(c), and the position of the tampered region is  e accuracy of tamper detection is calculated by the following two aspects: (1) the positive detection rate (TPR), which is the ratio of the number of the correctly detected   tampering blocks to the total number of all the tampering blocks, and (2) the negative detection rate (TNR), which is the ratio of the number of the inaccurately detected tampering blocks to the total number of the tampered blocks. Image tamper localization accuracy can be explained by the positive detection rate and negative detection rate. e pixel values of one or more pixel blocks of size 16 × 16 of the secret image are randomly selected. Figure 17(a) shows the mean of the positive detection rate after the 40 experiments; Figure 17(b) shows the mean value of the negative detection rate after the 40 experiments.
From Figure 17(a), we can know that, with the increase of tampered blocks, two methods of positive detection rate showed a downward trend; however, this method is obviously better than [26]; Figure 17(b) shows that the tampered blocks increases lead to a negative detection rate that showed an upward trend. is method rises slowly relative to the method in [26]. Of course, if tampering leads to information error of decomposition blocks, the negative detection rate will rise sharply. Based on the comprehensive analysis of the curve data in Figure 17 compared with the method of [26], the tamper localization accuracy of this method can be increased by almost 3%.

Conclusions
Because of the limitation of a single function in the existing medical image watermarking algorithms, a multipurpose watermarking algorithm for medical images is proposed in this paper. eoretical analysis and experimental results show that the algorithm has good invisibility. In addition, the multiple watermarking algorithm achieves the multiple protection of the original medical image at the expense of minimal watermarking robustness. e ROI feature in medical images is used as an authentication watermark to enhance the sensitivity of tampering. At the same time, the generated feature authentication watermark is embedded not only in the medical image RONI but also in the corresponding ROI of other mapping blocks, which can effectively resist collage attacks and mean value attacks, enhance the tamper localization ability, and improve the positioning accuracy.
Image fusion theory is used to embed the visible watermark, which is equivalent to adding digital signatures to carrier images. Only when the digital signature (visible watermark) exists can the receiver extract the invisible watermark by using the key. erefore, the multiple

12
Scientific Programming watermarking algorithm is very suitable for copyright protection and declaration of important or sensitive data.

Data Availability
All relevant data are within the paper.

Conflicts of Interest
e authors declare that there are no conflicts of interest regarding the publication of this paper.