Influential Metrics Estimation and Dynamic Frequency Selection Based on Two-Dimensional Mapping for JPEG-Reversible Data Hiding
Abstract
:1. Introduction
- We implement a dynamic frequency selection method based on a recoverable frequency order to ascertain the most suitable frequencies to embed data;
- We document the run length of NZACPs during their construction, facilitating the prospective estimation of file size increment and visual distortion;
- We group image blocks based on their metrics and adaptively prioritize the appropriate block groups for data embedding.
2. Preliminary Knowledge
2.1. Overview of JPEG Compression
- Step 1: Scan the block in a zigzag pattern to obtain a coefficient sequence.
- Step 2: Convert the coefficient sequence to an RSV sequence. RSV is constructed for non-zero coefficients in sequences. For each non-zero coefficient, it is converted to the number of zero coefficients between the previous non-zero coefficient and current coefficient, the length of the binary representation of the coefficient, and the binary representation of the coefficient; note that the first element should not exceed 15. If there are 16 consecutive zeros, construct an RSV with the values . In addition, when encountering negative numbers, the representation method for the third element is to invert the highest bit of its binary representation of its absolute value.
- Step 3: Merge the first two elements in RSV into a single byte, with the top 4 bits and the bottom 4 bits representing the two elements, respectively. Due to the limitations on element values during the RSV construction process, there will be no overflow or other issues during merging.
- Step 4: The Huffman table in the JPEG Header contains a value table and a bit table. The value table corresponds one-to-one with the merged byte, and the bit table determines the length of the encoding corresponding to that byte. Based on these two tables, the byte can be converted into a Huffman code (also known as VLC in JPEG encoding).
- Step 5: Merge the obtained Huffman code with the third element of the RSV; at this point, the RSV is converted into a binary sequence; After converting all RSVs within the block, convert the entire binary sequence to hexadecimal.
2.2. Overview of HS-Based RDH
2.3. File Size Increment Table
2.4. The Laplacian Cumulative Distribution Function
2.5. Distortion Calculation
3. Proposed Method
3.1. Theoretical Foundation
3.2. Block Pre-Processing
3.3. Dynamic Frequency Selection
3.4. Two-Dimensional Mapping Generation
- Type A: They are defined by the set . When embedding data, they stay the same when they encounter a 0. If they encounter a 1, they look back one place, and the coefficient pairs are shifted 1 place on the x-axis if the next place is a 0, and 1 place on the y-axis if the next place is a 1.
- Type B: They fall within or . When embedding data, a 0 is shifted 1 bit on the x-axis or y-axis when encountered; if a 1 is encountered it is shifted 1 bit along the diagonal direction.
- Type C: They are categorized as . When embedding data, they stay the same when they encounter a 0 as Type A; if a 1 is encountered it is shifted 1 bit along the diagonal direction as Type B.
- Type D: All remaining coefficient pairs are classified as Type D and are solely shifted diagonally. This shifting is primarily utilized to maintain reversibility and does not embed secret data.
3.5. Influential Model Construction
3.6. Adaptive Block Grouping
3.7. Data Embedding and Extracting
- Step 1: Decode the original JPEG bitstream to obtain the quantized DCT coefficient matrix and the quantization table. Initialize the total distortion to positive infinity. Arrange all DCT blocks by their own in descending order.
- Step 2: Compute the unit distortion for all frequency bands, considering Equation (22) to set their initial priorities.
- Step 3: Select frequencies based on the payload P and offset O. Apply the 2D mapping strategy to construct NZACPs on the sorted K blocks and , and compute the of each block.
- Step 4: Group the blocks by . Sort and select M block groups for data embedding.
- Step 5: Simulate the embedding of secret data and record the total distortion T. If , then , and keep record of the auxiliary data for this case. If all the O have been traversed, then go to Step 6, otherwise go back to Step 3.
- Step 6: Sequentially embed secret data in the optimal frequency band set and M selected block groups. Then, encode the DCT coefficients with secret data as the marked image.
- Step 1: Extract the auxiliary data , M, and P from the reserved space within the JPEG Header.
- Step 2: Recover the optimal frequency band set with Equation (22) and . The equation can restore the order of frequencies and is the first frequencies in the order.
- Step 3: Rearrange the block order with . As remains unchanged after data embedding, the block order can be directly restored.
- Step 4: Reconstruct the NZACPs by utilizing in conjunction with the M block groups. Then, from Figure 2b, we can easily identify the type of NZACP with secret data, as well as ascertain the shifting direction for image recovery and the extraction of the corresponding data.
- Step 5: Sequentially extract the secret data and recover DCT coefficients via an inverse 2D mapping shift. Then, encode the restored DCT coefficients to obtain the original image.
4. Experimental Results
4.1. Experimental Setup
4.2. Assessment of Visual Quality and File Size Increment
4.2.1. Evaluating against One-Dimensional Methodologies
4.2.2. Evaluating against Two-Dimensional Methodologies
4.3. Evaluating against the State of the Arts
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Fridrich, J.; Goljan, M.; Du, R. Lossless data embedding for all image formats. In Proceedings of the Security and Watermarking of Multimedia Contents IV, San Jose, CA, USA, 19–25 January 2002; Volume 4675, pp. 572–583. [Google Scholar] [CrossRef]
- 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]
- Qian, Z.; Zhang, X. Lossless data hiding in JPEG bitstream. J. Syst. Softw. 2012, 85, 309–313. [Google Scholar] [CrossRef]
- Du, Y.; Yin, Z.; Zhang, X. Improved lossless data hiding for JPEG images based on histogram modification. Comput. Mater. Contin. 2018, 55, 495–507. [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]
- Du, Y.; Yin, Z. New framework for code-mapping-based reversible data hiding in JPEG images. Inf. Sci. 2022, 609, 319–338. [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]
- 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. 2021, 31, 2535–2546. [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]
- 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]
- Weng, S.; Zhou, Y.; Zhang, T. Adaptive reversible data hiding for JPEG images with multiple two-dimensional histograms. J. Vis. Commun. Image Represent. 2022, 85, 103487. [Google Scholar] [CrossRef]
- Weng, S.; Zhou, Y.; Zhang, T.; Xiao, M.; Zhao, Y. General Framework to Reversible Data Hiding for JPEG Images with Multiple Two-Dimensional Histograms. IEEE Trans. Multimed. 2022, 25, 5747–5762. [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]
- Weng, S.; Zhou, Y.; Zhang, T.; Xiao, M.; Zhao, Y. Reversible Data Hiding for JPEG Images with Adaptive Multiple Two-Dimensional Histogram and Mapping Generation. IEEE Trans. Multimed. 2023, 25, 8738–8752. [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. 2020, 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]
- Lam, E.; Goodman, J. A mathematical analysis of the DCT coefficient distributions for images. IEEE Trans. Image Process. 2000, 9, 1661–1666. [Google Scholar] [CrossRef] [PubMed]
- Smoot, S.R.; Rowe, L.A. DCT coefficient distributions. In Proceedings of the Human Vision and Electronic Imaging, San Jose, CA, USA, 28 January 1996; Volume 2657, pp. 403–411. [Google Scholar]
Images | Metric | Huang [7] | Hou [8] | Yin [9] | He [17] | Our | |||||
---|---|---|---|---|---|---|---|---|---|---|---|
5000 | 10,000 | 5000 | 10,000 | 5000 | 10,000 | 5000 | 10,000 | 5000 | 10,000 | ||
Lena | PSNR | 54.393 | 50.989 | 54.945 | 51.365 | 55.561 | 51.693 | 55.418 | 51.913 | 55.623 | 52.053 |
FSI | 7624 | 14,328 | 6560 | 13,464 | 5672 | 11,624 | 6392 | 12,080 | 5264 | 9992 | |
Baboon | PSNR | 49.236 | 45.323 | 49.636 | 45.330 | 49.963 | 45.664 | 50.493 | 46.225 | 50.836 | 46.550 |
FSI | 8360 | 17,008 | 7536 | 17,000 | 7712 | 16,008 | 7544 | 16,736 | 7328 | 14,416 | |
Tiffany | PSNR | 52.560 | 49.034 | 53.335 | 49.578 | 53.883 | 50.002 | 54.170 | 50.810 | 54.348 | 51.005 |
FSI | 7696 | 14,968 | 6328 | 14,032 | 6160 | 12,856 | 6560 | 11,688 | 5608 | 10,632 | |
Peppers | PSNR | 52.975 | 49.169 | 54.047 | 50.117 | 54.608 | 50.472 | 54.859 | 51.393 | 55.092 | 51.502 |
FSI | 8048 | 14,848 | 6872 | 14,376 | 6384 | 12,824 | 6016 | 12,072 | 5408 | 10,688 | |
Couple | PSNR | 51.623 | 47.772 | 52.702 | 48.274 | 53.240 | 48.818 | 53.806 | 49.835 | 53.871 | 49.700 |
FSI | 7328 | 15,208 | 6640 | 14,728 | 6408 | 13,112 | 6408 | 13,520 | 5928 | 12,736 |
Image | Scheme | QF = 70 | QF = 80 | QF = 90 | ||||||
---|---|---|---|---|---|---|---|---|---|---|
6000 | 9000 | 12,000 | 6000 | 9000 | 12,000 | 6000 | 9000 | 12,000 | ||
Lena | Li-N [11] | 46.864 | 44.178 | 41.684 | 50.205 | 47.717 | 45.594 | 54.503 | 52.381 | 50.806 |
Li-F [12] | 46.894 | 44.213 | 41.635 | 50.457 | 47.745 | 45.637 | 54.571 | 52.479 | 50.797 | |
Our | 47.281 | 44.311 | 41.743 | 50.633 | 47.977 | 45.758 | 54.806 | 52.646 | 50.933 | |
Peppers | Li-N [11] | 47.282 | 44.773 | 42.626 | 50.094 | 47.788 | 46.031 | 53.978 | 51.801 | 50.151 |
Li-F [12] | 47.563 | 44.943 | 42.650 | 50.642 | 48.208 | 46.037 | 53.893 | 51.667 | 50.097 | |
Our | 48.030 | 45.262 | 42.832 | 50.683 | 48.354 | 46.428 | 54.219 | 52.100 | 50.446 | |
Tiffany | Li-N [11] | 47.347 | 44.700 | 42.582 | 49.842 | 47.605 | 45.795 | 53.163 | 51.200 | 49.703 |
Li-F [12] | 47.569 | 44.888 | 42.592 | 50.180 | 47.693 | 45.743 | 53.111 | 51.165 | 49.582 | |
Our | 47.897 | 45.005 | 42.770 | 50.393 | 48.027 | 46.046 | 53.452 | 51.525 | 49.985 | |
Goldhill | Li-N [11] | 45.461 | 43.318 | 41.722 | 47.697 | 45.549 | 43.985 | 51.746 | 49.400 | 47.622 |
Li-F [12] | 45.737 | 43.579 | 41.790 | 47.916 | 45.725 | 44.032 | 51.733 | 49.382 | 47.571 | |
Our | 46.082 | 43.842 | 42.065 | 48.270 | 46.034 | 44.426 | 52.143 | 49.623 | 47.852 | |
Splash | Li-N [11] | 47.803 | 45.591 | 43.418 | 50.198 | 48.262 | 46.607 | 53.511 | 51.670 | 50.272 |
Li-F [12] | 47.819 | 45.691 | 43.571 | 50.428 | 48.365 | 46.835 | 53.647 | 51.669 | 50.231 | |
Our | 48.298 | 45.692 | 43.673 | 50.690 | 48.611 | 46.842 | 54.061 | 52.043 | 50.622 |
Image | Scheme | QF = 70 | QF = 80 | QF = 90 | ||||||
---|---|---|---|---|---|---|---|---|---|---|
6000 | 9000 | 12,000 | 6000 | 9000 | 12,000 | 6000 | 9000 | 12,000 | ||
Lena | Li-N [11] | 6536 | 10,304 | 14,552 | 6792 | 10,016 | 13,600 | 6688 | 9512 | 13,064 |
Li-F [12] | 7056 | 10,512 | 14,824 | 6384 | 10,256 | 13,800 | 6536 | 9640 | 12,984 | |
Our | 6488 | 10,096 | 14,528 | 6376 | 9560 | 13,360 | 6232 | 8936 | 12,824 | |
Peppers | Li-N [11] | 6632 | 9864 | 13,312 | 6712 | 9880 | 12,880 | 6816 | 9944 | 13,152 |
Li-F [12] | 6808 | 10,368 | 13,576 | 6144 | 8864 | 13,400 | 6784 | 9560 | 12,792 | |
Our | 6088 | 9160 | 13,240 | 5912 | 8816 | 12,224 | 6440 | 9328 | 12,224 | |
Tiffany | Li-N [11] | 6208 | 9624 | 13,464 | 6184 | 9200 | 12,848 | 7240 | 10,112 | 13,752 |
Li-F [12] | 6696 | 9944 | 13,896 | 5712 | 9456 | 13,192 | 6952 | 9984 | 13,200 | |
Our | 5976 | 9552 | 13,288 | 5528 | 8760 | 11,888 | 6552 | 9776 | 13,176 | |
Goldhill | Li-N [11] | 7512 | 10,664 | 14,520 | 7808 | 11,544 | 15,192 | 7744 | 12,168 | 16,472 |
Li-F [12] | 7312 | 10,728 | 14,312 | 8056 | 11,496 | 15,256 | 7976 | 12,352 | 16,424 | |
Our | 6664 | 9952 | 13,752 | 7368 | 10,856 | 14,480 | 7728 | 12,024 | 16,384 | |
Splash | Li-N [11] | 5520 | 8480 | 12,120 | 6232 | 8776 | 11,648 | 7264 | 10,600 | 13,832 |
Li-F [12] | 6056 | 8904 | 12,488 | 5984 | 9440 | 12,264 | 6728 | 10,528 | 14,280 | |
Our | 5520 | 8552 | 12,072 | 5640 | 8648 | 11,456 | 6688 | 9912 | 12,968 |
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. |
© 2024 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
Wang, H.; Lu, C. Influential Metrics Estimation and Dynamic Frequency Selection Based on Two-Dimensional Mapping for JPEG-Reversible Data Hiding. Entropy 2024, 26, 301. https://doi.org/10.3390/e26040301
Wang H, Lu C. Influential Metrics Estimation and Dynamic Frequency Selection Based on Two-Dimensional Mapping for JPEG-Reversible Data Hiding. Entropy. 2024; 26(4):301. https://doi.org/10.3390/e26040301
Chicago/Turabian StyleWang, Haiyong, and Chentao Lu. 2024. "Influential Metrics Estimation and Dynamic Frequency Selection Based on Two-Dimensional Mapping for JPEG-Reversible Data Hiding" Entropy 26, no. 4: 301. https://doi.org/10.3390/e26040301
APA StyleWang, H., & Lu, C. (2024). Influential Metrics Estimation and Dynamic Frequency Selection Based on Two-Dimensional Mapping for JPEG-Reversible Data Hiding. Entropy, 26(4), 301. https://doi.org/10.3390/e26040301