1. Introduction
Hiding information that does not want to be discovered or tampered with in digital image carriers is a hot issue in the research area of information security. According to the application purpose, it can be divided into steganography and watermarking. Typically, people use watermarking techniques for copyright protection and steganography for covert communication. Data hiding methods can also be divided into two kinds: reversible and irreversible, depending on the receiver’s ability to recover the cover digital image. Reversible data hiding (RDH) [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13] can recover the primary digital image after reading the embedded secret messages. While irreversible data hiding (IRDH) [
14,
15] cannot recover the primary digital image from the message-embedded confidential image completely without loss. Nevertheless, the IRDH method is usually able to embed more messages than the RDH method.
Recently, many RDH schemes based on the interpolated cover image were proposed [
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30], which can embed more secret data than traditional RDH methods while preserving a good visual quality of confidential images. The interpolation-based RDH scheme is especially useful for the application of medical image management. Since the visual quality of clinical images is directly related to the diagnosis, perceptible distortion is unacceptable. Therefore, it is more desirable to keep the original pixel value unchanged. The cover image is usually generated by upsampling with interpolation technology in the interpolation-based RDH method. Then, the confidential message is hidden into the interpolated pixels only. In this way, after extracting the confidential data, we only need to delete the interpolated pixels from the confidential image, and we can recover the primary image perfectly.
In e-healthcare information management, if we can store and transmit the biometric information of a patient together with its corresponding medical image, an authentication procedure can be executed to ensure correct usage of the medical image. Moreover, we need to hide the information in its corresponding medical image with the least distortion to prevent misdiagnosis. The interpolation-based RDH method provides a good solution for this demand.
The key techniques for interpolation-based RDH are the interpolation method and the data embedding method. Previous work in interpolation technology includes the neighbor mean interpolation (NMI) [
16,
17,
18], the interpolation by neighboring pixel (INP) [
19], and the pixel repetition technology, etc. In 2021, Mandal et al. [
20] published an improved interpolation technology, which gives an interpolated pixel value toward the minimum value of the block. Then, the difference between the interpolated value and the maximum value (DIM) of the block is applied to embed secret data. Since the gap is enlarged, its embedding capacity also increases. Moreover, the difference expansion (DE) [
4,
5] is applied to embed a second layer of confidential messages, which further increases the embedding capacity. In 2020, Geetha et al. [
21] published a method that uses the last significant bit (LSB) substitution after re-interpolation, resulting in a good visual quality of the confidential images at low payloads. Many other existing RDH methods are also applicable to the interpolation-based RDH scheme.
The scheme published by Mandal et al. [
20], in 2021, provides a good embedding capacity compared to other existing schemes. However, when the dynamic extent of pixel values in a block is large, the DE embedding in the second layer leads to severe distortion of the pixel value. We propose an adaptive strategy that first classifies pixel blocks into two types: smooth pixel blocks and complex pixel blocks. Then, different pixel value interpolation and data embedding strategies are designed to fit the feature of the given block. The analysis of the experimental results shows that our proposed strategy is effective both on general images and medical images.
The proposed scheme is elaborated in this paper through the following sections. Some of the related work is briefly described in
Section 2.
Section 3 presents the proposed adaptive RDH scheme.
Section 4 not only provides its own experimental data and compares it with related works but also analyzes the experimental results. Finally, we summarize the proposed scheme in
Section 5.
2. Related Works
In this section, we introduce two fundamental tools for data hiding, including difference expansion (DE) and the prediction error histogram (PEH), which are used in the related and the proposed RDH schemes. Then, an interpolation-based RDH scheme proposed by Mandal et al. is discussed, which is the main reference of our RDH scheme.
2.1. Difference Expansion (DE)
In the differential expansion (DE) [
4,
5] method, we process the primary image with pixel pairs as the unit of operation. For each pixel pair, the mean value and difference value are calculated first. Centered at the mean value, the difference value is evenly double-expanded outward. We can hide a bit of the confidential message in a pixel pair by switching the difference value between an adjacent pair of even and odd difference values. The formulas for DE are given by:
The variables
denote the cover pixel pair,
is the average value,
is the difference,
is a binary secret bit,
is the modified difference, and
is the marked pixel pair. When we want to extract the information, the secret bit can be read from the new pixel pair by:
2.2. Prediction Error Histogram (PEH)
There are many PEH-based RDH techniques [
8,
9,
10] and the differences between these algorithms mainly focus on two aspects, which are PEH generation and the PEH modification. For PEH generation, researchers have published various prediction schemes to improve the prediction accuracy and thus generate a more concentrated histogram; for PEH modification, researchers have also proposed many PEH shifting methods to enhance the data embedding rate of confidential images and reduce the expansion distortion. In this paper, we use a commonly applied histogram shifting method to modify PEH. After obtaining the predicted pixel value
, we use Equation (5) to calculate the prediction error
and embed the confidential message into the predicted values using the rules given in Equation (6). The corresponding process is illustrated in
Figure 1a, where bins 0 and −1 are merged back to bin 0; bins 1 and 2 are merged back to 1; and secret bits are extracted during the process:
When we need to extract data, we first obtain the gap
between the marked pixel-value
and the predicted pixel-value
by Equation (7). Then, we can read the confidential message by the rule of Equation (8) while recovering the original gap. The corresponding process is illustrated in
Figure 1b, where bins 0 and 1 are selected as the target of embedding; the outside bins are shifted outward to vacate the required embedding space:
2.3. Mandal et al.’s Method [20]
In the method published by Mandal et al. [
20], a processing unit of the primary image is a pixel block of size
. Each unit is upsampled into a block of the size
. The inserted pixel values are interpolated using the minimum pixel value and its neighboring pixel values (MN). The data embedding includes two phases. In the first phase, the difference gap between the interpolated pixel value and the maximum pixel value (DIM) is exploited to embed confidential messages with an adjustable length. In the second phase, the interpolated pixels are grouped into two pairs and embedded confidential messages using DE.
An example of Mandal et al.’s RDH processing is given in
Figure 2. As shown in
Figure 2, the MN interpolation technique is first applied to calculate the three interpolated pixel values:
,
, and
. In the first embedding phase, DIM is used to estimate the payload of each interpolated pixel. According to the estimated payloads, secret data
, , and
are embedded to obtain
,
, and
. In the second phase, we first use
and
as a pair for DE embedding. The secret data
is embedded to obtain
and
. Then, we use
and
as a pair for DE embedding. The secret data
is embedded to obtain
and
.
In the first phase, DIM in the processing block is exploited to embed data. The larger the difference, the larger the value available for modification, which means that more secret bits can be embedded in the gap. However, the payload would be very small when the neighboring pixel values of a cover image change smoothly. Moreover, DE embedding is applied in the second phase to further improve the ability of the program to embed information. However, the visual quality of the confidential image is greatly degraded when the pixel value difference is large.
In most medical images, the background of the image usually contains a large smooth area, which is not suitable for the application of this RDH method. Moreover, the visual quality of a medical image is a very crucial concern. Therefore, severe degradation after data embedding is not allowed.
3. Proposed Scheme
A typical medical image usually contains both a large area of complex textures and a smooth background. For the image blocks with complex textures, we can take advantage of their complexity to embed multiple secret bits as in the DIM method of [
20]. However, the additional DE embedding in the second phase results in a large displacement of pixel values, which results in significant visual distortion, so our scheme does not apply an additional DE embedding for such blocks. For the blocks with smooth textures, the payloads of the pixels for the DIM method are usually zero since the pixel values are very close. So, the proposed scheme adopts an alternative interpolation and embedding method to effectively embed secret bits while preserving low distortion.
As illustrated in
Figure 3, we follow the interpolation-based framework proposed by Mandal et al. [
20] except that the processing order of image blocks is slightly modified. The original medical image is divided into
-sized blocks in an overlapped manner both row-wise and column-wise and the blocks are processed in the raster scanning order.
The dynamic range of pixel values for an image block is defined as the gray level range between the minimum and the maximum pixel values. In order to ensure that the medical images with hidden data have a good visual quality that will not lead to a misdiagnosis, the dynamic range of the pixel values within the processing block is utilized to hide the biometric information. Specifically, the interpolated pixel values modified by the data embedding should not exceed the dynamic range of the original pixel values regardless of whether they are above or below. Otherwise, false noises or contours may occur, and this may lead to misdiagnosis by the physician. However, the dynamic range of the image blocks is not the same. The blocks with a large dynamic range can be used to embed many data bits while the others are not suitable for this treatment. Therefore, we classify the pixel blocks into complex blocks and smooth blocks and process them using different methods.
The dynamic range of the pixel values in each block is calculated as shown in
Figure 4. When the dynamic range of a block is larger than the given threshold, we consider the block to be a complex block; conversely, it is considered to be a smooth block. Meanwhile, the original image is upsampled to obtain a cover image with spaces to be inserted for later use. The detailed processing for image upsampling and block classification is given in Algorithm 1. According to the type of the processing block, a specified interpolation method and embedding method are applied to hide the patient’s biometric information acquired by the biosensors. When a confidential image is received, the receiver first discriminates the block type and extracts the biometric data accordingly. After confirming the patient’s biometric information, the confidential image is downsampled to generate the original image. The overall flowcharts of the embedding and the extraction stages are given in
Figure 5.
Algorithm 1 Image Upsampling and Block Classification |
Input: | Original cover image -. |
Output: | Vacated cover image . |
Step 1: | Upsample the -sized image by zero-interlacing to obtain a )-sized image , whose values are given by (9) |
Step 2: | Image is divided into overlapped 2 × 2 pixel blocks given by (10) |
Step 3: | The dynamic range of each block is calculated by (11) is a complex block; else, it is a smooth block. |
3.1. Data Embedding Stage
After determining the type of all blocks, all the blocks are processed in the raster scan order. When the block is to be processed, its corresponding upsampled vacated block serves as the current processing unit. Depending on the block type of , two different data embedding processes for complex blocks and smooth blocks are presented as follows.
3.1.1. Data Embedding for Complex Blocks
For complex pixel blocks, the dynamic range of pixel values within the block is relatively large. The data hiding strategy is to embed EPR by filling DIM. To maximize the payload, an interpolated pixel value that is closer to the minimum pixel value of its neighbors is helpful. The MN interpolation method and DIM embedding method proposed by Mandal et al. [
20] in 2020 is a successful one. We adopt MN interpolation and DIM embedding, in their first embedding phase, as the embedding method for the complex blocks in our scheme. For the convenience of interpretation, we change the dummy variables in the vacated pixel block
into
. The data embedding process for complex blocks is given in Algorithm 2.
Algorithm 2 Data Embedding for Complex Blocks |
Input: | Cover block , secret data , maximum payload . |
Output: | Marked block . |
Step 1: | Calculate the interpolated pixel values by (12) . |
Step 2: | Calculate the difference values by (13) |
Step 3: | Calculate the payload for each interpolated pixel by (14) |
Step 4: | Retrieve , and secret bits from and convert to decimal values , and . Then, add to the interpolated pixel values as (15) . |
As shown in
Figure 6, we give an example to illustrate the interpolation and the DIM data hiding strategy of our scheme for a complex block. Three interpolated pixel values
,
, and
are calculated using MN interpolation. Then, the payloads for each interpolated pixel are calculated. According to the payloads, the data
, , and
are retrieved from the binary secret stream. Finally, the marked pixel values
, and
can be calculated.
3.1.2. Data Embedding for Smooth Blocks
For smooth pixel blocks, the dynamic range of pixel values in the block is relatively small. This characteristic provides a very good basis for PEH and DE embedding. Therefore, we design a completely different strategy for pixel value interpolation and data embedding of smooth blocks.
The proposed scheme uses the block mean (BM) as the interpolated pixel values for smooth blocks. Then, the data embedding procedure includes two layers, an ordered PEH (O-PEH) embedding and a DE embedding. For the O-PEH embedding, three interpolated pixels are embedded with secret data in a predefined order. The resulting pixel values are further grouped into two pairs and embedded with secret data using DE.
Since the interpolated pixel values are mutually equal, they are always embeddable, using O-PEH, in the first embedding layer. The resulting pixel values deviate by no more than 2; therefore, the expansion range of DE embedding is also very small. The overall embedding strategy can ensure a good payload and small distortion of the pixel values. The data embedding procedure for smooth blocks is summarized in Algorithm 3.
Algorithm 3 Data Embedding for Smooth Blocks |
Input: | Cover block , secret data . |
Output: | Stego block . |
Step 1: | Execute the BM interpolation by |
| (16) |
. |
Step 2: | Embed layer 1: |
Embed layer 1: Calculate PEs of the interpolated pixels in the order given by |
| |
(17) |
|
Embed 1-bit of secret data from to the leading pixel in (16) by |
| (18) |
Step 3: | Embed layer 2: |
Apply DE to embed 1-bit of secret data from according to the following processes |
| (19) |
Step 4: | Record and as and , respectively. |
As shown in
Figure 7, we give an example to illustrate the BM interpolation and two-layer embedding strategy for smooth pixel blocks. The seed pixels are 73, 68, 75, and 78; and the secret data stream is assumed to be ‘10,110′. We first use the block mean as the interpolated pixel values
. Then, the proposed O-PEH is applied first. The secret data
is embedded to
and it results in
. The next two secret bits
and
are then embedded to and
, and the resulting pixel values are
and
. In the second embedding layer, we first use
and
as a group for DE embedding and embed secret data
, and
and
are obtained. Finally,
and
are used as a group for DE embedding and to embed secret data
, and
and
are obtained.
3.2. Data Extraction Stage
After people receive a stego medical image, the stego medical image is first divided into pixel blocks sized that overlap between rows and columns with a stride of 2 to ensure that the processing units are exactly the same as the embedding. Then, the dynamic range of pixel values for each block is calculated to classify the blocks into complex and smooth types. The data extraction algorithms for complex and smooth blocks are described in the following subsections. After extracting the secret data, the confidential image is downsampled to obtain the original medical image.
3.2.1. Data Extraction for Complex Pixel Blocks
For a complex pixel block, we first calculate the interpolated pixel values using the seed pixel values so that we can obtain the gap between each original interpolated pixel value and the maximum value. The payload for each interpolated pixel is therefore obtained. Then, we obtain our secret data by converting the difference between the confidential pixel value and the maximum value back to the binary secret bits with the length determined by its payload. The extraction procedure of complex blocks is summarized in Algorithm 4.
An example of data extraction for complex blocks is shown in
Figure 8. The original interpolated pixel values
,
, and
are calculated first. Then, the difference values with respect to
are calculated to determine the payloads. Finally, the difference between each stego pixel value and original interpolated value is calculated and converted to binary bits according to its payload as shown in the figure.
Algorithm 4 Data Extraction for Complex Blocks |
Input: | Stego block , maximum payload . |
Output: | Secret data . |
Step 1: | Calculate the original interpolated pixel values by (20) . |
Step 2: | Calculate the difference values by |
Step 3: | (21) Calculate the payload of each interpolated pixel by (22) |
Step 4: | Calculate the difference values and restore secret bits according to .
(23) |
3.2.2. Data Extraction for Smooth Pixel Blocks
For a smooth pixel block, the data extraction operation is executed according to the reverse embedding order of the pixel block. We first restore the secret bits hidden in the second layer. In this layer, the second pair of pixels is processed and then the first pair. Finally, the secret bits hidden in the first layer are also extracted in the reverse order of PEH (RO-PEH). Algorithm 5 summarizes the data extraction process of the smooth block.
Algorithm 5 Data Extraction for Smooth Blocks |
Input: | Stego block . |
Output: | Secret data . |
| Extract layer 2: |
Step 1: | Apply RDE, (4), to extract secret data according to the following steps |
| (24) |
| Extract layer 1: |
Step 2: | Apply RPEH, Equations (7) and (8), to extract secret data according to the following steps |
| (25) |
An example of data extraction for smooth blocks is shown in
Figure 9. In the extraction of the second layer, the stego pixel pair
is applied to extract
and recover to
. Then, the pixel pair
is applied to extract
and recover to
. The extraction of the first layer is processed as follows. The prediction errors of pixel
and
with respect to
are calculated to extract
and recover to
. Finally, the prediction error of pixel
with respect to
is calculated to extract
and recover to
.
3.3. Overflow and Underflow
In the process of embedding secret information, extreme pixel values may cause overflow or underflow problems. In the embedding process of a complex block, pixel values are always modified within the dynamic range of the seed pixel values. Therefore, there is no overflow/underflow problem.
The smooth pixel blocks of the block mean valued 0 and 255 are left unembedded to prevent overflow/underflow of the first-layer embedding while the smooth pixel blocks of the block mean valued within the ranges 1 to 3 and 253 to 254 are only processed with the first-layer embedding to prevent the overflow/underflow of the second-layer embedding.
4. Experimental Results and Discussion
Our proposed adaptive RDH scheme was implemented on the Windows PC operating system using MATLAB version R2017a. We first verified the feasibility of our proposed adaptive RDH scheme with nine standard grayscale test images sized
, and then tested it on the six medical images shown in
Figure 10. We regarded the binary secret data
produced by a random number generator as the EPR to be embedded in the image. The threshold for block type classification was set to 5. The performance of the adaptive RDH scheme was evaluated with the peak signal to noise ratio (PSNR), the structural similarity (SSIM), and the embedding capability (EC). PSNR is a metric used to measure the visual quality of confidential images. Here, we adopted the PSNR definition in [
2] as follows:
where
is the size of the cover image, and
and
denote the pixel values of the cover image and the stego-image, respectively. To know whether the confidential image is close to a natural image or not, we first downsample a test image to obtain the small image. Then, it is processed by the proposed scheme to obtain a confidential image. Finally, the PSNR value of the confidential image is measured according to the given test image. Through the experiments, if the PSNR value is larger than 30 dB, it means that the distortion caused by information embedding is not detectable by the human eye. Of course, the higher the PSNR value, the less distortion due to hidden data. By minimizing the alteration of the pixel values, confidential images with a high PSNR value can be obtained.
SSIM is also a metric used to evaluate the similarity between the original image and the stego-image, as shown in Equation (27):
where
and
denote the mean of images
and
, respectively;
,
,
denote the standard deviation and covariance of images
and
, respectively; and
and
are two constants to avoid division by zero. The SSIM metric takes into account both image luminance, contrast, and structure information, which is closer to the benchmark of the human visual system; the higher the SSIM value, the more similar the original image and the stego image are.
EC, measured in bits per pixel, is defined as the total amount of payload in bits divided by the total amount of pixels in the interpolated cover image.
4.1. Experimental Results for Standard Grayscale Images
Our proposed adaptive RDH scheme was compared with the interpolation-based RDH schemes, proposed by Mandal et al. [
20] and Geetha et al. [
21], using the standard grayscale images. The values of EC, PSNR, and SSIM for the compared schemes are listed in
Table 1. Since the scheme proposed by Geetha et al. [
21] uses LSB substitution, its embedding capability is a fixed value and the features of the pixel blocks are not taken into consideration. In comparison with [
21], our scheme provides a better EC with a comparable SSIM. Although the PSNR value of our scheme is lower than that of [
21], the distortion is imperceptible when its value is higher than 30 dB. Mandal et al.’s scheme [
20] provides the highest EC among the three schemes; however, its PSNR and SSIM are the worst. Our proposed adaptive RDH scheme has a good balance between PSNR and EC by taking the block feature into consideration. Numerically, the PSNR values obtained by our proposed adaptive RDH scheme are all greater than 30 dB, which means that the difference between the confidential image obtained by the proposed scheme and the original test image is relatively small, and the confidential image looks like a natural one.
4.2. Experimental Results for Medical Images
Since the interpolation-based RDH schemes are designed for the special purpose of embedding patient information into medical images, the performance of our proposed adaptive RDH scheme on medical images is the main concern.
Figure 11 shows the original image and its corresponding confidential image with 2 bpp secret data embedded, and images showing the difference between the original medical images and their confidential images. The difference images (aiii–fiii) in
Figure 11 show almost nothing, which indicates that the proposed scheme does not look much different from the original image after hiding and will not draw the eavesdropper’s attention.
Table 2 shows the PSNR values of our proposed adaptive RDH scheme for the medical images in
Figure 10, where the embedding rate ranges from 0.25 to 2 bpp. From the table, we can clearly see that PSNR of the proposed scheme reaches 53.3405 dB in a low embedding rate, which indicates that our proposed adaptive RDH scheme does not cause significant distortion to the images. In a high embedding rate, PSNR of our proposed adaptive RDH scheme is still more than 36 dB.
A comparison of the proposed scheme with related works is given in
Table 3, where
and
represent the number of bits that can be embedded in edge pixels and non-edge pixels in [
27], respectively, and
is the number of bits per embedding in [
30]. From the table, we can find that our proposed adaptive RDH scheme significantly outperforms most of the related works in terms of both EC and PSNR, which means that our scheme can hide more biometric information while preserving a better visual quality than the others. For [
19,
26,
29], our scheme wins over these schemes both in terms of EC and PSNR. In [
27], when
, EC of [
27] is similar to that of our proposed adaptive RDH scheme, but PSNR of [
27] is worse than that of our proposed adaptive RDH scheme. When
, EC of [
27] can reach 3 bpp and PSNR of the image is obviously much worse. While the proposed scheme is slightly inferior to [
27] in terms of EC, we are able to maintain PSNR of the image at a relatively good level. In [
30], when
, the scheme loses to the proposed scheme in both EC and PSNR. When
, although the proposed scheme is slightly inferior to [
30] in terms of EC, the higher value of PSNR of our steganographic image makes the image carrying information less detectable during transmission.
The PSNR value with respect to the payload of three related schemes for the test images given in
Figure 10 are plotted in
Figure 12. As shown in the figures, our scheme maintains a superior visual quality under an equal payload. When the payload is larger than 1.5 bpp, the PSNR value of Geetha et al.’s scheme [
21] degrades significantly.
The method published by Mandal et al. [
20] treats all pixel blocks the same. When executing DE embedding in its second data hiding phase, the large pixel value differences cause the pixel values to be drastically modified, which significantly reduces the PSNR value of the stego image. In our scheme, the pixel blocks are classified into smooth and complex ones in advance. During data hiding, DE embedding of complex blocks is omitted, which effectively improves the PSNR value. For the smooth blocks, the block mean interpolation ensures a controllable difference value between interpolated pixels and DE can be safely executed without leading to significant distortion. The experimental data confirms the effectiveness of the proposed strategy. With this strategy, our scheme is not only able to achieve good visual quality scores on general grayscale images but is also able to embed more secret messages on medical images. The proposed scheme provides a high PSNR value at a low hiding volume. As the embedded volume increases, PSNR of the proposed scheme does not decrease drastically as in [
21] but decreases smoothly.
5. Conclusions
A new interpolation-based RDH scheme was proposed for hiding patient biometric information in medical images. The pixel blocks were classified into complex and smooth ones. Different methods were applied to process the two different categories. For complex blocks, the dynamic range of pixel values were preserved during data embedding. For smooth blocks, two layers of an electronic patient record can be embedded with a slight distortion in the pixel values. Compared to [
20], our adaptive scheme uses the same MN interpolation and DIM embedding to ensure a high payload for the image blocks with complex textures but removes the DE embedding part of [
20], which causes high distortion for the complex blocks. For the smooth image blocks, MN interpolation and DIM embedding methods cannot provide a satisfactory payload, so we adopted BM interpolation and DE embedding to ensure a good payload while preserving low distortion. From the experimental results, we can conclude that our proposed adaptive scheme can embed a satisfactory amount of biometric information with the least degree of image distortion. Our proposed adaptive scheme was also compared with state-of-the-art schemes. The performance improvement confirms the excellence of our proposed adaptive scheme.
In the application of medical image management, when the embedding capacity is large enough, the extra space can be applied to embed electronic patient records. In the future, we will focus on designing an RDH scheme that combines the hiding of patient biometric information and electronic diagnosis records.