1 Introduction

In most medical imaging domains traditional diagnosis has mostly migrated to e-diagnosis workflows. Hospital Information Systems (HIS) and medical imaging platforms generate and manage digital images across many modalities including X-ray, Ultrasound, Magnetic Resonance (MR), Computerized Tomography (CT), etc. Images taken in a hospital are saved in the Picture Archiving and Communication Systems (PACS), and are typically managed within a digital workflow based on the Digital Imaging and Communications in Medicine (DICOM) standard [26].

The transmission of these medical images through, and across, hospitals, locations and administrative organizations, has become a common practice for many purposes within the digital medical workflow. These include diagnosis, treatment, training, distance learning and medical consultation between clinicians and radiologists [32]. In most cases, this is within the defined workflows of the PACS systems, but there are also many cases, both valid and occasionally nefarious, in which images and data are withdrawn from one system to be transferred to other institutions or people. During the process of production and exchange, medical images can be intentionally, or unintentionally, tampered with. This potentially has serious implications on the diagnosis of patients with possible life affecting impact outcomes, mortality, etc. Therefore, the ability to maintain the integrity and authenticity of these images has become significant, both within the internal systems and during their transfer to other systems [38].

Two methods are generally applied to ensure the integrity and authenticity of the image data: metadata and digital watermarking. In medical imaging, metadata includes the patient information connecting the image to the patient and medical report [24]. The most common metadata structure fulfills part 15 of the DICOM standard, where the data is saved in the image header [37]. This data includes information to describe the patient, image, and acquisition properties (part of the image file). Existing metadata techniques do not provide a secure relationship between the metadata and medical image. It is, therefore, easy to destroy, modify, or otherwise disconnect the metadata rendering the image unreliable. Digital watermarking is recognized as a robust approach to tackle these failings. However, current approaches have little consideration on specific aspects of medical imagery against the defined need for imperceptibility, reversibility, integrity control, and authentication [32, 38].

Digital watermarking is the hiding of data within the digital object. This data can later be detected/extracted to confirm the validity of the object [5]. In medical domains, if an image is modified during the workflow process a collapse in trust regarding the validity of the images is formed. Potentially, any small change to the image could lead to misdiagnosis or uncertainty, with possible life-threatening consequences or legal implications. Consequently, retrieval of the original data from the modified image is essential. Reversible or lossless watermarking approaches fulfill this requirement in that they guarantee the extraction of the watermark and full retrieval of the unmodified original image [27]. Medical image watermarking approaches can be classified into three schools: conventional methods, Region of Interest (ROI), Region of Non Interest (RONI), and reversible approaches [38]. In this research, we adopted a reversible watermarking technique which can completely retrieve the original unmodified image.

In conventional watermarking methods, the watermark is encoded in the entire cover image by replacing some of its details, typically Least Significant Bits (LSBs), or degrading some detail when using lossy compression methods [29]. Irreversible approaches are not suitable as they are not accepted by radiologists with unmodified images being favored for medical investigations [44]. Medical images have two parts; ROI and RONI. ROI region comprises the informative part of the image which is utilized for diagnosis and must be conserved without any degradation. However, RONI includes the non-critical part of the image (e.g. background). Occasionally this region may contain grey level parts of slight interest [35]. Using the ROI part for hiding the watermark may deform the pixel intensities in this section which may lead to misinterpretations and consequently misdiagnosis. RONI watermarking techniques embed data in regions that are considered unimportant in medical examination. However, this can only be performed if RONI exists. The amount of data, that can be embedded, highly depends on the RONI size and ROI may not be preserved against malignant operations [38].

In medical applications, there are typically strict restrictions on data reliability that preclude any modifications, such as watermarking, that have a perceptible visual impact. Modifying a patients’ medical image could affect their life by causing errors in reading and interpretations, which may lead to incorrect diagnosis and treatment. Therefore, fully reversible watermarking techniques, which can completely recover both the original unmodified image and the embedded watermark, are developed. Reversible watermarking approaches can be categorized into four groups: compression based [7, 10], histogram modification based [16, 21, 33], quantization based [22, 23] and Difference Expansion (DE) based [20, 28]. Reversible watermarking based on the DE technique are recommended by many recent studies, and typically exceed alternate reversible methods in terms of higher payload capacity and lower complexity [20, 28, 41].

Difference Expansion presented a new approach for reversible watermarking [45]. It encodes 1-bit into the LSB of the difference value of 2-pixels. Selected pixel pairs can either be any two adjacent pixels (horizontal or vertical) or any pairs of pixels selected in a pre-defined form. To raise the embedding capacity, Alattar [2] developed previous DE techniques by encoding 2-bits into the difference values of a 3-pixels. This extended technique utilizes spatial and spectral triplets of pixels to hide a pair of bits. Spatial triplets denote any 3-pixels selected from the identical spectral or color part of the image. Spectral triplets can also be any 3-pixels chosen from different spectral components. Further enhancement of hiding capacity is achieved by encoding 3-bits in the difference values of 4-pixels [3]. The easiest way of determining the pixel quad is by selecting consecutive 2 × 2 pixel, and this approach can be further generalized [4]. This generalized method encodes several bits in the difference values vectors of connected pixels instead of pairs, triplets and quads. The weakness of the DE watermarking technique is the reduction of the hiding capacity due to the need for a location map denoting the pixels where data is embedded. The need for this map makes it difficult to control and predict the hiding capacity and distortion level because of the size of the location map [38].

We developed a novel reversible watermarking, based on the DE technique, for confirming authenticity and integrity of medical images which can be used to detect both intentional and unintentional manipulations. The proposed technique automatically segments the image into two parts: ROI and RONI, with the watermark encoded into smooth blocks (3 × 3 pixels) inside ROI. The main contributions of this research are:

  • Hiding of the watermark in smooth regions inside the ROI part of the image. Smooth regions are defined as blocks that have least differences between their pixels values. This makes the deformation less visually perceptible.

  • Evaluation of image distortion through clinical trials, based on relative Visual Grading Analysis (VGA). This enable identification of the level of modification that can be applied to medical images before modification is visually perceptible.

  • Retrieval without location mapping. This significantly enhances hiding capacity whilst also reducing potential image degradation.

2 Related work

A range of methods can be used to verify the authenticity of digital medical images: [38].

  • Hiding the Electronic Patient Record (EPR) to confirm that the information belongs to the correct patient.

  • Hiding the metadata which is located in the header of DICOM images. However, because some metadata may be modified each time the image is distributed; only information related to the patient and image should be employed.

  • Combining the header with the raw image data by concealing the Digital Signature (DS) of the header. Although this method decreases the message length, the header data is inextricably connected to the image during transmission.

Image integrity verification can typically be achieved by:

  • Hiding the Digital Signature (DS) of the image.

  • Hiding the Message Authentication Code (MAC) of the image.

At extraction, the integrity of the image can be validated by matching the recalculated DS/MAC and the previously hidden DS/MAC and identifying differences, if any, to determine applied modifications. In digital watermarking, there is an inverse relationship between the capacity, robustness, and imperceptibility. Therefore, an evaluated trade-off of properties may be applied depending on the desired application. The priority order of authentication and integrity applications is imperceptibility, robustness, and capacity [38].

In healthcare applications, a reversible, fragile and blind watermarking method is required for validating authenticity and integrity of medical images. Al-Qershi and Khoo [6] present two reversible watermarking approaches based on DE. The first approach combines a technique, which embeds 2 bits of the payload in each pair of pixels [45], with a scheme, which encodes 12 bits of the watermark into each smooth blocks of 4 × 4 pixels [11]. The second method combines ab technique, which embeds 3 bits of the watermark in each quad of pixels [3], with the same scheme in the first approach [11]. One of the special features of medical images, in comparison to nonmedical images, is the large ‘smooth’ areas (blocks with equal pixel values). These proposed approaches segment the image into smooth and non-smooth regions instead of ROI and RONI. High hiding capacity techniques are utilized in the smooth regions. However, DE is applied to the non-smooth regions. Although the scheme achieves high capacity, the major drawback is the lack of capacity control due to the need for embedding the compressed location map which is required for extraction.

Das and Kundu [14] developed a blind, fragile and ROI reversible watermarking scheme. This system joins lossless compression and encryption to hide DICOM metadata, image hash and tamper localization information into digital medical image. Secure Hash Algorithm (SHA-256) is adopted to calculate the ROI hash. Medical image integrity is confirmed by comparing the embedded and recalculated hash data. Eswaraiah and Reddy [15] presented a fragile watermarking method for validating the integrity of ROI, identifying the manipulated blocks inside ROI and recovering the original ROI region. In this technique, the medical image is divided into three parts; ROI, RONI and border region. The hash code of the ROI is computed using SHA-256 and hidden in the border region. Authentication and ROI recovery information are encoded into the RONI. Several limitations can be observed in these schemes [14, 15]; the ROI part needs to be defined manually, the ROI can only be retrieved after extracting the concealed data, and a substantive location map is required for extraction.

A newer approach combines the features of reversible, zero and RONI watermarking methods [41]. This technique merges the zero-watermarking principle in the ROI using Dual Tree Complex Wavelet Transform (DT-CWT), with high capacity of reversible watermarking in the RONI. This scheme needs a location map to retrieve the embedded data and original unmodified image. Selvam, et al. [42] present a blind hybrid reversible watermarking approach, operating in transform domain, for increasing hiding capacity and protecting the medical image. Integer Wavelet Transform (IWT) and Discrete Gould transform (DGT) are used to encode the watermark within the medical image. In the extraction, the concealed watermark is retrieved, and the original unmodified image is restored without any auxiliary data. However, this approach exhibits high distortion with a low payload capacity.

Parah, et al. [36] propose a high capacity reversible watermarking system for content authentication of medical images. A Pixel to Block (PTB) conversion method was applied, to the cover image, to achieve high embedding capacity and confirm reversibility. The watermark, which consists of EPR, block checksum and logo bits, was encoded into the Intermediate Significant Bit (ISB) of the whole image to avoid LSB removal attacks. Although this scheme achieves high embedding capacity, the distortion of watermarked images is high. Gao, et al. [16] present a reversible watermarking approach to achieve contrast enhancement of ROI and tamper detection against attacks on the ROI. This scheme segments background and ROI of medical image using Otsu’s thresholding method. The watermark is embedded along with distortion-less contrast enhancement of the ROI by expanding of the peak-pairs of the ROI histogram. The feature-bit matrix created from the ROI is encoded into the LSBs of the background pixels to ensure the reversibility of the ROI. The major limitations of this approach are the need for embedding the feature-bit matrix and only the ROI part of the image can be retrieved at extraction. A novel medical image authentication approach was proposed by Balasamy and Ramakrishnan [9] using Discrete Wavelet Transform (DWT) and Particle Swarm Optimization (PSO). This approach finds optimal wavelet coefficients for concealing the watermark data using PSO to produce a watermarked image with low distortion. The extraction process does not require auxiliary information, but this approach has high image deformation in comparison to the low hiding capacity of the technique.

Yang, et al. [46] propose a reversible and high capacity data hiding scheme for secure archiving of medical images. This scheme automatically segments the image into two parts; ROI and RONI. The contrast of the ROI part is enhanced by extending the grayscale values and encoding the data into peak bins of the extended histogram without stretching the histogram bins. The remaining large data is embedded into the RONI part without considering visual image quality. Evaluation of the scheme shows low invisibility between the original image and watermarked versions in terms of Peak Signal to Noise Ratio (PSNR) and Structural Similarity Index (SSIM) due to applying contrast enhancement to the watermarked images. Pan, et al. [34] present a fragile reversible watermarking approach for digital radiographic images. This technique differentiates the background from anatomical details within the image. Histogram Shifting (HS) modulation is used to encode the watermark into the background section while HS is applied to wavelet detail coefficients of the anatomical object, encoding watermark data with the image quantum noise. This scheme delivers a reasonable visual image quality, but hiding capacity is very low. Atta-ur-Rahman, et al. [8] propose a blind reversible watermarking to realize high level of secrecy and integrity for medical images. This scheme utilizes a chaotic key to choose some pixels from the cover image to hide a chaotically created watermark. The remainder of the pixels are transformed into residues by employing Residue Number System (RNS). A primitive polynomial, of degree four, is applied to divide the selected pixels and obtain the remainder which is appended to the watermark message. The validity of the watermark is ensured, at extraction, based on the calculated remainder. This approach exhibits high levels of imperceptibility, however, the embedding capacity of the scheme has not been measured. Moreover, the scheme does not rely on a region based watermarking strategy which makes the technique incapable of selecting the hiding regions.

Our research proposes a blind, fragile and reversible watermarking technique for encoding the DICOM metadata and DS of the whole image into the cover image to confirm authenticity and integrity of both image pixel data and image header. The scheme embeds the data into smooth blocks inside the ROI to achieve a watermarked image with low distortion. At extraction, the whole original image is fully recovered without the need for location map. The proposed method has been evaluated based on defined medical image watermarking requirements and compared to recent reversible watermarking approaches to verify its efficiency.

3 Proposed scheme

Conventional watermarking approaches based on DE embed one bit of watermark data into the difference value of two pixels. Locations of the pixels, used to encode the watermark, are required to detect/extract the watermark and reconstruct the reference image. The amount of additional information locating the relevant pixels reduces hiding capacity and increases potential for image distortion. Our watermarking approach encodes the watermark into smooth regions inside the ROI without needing a location map. This achieves high capacity watermarking with low distortion. The proposed method comprises three main steps; watermark creation, embedding, and extraction/verification. The parameters used in the embedding and extraction processes are listed in Table 1.

Table 1 The parameters used in the embedding and extraction processes

3.1 Watermark creation

Several approaches can be used to generate watermark data for confirming the authenticity and integrity of medical images [13]. Some of authentication data is modified when the image is exchanged. In these cases, the embedded and recalculated authentication data are different, rendering authenticity confirmation impossible. This makes a careful selection of the authentication watermark is a necessity.

3.1.1 Authentication watermark

In addition to the image raw data, DICOM defines a structure for describing the image. This structure is located in the image’s header and called metadata. DICOM metadata comprises tables of attributes which record key information including time of image acquisition, device parameters, imaging conditions, diagnosis result, and essential patient details such as the name, ID number, age, gender, weight, and height [26]. Some metadata fields are changed each time the image is distributed whilst others remain constant. Therefore, only information related to the patient and image (i.e. the constant data) must be used to ensure the authenticity. In our research, only essential metadata fields, which contain the patient information and data describing the image that do not change during distribution, were employed in the authentication watermark (AW) (Table 2). There is no necessity to utilize all columns, and only the value field is needed to create the watermark for ensuring the authentication.

Table 2 A section of metadata selected from a DICOM data dictionary [37] (These data do not relate to a real patient)

3.1.2 Integrity watermark

The Digital Signature (DS) of the original medical image is calculated utilizing the Message Digest (MD5) algorithm. The MD5 is a cryptographic hash function that generates a 128-bit Message Authentication Code (MAC). Any change to the image, either intentional or accidental, leads to change in the hash code. Comparing the base and retrieved codes enables identification of image manipulation [1]. In our research, the DS of the entire image is computed and encoded into the medical image to offer strict integrity watermark (IW).

3.1.3 Watermark compression

The two constructed watermarks (AW and IW) are concatenated and converted to binary form. To enhance the embedding capacity and reduce the distortion level, the watermark is compressed using Run Length Encoding (RLE). RLE is easy and quick to implement, making it a good alternative to other complex compression algorithms [30].

3.2 Embedding process

The embedding process initially segments the cover image into ROI and RONI (Fig. 1). In this research, we considered the entire brain region as the ROI due to its importance in diagnosis. The smooth blocks inside ROI section are determined and the generated watermark is encoded into these blocks using a reversible watermarking method based on DE.

Fig. 1
figure 1

Process diagram for the embedding process. Starts by segmenting the cover image into ROI and RONI. Smooth blocks inside ROI are then identified. Watermark is encoded into the smooth blocks inside the ROI

3.2.1 Image segmentation

Prior knowledge indicates that background intensity values of the brain MR slices are usually small compared to the intensity values in the foreground [18]. In our research, histogram thresholding was adopted as a segmentation technique to isolate background and identify the image ROI. This method is based on the thresholding values (T). If the intensity value of a pixel is greater than T then the pixel is considered as a brain region (ROI), otherwise, it is assumed to be part of the background. The T value can be identified either manually or automatically by applying established approaches [19]. The T value was chosen experimentally (75) after applying a range of threshold values on many various images and visually evaluating these. A set of morphological operators, erosion, dilation and holes filling, are utilized to eliminate holes occurring in the segmented region (Fig. 2). Erosion is an operation used to decrease the size of the foreground objects and increase the size of the background. Dilation is an operation employed to increase the size of the foreground objects in binary images. A hole filling operator was applied to automatically fill the holes that were considered as background region in the binary image and surrounded by linked borders of foreground regions [43].

Fig. 2
figure 2

An example of MR slice segmentation, a Original, b Segmented, c Eroded, d Dilated, and e Filled holes. A binary matrix of one and zero values represents the foreground (ROI) and the background (RONI) respectively

3.2.2 Smooth regions identification

Most medical images have a large smooth area, which is defined the regions that have little significant difference between the adjacent pixels intensity values, compared to the other images. Embedding the watermark into these regions is less noticeable to the human eye [6]. Consequently, the watermark was encoded in smooth areas inside ROI to decrease the degradation of the watermarked image. If adopting one of the existing techniques to determine the smooth regions, then when trying to identify the smooth regions to extract the encoded data, some of the identified smooth blocks will not precisely match the original blocks. Consequently, there is no guarantee that all pixels employed to discover the watermark will be similar to those utilized in the hiding process. This leads to the inability of the algorithm to extract the encoded data and recover the original image precisely.

We propose a simple new algorithm (Algorithm1) to determine the smooth regions inside the ROI of the medical image, such that when applying this algorithm to the watermarked image, it generates the same smooth blocks used at both embedding and extraction. This enables a precise extraction of the embedded data in the watermarked image without the need for any additional information (e.g. location map).

The algorithm segments the ROI into non-overlapping blocks of 3 × 3 pixels which are separately evaluated and classified as either smooth or non-smooth blocks (Fig. 3). The absolute difference values between the corner pixels (P1,P3,P7,P9) are calculated, and the average of these differences is computed and compared to the threshold value. The threshold value is increased based on the length of the watermark, created previously, to identify smooth blocks inside the ROI.

Fig. 3
figure 3

An example of a 3 × 3 block of pixels inside ROI which is individually treated and categorized as either smooth or non-smooth block

In Algorithm1, ROI denotes the ROI part of the image, len indicates the length of the watermark, and fin_th represents the final threshold used to identify the smooth blocks (Table 1).

3.2.3 Watermark data encoding

After the image has been segmented to ROI and RONI and the smooth blocks inside ROI have been identified, the generated watermark data can be encoded. We extend Alattar [3] scheme using DE of five pixels, instead of quad pixels, to hide four bits of the watermark data in each of the five pixels (P2,P4,P5,P6,P8) of the identified smooth blocks. This keeps the corner pixels unchanged, which is required to extract the embedded data and recover the reference unmodified image without the need for any auxiliary information in the form of location map. The final threshold value and the length of the watermark are embedded into the RONI section using 1-bit per 2-pixels reversible watermarking algorithm [31].

For each identified smooth block, the embedding algorithm deducts the value of the center pixel (P5) from pixels (P2,P4,P6,P8). Four new values are generated by encoding 4-bits of the watermark data into the differences values which previously calculated using the LSB technique. Finally, the inverse DE transform is applied to the generated new values, which carries the watermark bits, to produce the watermarked pixels.

In the embedding algorithm (Algorithm2), OM indicates the original image, ROI is the ROI part of the original image, smb denotes the smooth blocks inside the ROI, we is a binary array includes the watermark data, len indicates the length of the watermark (we), and WM represents the watermarked image (Table 1).

figure e
figure f

3.3 Extraction and verification process

Extraction and verification segments the watermarked image into ROI and RONI (Fig. 4). The final threshold and length of the embedded watermark are extracted from the RONI to identify smooth blocks inside the ROI. Concealed data is extracted from the pixels that have been employed in the embedding process, and the original pixels values are reconstructed.

Fig. 4
figure 4

Process diagram for the extraction and verification process. Starts by segmenting the watermarked image into ROI and RON. Smooth blocks inside ROI are then identified. Watermark is extracted from the identified smooth blocks. The watermark is compared to the recalculated watermark of the extracted image to verify the authenticity and integrity of the image

Matching to the encoding process, the extraction algorithm deducts the value of the center pixel (P5) from pixels (P2,P4,P6,P8) for each smooth block. 4-bits of the watermark data are retrieved and four new values generated by extracting the LSB from the differences values. Finally, the inverse DE transform is applied to the generated new values to reproduce the original unmodified watermarked pixels.

In the extraction algorithm (Algorithm3), WM denotes the watermarked image, ROI indicates the ROI part of the watermarked image, smb identifies the smooth blocks inside the ROI, fin_th is the final threshold, len indicates the length of the embedded watermark (we), XM represents the extracted image, and wx is a binary array includes the extracted watermark (Table 1).

The extracted watermark is decompressed using the same RLE decompression algorithm as for compression. It is divided into two watermarks; the authentication watermark (AW), and the integrity watermark (IW). These watermarks are compared to the recalculated metadata and DS of the extracted DICOM image to confirm authenticity and integrity of the image. This can be achieved by calculating the number of error and correct bits between the extracted and recalculated watermarks.

4 Experimental results and discussion

To assess the performance of the proposed scheme, twenty-five brain MR scans in DICOM format (16bpp, 512 × 512 pixels) were used. Sixteen images are provided by the MRI unit of Al Kadhimiya Teaching Hospital (Iraq), from patients’ records for use in this research conducted at the University of Salford, UK (Fig. 5) [17]. Nine images are selected from a publically available and standardized medical images dataset downloaded from The Cancer Imaging Archive (TCIA) (Fig. 6) [12]. Several parameters have been used to conduct the experiment and evaluate the system performance (Table 3). The Experimentation has been carried out using MATLAB R2016a working on MS Window 7 platform on a PC with Core i7–4790 Intel CPU and 16 GB RAM.

Fig. 5
figure 5

The sixteen brain MR scans in DICOM format (16bpp, 512 × 512 pixels) provided by the MRI unit of Al Kadhimiya Teaching Hospital (Iraq) [17] and used to assess the performance of the proposed method

Fig. 6
figure 6

The nine brain MR scans in DICOM format (16bpp, 512 × 512 pixels) selected from a publically available and standardized medical images dataset downloaded from TCIA website [12] and used to assess the performance of the proposed method

Table 3 The parameters used to conduct the experiment and evaluate the proposed system performance

4.1 Proposed system performance measurement

The proposed technique is assessed based on four principal requirements of image watermarking approaches: imperceptibility, reversibility, capacity, and robustness [32, 38]. Imperceptibility represents the highest requirement of watermarking systems. A digital watermark is called imperceptible if the original and watermarked images are perceptually indistinguishable. Imperceptibility is a factor of human cognition that needs to be appraised within the human context. We have conducted a visual assessment trial for 117 MR images in DICOM format [40]. These medical images have been modified by hiding a different amount of data to generate a range of images with various distortion levels. Five qualified radiographers evaluated the images through a relative Visual Grading Analysis (VGA) trial to determine the perceptual boundary, below which change is noticeable. This defines the level of modification that can be applied without perceptual distortion. The outcomes related to objective measures, includes PSNR for image fidelity. The results demonstrated that the modification of the images to a level of PSNR = 82 dB or better is unnoticeable to all observers, and modification level to a PSNR = 80 dB should not be noticeable in the vast majority of cases. Reversibility ensures the extraction of the watermark by precisely recovering the unmodified original image. The capacity refers to the number of watermark bits that can be concealed into the cover image. Robustness states the ability of resistance against different image processing operations such as rotating, resizing, adding noise, etc. Not all applications require robust watermark, in some applications, it is necessary to be fragile to detect alteration that can be applied to the images [38].

4.1.1 Imperceptibility

Imperceptibility between the original, watermarked and extracted images has been measured utilizing the following commonly used metrics where MN is the images dimension, and Io and Iw denote the original and watermarked images respectively.

Peak Signal to Noise Ratio (PSNR)

It is a basic measure used to estimate the distortion amount between the original and watermarked images (Eq. 1). A higher PSNR value indicates lower distortion [38].

$$ PSNR\left({I}_o,{I}_w\right)=10\times {\mathit{\log}}_{10}\frac{{\mathit{\operatorname{MAX}}}_I^2}{MSE} $$
(1)

Where MAXI represents the highest possible pixel value of the input images and MSE is the Mean Squared Error between the original and watermarked images (Eq. 2).

$$ MSE=\frac{1}{MN}{\sum}_{i=0}^{N-1}{\sum}_{j=0}^{M-1}{\left({I}_o\left(i,j\right)-{I}_w\left(i,j\right)\right)}^2 $$
(2)
figure g

Structural Similarity Index (SSIM)

It is a Human Visual System (HVS) based measures to quantify the degradation in the structural information between two images. The SSIM approach compares the similarity of three factors: luminance, contrast, and structure (Eq. 3). It takes a value between −1 and 1 where the value of 1 refers that the tested images are equal [32].

$$ {\displaystyle \begin{array}{l} SSIM\left({I}_o,{I}_w\right)=\frac{\left(2{\mu}_{I_o}{\mu}_{I_w}+c1\right)\left(2\mathit{\operatorname{cov}}+c2\right)}{\left({\mu}_{I_o}^2+{\mu}_{I_w}^2+c1\right)\left({\sigma}_{I_o}^2+{\sigma}_{I_w}^2+c2\right)}\\ {}\left\{\begin{array}{c}c1={\left({k}_1L\right)}^2\kern1.75em {k}_1=0.01\\ {}c2={\left({k}_2L\right)}^2\kern1.75em {k}_2=0.03\end{array}\right\}\end{array}} $$
(3)

Where \( {\mu}_{I_o} \) and \( {\mu}_{I_w} \) are the average of Io and Iw, respectively, \( {\sigma}_{I_o}^2 \)and \( {\sigma}_{I_w}^2 \) are the variances of Io and Iw, respectively. Cov is the covariance of Iw, c1 and c2 are variables to stabilize the division with weak denominator, and L is the dynamic range of pixel values (L = 2^(number of bits per pixels)-1).

Root Mean Squared Error (RMSE)

RMSE is the rooted value of the Mean Squared Error (MSE) and is mainly utilized to measure the reversibility of the watermarking technique (Eq. 4). RMSE value close to zero indicates low image distortion [39].

$$ RMSE=\sqrt[2]{MSE} $$
(4)

Image Fidelity (IF)

This metric measures the similarity between the original and watermarked images (Eq. 5). The value of IF equal to 1 indicates that the two images are identical [42].

$$ IF=1-\kern0.75em \frac{\sum_{i=0}^{N-1}{\sum}_{j=0}^{M-1}{\left({I}_o\left(i,j\right)-{I}_w\left(i,j\right)\right)}^2\ }{\sum_{i=0}^{N-1}{\sum}_{j=0}^{M-1}{\left({I}_o\left(i,j\right)\right)}^2\ } $$
(5)

Examples of original DICOM images and their corresponding watermarked, extracted and the difference between the original and extracted images (Fig. 7) indicate that there is no opportunity to perceive any differences between the original and watermarked images. In addition, the results of imperceptibility between the various original, watermarked and extracted images, using PSNR, SSIM, RMSE and IF (Table 4) show that the PSNR values between the original and watermarked images are high, SSIM values are equal to one, RMSE values close to zero, and IF values are either one or very close to one. This indicates that the distortion of the watermarked image is very low and the watermark was encoded invisibly within the images. Therefore, the proposed method achieved the highest requirement of the digital watermarking schemes which is the imperceptibility.

Fig. 7
figure 7

Examples of the original DICOM images and their corresponding watermarked, extracted and the difference between the original and extracted images. There is no visible difference between the original and watermarked images and no numerical difference between the original and extracted images

Table 4 Imperceptibility between the original, watermarked, and extracted images using PSNR, SSIM, RMSE and IF metrics. These results indicate that the distortion of the watermarked image is very low and the watermark was encoded invisibly within the images

4.1.2 Reversibility

Reversibility of the proposed system has been assessed, in the extraction, for both the retrieved image and the extracted watermark.

Image reversibility

The proposed technique need not require any additional information to detect/extract the encoded watermark and reconstruct the reference image. This is due to the ability of exactly identifying the same smooth blocks inside ROI in both the embedding and extraction process. The result demonstrates that there is no numerical difference between the original and extracted images (Fig. 7). PSNR values between the reference and extracted images are equal to infinity, SSIM and IF values are equal to one, and RMSE values are equal to zero (Table 4). Consequently, after extracting the watermark, the extracted image is precisely identical to the reference image.

Watermark reversibility

The similarity between the embedded and extracted watermarks has been measured utilizing two commonly used metrics; Bit Error Rate (BER) (Eq. 6) and Accuracy Ratio (AR) (Eq. 7). These metrics calculate the number of error bits and the number of correct bits between the original and extracted watermark [42].

$$ BER=\frac{EB}{TB} $$
(6)
$$ AR=\frac{RB}{TB} $$
(7)

Where EB is the number of error bits, RB is the number of right bits and TB is the total number of watermark bits.

The results demonstrate that the BER values are equal to zero, and the AR values are equal to one. This indicates that the embedded watermark can be recovered at the extraction without any loss.

4.1.3 Capacity

Capacity of the watermarking system is determined by calculating the number of image pixels required for embedding the data (Eq. 8) [42].

$$ Capacity=\frac{NP}{TP} $$
(8)

Where NP is the number of pixels required for embedding the watermark and TP is the total number of pixels.

Our proposed scheme encodes the watermark into the ROI part of the medical image. Therefore, the hiding capacity depends on the ROI size. The size of the watermark, used in this research for ensuring authenticity and integrity of the medical images, is approximately 1 KB. This indicates that the proposed scheme can encode the watermark even the size of ROI is 8% of the image size. The capacity of the proposed system is estimated by calculating the number of pixels required for embedding different magnitudes of data. Distortion level of embedding various payload into the sixteen DICOM images is measured using PSNR (Table 5). It is clear that the hiding capacity rises with increasing ROI size.

Table 5 PSNR values of hiding various payload (n/a refers to no space is available). It is clear that the hiding capacity and distortion level rise with increasing ROI size

4.1.4 Robustness

This research ensures the authenticity and integrity of DICOM images. Authenticity and integrity of the pixel data and header information of the watermarked image are confirmed, if and only if, the embedded watermark and original image can be retrieved correctly and exactly matched. Manipulations of the image data also corrupts the embedded watermark resulting in a mismatch between original and retrieved watermarks. PSNR and BER are used to assess reversibility and ability to recover the embedded watermark after applying image processing operations simulating both intentional and unintentional modifications. Malicious manipulations have also been applied including adding a new part to the image and removing an existing part from the image (e.g. lesion). The resultant PSNR values between the original and the extracted images are not equal to infinity, and BER values between the embedded and extracted watermarks are not equal to zero (Table 6). This demonstrates that the proposed system is fragile against various manipulations.

Table 6 Reversibility evaluation of both original image and embedded watermark after applying various accidental and malicious manipulations. These results demonstrates that the proposed scheme is fragile against various manipulations.

4.2 Comparison with existing approaches

Performance of our proposed technique is compared with the existing reversible watermarking approaches. In general, reversible watermarking methods are implemented either in spatial or transform domains. Original pixel values of the whole image are utilized in the spatial domain. Therefore, hiding capacity is high, but robustness is low. In the transform domain, original pixels are changed and the whole image is not employed for encoding the data. Therefore, hiding capacity is lower but more robust.

Many reversible watermarking approaches have been presented in literature to serve different applications. The performance of the proposed scheme is compared with reversible approaches applied to medical images to confirm authenticity and integrity (Table 7). In [14, 15], reversible watermarking methods are proposed in spatial domain. Embedding capacity is high, but several flaws can be observed; the ROI part of the image requires manual identification by a physician/clinician, and the ROI can only be recovered after removing the hidden data. Additional data is required for the extraction process. Transform based watermarking methods are proposed [9, 41, 42], and can recover the complete original image after extracting the watermark. However, image distortion is high in comparison to low embedding capacity. Moreover, approach [41] requires a location map for lossless recovery of the original image. In [16, 36], spatial domain based watermarking methods are presented. Watermark data is encoded into the ISB [36] and LSB [16] to ensure authenticity and integrity of the image. Although these schemes achieve high capacity, the distortion of watermarked images are high. Moreover, approach [16] needs additional information for extraction and the ROI can only be retrieved after extracting the watermark. Schemes [34, 46] utilize Histogram Shifting (HS) to hide the data. The cover image is automatically segmented into ROI and RONI and the original image is retrieved without any lose. However, the distortion of watermarked image is high in comparison to the amount of concealed data. Additionally, the location of pixels used to encode the data is required at the extraction. In [8] approach, the original unmodified image is recovered without the need for any additional information. A watermarked image with high visual quality is achieved, however, the scheme lacks evaluation of the embedding capacity. Moreover, a small number of images are used to assess the performance of the proposed watermarking technique.

Table 7 Performance comparison of the proposed scheme against approaches identified in literature. The results demonstrate that the proposed scheme surpassed the other techniques in terms of the visual image quality

Our proposed method is based on DE watermarking to ensure authenticity and integrity of both image pixel data and image header. The original medical image is segmented automatically into ROI and RONI. DICOM metadata and DS for the whole image is encoded into smooth region inside the ROI to protect the informative region of the image and make the distortion less visually perceptible. We evaluate image distortion through a clinical trial based on relative VGA to identify the perceptual distortion boundary. The obtained results demonstrate that the proposed scheme surpassed the other techniques in terms of visual image quality (Table 4). The complete original image is recovered at the extraction without the need for any auxiliary information. This contributed to controlling the capacity of the scheme and minimizing the distortion.

Furthermore, a DICOM15 image, which achieved highest embedding capacity, is used to compare the performance of our approach with other DE-based reversible watermarking schemes. These schemes comprise Tian [45], Alattar [3], Chiang, et al. [11], Al-Qershi and Khoo [6] (Scheme 1) and Al-Qershi and Khoo [6] (Scheme 2). DE-based watermarking approaches, found in literature, can perform equally but most of them lack our simplicity [20, 25, 28]. Visual image quality is tested after hiding various payload magnitudes (0.05bpp, 0.1bpp, 0.15bpp, 0.2bpp, 0.25bpp). The results clearly signify that our proposed algorithm achieves a watermarked image with lower distortion in terms of PSNR (Fig. 8) and IF (Fig. 9) in comparison to other approaches.

Fig. 8
figure 8

PSNR versus payload capacity for the proposed scheme, Tian [45], Alattar [3], Chiang, et al. [11], Al-Qershi and Khoo [6] (Scheme 1) and Al-Qershi and Khoo [6] (Scheme 2). The distortion is evaluated after hiding various payload magnitudes. The results indicate that the proposed algorithm achieves a watermarked image with a lower distortion

Fig. 9
figure 9

IF versus payload capacity for the proposed scheme, Tian [45], Alattar [3], Chiang, et al. [11], Al-Qershi and Khoo [6] (Scheme 1) and Al-Qershi and Khoo [6] (Scheme 2). The distortion is evaluated after hiding various payload magnitudes. The results indicate that the proposed algorithm achieves a watermarked image with a lower distortion

5 Conclusion

In this paper, a novel blind reversible watermarking method is proposed for ensuring integrity and authenticity of brain MR images and detecting both accidental and malicious manipulations. The proposed scheme automatically segments the image into two sections; ROI and RONI. An extended reversible watermarking method based on DE technique is utilized to encode 4-bits of the watermark data in each smooth block of 3 × 3 pixels selected from the ROI. The exact original images are retrieved after extracting the embedded watermark successfully. The need for a location map of the employed pixels is eliminated in the embedding and extraction processes. This enables, controls and facilitates maximizing hiding capacity whilst reducing image distortion. Based on the methodology of the DE technique, which hides the data in the difference values of pixels pairs, the proposed scheme encodes the watermark into the smooth blocks inside ROI. This makes the distortion less noticeable to the human visual perception and has been evaluated through visual trial based on the clinically recognized relative VGA technique to define a perceptual boundary, below which change is noticeable. This defines a clear metric to determine the level of modification that can be applied for encoding a known magnitude of payload data in an imperceptible manner.

Experimental results indicate that our proposed method yields superior performance to the other state-of-art schemes in terms of distortion level. It achieves excellent visual image quality regarding PSNR, SSIM, RMSE, and IF, and the proposed watermarking scheme is ideal for images with small ROI.

For future work, we recommend extending the proposed method to recover the manipulated regions, whilst operational trials are required before testing the watermark scheme in a fully operational PACS where the medical images are archived and retrieved.