An Adaptive Reversible Data Hiding Scheme Using AMBTC and Quantization Level Difference

: Hiding a message in compression codes can reduce transmission costs and simultaneously make the transmission more secure. This paper presents an adaptive reversible data hiding scheme that is able to provide large embedding capacity while improving the quantity of modiﬁed images. The proposed scheme employs the quantization level difference (QLD) and interpolation technique to adaptively embed the secret information into pixels of each absolute moment block truncation coding (AMBTC)-compressed block, except for the positions of two replaced quantization levels. The values of QLD tend to be much larger in complex areas than in smooth areas. In other words, our proposed method can obtain good performance for embedding capacity and still meets the requirement for better modiﬁed image quality when the image is complex. The performance of the proposed approach was compared to previous image hiding methods. The experimental results show that our approach outperforms referenced approaches.


Introduction
With the rapid development of internet communication and computer technology, a large number of information is transmitted over the internet. When digital data are transmitted through the internet, some sensitive data may become vulnerable to the malicious users. Therefore, to ensure the security of the transmitted data, data owners either encrypt the transmitted data via traditional cryptographic algorithms or transfer data into an imperceptible way by using data hiding techniques [1]. In the last decade, multimedia-based transmission has become popular; as such, data hiding techniques are a secure and efficient method for such applications. Data hiding is a way to embed secret data into a digital cover media by modifying the original content, such that other users in a public network will not be aware of the existence of the embedded data. If malicious users have not noticed the transmitted data concealing confidential data, the safety of hidden data is guaranteed. Generally, a data hiding scheme can be divided into three categories, i.e., spatial domain, frequency domain, and compressed domain. The spatial domain method imparts some meaningful changes in the image pixels in order to embed information. The frequency domain method and compressed domain method embed the secret data into transformed coefficients and the compressed codes of digital images, respectively [2].
In order to transmit multimedia data efficiently on the internet, many researchers have proposed various compression methods to reduce the size of multimedia files, such as vector quantization (VQ) [3][4][5], discrete wavelet transform (DWT) [6][7][8], and discrete cosine transform (DCT) [9][10][11]. Qin et al. [3] proposed a data hiding scheme based on VQ compressed images and an index mapping mechanism. Ahmed et al. [6] proposed a data hiding method based on DWT. Their method hides a secret image inside a cover image by using two secret keys. Chang [11] et al. proposed a scheme to hide the secret information in the DCT coefficient domain. In this scheme, the image is divided into 8 × 8 blocks, where if two successive coefficients of the medium-frequency components are zero, the information is hidden in each block.
Block truncation coding (BTC) [12] is another efficient lossy block-based image compression technique. In recent years, many researchers have studied data hiding based on BTC and made improvements, such as absolute block truncation coding (AMBTC) [13], ordered dither block truncation coding (ODBTC) [14], error Diffusion Block truncation coding (EDBTC) [15], etc. BTC is characterized by low complexity and low memory, and thus it has become an ideal data hiding domain. Wu and Sun [16] presented a data hiding method in which each secret bit is embedded into the bitmap of the BTC compression codes. Kim [17] proposed a data hiding method for halftone compressed images based on ODBTC and exploiting modification direction (EMD). Guo et al. [18] introduced a data hiding scheme based on error-diffused BTC to embed an extremely large amount of watermarks without obviously damaging image quality. These methods are irreversible, and the host image is permanently altered and it cannot be recovered accurately after data extraction. However, in some applications such as medical image sharing, military image processing, remote sensing and multimedia archive management, the recovery of a host image is essential [19]. To address this problem, a reversible data hiding scheme [20] were proposed that can extract the hidden data and produce a lossless recovery of the cover image. As Zhao et al. mentioned [1], the key property of reversible data hiding is not only the secret data but also the host image can be accurately recovered in the recorder.
In 2008, Chang et al. [21] presented a reversible data hiding method aimed at BTCcompressed color images. In 2011, Li et al. [22] introduced a reversible image hiding based on the BTC-compressed approach. In this scheme, the histogram shifting and bitmap flipping technique were used to hide secret bits. In 2013, Sun et al. [23] introduced another reversible data hiding method for BTC-compressed using the joint neighbor coding technique. In 2015, Lin et al. [24] presented a reversible data hiding scheme for AMBTCcompressed images by combining secret bits with bitmap bits one by one.
In this paper, we propose an adaptive reversible data hiding scheme that is based on an AMBTC compression domain and quantization level difference. In this scheme, the cover image is compressed into corresponding quantizers and a bitmap image by absolute moment block truncation coding (AMBTC). Subsequently, a certain amount of the data bits will be embedded into this pixel according to the value of QLD. The rest of this paper consists of four sections: AMBTC's and Lin et al.'s methods are introduced in Section 2; the proposed algorithm is illustrated in Section 3; detailed experimental description and comparative analysis are provided in Section 4; and finally, the conclusions are offered in Section 5.

Absolute Moment Block Truncation Coding (AMBTC)
As a variant of BTC, AMBTC was introduced by Lema and Mitchell [13] in 1984. During the encoding procedure, the algorithm divides the original image into a set of non-overlapped blocks with a size of k × k. Assume that x ij is the pixel value in location (i, j) of the block, the mean value u and its standard deviation α are computed by Equations (1) and (2), respectively. Then, each block is converted to two quantizers and a bitmap image bm. The two quantizers hm and lm for the block are computed by: where q is the number of pixels that are greater than or equal to the mean value u. The bitmap bm = m ij m ij ∈ {0, 1}, 1 ≤ i, j ≤ k is created as follows: Figure 1 shows an example to describe the procedures for the AMBTC scheme. Figure 1a shows the original image block of 4 × 4 pixels. Then, the block mean u and standard deviation α are computed, respectively, by using Equations (1) and (2). In this example, u = 110 and α = 10. The bitmap generated by AMBTC is shown in Figure 1b. Finally, the quantization levels, namely lm and hm, are calculated by using Equations (3) and (4), respectively. Figure 1c shows the reconstructed image block. Then, each block is converted to two quantizers and a bitmap image bm. The two quantizers hm and lm for the block are computed by: where q is the number of pixels that are greater than or equal to the mean value u. The bitmap = | ∈ 0,1 , 1 , is created as follows: Figure 1 shows an example to describe the procedures for the AMBTC scheme. Figure  1a shows the original image block of 4 × 4 pixels. Then, the block mean and standard deviation are computed, respectively, by using Equations (1) and (2). In this example, = 110 and = 10. The bitmap generated by AMBTC is shown in Figure 1b. Finally, the quantization levels, namely and ℎ , are calculated by using Equations (3) and (4), respectively. Figure 1c shows the reconstructed image block.

AMBTC Scheme of Lin et al.'s Method
In 2015, Lin et al. presented a reversible data hiding scheme for AMBTC-compressed images by considering the mean value and the standard deviation to achieve a high payload and high-quality modified images. Following are details about the major steps of the embedding processing.
Step 1: Define three parameters, i.e., the bitmap , mean pixel value and standard deviation using Equations (1), (2) and (5), respectively. Step 2: Define four different scenarios for each pixel of a given × block. As shown in Table 1, if the secret bit is "1", and the bit in bitmap is "0", then the corresponding scenario is "10" by combining secret bits with bits of the bitmap.
Step 3: Determine the cover image block is embeddable or non-embeddable. If there are only one or two different scenarios, this cover block is a non-embeddable block. If the types of scenarios are equal to three or four, the cover is an embeddable block. Step 4: Determine the hiding strategy. The detailed Algorithm 1 for hiding strategies is shown below.

AMBTC Scheme of Lin et al.'s Method
In 2015, Lin et al. presented a reversible data hiding scheme for AMBTC-compressed images by considering the mean value and the standard deviation to achieve a high payload and high-quality modified images. Following are details about the major steps of the embedding processing.
Step 2: Define four different scenarios for each pixel of a given k × k block. As shown in Table 1, if the secret bit is "1", and the bit in bitmap is "0", then the corresponding scenario is "10" by combining secret bits with bits of the bitmap. Step 3: Determine the cover image block is embeddable or non-embeddable. If there are only one or two different scenarios, this cover block is a non-embeddable block. If the types of scenarios are equal to three or four, the cover is an embeddable block.
Step 4: Determine the hiding strategy. The detailed Algorithm 1 for hiding strategies is shown below. Algorithm 1. Hiding strategy of Lin's method.

Input: current scenarios
Output: corresponding pixel value cpv corresponding pixel value Switch(current scenarios){ case00 : cpv = u − α; break; case01 : cpv = u + α; break; case10 : cpv = u − α − 1; break; case11 : cpv = u − α + 1; break; } return cpv; Figure 2 shows an example of the strategy. Figure 2a shows the secret bits and the corresponding bitmap. Figure 2b shows a combination. There are four types of in this example. Figure 2c shows the result according to Algorithm 1.  Figure 2 shows an example of the strategy. Figure 2a shows the secret bits and the corresponding bitmap. Figure 2b shows a combination. There are four types of in this example. Figure 2c shows the result according to Algorithm 1.

The Proposed Scheme
This section may be divided by subheadings. It should provide a concise and precise description of the experimental results, their interpretation as well as the experimental conclusions that can be drawn. This section describes the details of our method. Our proposal utilizes an adaptive interpolation technique and AMBTC compression technique, to improve embedding capacity and image quality. As we utilize the difference of two quantization levels to adaptively embed the secret data into the cover image, our method can obtain a high embedding capacity. Moreover, our method still meets good image quality as we exploit the middle value of two quantization levels and the values of two thresholds to limit the shifting of values. The flowcharts of embedding and extraction phases for our proposed scheme are shown in Figures 3-6, respectively.

The Proposed Scheme
This section may be divided by subheadings. It should provide a concise and precise description of the experimental results, their interpretation as well as the experimental conclusions that can be drawn. This section describes the details of our method. Our proposal utilizes an adaptive interpolation technique and AMBTC compression technique, to improve embedding capacity and image quality. As we utilize the difference of two quantization levels to adaptively embed the secret data into the cover image, our method can obtain a high embedding capacity. Moreover, our method still meets good image quality as we exploit the middle value of two quantization levels and the values of two thresholds to limit the shifting of values. The flowcharts of embedding and extraction phases for our proposed scheme are shown in Figures 3-6, respectively.

Embedding Phase
This section may be divided by subheadings. It should provide a concise and precise description of the experimental results, their interpretation as well as the experimental conclusions that can be drawn. This section describes the details of our method. Our proposal utilizes an adaptive interpolation technique and AMBTC compression technique, to improve embedding capacity and image quality. As we utilize the difference of two quantization levels to adaptively embed the secret data into the cover image, our method can obtain a high embedding capacity. Moreover, our method still meets good image quality as we exploit the middle value of two quantization levels and the values of two thresholds to limit the shifting of values. The flowcharts of embedding and extraction phases for our proposed scheme are shown in Figures 3-6, respectively.
The process of embedding phase is shown in Figure 3. Let I be an input cover image sized × . Each block is sized × , where = 0, 1, … , × 1. Secret data S is a bit stream in binary form, and is the decimal value of secret bits. Input: Cover image I and secret data S. Output: Modified image .
where ℎ and are quantization levels of high value and low value, respectively. Here, if is smaller than 3, the secret data cannot be extracted because of the middle value of two quantization levels could not be determined. For example, the values of ℎ and are 9 and 7, respectively. We cannot know whether the modified pixel value is ℎ 1 or 1 while is 8. Therefore, must be greater than 3. And if is greater than 63, it may cause a problem where the difference of the current processing block and its neighbor blocks are very large. As such, should be smaller than 63.  Step 6. Compute the value of using Equation (7). Then, embed the into each using Equation (8), where is the decimal value of the next secret bits to be embedded, is the pixel . In the first step, utilize the AMBTC algorithm to compute the block and obtain two quantization levels and ℎ . As is 3, S will be partitioned into multiple groups and each group contains three secret bits. Then, convert each group of secret bits into decimal value . The positions of and are utilized to substitute the values of and ℎ , respectively. Moreover, no secret bits are embedded in them. As such and , we use N/A to represent. In the next step, embed into each using Equation (8). And finally, S can be embedded into the block and obtain the modified block ′ .

Extraction and Recovery Phase
The processes for the extraction and recovery phases are shown in Figure 6. S will be extracted from modified image . When the block belongs to a non-embedding case, there are only two values in it. Therefore, we do not need any extra information to record whether this block has secret data or not.

Embedding Phase
The process of embedding phase is shown in Figure 3. Let I be an input cover image sized H × W. Each block b i is sized k × k, where i = 0, 1, . . . , H k × W k − 1. Secret data S is a bit stream in binary form, and M n is the decimal value of secret bits.
Input: Cover image I and secret data S. Output: Modified image I .
Step 1. Divide I into k × k non-overlapping blocks b i 's.
Step 2. Calculate the current processing block b i using AMBTC algorithm.
where h i and l i are quantization levels of high value and low value, respectively.
Step 4. Determine the value of d i . If 3 < d i < 64, go to Step 5. Otherwise, go to Step 7.
Here, if d i is smaller than 3, the secret data cannot be extracted because of the middle value of two quantization levels could not be determined. For example, the values of h i and l i are 9 and 7, respectively. We cannot know whether the modified pixel value p n is h i − 1 or l i + 1 while p n is 8. Therefore, d i must be greater than 3. And if d i is greater than 63, it may cause a problem where the difference of the current processing block and its neighbor blocks are very large. As such, d i should be smaller than 63.
Step 5. Find out the first bp n = 0 (FL) and the last bp n = 1 (LH) in the bitmap, where bp n is the presented value in the bitmap and n = 0, 1, . . . , k × k − 1. FL and LH are the first value 0 and the last value 1 in the bitmap, respectively. The locations of FL and LH are r 1 and r 2 , respectively, where r 1 and r 2 are 0, 1, . . . or k × k − 1. We show an example in Figure 4 to describe in detail the process of scanning FL and LH.
Step 6. Compute the value of a i using Equation (7). Then, embed the M n into each p n using Equation (8), , if bp n = 1 and n = r 1 or r 2 l i + M n , if bp n = 0 and n = r 1 or r 2 , where M n is the decimal value of the next a i secret bits to be embedded, p n is the pixel value in the block b i and p n is the modified pixel value in the modified block.
Step 7. Modify the value of each p n in block b i using Equation (9) that no secret data are embedded.
Step 8. Repeat Step 2 to Step 7 until all blocks b i 's are processed.
Step 9. Obtain modified image I . We can get modified image I when all steps are finished. We provide an example to further clarify our embedding process in Figure 5. In Figure 5, (a) shows an example of a 4 × 4 sized block b i , (b) is the bitmap of block b i , (c) presents secret data S and the decimal value M n of each a i secret bits and (d) shows the final result of modified image I . In the first step, utilize the AMBTC algorithm to compute the block b i and obtain two quantization levels l i and h i . As a i is 3, S will be partitioned into multiple groups and each group contains three secret bits. Then, convert each group of a i secret bits into decimal value M n . The positions of r 1 and r 2 are utilized to substitute the values of l i and h i , respectively. Moreover, no secret bits are embedded in them. As such M r 1 and M r 2 , we use N/A to represent. In the next step, embed M n into each p n using Equation (8). And finally, S can be embedded into the block b i and obtain the modified block b i .

Extraction and Recovery Phase
The processes for the extraction and recovery phases are shown in Figure 6. S will be extracted from modified image I . When the block b i belongs to a non-embedding case, there are only two values in it. Therefore, we do not need any extra information to record whether this block has secret data or not.
Input: Modified image I . Output: Secret data S and the cover image I.
Step 1. Divide I into k × k non-overlapping blocks b i 's.
Calculate the frequency f of the number of different pixels in the current processing block b i . The Algorithm 2 is described as follows.
Algorithm 2. Procedure for calculating the frequency.
Step 3. Determine the value of f. If f > 2, go to step 4. Otherwise, go back to Step 2.
Step 4. Sort all p n 's in the block b i in ascending order. The first and last values in the sorted sequence are l i and h i , respectively. And the positions of l i and h i are r 1 and r 2 , respectively.
Step 5. Compute the values of d i and a i utilizing Equations (6) and (7), respectively. Extract the secret data from p n 's using Equation (10).
Then, convert M n into a i secret bits and add in S.
Step 7. Repeat Step 2 to Step 6 until all modified blocks b i 's are processed.
Step 8. Obtain the cover image I and secret data S. After all steps are computed, we can extract S from modified block b i and recover each b i using min{p n } and max{p n } after sorting. We used l i and h i to replace the positions of FL and LH, respectively. This allows us to know l i and h i utilizing the ascending order of all p n 's in modified block b i while extracting. This approach can avoid the problem when the value of M n is 0. We also provide a detailed example of the extraction and recovery phases in Figure 7. In Figure 7, (a) presents the modified block b i that follows the previous example in Figure 5, (b) shows the results of extracted M n and S in binary form and (c) is the resulting block b i after recovery. Firstly, calculate the frequency f and determine whether the value of f is greater than 2. Then, all p n 's in the modified block b i will be sorted in ascending order. The first and last values are l i and h i , respectively. According to the first and last values in a sorted sequence corresponding positions in modified block b i , the positions of r 1 and r 2 are 1 and 14, respectively. Next step, M n will be extracted from modified block b i using Equation (8). Each M n will be converted into a i secret bits and added in the S. In the last step, recover each p n using Equation (9). Finally, we can get block b i and extract S from the modified block b i . determine whether the value of f is greater than 2. Then, all 's in the modified block ′ will be sorted in ascending order. The first and last values are and ℎ , respectively. According to the first and last values in a sorted sequence corresponding positions in modified block ′ , the positions of and are 1 and 14, respectively. Next step, will be extracted from modified block ′ using Equation (8). Each will be converted into secret bits and added in the S. In the last step, recover each using Equation (9). Finally, we can get block and extract S from the modified block ′ .

The Proposed Scheme
The section provides some experimental results to show the hiding capacity (bits) and image quality (dB) of our proposed scheme. In Figure 8, all of the experiments were performed with six commonly used grayscale test images: Lena, F-16, Sailboat, Girl, Toys, and Barbara. All are of the same size, 512 × 512. The size of each block b i is 4 × 4. The embedded secret data are composed of a random bit-stream that was produced from a random number generator.
In these experiments, the visual quality of the modified images was evaluated by using peak signal-to-noise ratio (PSNR) as defined in Equation (12).
The definition of mean square error (MSE) is shown in Equation (13).
where p i n and p i n are the stego pixels and original pixels in each modified block and original block, respectively.

The Proposed Scheme
The section provides some experimental results to show the hiding capacity (bits) and image quality (dB) of our proposed scheme. In Figure 8, all of the experiments were performed with six commonly used grayscale test images: Lena, F-16, Sailboat, Girl, Toys, and Barbara. All are of the same size, 512 × 512. The size of each block is 4 × 4. The embedded secret data are composed of a random bit-stream that was produced from a random number generator. In these experiments, the visual quality of the modified images was evaluated by using peak signal-to-noise ratio (PSNR) as defined in Equation (12).
The definition of mean square error (MSE) is shown in Equation (13).
where and are the stego pixels and original pixels in each modified block and original block, respectively.
To demonstrate the performance results for our proposed scheme, our method was compared with previous reversible data hiding methods in two aspects. In the first group, the proposed scheme was compared with other BTC-based schemes [21][22][23][24]. Figure 9a and Table 2 show the results of this comparison. Figure 9a shows, the good performance for embedding capacity that was achieved in our scheme. The proposed method can embed 56 bits in each 4 × 4 pixel block while the difference between two quantization levels is larger than 32. However can only be embedded 1, 2 and 4 bits, respectively. In our scheme, the capacity for, "Lena", "F-16", "Sailboat", "Girl", "Toys" and "Barbara", were 324,548 (bits); 267,386 (bits); 432,796 (bits); 388,780 (bits); 292,250 (bits) and 449,876 (bits), respectively. To demonstrate the performance results for our proposed scheme, our method was compared with previous reversible data hiding methods in two aspects. In the first group, the proposed scheme was compared with other BTC-based schemes [21][22][23][24]. Figure 9a and Table 2 show the results of this comparison. Figure 9a shows, the good performance for embedding capacity that was achieved in our scheme. The proposed method can embed 56 bits in each 4 × 4 pixel block while the difference between two quantization levels is larger than 32. However block can only be embedded 1, 2 and 4 bits, respectively. In our scheme, the capacity for, "Lena", "F-16", "Sailboat", "Girl", "Toys" and "Barbara", were 324,548 (bits); 267,386 (bits); 432,796 (bits); 388,780 (bits); 292,250 (bits) and 449,876 (bits), respectively. In our scheme, the image obtained a higher embedding capacity even with complex images such as "Barbara" and "Sailboat", because our adaptive interpolation technique is related to the difference of two quantization levels. However, the capacity is relatively small in smooth images, such as "Lena", "F-16 and "Toys". Table 2 shows a comparison of image quality. In Chang et al.'s and Sun et al.'s schemes, the cover image cannot be directly obtained from a stego compression code. Therefore, the two methods cannot be compared in terms of image quality of a modified image. From Table 2, the proposed scheme cannot achieve the best PSNR in every test image. In the "Lena", Lin et al.'s scheme achieves the best results, and Li et al.'s scheme provides the best results in the "Sailboat". But our method achieves a higher average. In brief, the first experiment shows that our scheme achieves the higher embedding capacity while maintaining relative good, modified image quality.   [21] Cannot be constructed by the modified code stream Sun et al.'s [23] Cannot be constructed by the modified code stream In our scheme, the image obtained a higher embedding capacity even with complex images such as "Barbara" and "Sailboat", because our adaptive interpolation technique is related to the difference of two quantization levels. However, the capacity is relatively small in smooth images, such as "Lena", "F-16′ and "Toys". Table 2 shows a comparison of image quality. In Chang et al.'s and Sun et al.'s schemes, the cover image cannot be directly obtained from a stego compression code. Therefore, the two methods cannot be compared in terms of image quality of a modified image. From Table 2, the proposed scheme cannot achieve the best PSNR in every test image. In the "Lena", Lin et al.'s scheme achieves the best results, and Li et al.'s scheme provides the best results in the "Sailboat". But our method achieves a higher average. In brief, the first experiment shows that our scheme achieves the higher embedding capacity while maintaining relative good, modified image quality.
In the second group, we compared some reversible data methods that are not based on a BTC-compressed technique [4,20,25]. These three other techniques hide secret data in the spatial domain. As shown in Figure 9b and Table 3, our method obtains good performance in comparison with the other methods. In Chiou et al.'s scheme, secret data cannot be embedded into the blocks in the first row and first column. Tai et al.'s scheme and Celik et al.'s cannot embed secret data in some cases. In our method, although secret data cannot be embedded when the difference of two quantization levels is smaller than 4, our scheme still can obtain a better hiding capacity than other schemes when conditions were In the second group, we compared some reversible data methods that are not based on a BTC-compressed technique [4,20,25]. These three other techniques hide secret data in the spatial domain. As shown in Figure 9b and Table 3, our method obtains good performance in comparison with the other methods. In Chiou et al.'s scheme, secret data cannot be embedded into the blocks in the first row and first column. Tai et al.'s scheme and Celik et al.'s cannot embed secret data in some cases. In our method, although secret data cannot be embedded when the difference of two quantization levels is smaller than 4, our scheme still can obtain a better hiding capacity than other schemes when conditions were similar for PSNR. The experimental results show that, our proposed scheme was better than other reversible data hiding schemes.

Conclusions
This paper proposed an adaptive reversible image hiding method using AMBTC compression by considering the quantization level difference of each block. According to our adaptive embedding strategy, more bits are embedded into the image sub-block located in regions where the value of QLD is larger. However, in order to ensure the quality of the image, when the value of the QLD of a sub-block is greater than the threshold, this block will not embed information. Experimental results showed that the performance of the proposed scheme is better than the previous schemes in terms of payload and modified image quality.