1 Introduction

In recent time, implementing e-Health solutions has become a trend amongst the various research groups across the world [8, 12]. The Information and communication technology (ICT) has been potentially useful for cost effective and speedy communication of electronic medical record (EMR) over open channels for e-Health applications [38]. However, electronic medical record (EMR) is widely communicated, stored and exchanged without any consideration of security [3, 11, 12, 23, 26, 30, 32, 37, 38]. In addition, identity theft related to medical is a growing and dangerous crime in the present time [8]. Therefore, the authenticity of the medical information and related images is of prime concern as they form the basis of inference for diagnostic purposes. To address these issues, potential researchers are using watermarking as a value added tools for data management and distribution in healthcare applications [8, 13, 14, 25, 26, 30, 32, 38]. Other interesting applications of digital watermarking are military, communication, privacy protection, identification, media file archiving, broadcast monitoring, remote education and insurance companies, secured E-voting systems, fingerprinting, real time audio/video, robotics, rightful ownership of identity card and digital cinema [38]. Most of the available watermarking techniques for healthcare applications are based on spatial domain [1, 4, 5, 10, 19], transform domain [8, 13, 14, 25, 28, 31,32,33, 39] or combination of both [2, 15, 18, 27, 34,35,36]. Recently, potential researchers are using robust and secure spread spectrum watermarking technique whereas the watermark information is embedding in a wavelet domain [18, 34,35,36]. However, wavelet coefficients of an image are non-Gaussian, such a Gaussian detector is neither robust nor optimal [29]. Therefore, modeling of host media becomes important for detection performance. In order to obtain a robust detector, a suitable technique is to treat the watermark detection as a statistical detection problem. Further, the binary hypothesis examination is formulated using a more accurate probability density function (pdf) of the coefficients of image.

In this paper, we present a watermarking technique applying secure spread-spectrum concept in wavelet domain where embedding strength is varied according a parameter called ‘watermark-to-document ratio (WDR)’ in order to ensure imperceptibility of the cover medical images. It is well established that spread-spectrum concept, popularly used as modulation scheme to provide secure communication over open channels. Further, the concept used in watermarking with the aim to achieved higher degree of security [38]. For the extraction of binary image watermark, statistical profile of DWT coefficients of watermarked image is determined and the obtained probability distribution function (pdf) is utilized for designing the watermark detection procedure using Cauchy statistical model of heavy-tailed family. The rest of the paper is organized as follows. Section 2 contains a brief preliminary on design of statistical watermark detector for medical images, Statistical modeling of wavelet coefficient, Likelihood- Ratio Test and Threshold determination for watermark detector. The proposed watermarking framework followed by watermark embedding and extraction algorithms is presented in Section 3. The results and analysis of the work is discussed in Section 4. Section 5 presents the conclusions of the proposed research.

2 Preliminaries

2.1 Design of statistical watermark detector for medical images

Although most of the watermarking schemes use different kinds of correlating detector for watermark detection, however their detection performances are generally not optimal [7, 29]. In facts, these detection methods do not take into account the actual statistical properties of the watermarked data. A statistical distribution is fully described by its pdf. Therefore, it becomes mandatory to obtain the best suitable pdf which closely models the DWT coefficients of the watermarked image.

2.2 Statistical modeling of wavelet coefficient

Recently, it is concluded by potential researchers, the histograms of wavelet coefficients have heavier tails and are more sharply peaked at zero than assumed by Gaussian distribution in the sub-band representation of medical images [16, 17, 22]. Further, the heavier-tailed characteristic of wavelet coefficients, the generalized student t-distribution is selected to model the statistics of sub-band coefficients of the selected medical image [16].

In view of above, we examine the appropriateness of long-tail distributions for statistical modeling of sub-band wavelet coefficients in a CT medical image. The chi-square goodness-of-fit test [6] is performed to recognize the most suitable fit. It compares a sample of data with identified statistical distribution. If the number of categories of data sample = N, observed frequency in each category = O, and expected frequency in corresponding category = E, then

$$ {\chi}^2=\sum \limits_N\frac{{\left(O-E\right)}^2}{E} $$
(1)

The model with a lower chi-square value is a better fit. Chi-square values of 2nd level HL and LH sub-band wavelet coefficients are presented in Table 1. It can be observed from the table that Cauchy distribution provides the best statistical model for the sub-band DWT coefficients under consideration as the Chi-Square value for Cauchy distribution is the lowest amongst the considered long-tailed distributions. The pdf of Cauchy distribution is defined as [20]:

$$ p\left(x/\gamma, \delta \right)=\frac{1}{\pi}\frac{\gamma }{\gamma^2+{\left(x-\delta \right)}^2} $$
(2)

Here, the location parameter and shape parameter are −∞<δ<∞ and γ> 0, respectively.

Table 1 Chi-square values of 2nd level sub-band wavelet coefficients

The obtained best fitted Cauchy distribution pdf will be used in designing a nearly optimum watermark detector based on the binary hypothesis test.

2.3 Likelihood- ratio test (LRT)

In designing process, we assume that the watermark image does not change the distribution characteristics of cover image after embedding. With the help of the obtained statistical model, we can derive a watermark detector and the most widely-used approach in this direction is to construct a Likelihood- Ratio Test (LRT) [37].

Based on the embedding rule, we can formulate a two-sided parameter test

$$ H0:\upalpha =0,\Theta\ \left(\mathrm{no}/\mathrm{other}\ \mathrm{watermark}\right) $$
(3)
$$ H1:\upalpha \ne 0,\Theta\ \left(\mathrm{watermark}\right) $$
(4)

Given that Θ and α are known a-priori we can formulate a Neyman-Pearson (NP) detector to decide H1 if

$$ L(y)=\frac{p\left(y;{H}_1\right)}{p\left(y;{H}_0\right)}>T $$
(5)

where T denotes a detection threshold obtained by exploiting the NP criterion [21]. We obtain the LRT statistics for the Cauchy model (LRT-C) [7, 21]

$$ \rho (y)=\sum \limits_{t=1}^N\log \left(\frac{\gamma^2+y{\left[t\right]}^2}{\gamma^2+\Big(y\left[t\right]-\alpha .w{\left[t\right]}^2}\right) $$
(6)

2.4 Threshold determination for watermark detector

The Likelihood- Ratio Test detection statistics follow a Gaussian law with mean μ0 under H0 and mean μ1 under the alternative hypothesis [7, 21].

Detector Threshold is calculated as:

$$ T=\surd 2\sigma\;{\operatorname{erfc}}^{-1}\left(2{P}_f\right)+{\mu}_0 $$
(7)

Where μ0 = variance and Pf = probability of false alarm. It can be defined as [21]:

$$ {P}_f=\frac{1}{2}\mathit{\operatorname{erfc}}\left(\frac{T-{\mu}_0}{\sqrt{2}\sigma}\right) $$
(8)

Probability of false alarm is one of the important performance parameters, which determines the accuracy of statistical watermark detector.

3 Proposed method

In this paper, we present a watermarking algorithm using robust DWT and secure spread spectrum techniques with adaptive embedding strength. In the embedding of binary watermark, the cover medical image is decomposed by DWT using Mexican hat as mother wavelet. Mexican Hat provides better detection and localization of patches and gaps, which can be exploited well in case of medical images. Adding watermark into Mexican Hat DWT provides more robustness toward affine transforms. This wavelet has the advantage of better resolution for smoothly changing time series [38]. However, it is being computationally expensive to use than the Haar wavelets. The detail discussion of watermark embedding and extraction process is presented in subsection 3.1 and 3.2, respectively. The power of the PN-sequence pair is varied according to specified watermark to document to ratio (WDR) in order to maintain the imperceptibility of watermarked medical image. By defining WDR, we ensure that watermark do not suppress the cover image in any frequency band. This is achieved by varying the power of watermark according to cover image so that defined WDR remain maintained. This concept to set a watermark to document ratio to get the embedding strength of watermark introduced in [9].WDR is defined as:

$$ WDR=10\log \left(\frac{{\sigma_w}^2}{{\sigma_x}^2}\right) $$
(9)
$$ {\sigma_w}^2=\frac{1}{N}\sum \limits_kW{\left[k\right]}^2,{\sigma_x}^2=\frac{1}{N}\sum \limits_kX{\left[k\right]}^2 $$
(10)

Where, σx = Variance of cover image, σw = Variance ofwatermark image, W[k] = Wavelet coefficient ofWatermark Image, X[k] = Wavelet Coefficient of Cover Image.The embedding strength of ith level HL and HL subbands are represented as k1(i) and k2 (i) respectively. These values are claculated as:

$$ \mathrm{k}1\left(\mathrm{i}\right)=\mathrm{sqrt}\left(\mathrm{x}\left(\mathrm{i}\right)/\exp \left(\left(\log (10)\times \mathrm{DWR}\right)/10\right)\right) $$
$$ \mathrm{k}2\left(\mathrm{i}\right)=\mathrm{sqrt}\left(\mathrm{y}\left(\mathrm{i}\right)/\exp \left(\left(\log (10)\times \mathrm{DWR}\right)/10\right)\right) $$

where x(i) and y(i) is the PN Matrix.

Figure 1 show the clear relation between eembedding strength and variance of subband DWT coefficients of the cover image (considered as document) for specified DWR values. It is evident that for a higher value of DWR, gives lower value of embedding strengh and vice-versa. The complete watermarking frame work is depicted in Fig. 2.

Fig. 1
figure 1

Watermark strength vs. document variance

Fig. 2
figure 2

Proposed variable gain embedding (VGE) process

3.1 Watermark embedding process

The embedding algorithm for binary watermark is formulated as follows:

  • STEP 1: Read the cover image I (M, N) of size M × N.

  • STEP 2: Change the information into binary image D and rearrange it in one dimension (d = 1to n).

  • STEP 3: Calculate the second level sub-band coefficients cA2, cH2, cV2, cD2 after wavelet transform using Mexican hat as mother wavelet

  • STEP 4: Generate n number of PN-sequence pairs (PNh and PNv) size equals to number of rows in cH2 and cV2 with secret key and random number generator.

  • STEP 5:

    Get the variance x(i) and y(i) of cH(i) and cV(i) respectively.

    Get embedding strength k1(i) and k2(i) for given DWR as

$$ \mathrm{k}1\left(\mathrm{i}\right)=\mathrm{sqrt}\left(\mathrm{x}\left(\mathrm{i}\right)/\exp \left(\left(\log (10)\times \mathrm{DWR}\right)/10\right)\right) $$
$$ \mathrm{k}2\left(\mathrm{i}\right)=\mathrm{sqrt}\left(\mathrm{y}\left(\mathrm{i}\right)/\exp \left(\left(\log (10)\times \mathrm{DWR}\right)/10\right)\right) $$
  • STEP 6

ford = 1 to n,

ifmessage = 0,

then

$$ \mathrm{cH}2\left({\mathrm{p}}^{\mathrm{th}}\mathrm{column}\right)=\mathrm{cH}2\left({\mathrm{p}}^{\mathrm{th}}\mathrm{column}\right)+\mathrm{k}1\left(\mathrm{i}\right)\times {\mathrm{r}}^{\mathrm{th}}{\mathrm{PN}}_{\mathrm{h}}; $$
$$ \mathrm{cV}2\left({\mathrm{p}}^{\mathrm{th}}\mathrm{column}\right)=\mathrm{cV}2\left({\mathrm{p}}^{\mathrm{th}}\mathrm{column}\right)+\mathrm{k}2\left(\mathrm{i}\right)\times {\mathrm{r}}^{\mathrm{th}}{\mathrm{PN}}_{\mathrm{v}} $$

if message = 1,

then

$$ \mathrm{cH}2\left({\mathrm{p}}^{\mathrm{th}}\mathrm{column}\right)=\mathrm{cH}2\left({\mathrm{p}}^{\mathrm{th}}\mathrm{column}\right)-\mathrm{k}1\left(\mathrm{i}\right)\times {\mathrm{r}}^{\mathrm{th}}{\mathrm{PN}}_{\mathrm{h}}; $$
$$ \mathrm{cV}2\left({\mathrm{p}}^{\mathrm{th}}\mathrm{column}\right)=\mathrm{cV}2\left({\mathrm{p}}^{\mathrm{th}}\mathrm{column}\right)-\mathrm{k}2\left(\mathrm{i}\right)\times {\mathrm{r}}^{\mathrm{th}}{\mathrm{PN}}_{\mathrm{v}}; $$

do

  • STEP 7: Take inverse“Mexican Hat” Wavelet transform to get watermarked image

3.2 Watermark extraction process

The extraction algorithm for binary watermark is formulated as follows:

  • STEP 1: Read the watermarked image I w (M, N)

  • STEP 2: Take the wavelet transform watermarked image using “Mexican hat” and get cA2, cH2, cV2, cD2 coefficients.

  • STEP 3: Generate 1’s sequences (msg) identical to message vector

  • STEP 4:

for i = 1 to n.

Generate n different PN-sequence pairs (PNh and PNv) Same secret key to reset the random number generator. Perform Cauchy modeling of wavelet coefficient and get the shape and location parameters γ, δ respectively.

Get the mean μ0and variance σ2 of LRT statistics.

Get the threshold Th_h(i) for Th_v(i) for cH2(i) and cV2(i) as

$$ Th=\surd 2\mathrm{s} \operatorname {erfc}-1\left(2 Pf\right)+\mu 0 $$

Once threshold (T) is being calculated decision is being made in favor of H1 or H0 corresponding to 1 or 0.

$$ L(y)=\frac{p\left(y;h1\right)}{p\left(y;h0\right)}> Th $$
(11)

The Eq. (11) is termed as Likelihood Ratio test.

if

$$ L(y)> Th\left(\mathrm{i}\right) $$

then

$$ \mathrm{messagevector}\;\left(\mathrm{i}\right)=1 $$

otherwise

$$ \mathrm{message}\ \mathrm{vector}\left(\mathrm{i}\right)=0 $$
  • STEP 5: Reshape this extracted bits to get the binary matrix which represent pixel values for watermarkimage.

  • STEP 6: Convert the matrix back to image to get the recovered watermark.

4 Experimental results performance analysis

Experiment has been carried out using 1024 × 1024 8 bit grey scale CT scan image cover image obtained from Medpix database [24]. A binary image of size 50 × 9is considered as watermark image as shown in Fig. 3a. Performance of the proposed variable gain watermarking scheme as well as the statistical watermark detector have been evaluated by considering suitable performance parameters such as PSNR, Correlation, WDR and probability of false alarm (pfa). PSNR between cover image and watermarked image and correlation between watermark and extracted watermark corresponding to different DWR is being represented in Table 2 corresponding to embedding at level 1 and level 2 wavelet decompositions. Referring this Table, the maximum PSNR value is obtained as 43.9986 dB for first level decomposition of DWT at WDR =20. However, minimum PSNR value is 33.1989 dB at WDR =10 for the same level of DWT decomposition. With reference to Table 2, it is further noticed that the maximum Correlation value is obtained as 0.9508 for first level decomposition of DWT at WDR =10 at. However, minimum Correlation value is 0.6871 at WDR =10 for the same level of DWT decomposition.

Fig. 3
figure 3

Health Center’s logo (a) original and extracted with DWR

Table 2 Effect of DWR at different level of wavelet decomposition

Figure 3b–f shows the extracted watermark corresponding to different DWR for embedding performed at first level sub-band decomposition. Figure 4a–e shows the extracted watermarks at second level wavelet decomposition. Table 3 shows the correlation between watermark image and extracted watermark image for given pfa. Tolerable pfa is fixed considering the degree of sensitivity of the watermark information. Extracted watermark at different false alarm probability is presented in Fig. 5. The perceptibility of watermarked image can be verified from Figs. 6 and 7 for level 1 and level 2 embedding of watermark, respectively. It is observed that no noticeable change occurs after the embedding.

Fig. 4
figure 4

Extracted Health Center’s logo with DWR (a) 10 (b) 14 (c)16 (d) 17 (e) 20 at 2nd level

Table 3 Effect of Probability of False alarm for level 1
Fig. 5
figure 5

Extracted Health Center’s logo with pfa at (a) 10−2 (b) 10−3 (c)10−6 (d) 10−8 at level 1

Fig. 6
figure 6

CT Scan images (a) Original andWatermarked with DWR (a) 10 (b)14 and (c)16 in level 1

Fig. 7
figure 7

CT Scan images (a) Original and Watermarked with DWR (a) 10 (b)14 and (c)16 in level 2

Further, we have evaluated our algorithm against different attacks. Robustness of the watermark is analyzed against attacks like compression, JPEG compression, Gaussian noise, and salt & pepper noise for different quality factor. Table 4 shows the robustness of method for different attacks at gain = 6. With reference to this table, we observed that the NC value is 1 for Gaussian noise (mean = 0, var.-0.01), Poisson noise and Histogram Equalization. However, the minimum NC value is obtained by the proposed method is 0.4066 for JPEG compression, whereas Quality Factor (QF) =10. Furthermore, robustness of the proposed method has been compared with other recent reported techniques [35] for JPEG compression attack in Table 5. Referring this table it can be inferred that the NC values as obtained by proposed method vary in the range from 0.4066 to 0.9953. However, NC values as obtained by Singh et al. [35] vary in the range from 0.5306 to 0.7394. Further, it is observed that the method offered up to 34.60% enhancement in robustness over the method as reported in [35]. Robustness of the method for Gaussian and Salt & pepper noise is compared with Singh et al. [35] in Table 6. With reference to this table it is noticed that the maximum NC value has been obtainedby Singh et al. is 0.7391for Salt & pepper (density = 0.02) noise.However, proposed method obtained the maximum NC value is 0.9953for this attack. Further, the smallest NC value is obtained by the proposed method is 0.9256 for Gaussian noise (var =0.05). However, the smallest NC value obtained with [35] is 0.6944for the same attack. Referring this table it is observed that the method offered up to 36.33% enhancement in robustness over the method in [35]. The results indicate that the robustness of proposed method is better than the other similar existing technique [35].

Table 4 Robustness analysis of proposed method for different attacks
Table 5 Comparative analysis under NC values for JPEG compression
Table 6 Comparison results under NC value

5 Conclusion

In this paper, we presented a spread-spectrum based watermarking technique with adaptive watermarking capacity in wavelet transform domain for medical images. The binary watermark image was embedded into the selected sub-band of DWT using Mexican hat wavelet. For the extraction of the watermark, statistical profile of DWT coefficients of watermarked image was determined and it was observed that the Cauchy distribution provided the best fit for modeling the DWT coefficients of watermarked image. This obtained probability distribution function (pdf) was utilized for designing the watermark detection procedure. This proposed detector is considered the Cauchy statistical model of heavy-tailed family, which accurately models the non-Gaussian DWT coefficients of an image. The performance of the proposed technique was evaluated against attacks with varying watermark to document ratio (WDR). Experimental results have been demonstrated that the proposed technique is more robust than recent reported method. In addition, there are a few methods to determine the most suitable statistical model for any specified data set such as Kolmogorov- Smirnov test, Anderson–Darling test, Kuiper's test. An attractive feature of the chi-square goodness-of-fit test is that it can be applied to any univariate distribution for which the cumulative distribution function can be calculated. Correlation and security of the method can be improved further by using other extended PN sequences such as random sequence, maximal length sequence, gold sequence and Kasami sequence. Further, some more computationally efficient wavelet filters may be tries to improve the performance of proposed algorithm.