1 Introduction

Telemedicine is a rapidly growing field in clinical medicine, used to transmit patients’ medical information across interactive media for consultations and remote medical examinations. For instance, digital medical imaging and communication in medicine (DICOM) are employed to transfer medical image reports (such as CT, and X-ray imaging) through networks. Medical images are also considered vital tools for doctors’ decision-making. Thus, the security of these images is regarded as critical in the telemedicine process, making robust protection systems for these images essential [1, 2].

Digital image copyright and authentication are key issues due to the high demand for image-processing tools that modify image content, data collection, and data protection [3, 4]. An image security system is essential for protecting images from unauthorized access and attacks when transferred across public networks [1, 5]. The medical image watermarking security system has been confirmed as one of the most commonly utilized protection systems for authorization and copyright protection that prevents violations of medical image content. This system embeds a watermark into the host image through a specific mechanism that can be extracted or detected later (after data reception) without causing any distortion to the protected image [6].

Embedded watermarking imperceptibility and robustness are considered the main criteria for the watermarking process, which must protect the embedded watermark from detection and removal by random or unexpected malicious attacks. However, robustness and imperceptibility are often conflicting objectives in evaluating watermarking mechanisms [7].

Watermarking can be classified into three categories depending on the mechanism parameters and conditions: semi-fragile, fragile, and robust [8]. Robust image watermarking protects images from expected attacks that attempt to destroy and remove the image watermark without significantly affecting the visual quality [9], typically applied for copyright rights and ownership verifications. In contrast, fragile watermarking is utilized to ensure credibility and image validity, rather than verifying ownership authenticity. Fragile watermarking aims to detect any unauthorized changes or damage caused by minor interferences or modifications to the watermarked image. Semi-fragile watermarking combines the characteristics of robustness and fragility while maintaining robustness against permitted manipulations and is often used for authentication [8, 10]. Several approaches have been introduced to incorporate watermarks into the frequency domain, often employing various transformations such as SVD, DWT, A discrete Fourier transform (DFT), discrete cosine transform (DCT), and integration methods like DWT–SVD, DCT–SVD, and DCT–DWT Wavelet transformation is recognized as one of the most effective techniques for achieving a balance between transparency and robustness. The robustness and imperceptibility of the watermarking methods are enhanced through the integration of SVD and DWT [7].

Modifications to the embedding watermark for host images can be made using certain watermarking methods. It is crucial to determine the volumes of adjustments needed to achieve a reasonable tradeoff between robustness and imperceptibility. These modification volumes are usually set by variables known as strength factors. Consequently, to determine the best strength factors, an effective and efficient algorithm is required to optimize the tradeoff between imperceptibility and robustness [3, 7, 11]. The primary objective of this study is to determine the optimal values of multiple strength factors (MSFs). The optimization of the best MSFs is addressed using heuristic methods.

This paper presents an image watermarking integration method using DWT and SVD, where the optimal values of MSFs are determined by the firefly Photinus algorithm (FPA) to balance robustness and imperceptibility. The LL3 sub-band singular values of the host image are embedded as singular values using MSFs. A linear combination of the peak signal-to-noise ratio (PSNR) and normal correlation coefficient (NC) is used as an objective function in this research. The remainder of this paper is organized as follows: Sect. 2 introduces related work on the integration of DWT- and SVD-based meta-heuristic search algorithms for image watermarking. Section 3 presents the FA, and Sect. 4 introduces the FPA algorithm. The integration process between the DWT and SVD is presented in Sect. 5. The proposed DWT–SVD-FPA method is detailed in Sect. 6. The experiments and results are discussed in Sect. 7, which also concludes the paper.

2 Literature review

In the field of medical image security, few efforts have been reported in recent years focusing on developing medical image watermarking mechanisms using meta-heuristic search optimization algorithms, which are considered a preferable choice for such problems. These algorithms are used to determine the optimal value of MSFs in watermarking methods, which have significantly improved outcomes [7, 12,13,14]. This section is divided into three subsections: first, we review studies of medical image watermarking using FAs; second, we review studies of medical image watermarking mechanisms based on other meta-heuristic search optimization algorithms; and third, we discuss the main contribution of this work.

2.1 Medical image watermarking based on firefly algorithm

Moeinaddini and Afsari [7] introduced a new DWT–SVD optimized watermarking approach using a modified FA based on opposition and dimensionality (ODFA). The experiments and outcomes of the proposed approach demonstrate a good degree of robustness and imperceptibility compared with other state-of-the-art methods.

The FA has recently been used by researchers to establish optimal trade-offs between robustness and imperceptibility in image watermarking techniques. Mishra et al. [8] The FA has recently been used by researchers to establish optimal trade-offs between robustness and imperceptibility in image watermarking techniques. Dong et al. [11] employed a chaotic FA to determine the optimal values of MSFs in the DCT-SVD domain; this method was used for grayscale image watermarking. The outcomes of the approach presented in [10] also showed that the proposed method was superior in terms of imperceptibility and robustness compared to other related works.

Kazemivash and Moghaddam [15] introduced a grayscale image watermarking approach that utilizes the Lifting Wavelet Transform (LWT) based on the FA to select appropriate watermark blocks for embedding in the host image. Additionally, Kazemivash and Moghaddam [16] presented another watermarking mechanism employing the FA method, which depends on the transformation of the lifting wavelet; here, the watermark in the host image is embedded using the expected regression tree value, with MSFs performed using FA. Although the method proposed in [16] achieved superior robustness, it did not adequately maintain the transparency of the host image.

2.2 Medical image watermarking based other meta-heuristic algorithms

Ali et al. [12] Introduced a watermarking mechanism based on the ABC algorithm and a fixed distribution using DWT–SVD. In this research, the ABC algorithm was used to optimize the values of MSFs. Furthermore, Lai [17] employed SVD based on a tiny genetic algorithm to determine the best MSF values, while Ishtiaq et al. [18] used particle swarm optimization (PSO) to find the optimal MSF values in the domain of DCT. The authors used the PSNR criterion to evaluate the strength, which was used as the objective function. Loukhaoukha et al. [13] utilized the Ant Colony Optimization algorithm with multiple objectives in the domain of LWT-SVD to determine the best MSF values.

Sankaran et al. [19] proposed a new approach to achieve distortion-free watermarking using a method subject to pixel weight. The main idea of this approach was to improve performance and security using a two-level DWT to identify the optimal embedding region with a dragonfly optimization algorithm. Verma and Sharma [20] proposed a method that generates better results for medical images using various invisible watermarking approaches, including transformation and frequency domains; the proposed approach is a hybrid method that combines two merging methods.

Anand and Singh [21] proposed an improved watermarking approach with the capacity to protect patient data using multiple watermarks embedded in the domain of medical images by DWT–SVD. The Hamming code was used as a text watermark before the embedding process to reduce distortion from channel noise for sensitive data. The image watermark was encrypted and compressed post-embedding. The Chaotic-LZW combination demonstrated the highest effectiveness among the various encryption methods, and three compression systems were evaluated.

Kahlessenane et al. [1] proposed a blind watermarking approach that allows a patient’s record to be combined into a computed tomography image scan. In this approach, DWT was applied to the medical images before the combination process, followed by the topological reorganization of the LL sub-band coefficients using zigzag scanning. The watermarked bits were then integrated when the combination process of coefficients was completed. This watermark combination process can be easily verified when a patient’s hash record is integrated into medical images.

Swaraja et al. [22] Proposed a method for the region of non-interest (RONI) using dual watermarks to conceal medical image blocks within the RONI, which is used to detect tampering through authenticity and recognition. These blocks were selected using DWT features aligned with the human visual system (HVS) and the particle swarm bacterial foraging optimization algorithm (PSBFO). The threshold value for achieving optimal outcomes was chosen using the PSBFO algorithm, which led to the best robustness and imperceptibility. Moreover, the Lempel–Ziv lossless compression method was used to compress the dual watermarks to enhance payload capacity.

Balasamy et al. [23] conducted several studies using an adaptive neuro-fuzzy model and an integrated watermark transformation mechanism based on the region of interest (ROI), which was employed to identify regions of medical imaging that reflect high-energy intensity levels. Furthermore, wavelet decomposition was used to extract the sub-bands for embedding [24, 25]

2.3 Discussions and main contributions of this work

Table 1 summarizes the advantages and disadvantages of each reviewed method, highlighting the main limitations of each approach. It is evident from Table 1 that many of the approaches presented are limited in terms of robustness and maintaining image transparency.

Table 1 Summary of image watermarking mechanisms based on meta-heuristic search optimization algorithms

In the proposed approach, the optimal values of MSFs are determined by the FPA to balance robustness and imperceptibility. The capability of the FPA is enhanced, which leads to an increase in the strength of robustness and imperceptibility. The proposed approach demonstrates good similarity between the host and watermarked images, strong robustness against various image-processing operations and attacks, and well-maintained image transparency.

3 Firefly algorithm

Yang [26] Proposed a meta-heuristic search algorithm called the FA, inspired by the behavior of fireflies and the flash signals they use to attract potential mates. The attractiveness of a firefly depends on the intensity of its flash; thus, a firefly is attracted to another firefly that exhibits higher brightness, moving towards it. The flash intensity, which directly influences the value of the objective function, is computed using Eq. 1:

$$ I(r) = I_{0} e^{{ - \gamma r^{2} }} $$
(1)

where the light source intensity is represented by I0, the flash absorption coefficient is γ, and the distance between the fireflies is r. The attractiveness of the firefly β can be computed using the equation as follows:

$$ \beta (r) = \beta_{0} e^{{ - \gamma r^{2} }} $$
(2)

The attractiveness is represented by β0 when the distance is 0. The distance r between fireflies I and j can be computed using the following equation:

$$ r_{ij} = \sqrt {\sum\limits_{k = 1}^{n} {\big(z_{ik} - z_{jk} \big)^{2} } } $$
(3)

The dimension of the problem is n. Each firefly moves toward another firefly using the following equation:

$$ z_{i} (t + 1) = z_{i} (t) + \beta_{0} e^{{ - \gamma \,r_{ij}^{2} }} (z_{j} (t) - z_{i} (t)) + \alpha \varepsilon_{i} $$
(4)

where ɛi is a random number between 0–1. Also, the movement of fireflies is affected by using the following three factors: the current firefly position, suitability to another firefly position, and random constraint values α and ɛi. The main steps of the FA can be summarized as follows (Fig. 1).

Fig. 1
figure 1

Firefly algorithm

4 Firefly Photinus algorithm

Alomoush et al. [27] proposed a new version of the FA, called the FPA, which introduces a mate list mechanism to address problems such as remembering history and being trapped in local optima. The FPA also proposes a new absorption coefficient (σ) that changes with time to solve the issue of static parameters. The main steps of the FPA are summarized in the pseudocode shown in Fig. 2.

Fig. 2
figure 2

Firefly Photinus algorithm

In addition, new modifications to the FPA were used to solve problems associated with the original FA, such as fixed FA parameters, the memory of any situation, and avoiding becoming stuck in local optima. These modifications are discussed below.

4.1 Update mate list

In each iteration of the FPA, the movement process generates a new position as a solution, which is then stored in a mate list M as shown in Eq. 5:

$$ \left\{ {M_{t + 1} } \right\} = \left\{ {M_{t} } \right\} - \left\{ {x_{i}^{t - 6} } \right\} + \left\{ {x_{i}^{t + 1} } \right\} $$
(5)

The new position for firefly i, is \(x_{i}^{t + 1}\) when forwarding to j, where t is the time iteration, and \(\left\{ {M_{t + 1} } \right\}\) is the new status of the mate list after the next movement to generate a new solution. It is important to note that when a new position is stored in the M list, firefly i is not allowed to move or revisit this position until it is removed from the mate list after a suitable number of movements, depending on the mate list size. See Fig. 3.

Fig. 3
figure 3

FPA mate list

4.2 New absorption coefficient (σ)

The absorption coefficient parameter gamma (γ) remains fixed in FA during the iteration time, whereas in FPA, the value of γ changes during the iteration time according to the new absorption coefficient sigma (σ). Equation 6 shows the relationship between γ and σ during the iteration.

$$ \gamma (t + 1) = \sigma .\gamma (t) $$
(6)

where 0 < σ ≤ 1 and it controls the dominance area of the firefly intensity through the iteration time, as shown in Eq. 7.

$$ when\,\,\,\,\,\,0 < \,\sigma \, \le \,1\,\,\,\,\,\,\,\, \Rightarrow \,\left\{ {\begin{array}{*{20}c} {\gamma (t + 1) \le \gamma (t)} \\ {\beta (t + 1) \ge \beta (t)}. \\ \end{array} } \right. $$
(7)

5 DWT–SVD-based watermarking algorithm

This paper investigates the effects of scaling factors (SFs) on the values of normalized cross-correlation (NC) for the original watermark (W) and the recovered watermarks (W′), and peak signal-to-noise ratio (PSNR). PSNR is used to determine the visual quality of the signed images, as shown in Eq. 8:

$$ PSNR = 10\log_{10} \left( {\frac{{I_{\max }^{2} }}{MSE}} \right) $$
(8)

where MSE represents the Mean Square Error, and Imax is the maximum possible pixel value for image I.

Initially, the watermark is extracted, and then NC(W, W′) is computed using Eq. 9:

$$ NC\left( {W,W{^{\prime}}} \right) = \frac{{\sum\limits_{i = 1}^{m} {\sum\limits_{j = 1}^{n} {\left[ {W(i,j).W{^{\prime}}(i,j)} \right]} } }}{{\sum\limits_{i = 1}^{m} {\left[ {W(i,J)} \right]^{2} } }} $$
(9)

5.1 Watermark embedding algorithm

The proposed watermarking scheme employs a watermark W of size m × m, and a host image I of size N × N, embedded as follows (Fig. 4).

Fig. 4
figure 4

The embedded watermark algorithm

5.2 Watermark extraction algorithm

Watermark extraction is performed by employing the signed image’s DWT–SVD mechanisms. Figure 5 illustrates the watermark extraction algorithm.

Fig. 5
figure 5

The watermark extraction algorithm

6 Proposed approach (DWT–SVD-FPA)

In this study, a new watermarking mechanism using the combination of DWT and SVD based on the FPA, termed DWT–SVD-FPA, is proposed. The FPA is implemented to optimize the values of MSF, δ. The best FPA outcomes are computed using the objective function shown in Eq. 17.

$$ f(x) = PSNR + \varphi^{*}\left[ {NC\left( {W,W{^{\prime}}} \right) + \sum\limits_{i = 1}^{T} {NC(W,W{^{\prime}}_{i} } } \right] $$
(17)

where NC(W, W′),and NC(W, Wi′) are the cross-correlation between the original and recovered watermarks from the signed image, and each attacked signed image, respectively. The values of NC include a weighting factor ϕ, and the DWT–SVD-FPA is represented as follows (Fig. 6).

Fig. 6
figure 6

The proposed approach algorithm (DWT–SVD-FPA)

The value of NC is much smaller than PSNR; therefore, a weighting factor ϕ is used in Eq. 17 to balance out the resulting effects.

7 Experimental results and discussion

This section evaluates and discusses the performance of the DWT–SVD-FPA. The experiments were conducted on medical image databases introduced in [28], which include tomography scanned images with dimensions of 512 × 512, as shown in Fig. 7. Setting proper algorithm parameters is considered critical; indeed, to achieve a fair comparison between the proposed approach and other related works, it is important to ensure an apples-to-apples comparison. In these experiments, the parameters of the proposed DWT–SVD-FPA watermarking algorithm were set based on other related works, such as DWT–SVD-FA [8], and FPA introduced in [27], which were set as follows: β0 = 1, α = 0.01, γ = 1.0, M = 7, σ = 0.95, n = 10, ϕ = 10, and number of the iterations ML = 10.

Fig. 7
figure 7

Medical images datasets [28]

Table 2 shows the proposed DWT–SVD-FPA algorithm values for NC and PSNR values of the proposed algorithm (DWT–SVD-FPA) compared to the watermarking schema-based original FA, named DWT–SVD-FA.

Table 2 The PSNR and NC (W, W′) Outcomes of (DWT–SVD-FPA) and (DWT–SVD-FA)

The outcomes of Table 2 show that the proposed algorithms, DWT–SVD-FPA and DWT–SVD-FA, have acceptable imperceptibility because their minimum values are 0.989 and 72.35 dB, respectively. Moreover, the average NC value of the DWT–SVD-FPA outperforms that of the DWT–SVD-FA and provides better robustness against attacks as a result of the capability to fine-tune multiple scaling values via the meta-heuristic algorithm of the FPA.

In addition, to evaluate the imperceptibility of the proposed DWT–SVD-FPA, the obtained PSNR values were compared with those reported in [1, 20, 21, 29]. Table 3 illustrates that the PSNR performance rates of the proposed DWT–SVD-FPA are satisfactory compared to state-of-the-art methods at an integration value of 100%.

Table 3 Comparison of the PSNR values of the proposed DWT–SVD-FPA algorithm and related work

Table 4 presents the NC outcomes for the CT-scanned images obtained by the proposed DWT–SVD-FPA algorithm, where eight different image-processing operation attacks were applied to assess robustness. These attacks include histogram equalization, Gaussian noise, sharpening, JPEG compression, average filtering, cropping, salt-and-pepper noise, and scaling.

Table 4 Comparison of NC outcomes of the proposed DWT–SVD-FPA algorithm and related work

As shown in Table 4, the proposed DWT–SVD-FPA algorithm outperforms other related works based on various attacks, such as histogram equalization, sharpening, JPEG compression, average filtering, and scaling. However, its performance is slightly lower for Gaussian noise, salt-and-pepper noise, and cropping. Table 4 also confirms that the robustness achieved by the proposed DWT–SVD-FPA is improved through the application of the FPA, which determines the optimal MSF value. The FPA implements a linear combination of the NC (W, W_0) objective function for the signed and attacked images. Furthermore, the PSNR of the signed image was calculated for these eight attacks. The obtained values of NC (W, W_0) ranged from 0 to 0.04, indicating high robustness.

Finally, Table 4 demonstrates that the proposed DWT–SVD-FPA algorithm retains good perceptible image quality for the signed and attacked images. Therefore, the conclusion is that the visual quality and robustness criteria are effectively met in the DWT–SVD-FPA approach, which is justified by the improvement in MSFs resulting from the embedding of the FPA.

8 Conclusion

This study proposes a medical image watermarking integration method that employs DWT and SVD. The optimal values of MSFs are determined by the FPA, which achieves a valuable balance between robustness and imperceptibility. The LL3 sub-band singular values of the host image are embedded using these MSFs, and a linear combination of PSNR and NC is used as the objective function in this research. The DWT–SVD-FPA was applied to CT images, and eight different image-processing operations were used to test the robustness of the proposed algorithm: histogram equalization, Gaussian noise, sharpening, average filtering, cropping, JPEG compression, salt-and-pepper noise, and scaling. The performance of the proposed algorithm indicates significant improvements in the embedding and extraction processes, as well as in the balance between robustness and imperceptibility compared to other related works. The limitations of this work include issues with the DWT, such as its phase sensitivity and lack of directionality, which can be potentially addressed by exploring alternative transforms, such as the Complex Wavelet Transform or Redundant DWT (RDWT). Future work will focus on enhancing robustness against these attacks and generalizing this approach to color images and videos.