1 Introduction

Due to the rapid advancement of networking technology, the digital information is widely distributed over the internet. Peoples can easily access and interchange various multimedia information like audio, video, and images more conveniently. However, distribution of these types of data has enormously increases the chance of interception, forgery, and fraud. Thus, protection of the sensitive information is highly demanded. Data hiding, also known as information hiding, plays an important role in information security. It embeds the secret information into cover media such that an unintended observer will not be aware of the existence of the hidden messages [18]. In the field of data hiding, watermarking and steganography are the two main techniques that have raised intensive concern among researchers. As far as watermarking is concerned, it alters a cover object, either imperceptibility or perceptibility to embed a message about the cover objects. Generally, it is used for copyright protection, transaction tracking, and broadcast monitoring. In contrast, steganography is mainly used for secret communication. A steganographic method undetectably alters a cover object to hide a secret message. Thus, steganographic methods can hide the very presence of covert communications [5]. There exist two main parameters that affect data hiding scheme, namely visual quality and embedding capacity (or payload). A data hiding scheme, having low image distortion is generally preferred, as it does not raise suspicion among invaders or attackers. On the other hand, data hiding scheme having a high embedding capacity is generally preferred, so that a large amount of secret data can be embedded in the cover image [1]. Data hiding techniques can be carried out in three domains [8] namely spatial, transform, and compressed domain. In the spatial domain, all the pixel values are directly modified to embed the secret data [13]. In case of transform domain, the cover image is firstly transformed into frequency coefficients by utilizing a frequency oriented mechanism such as discrete cosine transformation (DCT) [21] or discrete wavelet transformation (DWT) [20]. Subsequently, secret data are combined with the relative coefficients. Finally, the modified coefficients are used to reconstruct the frequency form image as a stego image. Due to the limited bandwidth of the communication channels, it is preferable to use the compressed or small sized media files. There have been many compression techniques to tackle this problem; however, the lossy image compression techniques like JPEG [9], vector quantization (VQ) [15], block truncation coding (BTC) [7] etc., are more preferable when the media is image or video. One of the most powerful compression techniques is BTC. Furthermore, the BTC has been improved using absolute moment block truncation coding (AMBTC) [10] in which instead of using the standard deviation the first absolute moment is preserved along with the mean. AMBTC is computationally simpler than BTC and also typically results in a lower mean squared error (MSE). Our proposed data hiding scheme is carried out in compression domain more specifically using AMBTC technique. In this paper, absolute moment block truncation coding (AMBTC) technique is modified to embed a large amount of the secret data. This technique also maintains the stego image quality. To validate this point, experimental results are presented in Section 4 which not only proves that the proposed scheme hides large amount of secret data while maintaining the stego image quality but also shows that the scheme is superior to other existing schemes in terms of both data hiding capacity and stego image quality.

The rest of the paper is organized as follows. In Section 2, we briefly introduce some related works of BTC and AMBTC based data hiding methods. The embedding and extraction process of the proposed scheme is introduced in Section 3. The experimental results and analysis are given in Section 4. Finally, in Section 5, the paper is concluded.

2 Related works

In this section, we will briefly review several data hiding schemes for BTC and AMBTC compressed images proposed in last decade and so. Chuang et al. [4] introduced a data embedding scheme based on BTC technique. In their scheme, BTC technique is applied to compress gray scale cover image which results into two quantization values and one bitmap for each block. Then, a predefined threshold is used to classify each BTC encoded block as smooth or complex. Subsequently, secret data is embedded into the bitmap of the selected BTC encoded blocks. This scheme is limited to gray scale images only and the stego image quality is significantly degrades with the increase in threshold value thus increasing the suspicion from the attackers. Later, Chang et al. [2] introduced a reversible data hiding method for color images compressed by BTC. In this method, BTC is applied to each block of a cover image and three pairs of quantization levels and three bitmaps are obtained. To further improve the compression rate, a genetic algorithm is used to find an approximate optimal bitmap out of three bitmap. Chen et al. [3] discussed a data hiding scheme which uses the difference between quantized values to embed the secret data. This scheme provides better quality stego image. In 2011, Li et al. [11] suggested a reversible data hiding scheme for BTC compressed images using bitmap flipping and histogram shifting strategies for the high mean values and low mean values. Due to the lack of extra data in the stego bit stream, this achieves very low image distortion after data embedding and enhances the security of embedded data. However, this technique has low data hiding capacity. To further improve the data hiding capacity, Sun et al. [19] discussed a reversible data hiding scheme based on the joint neighbor coding technique to BTC compressed images. Using the joint neighbor coding technique, both the high mean and low mean table are used for embedding the secret data. It has been observed that this scheme obtained a capacity four times larger as the number of blocks in the cover image, however, it requires extra data to be included in the stego code stream. Later, Zhang et al. [22] proposed a reversible data hiding scheme for BTC compressed images by further losslessly encoding the BTC compressed data according to the secret bits. Initially, the BTC technique is applied to the original image to get the BTC compressed data that consists of a high mean table, a low mean table, and a bit plane sequence which is used to hide the secret data. However, this scheme needs extra information such as a key to generate the sequence, length of secret data, and the cover image size to achieve reversibility. Later, Lin et al. [14] presented an AMBTC compression based reversible data hiding method. In this technique, the redundancy of compressed blocks is firstly investigated, which is used to classify the blocks of AMBTC compressed blocks as embeddable or non embeddable. In order to embed the secret data in embeddable blocks, four disjoint sets are designed by using different combinations of the mean value and the standard deviation. Jeng et al. [17] introduced a reversible data hiding scheme for AMBTC compressed images using a reference matrix. The quantization levels of each AMBTC compressed image block are used to embed the secret data by using a reference matrix. For each image block, original quantization levels are changed into another stego message which is combined with a bitmap. Ou et al. [16] discussed an AMBTC based data hiding scheme having minimum distortion. In this technique, a threshold is defined to divide the blocks of the AMBTC compressed codes as smooth and complex, in which secret data are embedded. In case of smooth blocks, the bit planes are directly used to embed the data by replacing the bits with the secret data bits. Next, the two quantization levels are re calculated to reduce the caused distortion. For complex blocks, a proportion of secret bits are hidden by exchanging the order of two quantization levels with together toggling the bit plane. Huang et al. [6] discuss a hybrid secret hiding schemes based on absolute moment block truncation coding. It is an extension of Ou et al. [16] for embedding more secret data into the complex and smooth blocks. It utilizes two different hiding methods for embedding the secret data into the smooth and complex blocks. In case of smooth blocks, the small variation of the block is adopted to define the embedding rule to minimize the distortion after data embedding. As for the complex blocks, the large variation of the block is used to embed more secrets while maintaining good visual quality. Li et al. [12] discuss a bi-stretch reversible data hiding algorithm for absolute moment block truncation coding compressed images. In this scheme, the AMBTC compressed image is divided into non overlapped blocks first, after that, four feasible cases are employed to embed secret data, which takes advantage of the characteristics of the coefficients of the AMBTC compressed image and leads to very small distortion of the AMBTC compressed image. In this paper, we extend the work of Ou et al. [16] to embed the larger amount of secret data. Our aim in this paper is to provide both good quality stego image and high data hiding capacity at the same time.

The proposed scheme employs a user defined threshold value to classify the AMBTC compressed blocks as complex block and a smooth block. Here, each pixel of the image is represented by two bits in the bit plane and four quantization levels are calculated instead of two levels so that a large amount of secret data is embedded with better image quality. In the next section, the proposed scheme is discussed.

3 Proposed scheme

In this section, the proposed scheme which modifies the AMBTC compression technique to embed a large amount of secret data is discussed. It converts the one bit plane into two bit plane so that large amount of secret data is embedded and caused distortion can also be limited. It uses a user defined threshold value (which is adjustable as per the requirement) to categorize the AMBTC compressed blocks into smooth blocks and complex blocks. In case of smooth block, to embed the secret data, the bit plane is replaced with the secret data bits. Later, the four quantization levels are calculated using Eqs. (1)–(4) so that caused distortion is minimized. In case of complex blocks, the secret data is embedded into the first LSB of the bit plane and four new quantization levels are calculated using Eqs. (1)–(4) (like in the case of smooth blocks) so that the resultant block could be brought close to the original block to maintain the stego image quality. Thus, the proposed scheme is able to embed two bits into each pixel of the smooth blocks and one bit into every pixel of complex blocks. The algorithm of the proposed scheme is discussed in the following section.

3.1 Embedding algorithm

Input- I: original image of size N × N pixels, thr: threshold, S: secret data bit stream.

Output- AMBTC compressed stego codes

BEGIN

Step 1: Divide input image I into 4 × 4 non overlapping blocks in raster scan order.

Step 2: Process each block IB i using AMBTC scheme to get two quantization levels a i and b i , mean value, and a bit plane B i .

Step 3: Reprocess each block IB i to get two bit plane instead of one bit plane so that caused noise due to the compression is reduced.

• If the original image pixel value of the block is less than the quantization level a i then represent the corresponding pixel by ‘00’ in the bit plane.

• Else if the original image pixel value is greater than or equal to the quantization level a i and less than or equal to the mean value of the block, then represent the corresponding pixel by ‘01’ in the bit plane.

• Else if the original image pixel value is greater than to the mean value of the block and less than to the quantization level b i , then represent the corresponding pixel by ‘10’ in the bit plane.

• Otherwise, the pixel is represented by ‘11’ in the bit plane.

Step 4: Calculate absolute difference value D i for the block IB i , such that D i  = |a i  − b i |.

Step 5: If D i  ≤ thr, means IB i is a smooth block. Replace bits of the two bit plane \( {B}_i^{\prime } \) with the 32 bits S 1 from secret data S for embedding the same, which in turn gives a new bit plane \( {B}_i^{\prime \prime } \) with embedded S 1. Subsequently, remove S 1 from S such that S = SS 1.

Step 6: Calculate four new quantization levels as follows to reduce the distortion.

$$ {a}_i^{\hbox{'}}=\frac{1}{q_{00}}{\displaystyle {\sum}_{x_i\in {G}_{00}^{\hbox{'}}}{x}_i} $$
(1)
$$ {d}_i^{\hbox{'}}=\frac{1}{q_{01}}{\displaystyle {\sum}_{x_i\in {G}_{01}^{\hbox{'}}}{x}_i} $$
(2)
$$ {c}_i^{\hbox{'}}=\frac{1}{q_{10}}{\displaystyle {\sum}_{x_i\in {G}_{10}^{\hbox{'}}}{x}_i} $$
(3)
$$ {b}_i^{\hbox{'}}=\frac{1}{q_{11}}{\displaystyle {\sum}_{x_i\in {G}_{11}^{\hbox{'}}}{x}_i} $$
(4)

where, q 00 , q 01 , q 10 and q 11 are the number of 00, 01, 10, and 11in the bit plane, respectively.

Step 7: If \( \left|{a}_i^{\prime }-{b}_i^{\prime}\right|\le thr \), indicates that new quantization levels can maintain the smoothness property of the block IB i , then add \( \left\{{a}_i^{\prime },{b}_i^{\prime },{c}_i^{\prime },{d}_i^{\prime },{B}_i^{\prime \prime}\right\} \) into I S (stego image). If \( \left|{a}_i^{\prime }-{b}_i^{\prime}\right|>thr \) indicates that the block is violating the smoothness property. So, to maintain its smoothness, add the old quantization levels a i and b i in place of \( {a}_i^{\prime } and\ {b}_i^{\prime } \) into I S such that the compressed code is \( \left\{{a}_i,{b_i,c}_i^{\prime },{d}_i^{\prime },{B}_i^{\prime \prime}\right\} \). Finally, go back to the Step 3 to process the next block.

Step 8: If D i  > thr, the block IB i is classified as a complex block. Embed the 16 bits S 1 from S by replacing the first LSB of the newly constructed two bit plane with the S 1 bits. After the replacement, a new bit plane \( {B}_i^{\prime \prime } \) with embedded S 1 is obtained. Subsequently, remove S 1 from S such that S = SS 1.

Step 9: According to the new bit plane \( {B}_i^{\prime \prime } \)four new quantization levels \( {a}_i^{\prime } \) , \( {d}_i^{\prime } \) , \( {c}_i^{\prime } \) and \( {b}_i^{\prime } \) are re-calculated using Eqs. (1)–(4), respectively, to reduce the distortion.

Step 10: If \( \left|{a}_i^{\prime }-{b}_i^{\prime}\right|>thr \), indicates that new quantization levels can maintain the complexness property of the block IB i , then add \( \left\{{a}_i^{\prime },{b}_i^{\prime },{c}_i^{\prime },{d}_i^{\prime },{B}_i^{\prime \prime}\right\} \) into I S . If \( \left|{a}_i^{\prime }-{b}_i^{\prime}\right|\le thr \) indicates that the block is violating the complexness property. So, to maintain its complexness, add the old quantization levels a i and b i in place of \( {a}_i^{\prime }\ \mathrm{and}\ {b}_i^{\prime } \) into I S such that the compressed code is \( \left\{{a}_i,{b_i,c}_i^{\prime },{d}_i^{\prime },{B}_i^{\prime \prime}\right\} \). Finally, go back to the Step 3 to process the next block.

Step 11: Repeat the steps 3 to 10 to obtain all the compressed image codes in I S .

END

3.2 Illustration of embedding process

An illustration of the proposed embedding process for stego image construction is shown in Fig. 1. Let the secret data bit stream S is (101001010010111 000101110111001011110010100001010)2 and the threshold (thr) is 15. Further assume, we have two different blocks each of size 4 × 4 pixels where the first block IB1 contains pixel values 100, 90, 85, 82, 76, 75, 72, 77, 80, 81, 80, 81, 82, 81, 79, and 79 and second block IB2 contains pixel values 186, 211, 212, 205, 181, 208, 211, 202, 185, 205, 203, 193, 194, 211, 202, and 190. The original blocks IB1 and IB2 are compressed using AMBTC compression technique and compressed codes {77, 85, B1} and {188, 207, B2} are obtained for the blocks IB1 and IB2, respectively. The mean values are 81 and 200 for the blocks IB1 and IB2, respectively.

Fig. 1
figure 1

An example to explain the proposed embedding process

The bit planes for both the blocks IB1 and IB2 contain only two values either 0 or 1 for a corresponding pixel. For the block IB1, absolute difference value D1 is calculated, such that D1 = |a1 − b1| = |77 − 85| = 8 < thr, which is less than the defined threshold value. It means the block IB1 is a smooth block. The block IB1 is processed to get a two bit plane \( {\mathrm{B}}_1^{\prime } \)instead of one bit plane B 1 as detailed in Section 3.1. To embed the secret data in smooth block, the bits of the bit plane \( {\mathrm{B}}_1^{\prime } \)are replaced with the 32 bits of the secret data i.e. S1 = (10100101001011100010111011100101 )2, which in turn gives the new bit plane \( {\mathrm{B}}_1^{\prime \prime } \). Subsequently, S1 from S is removed such that S = S − S1. Now, the new quantization levels\( {\mathrm{a}}_1^{\prime } \), \( {\mathrm{b}}_1^{\prime } \), \( {\mathrm{c}}_1^{\prime } \), and \( {\mathrm{d}}_1^{\prime } \), are calculated so that caused distortion is reduced with respect to the new bit plane \( {\mathrm{B}}_1^{\prime \prime } \) using Eqs. (1)–(4). As, the absolute difference\( \left|{\mathrm{a}}_1^{\prime }-{\mathrm{b}}_1^{\prime}\right|=\left|78-78\right|=\left(0<thr\right) \), that means smoothness property of the block IB1is maintained so new stego compressed code is \( \left\{{\mathrm{a}}_1^{\hbox{'}},{\mathrm{b}}_1^{\hbox{'}},{\mathrm{c}}_1^{\hbox{'}},{\mathrm{d}}_1^{\hbox{'}},{\mathrm{B}}_1^{\prime \prime}\right\}=\left\{78,78,83,81,{\mathrm{B}}_1^{\prime \prime}\right\} \). For the block IB2, absolute difference value D2 is calculated, such that D2 = |a2 − b2| = |188 − 207| = 19 > thr, which means the block IB2 is a complex block. In case of complex block, the block is processed to get a two bit plane instead of one bit plane as detailed in Section 3.1. Now, the next 16 bits of the secret data i.e., S1 = (1110010100001010)2 from S are embedded into the first LSB of the block B2. After the bit plane replacement, a newer bit plane (\( {\mathrm{B}}_2^{\prime \prime}\Big) \) with embedded S1 is obtained. Subsequently, S1 is removed from S such that S = S − S1. Now, four new quantization levels \( {\mathrm{a}}_2^{\prime } \), \( {\mathrm{b}}_2^{\prime } \), \( {\mathrm{c}}_2^{\prime } \), and \( {\mathrm{d}}_2^{\prime } \) are calculated with respect to new bit plane \( {\mathrm{B}}_2^{\prime \prime } \) so that the caused distortion is limited. As, the absolute difference\( \left|{\mathrm{a}}_2^{\prime }-{\mathrm{b}}_2^{\prime}\right|=\left|187-207\right|=\left(20>thr\right) \), that means complexness of the block \( {\mathrm{B}}_2^{\prime \prime } \)is maintained and the value of old quantization levels a2 and b2 can be replaced by the new quantization levels\( {\mathrm{a}}_2^{\prime },\ {\mathrm{b}}_2^{\prime },\ {\mathrm{c}}_2^{\prime },\mathrm{and}\ {\mathrm{d}}_2^{\prime }, \). Finally, the obtained stego compressed code will be as \( \left\{\ {\mathrm{a}}_2^{\prime },{\ \mathrm{b}}_2^{\prime },{\ \mathrm{c}}_2^{\prime },{\mathrm{d}}_2^{\prime },{\mathrm{B}}_2^{\prime \prime}\right\} \)=\( \left\{187,207,207,190,{\ \mathrm{B}}_2^{\prime \prime}\right\} \).

3.3 Extraction phase

In the extraction phase, the secret data is extracted from the AMBTC compressed codes for which a detailed algorithm is explained below.

Input- AMBTC compressed stego codes, thr: threshold

Output- S D : Secret data bit stream

Step 1: Calculate the difference between \( {a}_i^{\prime } \)and \( {b}_i^{\prime } \)in I S , such that \( {D}_i=\left|{a}_i^{\prime}\kern0.5em -{b}_i^{\prime}\right| \).

Step 2: If D i  ≤ thr, the 32 bits of the bit planes are extracted as the S 1 which are added into S D . Then Go to Step 4.

Step 3: If D i  > thr, then extract first LSB of every pixel from the bit plane\( {\mathrm{B}}_2^{\prime \prime } \) as S 1 and add the S 1 into S D .

Step 4: Go to step 1 until all the codes are processed.

Thus proceeding, we can extract the complete secret data bit stream SD from the AMBTC compressed stego codes.

3.4 Illustration of extracting process

In this section, an example is taken for illustrating the process of data extraction. We recall the example given in Section 3.2 for extraction of the secret data bits stream from the compressed codes. For the first compressed code, the absolute difference value D1 of two quantization levels \( {\mathrm{a}}_1^{\prime } \) and \( {\mathrm{b}}_1^{\prime } \) is calculated, such that \( \left|{\mathrm{a}}_1^{\prime }-{\mathrm{b}}_1^{\prime}\right|=\left|78-78\right|=\left(0<thr\right) \), which is less than the defined threshold value. It means that the block is a smooth block. To extract the secret data in case of smooth block, the bits of the bit plane \( {\mathrm{B}}_1^{\prime \prime } \) are extracted. Thus, 32 bits (S1 = (10100101001011100010111011100101 )2) is obtained from the bit plane \( {\mathrm{B}}_1^{\prime \prime } \)and these 32 bits are added into SD. For the second compressed code, the absolute difference value D2 of two quantization levels \( {\mathrm{a}}_2^{\prime } \)and \( {\mathrm{b}}_2^{\prime } \) is calculated, such that \( \left|{\mathrm{a}}_2^{\prime }-{\mathrm{b}}_2^{\prime}\right|=\left|187-207\right|=\left(20>thr\right) \), which is greater than the threshold value (i.e., 15) means the corresponding block is a complex block. To extract the secret data in case of complex block, the first LSB of every pixel from the two bit plane \( {B}_2^{\prime \prime } \) is extracted. Thus, 16 bits (S1 = (1110010100001010)2) is obtained from the bit plane \( {B}_2^{\prime \prime } \) and these 16 bits are added into SD. This process can be continues for all the stego blocks to extract the secret data bit stream.

4 Experimental results and discussions

This section discusses the comparative analysis of our proposed scheme with other existing schemes. For exhaustive analysis, we have taken nine gray scale images, namely “Lena”, “Baboon”, “Plane”, “Peppers”, “Boats”, “Barb”, “House”, “Houses”, and “Zelda” each of size 512 × 512 pixels as shown in Fig. 2. The scheme is implemented in MATLAB running on Intel (R) Core (TM) i5 processor 3.20-GHz with 4-GB RAM hardware platform. The secret data used in the experiment is a stream of random bits, generated by a pseudo random number generator (PRNG). For comparison, three parameters, namely hiding capacity, peak signal to noise ratio (PSNR), and compression ratio are used to evaluate the performance of existing schemes and the proposed scheme.

Fig. 2
figure 2

Cover images, each of size 512 × 512

The hiding capacity refers to the number of secret data bits hidden into the cover image. The visual quality of the image is measured by the peak signal to noise ratio (PSNR) defined as:

$$ \mathrm{PSNR}=10{ \log}_{10}\left[\frac{255*255}{\frac{1}{\mathrm{N}\times \mathrm{N}}{\displaystyle {\sum}_{\mathrm{i}=1}^{\mathrm{N}}\left({\mathrm{x}}_{ij}-{\mathrm{y}}_{ij}\right)}}\right] $$
(5)

where, xij and yij are the pixels located at the ith row and jth column of cover image x and stego image y, each of size N × N pixels, respectively. The stego images of the proposed scheme are shown in Fig. 3.

Fig. 3
figure 3

Stego images of the proposed scheme

The compression ratio is defined as the ratio between the uncompressed size and compressed size:

$$ \mathrm{Compression}\ \mathrm{ratio}=\frac{\mathrm{Compressed}\ \mathrm{size}}{\mathrm{Uncompressed}\ \mathrm{size}} $$
(6)

As discussed in proposed algorithm, the threshold value is used to determine whether the block is smooth or not. The value of the threshold certainly affects the hiding capacity and the image quality. As increasing the threshold value, the image quality is deteriorated but the hiding capacity is increased. The proposed scheme with different threshold values is implemented by using the cover images sized 512 × 512 pixels as shown in Fig. 2(a–i). The experimental results are illustrated in Table 1, where the PSNRs, hiding capacity, and compression ratio are shown. The trade off among the hiding capacity and the visual quality of the image can vary from the application to application by setting different values of the threshold. The value of the threshold can also be set according to the requirements of the application.

Table 1 Comparison of hiding capacity, PSNR, and compression ratio for different images between the proposed scheme and other AMBTC and BTC based schemes

We have compared the performance of the proposed scheme with other popular AMBTC based reversible data hiding schemes of Chuang et al. [4], Ou et al. [16], Lin et al. [14], Huang et al. [6], and Li et al. [12]. The proposed scheme is more closer to the Ou et al. [5] scheme that’s why to critically analyse the performance the results of the proposed scheme are compared with [16] for K = 2, 3, and 4, where K is the dimension of block size. Therefore, the results are taken at 4 × 4, 3 × 3, and 2 × 2 sized blocks for Ou et al. [16]. From Table 1, it is evident that the proposed scheme is performing better than the Chuang et al. [4], Ou et al. [16] at K = 4, Lin et al. [14], Huang et al. [6], and Li et al. [12] for both data hiding capacity and PSNR. However, its image quality performance i.e., PSNR is comparable to Ou et al. [16] at K = 3 and providing approximately more than two times better data hiding capacity for all the images. For K = 2, the Ou et al. [16] scheme provides much better PSNR than the proposed scheme, however its hiding capacity is approximately 5 times lower for all the images. Overall, we can say the proposed scheme is having much better data hiding capacity than the other contemporary AMBTC based data hiding schemes, however, its performance can be comparable for the PSNR in some cases like K = 3 of Ou et al. [16]. The compression ratio for K = 2, 3 and 4 of Ou et al. [16] and the proposed scheme is also provided in Table 1. Figure 4 illustrates the results of performance in terms of embedding capacity (bits) and PSNR (dB) for some of the typical standard images like Lena, Peppers, Boats, and Baboon to cover the thorough analysis. From Fig. 4, it is clearly evident that our scheme achieves more than two times hiding capacity while maintaining image quality of stego-image with respect to Lin et al. [14], Ou et. [16], Huang et al. [6], and Li et al. [12] schemes because it hides two secret data bits into every pixel of the smooth blocks and one secret data bit into the each pixel of complex blocks for all the images. It is also clearly evident from the Fig. 4((a)–(d)) the image quality of our method is better than that of Lin et al. [14], Ou et al. [16] at K = 3 and 4, Huang et al. [6], and Li et al. [12] methods because it reduces the caused distortion of the AMBTC compressed image by having four quantization levels. Hence, the quality of the stego images is maintained as shown in Fig. 3(a–i). Based on the experimental results and comparisons, it can be revealed that our proposed scheme outperforms the other methods, However, when the performance is compared with Ou et al. [16] at K = 2, the proposed scheme is achieving approximately 5 times better hiding capacity but comparatively poor PSNR. Conclusively, we can say that the image quality of the Ou et al. [16] at K = 2 is better than the proposed scheme because [16] is able to hide very less number of secret data bits which helps in maintain image quality. To analyse the performance of the proposed scheme at different threshold with its parent method [16], the results are provided in the Table 1. From the Table 1, it is clearly evident that our scheme is superior to Ou et al. [16] and Chuang et al. [4] methods in terms of both image quality and data hiding capacity, irrespective of the cover image. However, it reduces the compression level of the AMBTC compression technique but is able to compensate it better visual quality and higher data hiding capacity.

Fig. 4
figure 4

Performance comparisons of the proposed scheme and other related schemes based on AMBTC compressed image for four typical images: a Lena, b Peppers, c Boats, and d Baboon

5 Conclusion

In this paper, we have proposed a data hiding scheme that uses our modified AMBTC compression technique to embed the secret data. Our modified AMBTC technique provides two bit plane unlike the one bit plane in original AMBTC which helps in generating four quantization levels so that the resultant image quality is improved. Furthermore, it increases the hiding capacity. This scheme embeds almost 2 times more secret data than the existing schemes with better visual quality. However, our scheme affects the AMBTC compression ratio but the amount of secret data embedded into the codes compensates this overhead. Experimentally, we have shown that our scheme is superior to the existing AMBTC based data hiding schemes in terms of both the data hiding capacity and image quality.