# Secure NIfTI Image Authentication Scheme for Modern Healthcare System
## 4 Proposed Watermarking Method
### Watermark Extraction Process  
The extraction of watermarks is a fundamental process in every watermarking system. Initially, the patient's metadata are segregated from the image, and then the watermarked slice is selected from the watermarked NIFTI image. The LWT is then applied to the selected slices, resulting in the slices being divided into various frequency sub-bands. The SLT is then applied to the LL band, and the BSVD immediately follows it. In the last step, the ACM algorithm is applied to the bits recovered from the singular matrix to create the watermark. The proposed watermark extraction approach is described in Figure 3 and the Algorithm 2 is as follows  
``` Input: Watermarked NIFTI image \(\mathcal{M}^{\prime}\) Output: Extracted watermark Step 1. Select the watermarked slice \(\mathcal{M}^{\prime}\). Step 2. Perform one-level LWT on the watermarked slice \(\mathcal{M}^{\prime}\) \[\mathrm{LWT}(\mathcal{M}^{\prime})=\left[\mathrm{LH}^{\prime},\mathrm{HL}^{ \prime},\mathrm{LL}^{\prime},\mathrm{HH}^{\prime}\right]\] (23) Step 3. Apply SLT on the LL band using Equation (1). \[\mathrm{SLT}\left[\mathrm{LL}^{\prime}\right]=\left[\mathrm{LH}^{\prime}, \mathrm{HL}^{\prime},\mathrm{LL}^{\prime},\mathrm{HH}^{\ast}\right]\] (24) Step 4. Apply the BSVD on the LL band using Equation (13) and obtain \[\mathrm{U}^{\prime}_{\mathrm{X}}\,,\mathrm{U}^{\prime}_{\mathrm{W}}\,,\mathrm{S }^{\prime}\,,\mathrm{V}^{\prime\mathrm{T}}_{\mathrm{W}},\mathrm{ and}\ \mathrm{V}^{\prime\mathrm{T}}_{\mathrm{X}},\ \mathrm{ and}\ \mathrm{V}^{\prime\mathrm{T}}_{\mathrm{X}},\ \mathrm{ where}\ \mathrm{S}\) matrix is the bidiagonal singular matrix of the slice. \[\mathrm{BSVD}\ (\ \mathrm{LL}^{\ast})=\mathrm{U}^{\prime}_{\mathrm{X}}\times \ \mathrm{U}^{\prime\prime}_{\mathrm{W}}\times\mathrm{S}^{\prime}\times\ \mathrm{V}^{\prime\mathrm{T}}_{\mathrm{W}}\times\ \mathrm{V}^{\prime\mathrm{T}}_{\mathrm{X}}\] (25) Step 5. Calculate the \(\mathrm{D}^{\prime}\) using the following equation \[\mathrm{D}^{\prime}=\mathrm{U}^{\prime}_{\mathrm{X}}\times\mathrm{S}^{\prime} _{\mathrm{C}}\times\ \mathrm{V}^{\prime\mathrm{T}}_{\mathrm{X}}\] (26) Step 6. Extraction of watermark's bits is computed as the reversing formula of embedding, as given in the following equation \[\mathrm{B}=\left(\mathrm{D}^{\prime}-\mathrm{S}^{\prime}\right)/\rho\] (27) Step 7. Finally, decrypt the watermarking using the inverse ACM on the extracted bits using the key to generate the watermark. \[\mathrm{I}^{\prime}=\mathrm{IACM}(\mathrm{B})\] (28)

Figure 2: Complete procedure of watermark embedding. ## 5 Experimental Results and Discussion

The proposed watermarking approach is evaluated using the NIFTI slice generated from a CT scan of a COVID-19 patient [37]. We are following the ethical standards of medical practice by not disclosing the patient's identity. The simulation was run on a MATLAB 2022a platform, and the machine used to run it had an Intel i7-10750 CPU running at 2.6 GHz with six cores, a Windows 10 operating system, and 8 gigabytes of RAM. The experiment employed ten NIFTI images with a slice size of 630 \(\times\) 630 pixels and a.bmp grayscale watermark of 128 \(\times\) 128. The number of slices in each NIFTI image is depicted in Figure 4. Each NIFTI image may have a varied number of slices. Figure 5 depicts all of the NIFTI_3 image slices. Figure 5 clearly indicates that, as previously discussed, some starting and ending slices provide less medical information; we use the less-informative slice for watermark insertion. Figure 4: Number of Slices in NIFTI images used for the proposed scheme. Figure 3: Watermark extraction process. ### Performance Evaluation Metrics

The suggested watermarking method is assessed by using the Peak Signal to Noise Ratio (PSNR), Image Quality Index Q, Structural Similarity Index Measure (SSIM), and Normalized Correlation (NC) [38]. PSNR, Q, and SSIM are the metrics applied to evaluate the influence that various parameters of the proposed method have on the imperceptibility of the watermarked slice.