# Joint Adaptive Coding and Reversible Data Hiding for AMBTC Compressed Images

^{1}

^{2}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Related Works

#### 2.1. AMBTC Compression Technique

#### 2.2. Hong et al.’s Method

## 3. Proposed Method

#### 3.1. Reversible Integer Transform of Quantization Levels

#### 3.2. Adaptive Case Classification Technique

#### 3.3. The Embedding Procedures

- Step 1:
- Transform the quantization levels, ${\left\{{a}_{i}\right\}}_{i=1}^{N}$ and ${\left\{{b}_{i}\right\}}_{i=1}^{N}$, into means, ${\left\{{m}_{i}\right\}}_{i=1}^{N}$, and differences, ${\left\{{d}_{i}\right\}}_{i=1}^{N}$, using the RIT technique, as described in Section 3.1.
- Step 2:
- Visit ${\left\{{m}_{i}\right\}}_{i=1}^{N}$ and ${\left\{{d}_{i}\right\}}_{i=1}^{N}$ sequentially, and use the ACC technique described in Section 3.2 to find the best $\alpha $ and $\beta $ values, such that the estimated code length is minimal.
- Step 3:
- Convert the elements in the first row and the first columns of ${\left\{{m}_{i}\right\}}_{i=1}^{N}$ and ${\left\{{d}_{i}\right\}}_{i=1}^{N}$ to their eight-bit binary representations. The converted results are appended to the CS.
- Step 4:
- Scan the rest elements in ${\left\{{m}_{i}\right\}}_{i=1}^{N}$ using the raster scanning order and use the MED predictor (Equation (1)) to predict scanned ${m}_{i}$. Let ${p}_{i}$ be the prediction value and calculate the prediction error ${e}_{i}={m}_{i}-{p}_{i}$.
- Step 5:
- Extract n-bit secret data, ${\left\{{s}_{j}\right\}}_{j=1}^{n}$, from S. In accordance with ${e}_{i}$, one of the four encoding cases is applied:
- Case 1:
- If ${e}_{i}=0$, the bits ${\left\{{s}_{j}\right\}}_{j=1}^{n}$||00 are append to the code stream, CS.
- Case 2:
- If $1\le {e}_{i}\le {2}^{\alpha}$, append the bits, ${\left\{{s}_{j}\right\}}_{j=1}^{n}$||010||${({e}_{i}-1)}_{2}^{\alpha}$, to the CS, where ${(y)}_{2}^{k}$ is the $k-\mathrm{bit}$ binary representation of y. If ${2}^{\alpha}+1\le {e}_{i}\le {2}^{\alpha}+{2}^{\beta}$, append ${\left\{{s}_{j}\right\}}_{j=1}^{n}$||011||${({e}_{i}-{2}^{\alpha}-1)}_{2}^{\beta}$ to the CS.
- Case 3:
- If $-{2}^{\alpha}\le {e}_{i}\le -1$, append the bits, ${\left\{{s}_{j}\right\}}_{j=1}^{n}$||100||${(-{e}_{i}-1)}_{2}^{\alpha}$, to the CS. If $-({2}^{\alpha}+{2}^{\beta})\le {e}_{i}\le -({2}^{\alpha}+1)$, append ${\left\{{s}_{j}\right\}}_{j=1}^{n}$||101||${(-{e}_{i}-{2}^{\alpha}-1)}_{2}^{\beta}$ to the CS.
- Case 4:
- If ${e}_{i}\le -({2}^{\alpha}+{2}^{\beta}+1)$ or ${e}_{i}\ge {2}^{\alpha}+{2}^{\beta}+1$, append the bits, ${\left\{{s}_{j}\right\}}_{j=1}^{n}$||11||${({m}_{i})}_{2}^{8}$, to the CS.

- Step 6:
- Repeat Steps 4–5 until all means, ${\left\{{m}_{i}\right\}}_{i=1}^{N}$, are encoded.
- Step 7:
- Use the same procedures listed in Steps 4–6 to encode the differences, ${\left\{{d}_{i}\right\}}_{i=1}^{N}$, and append the encoded result to the CS.
- Step 8:
- Append the bitmap, ${\left\{{B}_{i}\right\}}_{i=1}^{N}$, to the CS, to construct the final code stream, $C{S}_{f}$.

#### 3.4. The Extraction and Recovery Procedures

- Step 1:
- Prepare empty arrays ${\left\{{a}_{i}\right\}}_{i=1}^{N}$, ${\left\{{b}_{i}\right\}}_{i=1}^{N}$, ${\left\{{m}_{i}\right\}}_{i=1}^{N}$, ${\left\{{d}_{i}\right\}}_{i=1}^{N}$, and S for storing the reconstructed lower quantization levels, upper quantization levels, means, differences, and secret data, respectively.
- Step 2:
- Read eight bits sequentially from $C{S}_{f}$ and convert them into integers. Place the converted integers in the first row and the first column of ${\left\{{m}_{i}\right\}}_{i=1}^{N}$.
- Step 3:
- Read the next n bits from $C{S}_{f}$ and append them to S.
- Step 4:
- Visit the unrecovered means, ${m}_{i}$, in ${\left\{{m}_{i}\right\}}_{i=1}^{N}$ using the raster scanning order. Use Equation (1) to predict ${m}_{i}$, and obtain the prediction value, ${p}_{i}$.
- Step 5:
- Read the next two bits, ${\left\{{t}_{j}\right\}}_{j=1}^{2}$, from $C{S}_{f}$, and use the following rules to recover ${m}_{i}$:
- Case 1:
- If ${\left\{{t}_{j}\right\}}_{j=1}^{2}=$‘00’, ${m}_{i}={p}_{i}$.
- Case 2:
- If ${\left\{{t}_{j}\right\}}_{j=1}^{2}=$‘01’, read the next bit, $t$, from $C{S}_{f}$. If $t$ = ‘0’, read the next $\alpha $ bits, ${\left\{{t}_{j}\right\}}_{j=1}^{\alpha}$, from $C{S}_{f}$. The mean, ${m}_{i}$, is recovered by ${m}_{i}={p}_{i}+{({\left\{{t}_{j}\right\}}_{j=1}^{\alpha})}_{10}+1$, where ${(y)}_{10}$ represents the decimal value of bitstream y. If $t$ = ‘1’, read the next $\beta $ bits ${\left\{{t}_{j}\right\}}_{j=1}^{\beta}$ from $C{S}_{f}$. The mean, ${m}_{i}={p}_{i}+{({\left\{{t}_{j}\right\}}_{j=1}^{\beta})}_{10}+{2}^{\alpha}+1$, is recovered.
- Case 3:
- If ${\left\{{t}_{j}\right\}}_{j=1}^{2}=$‘10’, read the next bit, $t$, from $C{S}_{f}$. If $t$ = ‘0’, read the next $\alpha $ bits, ${\left\{{t}_{j}\right\}}_{j=1}^{\alpha}$, from $C{S}_{f}$. The mean, ${m}_{i}$, is recovered by ${m}_{i}={p}_{i}-{({\left\{{t}_{j}\right\}}_{j=1}^{\alpha})}_{10}-1$. If $t$ = ‘1’, read the next $\beta $ bits, ${\left\{{t}_{j}\right\}}_{j=1}^{\beta}$, from $C{S}_{f}$. The mean, ${m}_{i}={p}_{i}-{({\left\{{b}_{j}\right\}}_{j=1}^{\beta})}_{10}-{2}^{\alpha}-1$, is recovered.
- Case 4:
- If ${\left\{{t}_{j}\right\}}_{j=1}^{2}$= ‘11’, read the next eight bits ${\left\{{t}_{j}\right\}}_{j=1}^{8}$ from $C{S}_{f}$, and the mean,${m}_{i}={({\left\{{t}_{j}\right\}}_{j=1}^{8})}_{10}$, is recovered.

- Step 6:
- Perform Steps 3–5 until all the means ${\left\{{m}_{i}\right\}}_{i=1}^{N}$ are recovered.
- Step 7:
- Recover the differences ${\left\{{d}_{i}\right\}}_{i=1}^{N}$ and extract data bits embedded in ${\left\{{d}_{i}\right\}}_{i=1}^{N}$. The procedures are similar to Steps 2–6.
- Step 8:
- Extract the remaining bits in $C{S}_{f}$ and rearrange them to obtain ${\left\{{B}_{i}\right\}}_{i=1}^{N}$. Transform ${\left\{{m}_{i}\right\}}_{i=1}^{N}$ and ${\left\{{d}_{i}\right\}}_{i=1}^{N}$ into ${\left\{{a}_{i}\right\}}_{i=1}^{N}$ and ${\left\{{b}_{i}\right\}}_{i=1}^{N}$ using Equation (3); the original AMBTC codes, ${\{{a}_{i},{b}_{i},{B}_{i}\}}_{i=1}^{N}$, can be reconstructed.

## 4. Experimental Results

#### 4.1. Performance Evaluation of the Proposed Method

#### 4.2. Comparison with Other Works

## 5. Conclusions

## Author Contributions

## Acknowledgments

## Conflicts of Interest

## References

- Hong, W.; Chen, T.S. A Novel Data Embedding Method Using Adaptive Pixel Pair Matching. IEEE Trans. Inf. Forensics Secur.
**2012**, 7, 176–184. [Google Scholar] [CrossRef] - Liu, Y.; Chang, C.C.; Huang, P.C.; Hsu, C.Y. Efficient Information Hiding Based on Theory of Numbers. Symmetry
**2018**, 10, 19. [Google Scholar] [CrossRef] - Xie, X.Z.; Lin, C.C.; Chang, C.C. Data Hiding Based on A Two-Layer Turtle Shell Matrix. Symmetry
**2018**, 13, 47. [Google Scholar] [CrossRef] - Hong, W.; Chen, T.S.; Chen, J. Reversible Data Hiding Using Delaunay Triangulation and Selective Embedment. Inf. Sci.
**2015**, 308, 140–154. [Google Scholar] [CrossRef] - Chen, J. A PVD-Based Data Hiding Method with Histogram Preserving Using Pixel Pair Matching. Signal Process. Image Commun.
**2014**, 29, 375–384. [Google Scholar] [CrossRef] - Chen, H.; Ni, J.; Hong, W.; Chen, T.S. High-Fidelity Reversible Data Hiding Using Directionally-Enclosed Prediction. IEEE Signal Process. Lett.
**2017**, 24, 574–578. [Google Scholar] [CrossRef] - Lee, C.F.; Weng, C.Y.; Chen, K.C. An Efficient Reversible Data Hiding with Reduplicated Exploiting Modification Direction Using Image Interpolation and Edge Detection. Multimedia Tools Appl.
**2017**, 76, 9993–10016. [Google Scholar] [CrossRef] - Tian, J. Reversible Data Embedding Using a Difference Expansion. IEEE Trans. Circuits Syst. Video Technol.
**2003**, 13, 890–896. [Google Scholar] [CrossRef] - Ni, Z.; Shi, Y.Q.; Ansari, N.; Su, W. Reversible Data Hiding. IEEE Trans. Circuits Syst. Video Technol.
**2006**, 16, 354–362. [Google Scholar] - Chen, J.; Hong, W.; Chen, T.S.; Shiu, C.W. Steganography for BTC Compressed Images Using No Distortion Technique. Image Sci. J.
**2010**, 58, 177–185. [Google Scholar] [CrossRef] - Chang, C.C.; Kieu, T.D.; Wu, W.C. A Lossless Data Embedding Technique by Joint Neighboring Coding. Pattern Recognit.
**2009**, 42, 1597–1603. [Google Scholar] [CrossRef] - Kieu, D.; Rudder, A. A Reversible Steganographic Scheme for VQ Indices Based on Joint Neighboring and Predictive Coding. Multimedia Tools Appl.
**2016**, 75, 13705–13731. [Google Scholar] [CrossRef] - Lin, C.C.; Liu, X.L.; Yuan, S.M. Reversible Data Hiding for VQ-Compressed Images Based on Search-Order Coding and Sate-Codebook Mapping. Inf. Sci.
**2015**, 293, 314–326. [Google Scholar] [CrossRef] - Chang, C.C.; Liu, X.L.; Lin, C.C.; Yuan, S.M. A High-Payload Reversible Data Hiding Scheme Based on Histogram Modification in JPEG Bitstream. Imaging Sci. J.
**2016**, 7, 364–373. [Google Scholar] - Hong, W. Efficient Data Hiding Based on Block Truncation Coding Using Pixel Pair Matching Technique. Symmetry
**2018**, 10, 36. [Google Scholar] [CrossRef] - Zhang, Y.; Guo, S.Z.; Lu, Z.M.; Luo, H. Reversible Data Hiding for BTC-Compressed Images Based on Lossless Coding of Mean Tables. IEICE Trans. Commun.
**2013**, 96, 624–631. [Google Scholar] [CrossRef] - Sun, W.; Lu, Z.M.; Wen, Y.C.; Yu, F.X.; Shen, R.J. High Performance Reversible Data Hiding for Block Truncation Coding Compressed Images. Signal Image Video Process.
**2013**, 7, 297–306. [Google Scholar] [CrossRef] - Hong, W.; Ma, Y.; Wu, H.C.; Chen, T.S. An Efficient Reversible Data Hiding Method for AMBTC Compressed Images. Multimedia Tools Appl.
**2017**, 76, 5441–5460. [Google Scholar] [CrossRef] - Chang, C.C.; Chen, T.S.; Wang, Y.K.; Liu, Y. A Reversible Data Hiding Scheme Based on Absolute Moment Block Truncation Coding Compression Using Exclusive OR Operator. Multimedia Tools Appl.
**2018**, 77, 9039–9053. [Google Scholar] [CrossRef] - Lema, M.; Mitchell, O. Absolute Moment Block Truncation Coding and Its Application to Color Image. IEEE Trans. Commun.
**1984**, 32, 1148–1157. [Google Scholar] [CrossRef] - Hong, W.; Chen, M.; Chen, T.S.; Huang, C.C. An Efficient Authentication Method for AMBTC Compressed Images Using Adaptive Pixel Pair Matching. Multimedia Tools Appl.
**2018**, 77, 4677–4695. [Google Scholar] [CrossRef] - Chen, T.H.; Chang, T.C. On The Security of A BTC-Based-Compression Image Authentication Scheme. Multimedia Tools Appl.
**2017**, 77, 12979–12989. [Google Scholar] [CrossRef] - Malik, A.; Sikka, G.; Verma, H.K. An AMBTC Compression Based Data Hiding Scheme Using Pixel Value Adjusting Strategy. Multidimensional Syst. Signal Process.
**2017**, 1–18. [Google Scholar] [CrossRef] - The USC-SIPI Image Database. Available online: http://sipi.usc.edu/database (accessed on 29 March 2018).
- BOWS-2 Image Database. Available online: http://bows2.gipsa-lab.inpg.fr (accessed on 29 March 2018).

**Figure 2.**Case classification of centralized error division (CED) and the proposed adaptive case classification (ACC).

**Figure 4.**Quantization levels and transformed means and differences. (

**a**) Upper quantization levels; (

**b**) Lower quantization levels; (

**c**) Means and (

**d**) Differences.

Case | Indicator | Range of Prediction Errors | Code Length | |
---|---|---|---|---|

case 1 | ‘00’ | $e=0$ | 2 | |

case 2 | case 2a | ‘010’ | $1\le e\le {2}^{\alpha}$ | $3+\alpha $ |

case 2b | ‘011’ | ${2}^{\alpha}+1\le e\le {2}^{\alpha}+{2}^{\beta}$ | $3+\beta $ | |

case 3 | case 3a | ‘100’ | $-{2}^{\alpha}\le e\le -1$ | $3+\alpha $ |

case 3b | ‘101’ | $-({2}^{\alpha}+{2}^{\beta})\le e\le -({2}^{\alpha}+1)$ | $3+\beta $ | |

case 4 | ‘11’ | $e\ge {2}^{\alpha}+{2}^{\beta}+1$ or $e\le -({2}^{\alpha}+{2}^{\beta}+1)$ | $2+8=10$ |

Images | Lena | Tiffany | Jet | Peppers | Stream | Baboon |
---|---|---|---|---|---|---|

$(\alpha ,\beta )$ | (1,3) | (1,3) | (1,3) | (1,3) | (3,4) | (3,4) |

$B{R}_{p}$ | 1.68 | 1.64 | 1.67 | 1.68 | 1.83 | 1.84 |

Metric | Methods | Lena | Tiffany | Jet | Peppers | Stream | Baboon |
---|---|---|---|---|---|---|---|

PSNR | 33.24 | 35.77 | 31.97 | 33.42 | 28.59 | 26.98 | |

Payload | [16] | 32,768 | 32,768 | 32,768 | 32,768 | 32,768 | 32,768 |

[17] | 64,008 | 64,008 | 64,008 | 64,008 | 64,008 | 64,008 | |

[18] | 64,516 | 64,516 | 64,516 | 64,516 | 64,516 | 64,516 | |

[19] | 64,008 | 64,008 | 64,008 | 64,008 | 64,008 | 64,008 | |

Proposed | 64,516 | 64,516 | 64,516 | 64,516 | 64,516 | 64,516 | |

Embedding Efficiency | [16] | 0.066 | 0.067 | 0.066 | 0.065 | 0.062 | 0.063 |

[17] | 0.116 | 0.118 | 0.116 | 0.116 | 0.111 | 0.112 | |

[18] | 0.123 | 0.125 | 0.124 | 0.123 | 0.117 | 0.116 | |

[19] | 0.118 | 0.121 | 0.119 | 0.118 | 0.112 | 0.113 | |

Proposed | 0.128 | 0.130 | 0.128 | 0.128 | 0.119 | 0.118 | |

Pure Bitrate | [16] | 1.77 | 1.75 | 1.76 | 1.79 | 1.88 | 1.87 |

[17] | 1.86 | 1.82 | 1.86 | 1.86 | 1.95 | 1.94 | |

[18] | 1.75 | 1.72 | 1.74 | 1.76 | 1.86 | 1.88 | |

[19] | 1.82 | 1.78 | 1.80 | 1.83 | 1.94 | 1.92 | |

Proposed | 1.68 | 1.64 | 1.67 | 1.68 | 1.83 | 1.84 |

© 2018 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Hong, W.; Zhou, X.; Weng, S.
Joint Adaptive Coding and Reversible Data Hiding for AMBTC Compressed Images. *Symmetry* **2018**, *10*, 254.
https://doi.org/10.3390/sym10070254

**AMA Style**

Hong W, Zhou X, Weng S.
Joint Adaptive Coding and Reversible Data Hiding for AMBTC Compressed Images. *Symmetry*. 2018; 10(7):254.
https://doi.org/10.3390/sym10070254

**Chicago/Turabian Style**

Hong, Wien, Xiaoyu Zhou, and Shaowei Weng.
2018. "Joint Adaptive Coding and Reversible Data Hiding for AMBTC Compressed Images" *Symmetry* 10, no. 7: 254.
https://doi.org/10.3390/sym10070254