A JPEG Reversible Data Hiding Algorithm Based on Block Smoothness Estimation and Optimal Zero Coefficient Selection
Abstract
1. Introduction
- Propose a block smoothness estimation strategy. By evaluating the smoothness of all quantised DCT coefficient blocks and sorting them in descending order of estimated values, blocks with higher smoothness are prioritised for information embedding to enhance embedding efficiency and visual quality.
- Propose an optimal zero coefficient selection strategy. Each DCT block undergoes a zig-zag scan and is divided into embedding regions (containing low-frequency coefficients) and non-embedding regions (containing mid-to-high-frequency coefficients) based on a preset position threshold T. Non-embedding regions remain unchanged to preserve image quality and control file size growth. Within embedding regions, the frequency of zero coefficients at each position across all blocks is counted. Prioritising positions with the highest zero coefficient frequency for information embedding is performed, subject to embedding payload constraints.
- To minimise the ineffective displacement of non-zero coefficients during embedding, positive and negative displacement gaps, Gp and Gn, are established. Displacement adjustments are applied only to non-zero coefficients within the interval (Gn, Gp), thereby significantly reducing unnecessary modifications and preserving high image reconstruction quality.
2. Related Work
JPEG Image Analysis
3. The Proposed Scheme
3.1. Block Smoothness Estimation Strategy
3.2. Optimal Zero Coefficient Selection Strategy
3.3. Data Embedding
3.4. Data Extraction and Image Recovery
4. Experiment and Result Analysis
4.1. Embedded Capacity
4.2. Visual Quality
4.3. File Extension
4.4. Time Complexity
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Fridrich, J.; Goljan, M.; Chen, Q.; Pathak, V. Lossless data embedding with file size preservation. In Proceedings of the Security, Steganography, and Watermarking of Multimedia Contents VI, San Jose, CA, USA, 19–22 January 2004; SPIE: Bellingham, WA, USA, 2004; Volume 5306, pp. 354–365. [Google Scholar]
- Wang, K.; Lu, Z.M.; Hu, Y.J. A high capacity lossless data hiding scheme for JPEG images. J. Syst. Softw. 2013, 86, 1965–1975. [Google Scholar] [CrossRef]
- Fridrich, A.J.; Goljan, M.; Du, R. Lossless data embedding for all image formats. Proc. SPIE 2002, 4675, 572–583. [Google Scholar]
- Chang, C.-C.; Lin, C.-C.; Tseng, C.-S.; Tai, W.-L. Reversible hiding in DCT-based compressed images. Inf. Sci. 2007, 177, 2768–2786. [Google Scholar] [CrossRef]
- Mobasseri, B.G.; Berger, I.R.J.; Marcinak, M.P.; NaikRaikar, Y.J. Data Embedding in JPEG Bitstream by Code Mapping. IEEE Trans. Image Process. 2010, 19, 958–966. [Google Scholar] [CrossRef] [PubMed]
- Qian, Z.; Zhang, X. Lossless data hiding in JPEG bitstream. J. Syst. Softw. 2012, 85, 309–313. [Google Scholar] [CrossRef]
- Hu, Y.; Wang, K.; Lu, Z.M. An improved VLC-based lossless data hiding scheme for JPEG images. J. Syst. Softw. 2013, 86, 2166–2173. [Google Scholar] [CrossRef]
- Qiu, Y.; He, H.; Qian, Z.; Li, S.; Zhang, X. Lossless data hiding in JPEG bitstream using alternative embedding. J. Vis. Commun. Image Represent. 2018, 52, 86–91. [Google Scholar] [CrossRef]
- Wu, Y.; Deng, R.H. Zero-error watermarking on jpeg images by shuffling Huffman tree nodes. In Proceedings of the 2011 Visual Communications and Image Processing (VCIP), Tainan, Taiwan, 6–9 November 2011; IEEE: New York, NY, USA, 2011; pp. 1–4. [Google Scholar]
- Xiong, W.; Cao, C.; Wang, X.; Shao, Y.; Zhou, M. Reversible data hiding in JPEG images based on improved frequency selection and mapping strategy. Digit. Signal Process. 2025, 156, 104754. [Google Scholar] [CrossRef]
- Du, Y.; Yin, Z.; Zhang, X. High capacity lossless data hiding in JPEG bitstream based on general VLC mapping. IEEE Trans. Dependable Secur. Comput. 2020, 19, 1420–1433. [Google Scholar] [CrossRef]
- Huang, F.; Qu, X.; Kim, H.J.; Huang, J. Reversible data hiding in JPEG images. IEEE Trans. Circuits Syst. Video Technol. 2016, 26, 1610–1621. [Google Scholar] [CrossRef]
- Hou, D.; Wang, H.; Zhang, W.; Yu, N. Reversible data hiding in JPEG image based on DCT frequency and block selection. Signal Process. 2018, 148, 41–47. [Google Scholar] [CrossRef]
- Wedaj, F.T.; Kim, S.; Kim, H.J.; Huang, F. Improved reversible data hiding in JPEG images based on new coefficient selection strategy. EURASIP J. Image Video Process. 2017, 2017, 63. [Google Scholar] [CrossRef]
- He, J.; Chen, J.; Tang, S. Reversible data hiding in JPEG images based on negative influence models. IEEE Trans. Inf. Forensics Secur. 2019, 15, 2121–2133. [Google Scholar] [CrossRef]
- He, J.; Pan, X.; Wu, H.-T.; Tang, S. Improved block ordering and frequency selection for reversible data hiding in JPEG images. Signal Process. 2020, 175, 107647. [Google Scholar] [CrossRef]
- Yin, Z.; Ji, Y.; Luo, B. Reversible data hiding in JPEG images with multi-objective optimization. IEEE Trans. Circuits Syst. Video Technol. 2020, 30, 2343–2352. [Google Scholar] [CrossRef]
- Xiao, M.; Li, X.; Ma, B.; Zhang, X.; Zhao, Y. Efficient reversible data hiding for JPEG images with multiple histograms modification. IEEE Trans. Circuits Syst. Video Technol. 2020, 31, 2535–2546. [Google Scholar] [CrossRef]
- Xiao, M.; Li, X.; Zhao, Y. Reversible data hiding for JPEG images based on multiple two-dimensional histograms. IEEE Signal Process. Lett. 2021, 28, 1620–1624. [Google Scholar] [CrossRef]
- Yang, X.; Wu, T.; Huang, F. Reversible data hiding in JPEG images based on coefficient-first selection. Signal Process. 2022, 200, 108639. [Google Scholar] [CrossRef]
- Li, N.; Huang, F. Reversible data hiding for JPEG images based on pairwise nonzero AC coefficient expansion. Signal Process. 2020, 171, 107476. [Google Scholar] [CrossRef]
- Ou, B.; Li, X.; Zhao, Y.; Ni, R.; Shi, Y.-Q. Pairwise prediction-error expansion for efficient reversible data hiding. IEEE Trans. Image Process. 2013, 22, 5010–5021. [Google Scholar] [CrossRef] [PubMed]
- Li, F.; Zhang, L.; Qin, C.; Wu, K. Reversible data hiding for JPEG images with minimum additive distortion. Inf. Sci. 2022, 595, 142–158. [Google Scholar] [CrossRef]
- Li, F.; Qi, Z.; Zhang, X.; Qin, C. JPEG reversible data hiding using dynamic distortion optimizing with frequency priority reassignment. IEEE Trans. Circuits Syst. Video Technol. 2022, 32, 8849–8863. [Google Scholar] [CrossRef]
- Li, F.; Qi, Z.; Zhang, X.; Qin, C. Progressive histogram modification for JPEG reversible data hiding. IEEE Trans. Circuits Syst. Video Technol. 2023, 34, 1241–1254. [Google Scholar] [CrossRef]
- Di, F.; Zhang, M.; Huang, F.; Liu, J.; Kong, Y. Reversible data hiding in JPEG images based on zero coefficients and distortion cost function. Multimed. Tools Appl. 2019, 78, 34541–34561. [Google Scholar] [CrossRef]
- Yin, X.; Wu, S.; Chen, B.; Wang, K.; Lu, W. Reversible data hiding in JPEG document images based on zero coefficients embedding. Signal Process. 2023, 206, 108917. [Google Scholar] [CrossRef]
- Huynh, V.T.; Vo, P.H.; Nguyen, T.S. A Novel Reversible Data Hiding for JPEG Images Based on Zero AC Coefficients Shifting. In Proceedings of the International Symposium on Information and Communication Technology, Danang, Vietnam, 13–15 December 2024; Springer Nature: Singapore, 2024; pp. 353–363. [Google Scholar]
- Image Database of BOSSbase 1.01. Available online: http://dde.binghamton.edu/download/ (accessed on 15 July 2024).
- Anon. The USC-SIPI Image Database [EB/OL]. Available online: https://www.doc88.com/p-694588069958.html (accessed on 12 September 2012).
- Woods, L. Website of the independent JPEG group. J. Physiol. 1988, 393, 213–231. [Google Scholar]
Image | Method | QF = 50 | QF = 60 | QF = 70 | QF = 80 | QF = 90 | QF = 100 |
---|---|---|---|---|---|---|---|
Boat | Huang et al. | 21,901 | 22,016 | 25,098 | 28,165 | 36,912 | 60,992 |
Hou et al. | 22,931 | 23,012 | 26,192 | 29,215 | 36,911 | 61,202 | |
Yin et al. | 63,189 | 54,244 | 43,065 | 32,563 | 20,987 | 19,308 | |
Huynh et al. | 63,110 | 54,120 | 42,852 | 31,938 | 19,983 | 19,202 | |
Proposed | 70,236 | 61,923 | 49,659 | 38,956 | 26,689 | 26,000 | |
Barbara | Huang et al. | 22,087 | 23,958 | 26,334 | 29,650 | 37,150 | 61,259 |
Hou et al. | 23,165 | 24,756 | 27,123 | 30,162 | 38,165 | 61,965 | |
Yin et al. | 54,271 | 44,292 | 33,780 | 22,847 | 18,368 | 14,658 | |
Huynh et al. | 54,153 | 44,037 | 33,562 | 23,023 | 19,380 | 15,834 | |
Proposed | 61,923 | 51,093 | 40,692 | 30,909 | 26,900 | 22,690 | |
F16 | Huang et al. | 15,315 | 17,447 | 20,536 | 25,636 | 36,032 | 68,519 |
Hou et al. | 16,138 | 18,135 | 21,286 | 26,562 | 37,956 | 69,101 | |
Yin et al. | 58,262 | 47,451 | 36,956 | 25,983 | 20,165 | 18,659 | |
Huynh et al. | 58,923 | 47,238 | 36,952 | 25,953 | 20,896 | 18,364 | |
Proposed | 65,981 | 54,110 | 43,198 | 32,198 | 27,569 | 25,928 | |
Baboon | Huang et al. | 35,279 | 38,712 | 43,488 | 51,342 | 64,135 | 20,773 |
Hou et al. | 36,572 | 39,116 | 44,219 | 52,110 | 65,181 | 21,924 | |
Yin et al. | 58,037 | 49,504 | 40,839 | 30,563 | 21,034 | 19,563 | |
Huynh et al. | 57,490 | 48,983 | 40,392 | 30,001 | 20,183 | 18,360 | |
Proposed | 64,269 | 55,386 | 47,923 | 37,619 | 27,165 | 25,649 |
Images | Huang et al. | Hou et al. | Yin et al. | Van et al. | Proposed |
---|---|---|---|---|---|
Barbara | 0.32 | 18.30 | 7.20 | 5.90 | 5.24 |
F16 | 0.34 | 18.43 | 7.49 | 6.01 | 5.59 |
Baboon | 0.42 | 18.92 | 7.69 | 6.23 | 5.81 |
Boat | 0.34 | 18.12 | 6.24 | 5.88 | 5.39 |
Average | 0.35 | 18.44 | 7.15 | 6.00 | 5.51 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 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 (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Yue, Y.; Zhang, M.; Lai, P.; Di, F. A JPEG Reversible Data Hiding Algorithm Based on Block Smoothness Estimation and Optimal Zero Coefficient Selection. Appl. Sci. 2025, 15, 10282. https://doi.org/10.3390/app151810282
Yue Y, Zhang M, Lai P, Di F. A JPEG Reversible Data Hiding Algorithm Based on Block Smoothness Estimation and Optimal Zero Coefficient Selection. Applied Sciences. 2025; 15(18):10282. https://doi.org/10.3390/app151810282
Chicago/Turabian StyleYue, Ya, Minqing Zhang, Peizheng Lai, and Fuqiang Di. 2025. "A JPEG Reversible Data Hiding Algorithm Based on Block Smoothness Estimation and Optimal Zero Coefficient Selection" Applied Sciences 15, no. 18: 10282. https://doi.org/10.3390/app151810282
APA StyleYue, Y., Zhang, M., Lai, P., & Di, F. (2025). A JPEG Reversible Data Hiding Algorithm Based on Block Smoothness Estimation and Optimal Zero Coefficient Selection. Applied Sciences, 15(18), 10282. https://doi.org/10.3390/app151810282