A Reversible Data Hiding Based on Histogram Shifting of Prediction Errors for Two-Tier Medical Images

Clinics and hospitals have already adopted more technological resources to provide a faster and more precise diagnostic for patients, health care providers, and institutes of medicine. Security issues get more and more important in medical services via communication resources such as Wireless-Fidelity (Wi-Fi), third generation of mobile telecommunications technology (3G), and other mobile devices to connect medical systems from anywhere. Furthermore, cloud-based medical systems allow users to access archived medical images from anywhere. In order to protect medical images, lossless data hiding methods are efficient and easy techniques. In this paper, we present a data hiding of two-tier medical images based on histogram shifting of prediction errors. The median histogram shifting technique and prediction error schemes as the two-tier hiding have high capacity and PSNR in 16-bit medical images.


Introduction
Mobile and digital media are getting more and more popular on Internet and cloud services. In social networks, many multi-media such as images, videos, and audios are produced by different aspects of the human activities. Moreover, telemedicine applies telecommunication and information technology to offer clinical health care from a distance. In critical care and emergency situations, health informatics, medical, and imaging data are transmitted from doctors and healthcare professionals to discuss patient issues. Therefore, E-Healthcare data management plays a crucial role in modern hospitals. Over Internet and cloud services, digitized healthcare systems have provided easy access, viewing and sharing of digitized medical images to patients, doctors, medical professionals, health care providers, and institutes of medicine. Medical images may provide for teleconferences among clinicians, interdisciplinary exchanges between radiologists for consultative purposes, and distant learning of medical personnel. For illegal purposes used for insurance, for example, digital medical malignant nodule images may be modified on lung parenchyma in chest CT scan images. Therefore, data hiding schemes (Wang et al., 2017;Huang et al., 2017;Li et al., 2018;Wang et al., 2018) are much simpler and cheaper than an intrusion detection system  to protect security and privacy of images by image with an unique digital identity.
Reversible data hiding schemes Huang et al., 2013a;Chen and Guo, 2020;Kim et al., 2009) (RDH) are applied to embed secrets inside an image as a stegoimage with minimal distortion. After the secrets are retrieved from a stego-image at the extraction stage, the original images can be reconstructed exactly. The major applications of RDH are authentication, diagnostic image, military imagery, astronomical images, satellite, and artwork preservation. Shi et al. (2016) classified RDH techniques into six categories: histogram shifting, image compressing (e.g., JPEG), semi-fragile authentication, image contrast enhancement, encrypted images, and RDH based on audio and video. In general, there are two types of popular RDH techniques: histogram shifting (HS) (Thodi and Rodriguez, 2007;Hong et al., 2008) and difference expansion (DE). In 2006, Ni et al. (2006) proposed the first HS-based RDH by modifying the generated histogram. Some extensions of Ni et al.'s HS-based RDH methods proposed such as block-based HS (Fallahpour and Sedaaghi, 2007), difference-histogram (Lee et al., 2006), high-frequency IWT coefficients (Xuan et al., 2007;Huang et al., 2017). In 2002, Tian (2002 proposed a high capacity DE method. Furthermore, DE has been developed in three species: integer-tointeger transformation (Qiu et al., 2016), prediction-error expansion (PEE) (Dragoi and Coltuc, 2015), and adaptive embedding (Hong et al., 2015). There are three approaches in image compressing: RDH with quantized DCT coefficients modification (Huang et al., 2016), RDH with quantization table modification (Wang et al., 2013), RDH with Huffman table modification (Wu and Deng, 2011). In 2003, Vleeschouwer et al. (2003 presented the first robust RDH based on the correlations among the neighbouring pixels. In general, the approaches of contrast enhancement RDH applied some functionalities such as histogram bin expansion operations to improve the visual quality. There are four RDH approaches with contrast enhancement: method by histogram bin expansion (Wu et al., 2015a), method with contrast enhancement for medical images (Wu et al., 2015b), method with the controlled contrast enhancement (Gao and Shi, 2015), and automatic contrast enhancement method (Kim et al., 2015). Due to protection of the privacy of data and enabling the cloud server to easily manage the data, more and more researchers study reversible data hiding in encrypted images. The techniques of encrypted images are divided into three types: vacating room before encryption (Cao et al., 2016), vacating room after encryption (Zhang, 2011), and reversible image transformation .
Considering resource sharing data in Cloud computing environments, stego-images may be disturbed by various techniques such as a chaotic Hénon function to obtain en- crypted images (Huang et al., 2013b). Abbasy and Shanmugam (2011) presented biological aspects of the DNA to increase the level of data confidentiality among clients. Some other authors (Zhang, 2012;Surekha and Swamy, 2013) converted stego-images into encryption data transferred to public Cloud environments. Based on prediction error expansion, a predictive value is calculated by predictors. Then the secret bit-stream will be embedded into the cover image according to the expansion of the difference between a pixel and its predictive values.
Most of image data hiding techniques Wu et al., 2009;Zhang S. et al., 2016;Jana et al., 2016) are developed in 2D images. However, many medical images are produced and processed (Tseng and Huang, 2010) as stacks of slices such as CT, MRI, and PET. These slices can be used to generate 3D image volumetric information. Thus, it is important to apply data hiding in 3D images efficiently. Recently, for digital media it is getting more and more important to apply data hiding to the quality of compressed video. Shanableh (2012) applied data hiding schemes to embed secrets into a compressed video bit stream for copyright protection.
In this paper, two-tier structures, histogram-shifting of median and prediction error, are utilized to embed secret messages. The rest of this paper is presented as follows. The second section demonstrates our method. The fourth section shows the outcome of the experiments. Conclusions are presented in the last section.

Proposed Method
In this paper, we apply a block median preservation technique (Luo et al., 2011), a prediction-based reversible hiding method (Chang et al., 2012), and a histogram-based overflow/underflow process (Huang et al., 2013b) to embed n bits of secret messages for each block in gray level images. Adopting overlapping blocks partition and a histogrambased overflow/underflow process, the capacity can be improved. Two-tier data hiding will be adopted to embed messages. The detail of a two-tier data hiding scheme is described as follows.

Data Embedding
At first, we partition image I into a set of 2 × 2 sized overlapping blocks as embed blocks shown in Fig. 1 Then, each overlapping block embeds secret bits by two tier data hider repeatedly. The detail describes as follows Fig. 2.

Tier-1 Data Hiding
In the tier-1 data hiding, we adopt the histogram shifting method (Luo et al., 2011) by adjusting the peak point to zero points of the image histogram. The tier-1 data hiding con- sists of four steps: constructing difference, classifying block type, emptying peak points, and embedding data.
Step 1: Construct difference At this step, we find median values of each block. Let four pixel values v j , where 1 j 4, be retrieved from each difference block. Then these pixel values are sorted in an ascending order s 1 s 2 s 3 s 4 . The median of v m is defined as v m = s p×q 2 , where p = 2 and q = 2.
In order to construct a difference histogram in the block, we will compute the difference between v m and the other (p × q) − 1 pixels as follows: (1) Step 2: Classify block type In this step, all blocks will be classified into two types, Type I and Type II. Let n L , n 0 and n R be the numbers of pixel values, which are smaller, equal and larger than v m in a block, respectively. Therefore, we will obtain n L + n R + n 0 = p × q where p and q are equal to 2. So each block will be labelled with the type number for embedding at this stage. In other words, different kinds of block types will be processed by different embedding procedure.
Step 3: Empty peak points Embedding level (EL) is a parameter to adjusting capacity by histogram shifting. Let . For instance, i = 2 and bit-depth = 8 will empty the bins b ±3 , b ±4 , b ±5 by shifting the bins b −3 t −127 leftward and the bins b 3 t 128 rightward. These operations are described by the formula as follows: where 1 k p × q, k = m.
where 1 k p × q, k = m.
Step 4: Embed data In this step, we apply histogram shifting to differentiate types of blocks. The strategies of the secret embedding are demonstrated as follows: (1) Type I.
The definition of Type I is The secrets will be embedded as Eq. (4) repeatedly.
where 1 k p × q, k = m.
The definition of block Type II-1 is presented as follows: We will apply Eq. (6) to embed secrets w repeatedly.
where 1 k p × q, k = m. t is the number of n 0 and t 2. In other words, the first one will not be applied to the formula (6) to embed a bit.
In a Type II-2 block, the definition is demonstrated as where 1 k p × q, k = m. t is the number of n 0 .
In a Type II-3 block, the definition is demonstrated as where 1 k p × q, k = m. t is the number of n 0 .

Tier-2 Data Hiding
In order to adjust the quality of stego-image, we apply threshold in the embedding process. Let a set of 2 × 2 sized block have four elements (a, b, c, d) shown in Fig. 1. Assume the difference value (DV) is 3 t=1 |element i − element 4 |. When DV threshold, the Tier-2 data hiding will be performed. The details of Tier-2 data hiding are described as follows.
Step 1: Compute the prediction pixel valuê Step 2: Compute the prediction error e Let predict pixel p be an element a e = p −p.
Step 3: Data embedding where w is the secret bit.
Step 4: Overflow/Underflow process In order to restore the cover image correctly, we process the overflow/underflow by the shifting histogram from the embedding stage without a location map or compression (Kim et al., 2009). At first, we compute the utilization rate of the medical image which consists of intensity rate and underflow/overflow rate. In order to get the intensity rate, we divide the range of intensity by 2 to the power of bit depth. The range of intensity is the difference in the intensity of the cover image between max value and min value. Bit depth is the image quality expressing how many unique shades are available. Images with higher bit depths are able to encode more intensities because there are combinations of 0's and 1's available.

Intensity rate =
The range of intensity The utilization rate = |intensity rate| + |underflow/overflow rate|.
Further, we adjust image histograms to prevent overflow/underflow problems. On low underflow/overflow rates of high bit-depth medical images, unsinged bit images will produce underflow problems.
Because modern medical devices provide high quality images, medical images can range from 0 to 65535 for a 16-bit image. Therefore, the utilization rate of 16-bit depth is lower than 8-bit depth shown in equations (15), (16). In other words, we can utilize empty histogram bin to process overflow/underflow problem by shifting histogram of the whole image.
In respect of preserving boundary pixels, our method can restore the original-image from the stego-image successfully. Thus, the boundary pixels will be preserved. After the process of embedding, our method also can preserve the boundary pixels shown in Fig. 5. The 16-bit depth unsigned images are tested with threshold 21. In Fig. 5(b) and (c) the preserved boundary of the medical image when EL are changed from 5 to 20 is shown. In the same way, another test of the preserved boundary is shown in Fig. 5(e), (f).

Data Extraction
In order to extract data, we need the embedding level and overflow/underflow distance as parameters. The data extraction will extract secret messages correctly and restore the stego-image back to the original without any distortions, described in detail below as shown in Fig. 3 Similar to the data embedding process, we partition the stego-image into overlaying blocks with 2 × 2 block-size at the first step. The extraction process comes in the reverse direction of the embedding. Thus, the start block of the extraction comes from the right side of the bottom image. At the same time, the extrication direction follows the principle of right-to-left and bottom-to-top. After the block partition, each block will perform two tier data extraction to obtain secrets repeatedly. The detail is described as follows. Fig. 3. Diagram for the framework of two-tier medical image data extraction based on histogram shifting of prediction errors at receiver side.

Tier-2 Data Extraction
In tier-2 data extraction, we perform the extraction of prediction-based reversible data hiding method. There are four stages: inverting overflow/underflow process, predicting pixel value, predicting error e, and extracting secrets. At the first stage, we adopt histogram shifting with distance overflow/underflow to invert overflow/underflow process. At the predict pixel value stage, we construct a difference block like in the Tier-1 data hiding, step 2. Then we apply the formula (11) to obtain the predicted pixel valuep. And we get the extracted pixelp at the left-top element of a 2 × 2 block. Then the formula (12) is adopted to obtain predicted error e in predicted error e stage. The stage of extracting secrets applies e to compute the original pixel by p =p + e 2 . And the secret bit is extracted by w =p −p − (2 × (p −p)). After extracting secrets, we restore the intermediate image block d for tier-2 data extraction.

Tier-1 Data Extraction
There are three stages: extracting secrets, inversing histogram shifting, and inversing empty bin in tier-2 data extraction demonstrated as follows.

a. Extracting secrets
In order to extract secrets and restore the original image, we apply histogram shifting to the intermediate image block from tier-1 data extraction at this stage. Let the elements of the intermediate block be d k , where 1 k p × q, k = m. Set EL = 0 and scan all elements d k . If d k is equal to 1 or −1, a secret bit 1 will be extracted. If d k is equal to 0, a secret bit is 0.
Next step, repeat n times when EL is equal to n. In the case EL = 1, d k is ±3 and will extract secret bit "1". And d k is ±2 and will extract secret bit "0". In the case EL = 2, d k is ±5 and will extract secret bit "1". And d k is ±4 and will extract secret bit "0".

b. Inversing histogram shifting
According to Embedding level (EL), there are different strategies to inverse histogram described as follows.
If EL = 0, If EL > 0, c. Inversing empty bin If EL is greater than 0, we perform the inversion of empty bin according to the following formula: After inversing empty bin, we add a median value of a block to elements of the block. Finally, we construct each block as the original image.

Experimental Results
In this paper, we demonstrate two-tier medical images data hiding based on histogram shifting of prediction errors to experiment on medical images with DICOM. The peak signal-to-noise ratio (PSNR) is applied to measure the quality.
where W and H are the width and the height of the test image. I (i, j) and I (i, j ) are two pixel values of the cover image and stego-image at the location (i, j ). We test on 16-bit depth CT medical image shown in Fig. 4. In Table 1, we set the embedding level to 1. Different kinds of threshold result in capacity and PSNR. Obviously, the more threshold T, the more capacity. The more threshold, the smaller PSNR. On the contrary, we set  the threshold to 21 and various embedding levels in Table 2. The greater the embedding level E, the more capacity, and the smaller PSNR. In Table 3, we set an embedding level and threshold to 21. The largest of bpp is 2.641178445 and the PSNR is 63.24405029. In this paper, we also used Lena and airplane with 8-bit depth 512×512 image shown in Fig. 6. Let the threshold be 1 and the embedding level be 1-4. When bpp is 1.299938202 in the Lena image, the PSNR will be 26.39720695. Because of overflow/underflow processing, the stego-image of Lena will be shifted and the pixels will have poor PSNR. Owing to histogram shifting of the whole image, the most of the image shape will be preserved as shown in Fig. 5 and Table 4. In Fig. 7, we compare a 16-bit grayscale medical image and 8 bit images. We compare the method of median and prediction shown in Table 5. Our method has more capacity at the same PSNR.

Security Aspects
The embedding algorithm is used to embed the secret data into the cover image as a stegoimage. Stego-images are transmitted over the Internet. If stego-images are altered or de-stroyed due to certain attacks, our method has the basic characteristics of data hiding to protect secret data. Because the secret data is hidden in the cover image, it is difficult for the human visual system to detect any unperceivable secret data. In our method, there are two layers of block median retention technology and a predictive reversible hiding method to hide secret data. Therefore, our method is a technique that resists the attack of this technique without parameters such as threshold, EL and overflow/underflow methods. We also applied 2 × 2 overlapping blocks to partition the image. If a hacker changes the secure covert image over the network, the secure covert image cannot be extracted correctly.

Conclusion
We have proposed the data hiding of two-tier medical images based on histogram shifting of prediction error. The median histogram shifting technique and prediction error schemes as the two-tier hiding have high capacity and PSNR in 16-bit medical images. The overlapping block partitions have also been adopted in this scheme, and it has performed well. At the Tier-1 data hider, the median histogram shifting technique is based on a multi-level histogram shifting mechanism. Due to adopting two types of embedding strategies, the block medians are able to be preserved. Therefore, the stego-image utilizes these block medians to convert the stego image to the original image successfully. At the Tier-2 data hider, the prediction error scheme applies a pre-determined threshold and the absolute difference of the neighbouring pixels to decide whether the current pixel is embeddable.
L.-C. Huang received the BS degree in computer science from Providence University, Taiwan, in 1993 and MS degree in information management from Chaoyang University of Technology (CYUT), Taichung, Taiwan, in 2001, and the PhD degree in computer and information science from National Chung Hsing University (NCHU), Taiwan, in 2001. Her current research interests include information security, cryptography, medical image, data hiding, network, security, big data, and mobile communications.
S.-F. Chiou received a BBA degree in information management from National Taichung Institute of Technology, Taichung, Taiwan, ROC, in 2004. She studied MS degree in computer science and engineering from National Chung Hsing University for one year, and she started to pursue the PhD degree. She received a PhD in computer science and engineering from National Chung Hsing University, in 2012. She is currently an assistant professor of Department of Information Management, National Taichung University of Science and Technology. Her current research interests include information security, network security, data hiding, text mining and big data analysis.  1997, 1998, 1999, 2000, and 2001 Excellent Research Award of National Science Council (Taiwan). Dr. Hwang was a dean of college of Computer Science, Asia University (AU), Taichung, Taiwan. He is currently a chair professor with Department of Computer Science and Information Engineering, AU. His current research interests include information security, electronic commerce, database and data security, cryptography, image compression, and mobile computing. Dr. Hwang has published over 300+ articles on the above research fields in international journals.