A JPEG reversible data hiding method based on chaos theory and histogram shift

Through the method based on chaos theory and histogram shift, the AC coefficient with an absolute value of 1 is selected for data embedding, which solves the balance problem of embedding capacity, visual quality and file size saving in JPEG images, and achieves efficient reversible data hiding.

CN116346998BActive Publication Date: 2025-08-15NORTHEASTERN UNIV CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310369727.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-10
Publication Date
2025-08-15
Estimated Expiration
2043-04-10

AI Technical Summary

Technical Problem

Existing JPEG image reversible data hiding techniques are difficult to achieve a good balance between embedding capacity, visual quality and file size saving, especially in JPEG images, where modifying quantized tables or Huffman tables may lead to increased file size or decreased visual quality.

Method used

A pseudo-random sequence is generated by a segmented linear chaotic system, and the AC coefficient with an absolute value of 1 is selected through the histogram shift strategy for data embedding. The zero AC coefficient is not modified. Combined with the new coefficient block selection strategy, R=p/q is selected to measure the priority of each block and perform data hiding.

Benefits of technology

It achieves high embedding capacity, good visual quality and small file size increase, which is suitable for reversible data hiding of JPEG images, meeting the needs of multiple application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116346998B_ABST
    Figure CN116346998B_ABST
Patent Text Reader

Abstract

The present invention provides a JPEG reversible data hiding method based on chaos theory and histogram shifting. First, a pseudo-random sequence is generated based on a JPEG image using a chaotic system. Then, the JPEG image is entropy decoded to obtain quantized discrete cosine transform (DCT) coefficients, resulting in a DCT coefficient block. All DCT coefficient blocks are scrambled using a pseudo-random sequence x for data embedding, thereby enhancing the concealment and security of data embedding. The present invention does not modify the zero AC coefficients in the quantization block, but only expands the AC coefficients with an absolute value of 1 to carry secret information. Furthermore, a new coefficient block selection strategy is proposed, in which, during the information embedding process, the embedding coefficient block is selected based on the ratio R of the number of AC coefficients with a value of 1 to the number of other non-zero AC coefficients. This method effectively preserves the visual quality and storage size of the image, and has a high embedding capacity, which depends solely on the number of AC coefficients with an absolute value of 1 in the DCT coefficient block.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of reversible data hiding, and in particular to a JPEG reversible data hiding method based on chaos theory and histogram shift. Background Art

[0002] Reversible Data Hiding (RDH), also known as reversible or lossless data hiding, can conceal data in digital images without detection. More importantly, upon extracting the embedded data, the original image can be completely reconstructed without any distortion, making it suitable for a wide range of applications. Among the various digital image formats used in daily life, JPEG is the most popular. Therefore, reversible data hiding (RDH) in JPEG images is crucial and useful for many applications, such as archival management and image authentication. However, RDH in JPEG images is significantly more difficult than in uncompressed images because JPEG images contain less information redundancy than uncompressed images, and any modifications in the compressed domain may distort the host image. Furthermore, in addition to the embedding capacity and fidelity (visual quality) that must be considered for uncompressed images, the storage size of the embedded JPEG file (marker file) must also be considered.

[0003] Currently, there are three main reversible data hiding schemes for JPEG images:

[0004] The first method is based on modifying the JPEG quantization table. "A high capacity lossless data hiding scheme for JPEG images" proposes dividing some elements in the quantization table by an integer and then multiplying the corresponding quantized DCT coefficients by the same integer to create space for embedded information. The second method is based on modifying the Huffman table. "Data embedding in JPEG bitstream by code mapping" points out that the encoder actually only uses a small part of the JPEG coding space, and data embedding can be achieved by mapping the used variable length code (VLC) to the unused VLC. The third method is based on modifying the quantized DCT coefficients. "Reversible data hiding for JPEG images based on histogram pairs" proposes a JPEG image RDH method based on histogram pairs. This method uses the optimal search strategy to shift the quantized DCT coefficient histogram, achieving good performance.

[0005] While data embedding based on modifications to the JPEG quantization table can easily achieve high embedding capacity and visual quality, as we know, the original quantization table of a JPEG file presents a significant trade-off between file size and the perceived quality of the encoded image. This approach may inevitably undermine the balance between file size and the perceived quality of the host JPEG image. In general, the storage size of the marked JPEG file may increase significantly.

[0006] Data hiding based on modified Huffman tables can maintain the visual quality of the embedded JPEG images while maintaining the image's storage size. However, this method's embedding capabilities are quite limited. Typically, only a few hundred bits can be embedded in a standard 512×512 test image, significantly limiting its application scenarios. Furthermore, this method can only be applied to JPEG images encoded using non-optimized Huffman tables.

[0007] Modifying quantized DCT coefficients for data embedding is currently the most popular method and has received considerable attention over the past few years. The paper "Reversible data hiding for JPEG images based on histogrampairs" achieves good performance by embedding only low- and mid-frequency DCT coefficients. However, there is room for improvement in coefficient selection and file size conservation. The fundamental issues of embedding capacity, visual quality, and file size conservation need to be better addressed. Summary of the Invention

[0008] To address the shortcomings of existing technologies and strike a good balance between embedding capacity, visual quality, and file size preservation, this paper proposes a JPEG reversible data hiding method based on chaos theory and histogram shifting. First, a piecewise linear chaotic system (PWLCM) is used as a pseudo-random number generator to generate a pseudo-random key sequence to enhance the confidentiality of information embedding. Second, a new quantized DCT coefficient block selection strategy is adopted to embed secret data in AC coefficients with an absolute value of 1 (the AC component obtained after DCT transformation is referred to as the AC coefficient, and the DC component is referred to as the DC coefficient). Theoretically, this method has good embedding capacity without significantly affecting file size preservation and visual quality.

[0009] To achieve the above technical effects, the present invention proposes a JPEG reversible data hiding method based on chaos theory and histogram shift, comprising the following steps:

[0010] Step 1: Generate a pseudo-random sequence using a chaotic system based on the JPEG image; including:

[0011] Step 1.1: Use the JPEG image as input to the SHA-256 hash function to generate a 256-bit random hash value.

[0012] Step 1.2: Count the number of odd-bit digits of the 256-bit hash value that are 1 (odd) and the number of even-bit digits that are 1 (even);

[0013] Step 1.3: Modify the initial value a0 and control parameter p0 of the PWLCM chaotic system according to the obtained odd and even values. The formula is as follows:

[0014]

[0015] Where a ′ 0 indicates the modified initial value, p ′ 0 indicates the modified control parameter value;

[0016] Step 1.4: Get a ′ 0, p ′ 0 is used as the initial value to iteratively calculate the PWLCM piecewise linear chaotic map to generate a pseudo-random sequence x; the specific expression is:

[0017] The pseudo-random value a1 calculated in the first iteration is expressed as:

[0018]

[0019] The pseudo-random value a calculated at the i+1th iteration i+1 Expressed as:

[0020]

[0021] Set the maximum number of iterations K, where i = 1, 2, ..., K, according to the output of all iterative processes {a′0, a1, ..., a K}Get pseudo-random sequence x;

[0022] Step 2: Obtain quantized discrete cosine transform (DCT) coefficients by entropy decoding the JPEG image to obtain a DCT coefficient block; including:

[0023] Step 2.1: Obtain the compressed data and Huffman coding table of the original JPEG image according to the storage format of the JPEG image;

[0024] Step 2.2: Perform the inverse operation of RLE (Run Length Encoding) on the AC coefficients and the inverse operation of DPCM (Differential Pulse Code Modulation) on the DC coefficients to obtain quantized DCT coefficients;

[0025] Step 2.3: Rearrange the DCT coefficients of the entire image into 8×8 DCT coefficient blocks through ZigZag scanning;

[0026] Step 3: Calculate the number p of AC coefficients whose absolute value of DCT coefficient is 1 (corresponding to 1 and -1) and the number q of other non-zero AC coefficients in each 8×8 DCT coefficient block;

[0027] Step 4: Set the block selection index R to divide all 8×8 DCT coefficient blocks into two parts; including:

[0028] Step 4.1: Calculate the index R = p / q for each 8×8 DCT coefficient block;

[0029] Step 4.2: Sort the 8×8 DCT coefficient blocks in descending order according to the index R;

[0030] Step 4.3: Select T=R j (j=1,2,3…n), R j Indicates the R index of the jth 8×8 DCT coefficient block, n is the number of 8×8 DCT coefficient blocks, and calculates the number of AC coefficients with an absolute value of 1 in the first j 8×8 DCT coefficient blocks p t Indicates the number of AC coefficients with an absolute value of 1 in the t-th 8×8 DCT coefficient block;

[0031] Step 4.4: If S ≥ (L + len1 + len2), determine the current value of T as the threshold for block selection. Otherwise, set j = h + 1 and continue with steps 4.3 to 4.4, where L is the number of bits of the secret information, len1 is the number of bits required for the value of L, and len2 is the number of bits required for the threshold T.

[0032] Step 4.5: Divide all 8×8 DCT coefficient blocks with index R not less than threshold T into the first part for data embedding, and the remaining blocks as the second part;

[0033] Step 5: Embed the auxiliary information required for information extraction and the secret information to be hidden into the 8×8 DCT coefficient block, including:

[0034] Step 5.1: Scramble all 8×8 DCT coefficient blocks using the pseudorandom sequence x. Specifically, sort the pseudorandom sequence x in ascending order, then iterate through the pseudorandom sequence. If the element at position i' in the pseudorandom sequence moves to position j' after sorting, then move the 8×8 DCT coefficient block at position i' to position j' accordingly. Then, set i' = i' + 1 and continue iterating until i' = n, where n is the number of 8×8 DCT coefficient blocks.

[0035] Step 5.2: Embed the auxiliary information required for extracting the secret information. Specifically, for each 8×8 DCT coefficient block, perform a Zigzag scan of the AC coefficients in sequence, and embed the secret information length L (len1 bit) and threshold T (len2 bit) into the host image. The embedding formula is as follows:

[0036]

[0037] Where C i represents the non-zero AC coefficient, b represents the information bit to be embedded, b∈{0,1}, Represents the new AC coefficient after embedding information;

[0038] Step 5.3: Embed secret information. Specifically, traverse each 8×8 DCT coefficient block in turn. If the R index of the accessed 8×8 DCT coefficient block is not less than the threshold T, zigzag scan the AC coefficients of the current coefficient block and embed the secret information bits according to formula (1). Otherwise, no processing is performed and the next 8×8 DCT coefficient block is accessed in the order from left to right and top to bottom.

[0039] Step 6: After all L bits of secret information are embedded, the scrambled 8×8 DCT coefficient block is restored to its original position, and the new coefficient block after the embedded information is entropy encoded to obtain the marked JPEG image.

[0040] The beneficial effects of the present invention are:

[0041] This invention uses the SHA-256 algorithm to modify the initial conditions of the chaotic system, resulting in different pseudo-random sequences for different original images, further enhancing the confidentiality of the information embedding method. Furthermore, this method does not modify the zero AC coefficients in the quantization block; only the AC coefficients with an absolute value of 1 are expanded to carry the secret information. Furthermore, during the information embedding process, the embedding coefficient block is selected based on the ratio R of the number of AC coefficients with a value of 1 to the number of other non-zero coefficients. This effectively preserves the image's visual quality and storage size. However, the embedding capacity of this scheme depends on the number of AC coefficients with an absolute value of 1 in the DCT coefficient block. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 This is a flow chart of the JPEG reversible data hiding method based on chaos theory and histogram shift in the present invention;

[0043] Figure 2 is the standard Lena image in the present invention; wherein (a) is the AC coefficient histogram, and (b) is the non-zero AC coefficient histogram;

[0044] Figure 3is the DCT coefficient histogram in the present invention;

[0045] Figure 4 This is the RDH effect diagram of the present invention, where (a) is the original image of lena, (b) is the image after lena is embedded with 20kbit, (c) is the image of lena after information is extracted, (d) is the original image of baboon, (e) is the image after baboon is embedded with 20kbit, (f) is the image of baboon after information is extracted, (g) is the original image of vegatables, (h) is the image after vegatables is embedded with 20kbit, and (i) is the image of vegatables after information is extracted. DETAILED DESCRIPTION

[0046] The invention will be further described below with reference to the accompanying drawings and specific implementation examples.

[0047] The present invention proposes a JPEG reversible data hiding method based on chaos theory and histogram shift, which uses some JPEG quantized 8×8 DCT (discrete cosine transform) coefficients (abbreviated as JPEG coefficients) blocks for reversible data hiding. The specific flow chart is as follows: Figure 1 As shown, the following steps are included:

[0048] Step 1: Generate a pseudo-random sequence using a chaotic system based on the JPEG image; including:

[0049] Step 1.1: Use the JPEG image as input to the SHA-256 hash function to generate a 256-bit random hash value.

[0050] Step 1.2: Count the number of odd-bit digits of the 256-bit hash value that are 1 (odd) and the number of even-bit digits that are 1 (even);

[0051] Step 1.3: Modify the initial value a0 = 0.123456789010 and the control parameter p0 = 0.2345789101 of the PWLCM chaotic system according to the obtained odd and even values. The formula is as follows:

[0052]

[0053] Where a ′ 0 indicates the modified initial value, p ′ 0 indicates the modified control parameter value;

[0054] Step 1.4: Get a ′ 0, p ′ 0 is used as the initial value to iteratively calculate the PWLCM piecewise linear chaotic map to generate a pseudo-random sequence x; the specific expression is:

[0055] The pseudo-random value a1 calculated in the first iteration is expressed as:

[0056]

[0057] The pseudo-random value a calculated at the i+1th iteration i+1 Expressed as:

[0058]

[0059] Set the maximum number of iterations K, where i = 1, 2, ..., K, according to the output of all iterative processes {a′0, a1, ..., a K}Get pseudo-random sequence x;

[0060] Step 2: Obtain quantized discrete cosine transform (DCT) coefficients by entropy decoding the JPEG image to obtain a DCT coefficient block; including:

[0061] Step 2.1: Obtain the compressed data and Huffman coding table of the original JPEG image according to the storage format of the JPEG image;

[0062] Step 2.2: Perform the inverse operation of RLE (Run Length Encoding) on the AC coefficients and the inverse operation of DPCM (Differential Pulse Code Modulation) on the DC coefficients to obtain quantized DCT coefficients;

[0063] Step 2.3: Rearrange the DCT coefficients of the entire image into 8×8 DCT coefficient blocks through ZigZag scanning;

[0064] For JPEG images, it is easy to obtain the quantized DCT coefficient histogram and use the HS (Histogramshift) strategy to embed the information directly into the JPEG image. However, due to the quantization process, any modification of the quantized DCT coefficients may introduce considerable distortion in the spatial domain and may also significantly increase the size of the JPEG file. Figure 2 The standard 512×512 Lena image shown is analyzed to see which types of coefficients can be selected for data hiding.

[0065] Regarding DC coefficients: If DC coefficients are used for data hiding, modification of the DC coefficients will cause considerable distortion to the host image and the embedding capacity achieved is very low. Therefore, in the HS-based RDH method proposed in this invention, all DC coefficients remain unchanged during the embedding process.

[0066] Regarding the AC coefficient, Figure 3The DCT coefficient histogram distribution of the Lena image shows that most of the quantized AC coefficients have a value of zero. However, for RDH in JPEG images, not only the embedding capacity and visual quality need to be considered, but also the storage size of the obtained labeled image. If some zero coefficients are modified during the embedding process, the image file size may increase significantly, so we do not modify the zero AC coefficients to maintain the file size after embedding the information. In addition, due to the quantization stage of JPEG compression, most of the non-zero AC coefficients belonging to high frequencies generally have a value of +1 or -1.

[0067] In the HS-based RDH scheme of the present invention, AC coefficients with an absolute value of 1 are expanded to carry data, while other non-zero AC coefficients are shifted. Obviously, other non-zero AC coefficients do not carry any information, and their ineffective shifting may cause the visual quality of the marked image to degrade and the file storage size to increase. Therefore, we use a new metric R = p / q (p represents the AC coefficient with an absolute value of 1, and q represents the number of other non-zero AC coefficients) to measure the priority of each block. Coefficient blocks with larger R are preferentially used for information hiding.

[0068] Step 3: Calculate the number p of AC coefficients whose absolute value of DCT coefficient is 1 (corresponding to 1 and -1) and the number q of other non-zero AC coefficients in each 8×8 DCT coefficient block;

[0069] Step 4: Set the block selection index R to divide all 8×8 DCT coefficient blocks into two parts; including:

[0070] Step 4.1: Calculate the index R = p / q for each 8×8 DCT coefficient block;

[0071] Step 4.2: Sort the 8×8 DCT coefficient blocks in descending order according to the index R;

[0072] Step 4.3: Select T=R j (j=1,2,3…n), R j Indicates the R index of the jth 8×8 DCT coefficient block, n is the number of 8×8 DCT coefficient blocks, and calculates the number of AC coefficients with an absolute value of 1 in the first j 8×8 DCT coefficient blocks p t Indicates the number of AC coefficients with an absolute value of 1 in the t-th 8×8 DCT coefficient block;

[0073] Step 4.4: If S ≥ (L + len1 + len2), then determine the current T value as the block selection threshold, otherwise set j = j + 1 and continue with steps 4.3 to 4.4, where L is the number of bits of the secret information, len1 represents the number of bits required for the L value, and len2 represents the number of bits required for the threshold T. Since the message length is generally less than 2 24 The threshold T takes 4 decimal places, so we can choose len1 = 24 and len2 = 16, which is acceptable for almost all applications.

[0074] Step 4.5: Divide all 8×8 DCT coefficient blocks with index R not less than threshold T into the first part for data embedding, and the remaining blocks as the second part;

[0075] Step 5: Embed the auxiliary information required for information extraction and the secret information to be hidden into the 8×8 DCT coefficients, including:

[0076] Step 5.1: Scramble all 8×8 DCT coefficient blocks using the pseudorandom sequence x. Specifically, sort the pseudorandom sequence x in ascending order, then iterate through the pseudorandom sequence. If the element at position i' in the pseudorandom sequence moves to position j' after sorting, then move the 8×8 DCT coefficient block at position i' to position j' accordingly. Then, set i' = i' + 1 and continue iterating until i' = n, where n is the number of 8×8 DCT coefficient blocks.

[0077] Step 5.2: Embed the auxiliary information required for extracting the secret information. Specifically, for each 8×8 DCT coefficient block, perform a Zigzag scan of the AC coefficients in sequence, and embed the secret information length L (len1 bit) and threshold T (len2 bit) into the host image. The embedding formula is as follows:

[0078]

[0079] Where C i represents the non-zero AC coefficient, b represents the information bit to be embedded, b∈{0,1}, Represents the new AC coefficient after embedding information;

[0080] Step 5.3: Embed secret information. Specifically, traverse each 8×8 DCT coefficient block in turn. If the R index of the accessed 8×8 DCT coefficient block is not less than the threshold T, zigzag scan the AC coefficients of the current coefficient block and embed the secret information bits according to formula (1). Otherwise, no processing is performed and the next 8×8 DCT coefficient block is accessed in the order from left to right and top to bottom.

[0081] Step 6: After all L bits of secret information are embedded, the scrambled 8×8 DCT coefficient block is restored to its original position, and the new coefficient block after the embedded information is entropy encoded to obtain the marked JPEG image.

[0082] To evaluate the performance of our method, we selected the paper "Reversible data hiding for JPEG images based on histogram pairs" as comparative experiment 1. This paper also embeds secret information based on quantized DCT coefficient modification, demonstrating good performance in terms of visual quality and file size preservation. Furthermore, to demonstrate the effectiveness of our proposed block selection strategy, we also used an embedding algorithm that does not use this strategy as comparative experiment 2.

[0083] Without loss of generality, we randomly selected 1,000 images from the BOSSbase database (the BOSSbase image dataset is currently widely used in the field of information hiding) to test the average number of bits of embedded information in the algorithm. Experimental results show that when the JPEG compression quality factors are 70, 80, 90, and 100, the corresponding embedding capacities are 27k, 34k, 47k, and 63k bits, respectively. The resulting embedding capacity is quite high and sufficient for many practical applications. Coatrieux et al. pointed out in the paper "Reversible watermarking for knowledge digest embedding and reliability control in medical images" that for 512×512 images, an embedding capacity of 3,500 bits is generally sufficient for applications in medical image sharing.

[0084] The visual effect of the present invention uses three 512×512 grayscale images (lena image, baboon image, vegatables image) to demonstrate the information embedding results. The experimental results are as follows: Figure 4 shown.

[0085] from Figure 4 Because it's difficult to directly discern the differences between the original image, the marked image, and the restored image, we use a commonly used quantitative metric in the imaging field: Peak Signal-to-Noise Ratio (PSNR). The PSNR value is calculated between the original JPEG image and the marked JPEG image and is used as a measure of the visual quality of the marked JPEG image.

[0086] The peak signal-to-noise ratio mainly examines the error between corresponding pixels. Given a labeled image X and an original image Y of size M×N, the mean square error (MSE) is defined as:

[0087]

[0088] The PSNR calculation formula is as follows:

[0089]

[0090] Among them, M and N represent the width and height of the image respectively, and n is the number of pixel bits; the larger the PSNR value, the smaller the distortion, the smaller the difference between the two images, and the higher the fidelity of the algorithm.

[0091] Table 1 shows the PSNR test results of different test images using three algorithms after embedding 10k and 20k bits of information.

[0092] Table 1 PSNR test results of different embedded information amounts

[0093]

[0094] As can be seen from Table 1, the average PSNR value obtained by the method of the present invention is larger than the average PSNR value obtained by the method based on DCT coefficient modification in comparative experiment 1; however, the fidelity without using the block selection strategy is relatively poor.

[0095] Table 2 File size increment after embedding different amounts of information (bit)

[0096]

[0097] Table 2 shows the number of bits added between the labeled image and the original image. It can be seen that the file size increase of the labeled image obtained by the present method is similar to (or smaller than) that of Comparative Experiment 1. However, as the number of embedded information bits increases, the increase in file size introduced by this method is often much smaller than that of the method in Comparative Experiment 1. Even without using a block selection strategy during the embedding process, the file size increase introduced by the present method is still significantly smaller than that of the method in Comparative Experiment 1.

[0098] The experimental results show that the method proposed in this paper has high embedding capacity and good visual quality, and has strong practicality. At the same time, the host's storage size JPEG file can be better preserved.

Claims

1. A JPEG reversible data hiding method based on chaos theory and histogram shift, characterized in that: include: Step 1: Generate a pseudo-random sequence using a chaotic system based on the JPEG image; Step 2: Obtain the quantized discrete cosine transform (DCT) coefficients by entropy decoding the JPEG image to obtain a DCT coefficient block; Step 3: Calculate the number p of AC coefficients whose absolute value of DCT coefficient is 1 and the number q of other non-zero AC coefficients in each 8×8 DCT coefficient block; Step 4: Set the block selection index R to divide all 8×8 DCT coefficient blocks into two parts; Step 5: Embed the auxiliary information required for information extraction and the secret information to be hidden into the 8×8 DCT coefficient block; Step 6: After all L bits of secret information are embedded, the scrambled 8×8 DCT coefficient block is restored to its original position, and the new coefficient block after the embedded information is entropy encoded to obtain the marked JPEG image.

2. The JPEG reversible data hiding method based on chaos theory and histogram shift according to claim 1, characterized in that: The step 1 comprises: Step 1.1: Use the JPEG image as input to the SHA-256 hash function to generate a 256-bit random hash value. Step 1.2: Count the number of odd-bit digits of the 256-bit hash value that are 1 (odd) and the number of even-bit digits that are 1 (even); Step 1.3: Modify the initial value a0 and control parameter p0 of the PWLCM chaotic system according to the obtained odd and even values. The formula is as follows: Where a ′ 0 indicates the modified initial value, p ′ 0 indicates the modified control parameter value; Step 1.4: Get a ′ 0, p ′ 0 is used as the initial value to iteratively calculate the PWLCM piecewise linear chaotic map and generate a pseudo-random sequence x.

3. The JPEG reversible data hiding method based on chaos theory and histogram shift according to claim 2, characterized in that: The step 1.4 is specifically described as follows: The pseudo-random value a1 calculated in the first iteration is expressed as: The pseudo-random value a calculated at the i+1th iteration i+1 Expressed as: Set the maximum number of iterations K, where i = 1, 2, ..., K, according to the output of all iterative processes {a′0, a1, ..., a K }Get the pseudo-random sequence x.

4. The JPEG reversible data hiding method based on chaos theory and histogram shift according to claim 1, characterized in that: The step 2 includes: Step 2.1: Obtain the compressed data and Huffman coding table of the original JPEG image according to the storage format of the JPEG image; Step 2.2: Perform the inverse operation of run-length encoding (RLE) on the AC coefficients and the inverse operation of differential pulse code modulation (DPCM) on the DC coefficients to obtain quantized DCT coefficients; Step 2.3: Rearrange the DCT coefficients of the entire image into 8×8 DCT coefficient blocks through ZigZag scanning.

5. The JPEG reversible data hiding method based on chaos theory and histogram shift according to claim 1, characterized in that: The step 4 comprises: Step 4.1: Calculate the index R = p / q for each 8×8 DCT coefficient block; Step 4.2: Sort the 8×8 DCT coefficient blocks in descending order according to the index R; Step 4.3: Select T=R j (j=1,2,3…n), R j Indicates the R index of the jth 8×8 DCT coefficient block, n is the number of 8×8 DCT coefficient blocks, and calculates the number of AC coefficients with an absolute value of 1 in the first j 8×8 DCT coefficient blocks p t Indicates the number of AC coefficients with an absolute value of 1 in the t-th 8×8 DCT coefficient block; Step 4.4: If S ≥ (L + len1 + len2), determine the current value of T as the block selection threshold. Otherwise, set j = j + 1 and continue with steps 4.3 to 4.4, where L is the number of bits of the secret information, len1 is the number of bits required for the value of L, and len2 is the number of bits required for the threshold T. Step 4.5: Divide all 8×8 DCT coefficient blocks with an index R not less than a threshold T into the first part for data embedding, and the remaining blocks as the second part.

6. The JPEG reversible data hiding method based on chaos theory and histogram shift according to claim 1, characterized in that: The step 5 comprises: Step 5.1: Scramble all 8×8 DCT coefficient blocks with pseudo-random sequence x; Step 5.2: Embed the auxiliary information required for extracting the secret information. Specifically, for each 8×8 DCT coefficient block, perform a Zigzag scan on the AC coefficients and embed the secret information length L and threshold T into the host image. The embedding formula is as follows: Where C i represents the non-zero AC coefficient, b represents the information bit to be embedded, b∈{0,1}, Represents the new AC coefficient after embedding information; Step 5.3: Embed secret information.

7. The JPEG reversible data hiding method based on chaos theory and histogram shift according to claim 6, characterized in that: The step 5.1 is specifically expressed as follows: sort the pseudo-random sequence x in ascending order, and then traverse the pseudo-random sequence. If the element at the i'th position of the pseudo-random sequence moves to the j'th position after sorting, then move the 8×8 DCT coefficient block at the i'th position to the j'th position accordingly, and then set i'=i'+1 and continue traversing until i'=n, where n is the number of 8×8 DCT coefficient blocks.

8. The JPEG reversible data hiding method based on chaos theory and histogram shift according to claim 6, characterized in that: The step 5.3 is specifically expressed as follows: traverse each 8×8 DCT coefficient block in turn. If the R index of the accessed 8×8 DCT coefficient block is not less than the threshold T, zigzag scan the AC coefficients of the current coefficient block and embed the secret information bits according to formula (1). Otherwise, no processing is performed and the next 8×8 DCT coefficient block is accessed in the order from left to right and from top to bottom.

Citation Information

Patent Citations

  • Intra-class coefficient scrambling-based JPEG image encryption method

    CN105975866A

  • Universal reversible data hiding method based on JPEG image

    CN115601215A