1 Introduction

With the advancement in digital communication, it has facilitated the transfer of a large amount of data through the public network in real-time [20]. By applying these emerging technologies, smart healthcare organizations can provide remote medical services to patients [7]. POC services can be beneficial for the remote collection of patient data such as biomedical signals, blood pressure, body temperature, etc. by deploying edge level sensors [1]. At the time of transmission over the open network, different security issues also arise, including preserving data's integrity and privacy along with the source authentication [5]. To date, a variety of guidelines and standards is used to protect patient’s privacy while sharing data for diagnosis or research purposes [5, 9, 21]. Despite several benefits, health data may be redistributed by unauthorized person, which leads to strong security issue. Further, the importance of health data security has increased even more during COVID-19 pandemic [3, 10, 27].

While sending the ECG signal, some information about the patient and the hospital logo can be added as watermarks to resolve any conflict regarding the source in the future. Notably, as the ECG signal is very important for the proper diagnosis, so the watermark should be added in such a way that the degradation of the cover signal will be minimum [29]. Watermarking technique is widely used for bio medical data authentication purposes for its robust nature. In watermarking, the secret digital data is efficiently concealed within the cover to resolve the ownership conflict at any point [6]. Robustness and invisibility are the mutually exclusive properties of any general watermarking system [2]. These requirements need to be balanced to offer high performance. Recently, the concept of watermarking and optimization [4, 16] methods are used together to provide balanced tradeoff among invisibility and robustness efficiently. Optimizations schemes are mainly used to offer optimal gain/embedding value for embedding the secret data into cover [16].

Inspired by these current works, in this article an optimization-based ECG watermarking in RDWT-SVD domain is developed, which are mainly provide balanced tradeoff among invisibility and robustness through optimal embedding/gain value. The contribution of this paper can be summarized from the following aspects:

  • An optimization-based ECG watermarking in RDWT-SVD domain is developed, where main criteria in digital image watermarking are simultaneously improved i.e., quality and robustness. Due to shift invariance nature, RDWT is superior to DWT [7]. Non-fixed orthogonal bases and unidirectional non-symmetrical decomposition properties of SVD make it one of the efficient and popular methods for watermarking [5, 11].

  • Simultaneously embedding of patient details and hospital logo into ECG signal to solve any ownership conflict and offers high robustness with increased embedding capacity [30].

  • Fusion of PSO and firefly optimization (pFIR) concept [8] is used offer the balanced trade-off among invisibility and robustness efficiently.

  • Preliminary experimental results indicate the optimal invisibility and robustness result is more effective than the traditional schemes.

The rest of the paper is arranged in the following way: The related work is detailed in Section 2. Section 3 presents the detail of proposed work. In Section 4, some detail result analysis of the proposed method is carried out. Finally, Section 5 summarizes the work and gives an outlook for future plans.

2 Literature review

Some of the related research works are discussed in this section.

In [29], Sanivarapu et al. proposed a robust watermarking to securely embed patient data within ECG signal. The method used DWT to decompose the cover signal into frequency domain and embed encoded mark into the signal. Compared with the schemes developed by Edward Jero et al. [16], Jero and Ramu [19] and Mathivanan et al. [22], its invisibility is higher. In [16], authors proposed DWT-SVD based secure data hiding technique where embedding and recovery of secret data within cover signal is done using quantization. The performance is improved by utilizing optimization scheme to calculate the value of gain value, which maintains a balance between robustness and visual quality. However, the robustness analysis of this method for different attacks is missing. In [13], Dey et al. described a blind and secure watermarking method to hide data within ECG signal. In this technique, a fusion of RDWT, spread spectrum and quantization method is used to provide source authentication and self-recovery at receiver side. The results show the method is highly invisible and secure with low cost. However, different encoding techniques can also be used to further increase the security. Authors of [18] proposed a blind and secure watermarking using curvelet transform to provide security to patient’s private data. The cover ECG image is decomposed using fast discrete curvelet transform technique. Further, Euclidean distance is used get clusters from the curvelet coefficient points. The patient data is embedded as binary image into these cluster coefficients. The scheme provides more invisibility and robustness when compared with the existing techniques [15, 19, 28].

In [12], authors proposed a quantization based blind watermarking for ECG signal. Here different transform domain techniques are applied on the ECG signal and quantization-based embedding is used to hide the patient’s confidential data. The performance concluded that quantization scheme in DWT and DCT domain gives better result in term of imperceptibility and is useful for medical applications. Bio-medical signals based watermarking which provides data and owner authenticity along with data tracking in [17]. The watermarks are encoded using attribute-based encryption technique which ensures better security. Author used linear-correlation based detection method for robustly encoding the medical data. Another robust watermarking technique is implemented by Dey et al. [14] for authentication of ECG signals. The authors embed hospital logo within the second level DWT coefficients of cover signal using pseudo random sequence and three embedding factors. The values of embedding factors are optimized using cuckoo search optimization to ensure high robustness with minimum distortion. However, the embedding capacity of this technique can further be improved.

Tseng et al. [32] proposed wavelet based watermarking method to ensure secure transmission and authentication of ECG signals. In this approach, the mark is concealed in lower frequency DWT coefficients to provide better robustness. Also, wavelet-based compressed is applied on the watermarked signal to reduce the transmission overhead. In [23], Nambakhsh et al. developed a dual watermarking method to control mismatching of diagnosis report. The authors considered patient data and ECG signal as the watermarks. Multi resolution wavelet decomposition is used to securely embed both the watermarks into PET image. The secure embedding locations for embedding and extraction of marks is computed by applying texture feature extraction algorithm on the host image. The proposed method shows high resistance against various attacks.

Although the proposed watermarking solutions in ECG signals have major advantages, some of the major issues need to be addressed. Most of the discussed techniques are hiding only single watermark, which limits the security and authentication process. This also limits the embedding capacity. Also, an optimized balance between robustness, embedding capacity and visual quality need to be maintained. Further, most of the proposed watermarking techniques need extended robustness analysis.

3 Proposed method

In this section, the overview of our proposed method (see Fig. 1) is presented in detail. We describe the conversion of 1D signal to 2D signal through pan-Tompkins algorithm in Section 3.1. Then, our embedding and extraction design is presented in Section 3.2. Section 3.3 presents the determination of optimal embedding factor by using the pFIR. Specific steps of all these phases are provided in Algorithm 1 to Algorithm 3, respectively, while notations used in the algorithms are summarized in Table 1.

Fig. 1
figure 1

Proposed framework for embedding in ECG signal based on RDWT, SVD and pFIR optimization

Table 1 List of notations used in this article

3.1 Conversion of 1D signal to 2D signal

In the pre-processing phase, the QRS region of the ECG signal is extracted and used as 2D carrier image. Since, maximum energy of an ECG signal is concentrated in the QRS region, embedding in this region offers better robustness against different attacks [31]. In the proposed work, pan-tompkins algorithm is implemented to convert ECG signal, ‘Ecg_1D’ into 2D carrier image, ‘Ecg_2D’ [25]. In this process, the powerline interference and high frequency noise is eliminated by passing the input ECG signal through low pass and high pass filters, respectively. Further, the P and T waves are supressed to obtain the QRS region. The complexes are enhanced by applying square and smoothening operations and adaptive threshold method is used to calculate the R wave. Finally, we resize the resulting matrix in desired size. The detailed process of this process is given in Algorithm 1 [29]. Figure 2 shows the original ECG signal and the 2D image of ECG signal containing the QRS region.

Fig. 2
figure 2

a Original 1D ECG signal, b signal containing only QRS-region of the original signal

figure a

3.2 Embedding and extraction of multiple marks

Initially, pan-Tompkins algorithm [23] is implemented to covert carrier ECG signal, ‘Ecg_1D’, into 2D image, ‘Ecg_2D’ using Algorithm 1. Further, sub-sampling is applied on ‘Ecg_2D’ to generate sub-sampled blocks, ‘F1’, ‘F2’, ‘F3’ and ‘F4’. The sub-sampled block with highest entropy value, ‘F_max’, is transformed by second level RDWT and singular matrices, ‘S_H2’ and ‘S_V2’, of the resultant middle frequency sub-bands, ‘H2’ and ‘V2’ are computed. Similar series of RDWT and SVD is applied on the mark images, ‘Waterim1’ and ‘Waterim2’. Finally, the singular value of both watermarks, ‘W_S1’ and ‘W_S2’ are embedded into ‘S_A’ and ‘S_V’, using optimized embedding factor, ‘opt_α’. Lastly, inverse SVD- inverse RDWT are applied to generate the final marked image, ‘Wat_sig’. The stepwise procedure of embedding and recovery of dual marks is given in Algorithm 2. Figure 3 illustrates the middle frequency sub-bands of cover signal before and after embedding of the watermarks. It is observed that there is no significant visual change in the sub-bands before and after embedding procedure. During extraction process, the received signal is reshaped into 2D marked image. Further, reverse of embedding algorithm is applied on marked image to get the watermark images.

Fig. 3
figure 3

Horizontal and vertical sub-bands of cover signal before and after embedding watermark

figure b

3.3 Determination of optimal embedding factor

Robustness and imperceptibility are two main requirements of watermarking technique. Due to their inverse relation, an optimal balance between these requirements needs to be maintained [6]. In the proposed work, embedding and extraction schemes use optimal scaling factor, ‘opt_α’ which is calculated using Fusion of PSO and firefly optimization (pFIR). It offers optimal balance between invisibility and robustness. As shown in Fig. 4, the concept of pFIR is used to calculate the embedding factor. The stepwise procedure for deamination of scaling factor is provided Algorithm 3. The fitness function of our proposed method is calculated as,

$${\text{Fitness}}\;{\text{Function}} = \left( {\frac{{{\text{PSNR}}}}{100}} \right) + \left( {\mathop \sum \limits_{{{\text{i}} = 1}}^{{\text{n}}} {\text{NC}}} \right){ }$$
(1)
Fig. 4
figure 4

Flow diagram of pFIR algorithm [8]

Here peak signal-to-noise ratio (PSNR) and normalized correlation coefficient (NC) are the performance parameters and ‘n’ is the count of considered attacks.

figure c

4 Results and analysis

In our experiments, two watermark images including patient’s information [26] and NIT Patna logo [24], each of size 64 × 64, are embedded into the 2D-ECG signal of size 128 × 128 [26]. To verify the proposed method, different parameters including PSNR, Percentage residual difference (PRD), Kullback Leibler (KL) distance and NC are considered [5, 15]. PSNR measures the imperceptibility of the watermarks and PRD shows the percentage of relative squared difference between of original and marked ECG signal [15]. Further, KL divergence measures the difference between the probability density functions of cover and marked ECG signals [15]. NC score is associated with the robustness of the proposed technique which measures the similarity between the original and extracted mark images [5]. It is observed that the scaling factor range from 0.05 to 0.3 gives best result. Figure 5a–d illustrates the original and marked ECG signal, and both watermarks as personal patient data and logo image. It is noticed that there is no significant dissimilarity noticed between the two signals with naked eyes. Also, the ECG signals used for the experimental evaluation of the proposed work are illustrated in Fig. 6.

Fig. 5
figure 5

a The original ECG signal. b The watermarked ECG signal. c The private information about the patient as first watermark. d nitp logo as second watermark

Fig. 6
figure 6

Sample of different ECG signals [26]

The imperceptibility, robustness and feasibility of the proposed approach are evaluated by considering different experiments. Table 2 summarizes the versatility of the proposed method by considering different ECG signal samples (Fig. 6). The highest value of PSNR obtained is 67.8542 dB implying a good amount of imperceptibility. The NC values for both the watermarks are approaching one which shows the strong robustness. Also, the best value of PRD and KL distance are 0.291% and 0.0025. These small values of PRD and KL distance imply that the proposed method achieves good amount of imperceptibility and shows negligible distortion of the cover signal. Further, the effect on performance parameters for using different sizes of ECG signals is illustrated in Table 3 and Fig. 7. It is observed that in most of the cases we are getting the best results for the size 128 × 128.

Table 2 Performance evaluation on different ECG signals
Table 3 Performance evaluation on different sizes of ECG signal
Fig. 7
figure 7

The effect of choosing different size of ECG signals on a PSNR value and b PRD values, c NC values and d KL distance

Different signal processing attacks are considered to check the robustness of the proposed method and the result is shown in Table 4. NC values of acceptable range, i.e., NC > 0.7, are obtained for most of the attacks except for Gaussian noise and Salt and pepper noise with noise density 0.1. It is observed that our method is robust against the considered attacks. Table 5 represents the comparative analysis of the proposed method with some existing methods. Better results in terms of robustness and imperceptibility are experienced when our technique is compared with the existing state-of-the-art methods [15, 19, 22, 23]. Overall, the objective assessment confirms the promising results, while offered superiority to other competing schemes.

Table 4 Robustness analysis against various signal processing attacks
Table 5 Performance comparison between the proposed work and existing methods

5 Conclusion

This paper presented a RDWT-SVD domain robust ECG watermarking scheme based on optimization, providing both data confidentiality and copyright protection. We first perform pan-tompkins algorithm to convert 1D-ECG signal into 2-D matrix. Then, hybrid of RDWT and SVD is used to invisibly embed the patient data and logo image into cover signal. We also used pFIR scheme to offer good balance between invisibility and robustness. Extensive experimental analysis of the proposed work is further provided. The proposed method provides better scores of PSNR, PRD and KL distance when compared with similar existing methods and incur high visual quality with the best improvement of 97.89%. However, the robustness against Gaussian and salt and pepper noise with high density can further be improved. In future, we can use the concept of machine learning and deep learning to retrieve the watermarks from signal more efficiently.