Reversible information hiding method based on recursive structure and block idea
Patent Information
- Application Number
- CN202310385902.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-12
- Publication Date
- 2026-09-29
- Estimated Expiration
- 2043-04-12
AI Technical Summary
目前基于递归结构的可逆信息隐藏方法较少,但是其有很高的嵌入性能,因为使用递归结构,可以使用到图像的更多比特平面来嵌入,嵌入率往往比其他方法嵌入率高很多,所以主要基于递归结构进行设计
[0047]本发明的有益效果是:能够将自然图像处理成具备嵌入信息功能的加密图像,提供信息嵌入功能,该方法的信息提取和图像还原是可以分离的,嵌入信息的第三方可以在不还原图像的条件下进行隐藏信息的嵌入和信息提取,除此之外,该方法是完全可逆的方法,在对图像进行预处理后可以按照逆过程无失真地还原图像。经试验验证,该方法有着较高的嵌入率,达到2.43bpp,视觉质量较高,还原后的图像肉眼效果高并且PSNR趋近于+∞,SSIM达到1,最后该方法在图像加密性能上表现良好,预处理的图像相对于原图的PSNR,UACI,NPCR都趋近于理想值,预处理图像自身的信息熵,相关系数也接近理想值。
Smart Images

Figure CN116405182B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the fields of information security and image processing technology, specifically a reversible information hiding method based on recursive structure and block-based thinking. Background Technology
[0002] Reversible information hiding is a technique that embeds information into a carrier and can restore the carrier without loss of quality after the information is extracted. Plaintext-based information hiding is used to embed hidden information in plaintext images, while ciphertext-based information hiding is used to embed information into encrypted images.
[0003] The main applications of information hiding are covert communication and digital content protection. For example, in remote diagnosis of medical images, patient privacy information is needed during transmission or storage, but it cannot be directly exposed. Information hiding techniques are needed to embed this information in a specific way to protect privacy. However, embedding alters the image, and even slight changes in a medical image can lead to misdiagnosis. Therefore, a reversible information hiding method is required, ensuring perfect decryption and restoration of the image after extraction. In the military field, images are sometimes used as carriers of ciphertext. Image information hiding techniques can be used to embed ciphertext within the image for transmission over the network, achieving covert communication. During image storage and transmission, if copyright information and security checks are involved, information hiding techniques can be used to discreetly embed digital copyright content or embed hidden verification information to check whether the image has been tampered with during transmission. In the cloud, user images are generally stored in encrypted form. To enable direct retrieval, clustering, and authentication of encrypted images, additional annotation information needs to be embedded within the images. Furthermore, since hidden information is embedded within encrypted images, a ciphertext-domain reversible information hiding method is used. This method belongs to the category of ciphertext-domain reversible information hiding methods.
[0004] Currently, most reversible information hiding methods are based on histogram translation or prediction error. Reversible information hiding methods based on recursive structures are less common, but they offer high embedding performance because they utilize more bit planes of the image, resulting in significantly higher embedding rates compared to other methods. Therefore, recursive structures are primarily used in their design. Furthermore, since the first and second edges of adjacent pixels have high similarity, block-based operations are considered for the bit plane formed by the first and second edges. Summary of the Invention
[0005] To address the aforementioned problems, this invention provides a reversible information hiding method based on recursive structure and block-based thinking, comprising the following steps:
[0006] Step 1: Prepare the carrier image and preprocess the carrier image into which text information needs to be embedded; including:
[0007] Note: (The preprocessing steps need to be performed recursively. When the recursion depth is k, the carrier image...) [k,7] The processing involves operating on the sub-image formed by bits k to 7 of each pixel of the carrier image. This enables the processing of the image... [k,7] The specific implementation method is as follows: when the recursion depth is k, if we want to use the pixel p in the i-th row and j-th column of the carrier image... i.j , to the pixel p of the image i.j and 2 8-k A bitwise AND operation with -1 yields a pixel value p. (i.j)[k,7] , using p (i.j)[k,7] Replace the original p i.j 。 )
[0008] Note: (pixel value p) (i.j)[k,7] The calculation method is p (i.j)[k,7] =p i.j &(2 8-k -1))
[0009] Step 1.1: When the recursion depth k = 0, process the image. [0,7] (That is, operations are performed on the sub-image consisting of bits 0 to 7 of each pixel of the carrier image): including:
[0010] Step 1.1.1: Generate a list Val and an error location storage matrix Loc. Use median prediction to predict the pixels except for the first row and first column, and obtain the pixel p in the i-th row and j-th column. i.j The predicted value pred i,j ;
[0011] Note: Median prediction is an algorithm used to calculate the predicted value of pixels in a carrier image. For example, to calculate the predicted value of pixel p in the i-th row and j-th column... i.j The predicted value is based on the pixel p in the (i-1)th row and (j-1)th column. i-1.j-1 The pixel p in the (i-1)th row and the jth column i -1.j And the pixel p in the i-th row and (j-1)-th column i.j-1 Perform the calculation. The calculation method is as follows:
[0012]
[0013] Step 1.1.2: Calculate pred i,j With p i.j The absolute value of the difference △;
[0014] Step 1.1.3: Calculate pred i,j with inv i.jThe absolute value of the difference △ inv ;inv i.j p i.j The result of inverting the most significant bit;
[0015] Note: (inv) i.j p i.j The result of inverting the highest bit, if p i.j The binary representation is 101011, inv i.j (001011)
[0016] Step 1.1.4: By determining the absolute values Δ and Δ inv The relationship generates an auxiliary information list Val; specifically, it is described as follows:
[0017] If △ < △ inv And △! = 2 6-k And △ inv ! = 2 7-k +2 6-k In the auxiliary information list Val, no auxiliary information x is added, and the i-th row and j-th column of the error position storage matrix are set to 0, i.e., Loc[i][j] = 0;
[0018] If △>△ inv And △! = 2 7-k +2 6-k And △ inv ! = 2 6-k Generate auxiliary information x, and generate it according to the following rules: Add the auxiliary information to the tail of the Val list, and set the i-th row and j-th column of the error position storage matrix to 1, i.e., Loc[i][j] = 1;
[0019] If p i.j The first digit is 1, and the auxiliary information x is 2. 6-k +1, otherwise x is -2 6-k -1, add the auxiliary information x to the tail of the Val queue, and set the i-th row and j-th column of the error position storage matrix to 1, i.e., Loc[i][j] = 1;
[0020] Retain the generated auxiliary information list Val;
[0021] Step 1.1.5: Adjust the carrier image. Traverse the entire image. If Loc[i][j] = 1, that is, the error position storage matrix at row i and column j is 1, retrieve the auxiliary information Val[idx] from the Val list and increment idx by 1. If the absolute value of Val[idx] is not equal to 2... 6-k +1, let p at that position... i.j Become p i.j +Val[idx];
[0022] Note: (Val is a list that stores auxiliary information, which can generally be stored using an array or a linked list. idx is the index of the Val list, which is initially 0. Each time the auxiliary information corresponding to idx is retrieved from the Val list, idx is incremented by 1.)
[0023] Step 1.2: Increment the recursion depth k by 1. When k = 1, 2, 3, 4, 5, 6, process the image. [k,7] That is, to operate on the sub-image consisting of the kth to 7th bits of each pixel of the carrier image, when k=7, step 1.3 is executed; including:
[0024] Step 1.2.1: Perform k-th bit processing on the carrier image. For the carrier image, calculate p using the median prediction method. i.j The predicted value pred i.j If p i.j and pred i.j If the first two digits are the same, then p i.j Set the first value to 0, otherwise set it to 1;
[0025] Step 1.2.2: Extract the bit plane composed of the kth bit of the carrier image and traverse it in 4×4 blocks. The traversal direction is from left to right and from top to bottom. Use seq[k] to record the classification information of each block. If the block is all 0, it belongs to the block that can be embedded, so record 0. If the block contains 1, it belongs to the block that cannot be embedded, so record 1. Add the classification information of the block to the tail of seq[k].
[0026] Step 1.3: When k equals 7, process the image. [7,7] This refers to operations performed on the sub-image formed by the 7th bit of the carrier image; including:
[0027] Step 1.3.1: Use a logistic chaotic system and a key Ke to generate a 512×512 chaotic sequence. Magnify each element in the sequence by 100,000 times and then perform a floor operation. Then take the modulo of 256 to obtain a pseudo-random sequence. Use the pseudo-random sequence and the pixels of the carrier image to perform an XOR operation to encrypt the carrier image.
[0028] Note: (A logistic chaotic system is a type of chaotic system that can generate a large number of pseudo-random sequences after having an initial starting value.)
[0029] Ke is the key used for encrypting and decrypting the carrier image. It is typically a high-precision decimal, such as 1.2324647421. The specific key can be chosen by the user.
[0030] Step 1.3.2: Embed the Val list bitwise over the 0th bit plane of the carrier image and end it with 11111111. Then embed seq[1], seq[2], ..., seq[6] bitwise over the end marker.
[0031] At this point, the preprocessing of the carrier image is complete.
[0032] Step 2: Embed hidden information into the preprocessed carrier image; including:
[0033] Step 2.1: Traverse the highest bit plane of the carrier image, find the end marker 11111111, then extract the following 98304 bits, divide these 98304 bits into 6 equal parts, each part is a sequence of 16384 bits, and the kth sequence corresponds to seq[k].
[0034] Step 2.2: Binary the hidden information to be embedded, use the key Km and the Logistic chaotic system to encrypt and generate a 512×512 chaotic sequence, magnify each element in the sequence by 100,000 times and then round down, and then take the modulo of 256 to obtain a pseudo-random sequence. Use the pseudo-random sequence and the hidden information to be embedded to perform an XOR operation, thereby encrypting the hidden information first.
[0035] Step 2.3: Starting from bit 98305 after the end position 11111111 of the 0th bit plane of the carrier image, embed the hidden information bit by bit;
[0036] Step 2.4: If the amount of text information is large and the capacity of the 0th bit plane cannot embed all the information, seq[1], seq[2], ..., seq[6] can be used to find small blocks marked as 0 in the 1st to 6th bit planes for embedding, and the embedding is also done by bit overlay.
[0037] Note: (Km is the key used to encrypt and decrypt hidden information. It is generally a decimal with high precision, such as 0.233254776, etc. The specific choice is determined by the user.)
[0038] This method is completely reversible, meaning the carrier image can be restored to the original image. Below are the steps for extracting hidden information and restoring the image.
[0039] Step 3: Extract the hidden information embedded in the carrier image; including:
[0040] Step 3.1: Traverse the 0th bit plane of the carrier image embedded with hidden information, find the end marker 11111111, extract the 98304 bits after the end position, divide them into 6 equal parts, each with 16384 bits, the jth sequence corresponds to seq[j], thus generating seq[1], seq[2], ..., seq[6], and then extract all the remaining bits of the 0th bit plane from the 98305th bit after the end position;
[0041] Step 3.2: Based on seq[1], seq[2], ..., seq[6], find the small blocks marked as 0 in the 1st to 6th bit planes, and extract the information from the small blocks;
[0042] Step 3.3: Concatenate the bits extracted from the 0th bit plane and the bits in the small blocks of the 1st to 6th bit planes. Then, generate a pseudo-random sequence based on the key Km and the chaotic system (repeat step 2.2), and use the pseudo-random sequence and the encrypted bit sequence to perform an XOR operation to restore the hidden information.
[0043] Step 4: Reconstruct the carrier image: including:
[0044] Step 4.1: First, find the end marker 11111111 from the 0th bit plane, extract the bits before the end position to obtain Val, and then extract seq[1], seq[2], ..., seq[6], obtain the pseudo-random sequence based on the key Ke and the chaotic system (repeat step 1.3.1), and perform an XOR operation with the image. After the operation is completed, the 7th bit plane has been restored.
[0045] Step 4.2: Next, restore the 1st to 6th bit planes. First, for the kth bit plane (1 <= k <= 6), according to seq[k], set all the small blocks marked as 0 to 0, and then restore from left to right and from top to bottom. For pixel p i.j The predicted value pred was calculated using the median forecasting method. i.j Next, depending on whether the original value of the i-th row and j-th column of the k-th bit plane is 0 or 1, different restorations are performed. If the value is 0, then the value of the i-th row and j-th column of the k-th bit plane is set to the predicted value pred. i.j The k-th bit has a value of 1. Let the value in the i-th row and j-th column of the k-th bit plane be the value of pred. i.j The inverse value of the k-th bit is used to restore the k-th bit plane. After that, the (k-1)-th bit plane is restored, and so on, restoring the 6th to 1st bit planes in sequence.
[0046] Step 4.3: After restoring bit planes 1 through 7, continue restoring bit plane 0 of the image. Use the auxiliary information list Val and the image composed of the remaining 7 bit planes to restore bit plane 0. Finally, stitch all bit planes together to restore the entire image without distortion.
[0047] The beneficial effects of this invention are: it can process natural images into encrypted images with embedded information, providing information embedding functionality. The information extraction and image restoration processes are separable, allowing third parties to embed hidden information and extract information without restoring the original image. Furthermore, this method is completely reversible; after preprocessing, the image can be restored without distortion by reversing the process. Experimental results show that this method has a high embedding rate of 2.43 bpp, high visual quality, and the restored image has a high visual quality with a PSNR approaching +∞ and an SSIM of 1. Finally, this method performs well in image encryption; the PSNR, UACI, and NPCR of the preprocessed image are close to ideal values compared to the original image, and the information entropy and correlation coefficient of the preprocessed image itself are also close to ideal values. Attached Figure Description
[0048] Figure 1 This is a diagram of the reversible information image preprocessing process based on recursive structure and block division in this invention.
[0049] Figure 2 This is a diagram illustrating the information embedding process in this invention.
[0050] Figure 3 The following is a diagram illustrating the recursive processing of the carrier image in this invention: (a) is a schematic diagram of dividing the carrier image into 8 bit planes; (b) is a diagram illustrating the processing of image[0,7], which is processing the sub-image composed of the 0th to 7th bit planes of each pixel of the carrier image; (c) is a diagram illustrating the processing of image[1,7], which is processing the sub-image composed of the 1st to 7th bit planes of each pixel of the carrier image; (d) is a diagram illustrating the processing of image[2,7], which is processing the sub-image composed of the 2nd to 7th bit planes of each pixel of the carrier image; and (e) is a diagram illustrating the processing of image[3,7], which is processing the sub-image composed of the 0th to 7th bit planes of each pixel of the carrier image.
[0051] Figure 4These are comparison images of the original image, the preprocessed image, and the restored image in this invention, where (a) is the original Lena.png, (b) is the preprocessed Lena.png, (c) is the restored Lena.png, (d) is the original Boat.png, (e) is the preprocessed Boat.png, (f) is the restored Boat.png, (g) is the original Baboon.png, (h) is the preprocessed Baboon.png, and (i) is the restored Baboon.png. Detailed Implementation
[0052] The invention will be further explained below with reference to the accompanying drawings and specific implementation examples.
[0053] The carrier image is a natural image from the Bows-2 public dataset, with a size of 512×512. The hidden information is a string from a novel that describes a character, in order to give the character a vivid impression.
[0054] Choose key Ke as 1.11221122 and key Km as 0.97979696.
[0055] The present invention provides a reversible information hiding method based on recursive structure and block-based thinking to hide the aforementioned novel content in a natural image. The specific process is as follows: Figure 1 As shown, it includes the following steps:
[0056] Step 1: Preprocess the carrier image into which text information needs to be embedded; including:
[0057] Note: (The preprocessing steps need to be performed recursively. When the recursion depth is k, the carrier image...) [k,7] The processing involves operating on the sub-image formed by bits k to 7 of each pixel of the carrier image. This enables the processing of the image... [k,7] The specific implementation method is as follows: when the recursion depth is k, if we want to use the pixel p in the i-th row and j-th column of the carrier image... i.j , to the pixel p of the image i.j and 2 8-k A bitwise AND operation with -1 yields a pixel value p. (i.j)[k,7] , using p (i.j)[k,7] Replace the original p i.j 。 )
[0058] Note: (pixel value p) (i.j)[k,7] The calculation method is p (i.j)[k,7] =p i.j &(2 8-k -1))
[0059] Step 1.1: When the recursion depth k = 0, process the image.[0,7] (That is, operations are performed on the sub-image consisting of bits 0 to 7 of each pixel of the carrier image, as shown in the notes above): including:
[0060] Step 1.1.1: Generate a list Val and an error location storage matrix Loc. Use median prediction to predict the pixels except for the first row and first column, and obtain the pixel p in the i-th row and j-th column. i.j The predicted value pred i,j ;
[0061] Note: Median prediction is an algorithm used to calculate the predicted value of pixels in a carrier image. For example, to calculate the predicted value of pixel p in the i-th row and j-th column... i.j The predicted value is based on the pixel p in the (i-1)th row and (j-1)th column. i-1.j-1 The pixel p in the (i-1)th row and the jth column i -1.j And the pixel p in the i-th row and (j-1)-th column i.j-1 Perform the calculation. The calculation method is as follows:
[0062]
[0063] Step 1.1.2: Calculate pred i,j With p i.j The absolute value of the difference △;
[0064] Step 1.1.3: Calculate pred i,j with inv i.j The absolute value of the difference △ inv ;inv i.j p i.j Note: (inv) i.j p i.j The result of inverting the highest bit, if p i.j The binary representation is 101011, inv i.j (001011)
[0065] Step 1.1.4: By determining the absolute values Δ and Δ inv The relationship generates an auxiliary information list Val; specifically, it is described as follows:
[0066] If △ < △ inv And △! = 2 6-k And △ inv ! = 2 7-k +2 6-k In the auxiliary information list Val, no auxiliary information x is added, and the i-th row and j-th column of the error position storage matrix are set to 0, i.e., Loc[i][j] = 0;
[0067] If △>△inv And △! = 2 7-k +2 6-k And △ inv ! = 2 6-k Generate auxiliary information x, and generate it according to the following rules: Add the auxiliary information to the tail of the Val list, and set the i-th row and j-th column of the error position storage matrix to 1, i.e., Loc[i][j] = 1.
[0068] In the remaining cases, if p i.j The first digit is 1, and the auxiliary information x is 2. 6-k +1, otherwise x is -2 6-k -1. Add the auxiliary information x to the tail of the Val queue, and set the i-th row and j-th column of the error position storage matrix to 1, i.e., Loc[i][j] = 1.
[0069] Finally, retain the generated auxiliary information list Val.
[0070] Step 1.1.5: Adjust the carrier image. Traverse the entire image. If Loc[i][j] = 1, that is, the error position storage matrix at row i and column j is 1, retrieve the auxiliary information Val[idx] from the Val list and increment idx by 1. If the absolute value of Val[idx] is not equal to 2... 6-k +1, let p at that position... i.j Become p i.j +Val[idx].
[0071] Note: (Val is a list that stores auxiliary information, which can generally be stored using an array or a linked list. idx is the index of the Val list, which is initially 0. Each time the auxiliary information x corresponding to idx is retrieved from the Val list, idx is incremented by 1.)
[0072] Step 1.2: Increment the recursion depth k by 1. When k = 1, 2, 3, 4, 5, 6, process the image. [k,7] That is, to operate on the sub-image consisting of the kth to 7th bits of each pixel of the carrier image, as explained in the notes above. When k=7, step 1.3 is executed.
[0073] Step 1.2.1: Perform k-th bit processing on the carrier image. For the carrier image, calculate p using the median prediction method. i.j The predicted value pred i.j If p i.j and pred i.j If the first two digits are the same, then p i.j Set the first position to 0, otherwise set it to 1.
[0074] Step 1.2.2: Extract the bit plane composed of the kth bit of the carrier image and traverse it in 4×4 blocks. The traversal direction is from left to right and from top to bottom. Use seq[k] to record the classification information of each block. If the block is all 0, it belongs to the block that can be embedded, so record 0. If the block contains 1, it belongs to the block that cannot be embedded, so record 1. Add the classification information of the block to the tail of seq[k].
[0075] Step 1.3: When k equals 7, process the image. [7,7] This means operating on the sub-image formed by the 7th bit of the carrier image, as explained in the notes above.
[0076] Step 1.3.1: Using a logistic chaotic system and a key Ke, generate a 512×512 chaotic sequence. Magnify each element of the sequence by a factor of 100,000, round it down, and then take the modulo 256 to obtain a pseudo-random sequence. XOR the pseudo-random sequence with the pixels of the carrier image to encrypt the carrier image.
[0077] Note: (A logistic chaotic system is a type of chaotic system that can generate a large number of pseudo-random sequences after having an initial starting value.)
[0078] Ke is the key used for encrypting and decrypting the carrier image. It is typically a high-precision decimal, such as 1.2324647421. The specific key can be chosen by the user.
[0079] Step 1.3.2: Embed the Val list bitwise over the 0th bit plane of the carrier image and end with 11111111. Then embed seq[1], seq[2], ..., seq[6] bitwise over the end marker.
[0080] At this point, the preprocessing of the carrier image is complete. The processing steps are illustrated in the diagram below. Figure 3 As shown, for a carrier image, each pixel has 8 bits, and each bit of a pixel can form a bit plane, such as... Figure 3 As shown in (a); the preprocessing process first processes the image. [0,7] That is, the image composed of the lower 0 bits to the 7th bit of each pixel of the carrier image, such as Figure 3 (b) shows the image. [0,7] After processing is complete, continue processing the image. [1,7] The operation involves manipulating the image composed of bits 1 to 7 of each pixel in the carrier image, such as... Figure 3 As shown in (c); for image [1,7] After processing is complete, continue processing the image.[2,7] The operation involves manipulating the image composed of bits 2 to 7 of each pixel in the carrier image, such as... Figure 3 As shown in (d); for image [2,7] After processing is complete, continue processing the image. [3,7] The operation involves manipulating the image formed by bits 3 to 7 of each pixel in the carrier image, such as... Figure 3 As shown in (e); and so on, when the image [k,7] Continue processing the image after the initial processing is complete. [k+1,7] Until k=7.
[0081] Step 2: Embed hidden information into the preprocessed carrier image, such as... Figure 2 As shown; including:
[0082] Step 2.1: Traverse the highest bit plane of the carrier image, find the end marker 11111111, then extract the following 98304 bits, divide these 98304 bits into 6 equal parts, each part is a sequence of 16384 bits, and the kth sequence corresponds to seq[k].
[0083] Step 2.2: Binary the hidden information to be embedded. Using the key Km and a Logistic chaotic system, generate a 512×512 chaotic sequence. Magnify each element of the sequence by a factor of 100,000 and round it down. Then, take the modulo 256 to obtain a pseudo-random sequence. XOR the pseudo-random sequence with the hidden information to be embedded to encrypt the hidden information.
[0084] Step 2.3: Starting from bit 98305 after the end position 11111111 of the 0th bit plane of the carrier image, embed the hidden information bit by bit.
[0085] Step 2.4: If the amount of text information is large and the capacity of the 0th bit plane cannot embed all the information, seq[1], seq[2], ..., seq[6] can be used to find small blocks marked as 0 in the 1st to 6th bit planes for embedding, and the embedding is also done by bit overlay.
[0086] Note: (Km is the key used to encrypt and decrypt hidden information. It is generally a decimal with high precision, such as 0.233254776, etc. The specific choice is determined by the user.)
[0087] This method is completely reversible, meaning the carrier image can be restored to the original image. Below are the steps for extracting hidden information and restoring the image.
[0088] Step 3: Extract the hidden information embedded in the carrier image; including:
[0089] Step 3.1: Traverse the 0th bit plane of the carrier image embedded with hidden information, find the end marker 11111111, extract the 98304 bits after the end position, divide them into 6 equal parts, each with 16384 bits, the jth sequence corresponds to seq[j], thus generating seq[1], seq[2], ..., seq[6], and then extract all the remaining bits of the 0th bit plane from the 98305th bit after the end position.
[0090] Step 3.2: Based on seq[1], seq[2], ..., seq[6], find the small blocks marked as 0 in the 1st to 6th bit planes and extract the information from the small blocks.
[0091] Step 3.3: Concatenate the bits extracted from the 0th bit plane and the bits in the small blocks of the 1st to 6th bit planes. Then, generate a pseudo-random sequence based on the key Km and the chaotic system (repeat step 2.2), and use the pseudo-random sequence and the encrypted bit sequence to perform an XOR operation to restore the hidden information.
[0092] Step 4: Reconstruct the carrier image: including:
[0093] Step 4.1: First, find the end marker 11111111 from the 0th bit plane, extract the bits before the end position to obtain Val, and then extract seq[1], seq[2], ..., seq[6], obtain the pseudo-random sequence based on the key Ke and the chaotic system (repeat step 1.3.1), and perform an XOR operation with the image. After the operation is completed, the 7th bit plane has been restored.
[0094] Step 4.2: Next, restore the 1st to 6th bit planes. First, for the kth bit plane (1 <= k <= 6), according to seq[k], set all the small blocks marked as 0 to 0, and then restore from left to right and from top to bottom. For pixel p i.j The predicted value pred was calculated using the median forecasting method. i.j Next, depending on whether the original value of the i-th row and j-th column of the k-th bit plane is 0 or 1, different restorations are performed. If the value is 0, then the value of the i-th row and j-th column of the k-th bit plane is set to the predicted value pred. i.j The k-th bit has a value of 1. Let the value in the i-th row and j-th column of the k-th bit plane be the value of pred. i.j The inverse of the k-th bit. After restoring the k-th bit plane, continue restoring the (k-1)-th bit plane, and so on, restoring the 6th to 1st bit planes in sequence.
[0095] Step 4.3: After restoring bit planes 1 through 7, continue restoring bit plane 0 of the image. Use Val and the remaining 7 bit planes to restore bit plane 0. Finally, stitch all bit planes together to restore the entire image without distortion.
[0096] Finally, to verify the efficiency of the method of the present invention in terms of embedding rate, visual quality, and visual safety level, experimental verification is required. The verification steps include:
[0097] 1) Determine the formula for calculating the embedding rate:
[0098]
[0099] Where r and c are the height and width of the image, respectively, and bits is the number of bits that can be embedded in the entire carrier image;
[0100] The unit of embedding rate is bpp (bits-per-pixel, the number of bits that can be embedded per pixel), and the embedding rate ranges from 0 bpp to 8 bpp.
[0101] 2) Count the total number of bits that can be embedded in the carrier image. After finding the end marker 11111111 in the 0th bit plane, move it forward 98304 bits to get the starting point of the bits that can be embedded in the 0th bit plane. Traverse from this position to the last bit of the 0th bit plane to get the number of bits that can be embedded in the 0th bit plane.
[0102] 3) Count the total number of bits that can be embedded from the 1st bit plane to the 6th bit plane. Find the small blocks that can be embedded in each bit plane according to seq[1], seq[2], ..., seq[6]. The number of bits that can be embedded in each small block is 16.
[0103] 4) Add up the total number of bits that can be embedded in the 0th bit plane to the 6th bit plane to get the total number of bits that can be embedded in the carrier image;
[0104] 5) Obtain the embedding rate of the carrier image according to the formula, and record the embedding rate.
[0105] 6) Repeat steps 1) to 5) for the other images and record the embedding rate. Calculate and summarize the embedding rate data, as shown in Table 1:
[0106] Table 1. Summary of Embedding Rate
[0107] Images numbered 1-100 2.6466 Images numbered 1201-1301 2.2626 Images numbered 3401-3501 2.0293 Images numbered 5601-5701 2.7719 Images numbered 8801-8901 2.3249
[0108] Currently, reversible information hiding methods with an embedding rate of 2.2 bpp can be considered excellent, while the average embedding rate of this method is around 2.43 bpp, which verifies that the method of this invention has high embedding performance.
[0109] 7) Determine the evaluation indicators for visual quality: visual effect, PSNR and SSIM.
[0110] Formulas for calculating PSNR and SSIM:
[0111]
[0112]
[0113] in, It is the pixel value in the i-th row and j-th column of the original image, while It is the pixel value in the i-th row and j-th column of the restored image.
[0114] r and c are the length and width of the image, x and y are the corresponding regions of the original and restored images, E(x) and E(y) are the mean values of pixels in x and y, respectively, V(x) and V(y) are the variances of pixel values in x and y, respectively, and Cov(x,y) is the covariance between the sets of pixel values in regions x and y. γ1=(0.01×(2 l -1)) 2 , γ2=(0.03×(2 l -1)) 2 ,(2 l -1) Generally, 255 is taken.
[0115] 8) Using three images—Lena.png, Boat.png, and Baboon.png—perform image preprocessing, embedding hidden information, and restoring the images. Compare the original image, the preprocessed image, and the restored image. The comparison results are as follows: Figure 4 As shown, the visual quality of the reproduced image is very high to the naked eye.
[0116] 9) Calculate the PSNR and SSIM between the original and restored images of Lena.png, Boat.png, and Baboon.png as shown in Table 2.
[0117] Table 2 Calculation results of PSNR and SSIM
[0118] Lena.png +∞ 1 Boat.png +∞ 1 Baboon.png +∞ 1
[0119] As can be seen, not only is the reproduction performance strong in terms of visual effect, but the PSNR is close to +∞ and SSIM = 1, which verifies that the method of the present invention has extremely high visual quality and is a completely reversible method.
[0120] The evaluation metrics for visual safety levels include: information entropy, PSNR, NPCR, UACI, and correlation coefficient. The calculation formulas are as follows:
[0121] (1) NPCR (Non-Pixel Change Rate) is used to test the degree of difference between a new image and the original image. The calculation formula is:
[0122]
[0123] The formula for calculating d(i,j) is:
[0124] in, It is the pixel value in the i-th row and j-th column of the original image. This is the pixel value in the i-th row and j-th column of the new image. r and c are the length and width of the image, respectively.
[0125] (2) UACI (Uniform Average Change Intensity): UACI measures the degree of difference between the new image and the original image. The calculation method is as follows:
[0126]
[0127] in, It is the pixel value in the i-th row and j-th column of the original image. This is the pixel value in the i-th row and j-th column of the new image. r and c are the length and width of the image, respectively.
[0128] (3) PSNR (Peak Signal-to-Noise Ratio), used to evaluate the differences between the new image and the original image, is calculated using the following formula:
[0129]
[0130] in, It is the pixel value in the i-th row and j-th column of the original image. This is the pixel value in the i-th row and j-th column of the new image. r and c are the length and width of the image, respectively. l -1 is usually taken as 255.
[0131] (4) Information entropy: Used to measure the randomness of a new image, the calculation formula is as follows:
[0132]
[0133] Where x i It is the pixel value of the i-th pixel, P(x) i ) is grayscale x i The probability values are given by r and c, where r and c are the length and width of the image, respectively.
[0134] (5) Correlation coefficient: Used to measure the correlation between adjacent pixels in a new image. Generally, 3000 pixels are randomly selected, and the values are calculated in the horizontal, vertical, and diagonal directions according to the following formula:
[0135]
[0136]
[0137]
[0138]
[0139] Where N is the number of selected pixels, x i It is the pixel value of the selected pixel, y i It is the pixel value of the neighboring pixels of the selected pixel. When calculating the horizontal correlation coefficient, y i Take the pixel value of the right-hand neighbor of the selected pixel; when calculating the vertical correlation coefficient, y i Take the pixel value of the adjacent pixel below the selected pixel; when calculating the diagonal correlation coefficient, y i Take the pixel value of the bottom-right neighbor of the selected pixel. E(x) is the average pixel value of the selected pixel, D(x) is the variance of the pixel values of the selected pixel, cov(x,y) is the covariance of the pixel values between the selected pixel and its neighboring pixels, and R... xy It is the correlation between the selected pixel and its neighboring pixels calculated using E(x), D(x), and cov(x,y).
[0140] Finally, eight images (Lena.png, Baboon.png, Boat.png, barbara.png, Peppers.png, zelda.png, goldhill.png, and fruits.png) were prepared and preprocessed. PSNR, NPCR, and UACI were calculated for the processed images and the original images. The information entropy, horizontal, vertical, and diagonal correlation coefficients of the new images were also calculated. The data were statistically summarized in Table 3.
[0141] Table 3. Summary of calculation results for information entropy, horizontal, vertical, and diagonal correlation coefficients, etc.
[0142]
[0143] As can be seen, the PSNR of the preprocessed new image is less than 10, the NPCR is close to 1, the UACI is close to 0.33, and the information entropy of the new image is close to 8. The horizontal, vertical and diagonal correlation coefficients are all close to 0. That is, the indicators of visual safety level are close to the ideal value. Therefore, it can be verified that the visual safety level of the algorithm is very high and has high security performance.
[0144] In summary, the above verification demonstrates that the method of the present invention has a high embedding capacity, visual quality, and visual security level.
Claims
1. A reversible information hiding method based on recursive structure and block-based thinking, characterized in that, include: Prepare the carrier image and preprocess the carrier image into which text information needs to be embedded; Embed hidden information into the preprocessed carrier image; Extract hidden information embedded in the carrier image; Restore the carrier image; The preparation of the carrier image and the preprocessing of the carrier image into which text information needs to be embedded include: Step 1.1: When the recursion depth k=0, perform operations on the sub-image formed by the 0th to 7th bits of each pixel of the carrier image to obtain the auxiliary information list Val and the error position storage matrix Loc; Step 1.2: Increment the recursion depth k by 1. When k = 1, 2, 3, 4, 5, 6, perform operations on the sub-image formed by the kth to 7th bits of each pixel of the carrier image. When k = 7, execute step 1.
3. Step 1.3: When k equals 7, perform the operation on the sub-image formed by the 7th bit of the carrier image; Step 1.2 includes: Step 1.2.1: Perform k-th bit processing on the carrier image. For the carrier image, calculate using the median prediction method. Predicted value ,like and If the first two digits are the same, then... The first position is set to 0, otherwise it is set to 1; where, Let be the pixel in the i-th row and j-th column of the carrier image; Step 1.2.2: Extract the bit plane composed of the kth bit of the carrier image and traverse it in 4×4 blocks. The traversal direction is from left to right and from top to bottom. Use seq[k] to record the classification information of each block. If the block is all 0, it belongs to the block that can be embedded, so record 0. If the block contains 1, it belongs to the block that cannot be embedded, so record 1. Add the classification information of the block to the tail of seq[k]. Step 1.3 includes: Step 1.3.1: Use a logistic chaotic system and a key Ke to generate a 512×512 chaotic sequence. Magnify each element in the sequence by 100,000 times and then perform a floor operation. Then take the modulo of 256 to obtain a pseudo-random sequence. Use the pseudo-random sequence and the pixels of the carrier image to perform an XOR operation to encrypt the carrier image. Step 1.3.2: Embed the Val list bitwise over the 0th bit plane of the carrier image and end it with 11111111. Then embed seq[1], seq[2], ..., seq[6] bitwise over the end marker. The embedding of hidden information into the preprocessed carrier image includes: Step 2.1: Traverse the highest bit plane of the carrier image, find the end marker 11111111, then extract the following 98304 bits, divide these 98304 bits into 6 equal parts, each part is a sequence of 16384 bits, and the kth sequence corresponds to seq[k]. Step 2.2: Binary the hidden information to be embedded, use the key Km and the Logistic chaotic system to encrypt and generate a 512×512 chaotic sequence, magnify each element in the sequence by 100,000 times and then round down, and then take the modulo of 256 to obtain a pseudo-random sequence. Use the pseudo-random sequence and the hidden information to be embedded to perform an XOR operation, thereby encrypting the hidden information first. Step 2.3: Starting from 98305 bits after the end position 11111111 of the 0th bit plane of the carrier image, the hidden information is embedded by bit overlay. If the capacity of the 0th bit plane cannot embed all the information, use seq[1], seq[2], ..., seq[6] to find the small blocks marked as 0 in the 1st to 6th bit planes for embedding, also by bit overlay.
2. The reversible information hiding method based on recursive structure and block-based thinking according to claim 1, characterized in that, Step 1.1 includes: Step 1.1.1: Generate a list Val and an error location storage matrix Loc. Use median prediction to predict the pixels except for the first row and first column, to obtain the pixels in the i-th row and j-th column. Predicted value ; Step 1.1.2: Calculation and The absolute value of the difference ; Step 1.1.3: Calculation and The absolute value of the difference ; express The result of inverting the most significant bit; Step 1.1.4: Determine the absolute value and The relationship generates an auxiliary information list Val; specifically, it is described as follows: if ,and != and In the auxiliary information list Val, no auxiliary information x is added, and the i-th row and j-th column of the error position storage matrix are set to 0, i.e., Loc[i][j]=0; if ,and ! = and Generate auxiliary information x, and generate it according to the following rules: Add the auxiliary information to the tail of the Val list, and set the i-th row and j-th column of the error position storage matrix to 1, i.e., Loc[i][j]=1; if The first digit is 1, and the auxiliary information x is taken as 1. +1, otherwise x takes... -1, add the auxiliary information x to the tail of the Val queue, and set the i-th row and j-th column of the error position storage matrix to 1, i.e., Loc[i][j]=1; Retain the generated auxiliary information list Val; Step 1.1.5: Adjust the carrier image. Traverse the entire image. If Loc[i][j] = 1, that is, the error position storage matrix at row i and column j is 1, retrieve the auxiliary information Val[idx] from the Val list and increment idx by 1. If the absolute value of Val[idx] is not equal to... +1, making the value at that position... become + Val[idx], where idx represents the index value of the Val list.
3. The reversible information hiding method based on recursive structure and block-based thinking according to claim 1, characterized in that, The extraction of hidden information embedded in the carrier image includes: Step 3.1: Traverse the 0th bit plane of the carrier image embedded with hidden information, find the end marker 11111111, extract the 98304 bits after the end position, divide them into 6 equal parts, each with 16384 bits, the jth sequence corresponds to seq[j], thus generating seq[1], seq[2], ..., seq[6], and then extract all the remaining bits of the 0th bit plane from the 98305th bit after the end position; Step 3.2: Based on seq[1], seq[2], ..., seq[6], find the small blocks marked as 0 in the 1st to 6th bit planes, and extract the information from the small blocks; Step 3.3: Concatenate the bits extracted from the 0th bit plane and the bits in the small blocks of the 1st to 6th bit planes; then generate a pseudo-random sequence based on the key Km and the chaotic system, and use the pseudo-random sequence and the encrypted bit sequence to perform an XOR operation to restore the hidden information.
4. The reversible information hiding method based on recursive structure and block-based thinking according to claim 3, characterized in that, The restored carrier image includes: Step 4.1: First, find the end marker 11111111 from the 0th bit plane, extract the bits before the end position to get Val, and then extract seq[1], seq[2], ..., seq[6], obtain the pseudo-random sequence according to the key Ke and the chaotic system, and perform an XOR operation with the image. After the operation is completed, the 7th bit plane has been restored. Step 4.2: Next, restore the 1st to 6th bit planes. First, for the kth bit plane, k=1,2,…,6, set all the small blocks marked as 0 to 0 according to seq[k]. Then restore from left to right and from top to bottom, for each pixel... The predicted value was calculated using the median forecasting method. Next, depending on whether the original value of the i-th row and j-th column of the k-th bit plane was 0 or 1, different restorations are performed. If the value is 0, then the predicted value is set to the i-th row and j-th column of the k-th bit plane. The k-th bit has a value of 1. Let the value in the i-th row and j-th column of the k-th bit plane be... The inverse value of the kth bit is used to restore the kth bit plane. After restoring the k-1th bit plane, the (k-1)th bit plane is restored, and so on, from the 6th to the 1st bit plane. Step 4.3: After restoring the 1st to 7th bit planes, continue to restore the 0th bit plane of the image. Use the auxiliary information list Val and the image composed of the remaining 7 bit planes to restore the 0th bit plane. Finally, stitch all the bit planes together to restore the entire image without distortion.
Citation Information
Patent Citations
A reversible information concealment framework with contrast pull-up utilizing histogram translation
CN111464717A
Reversible data hiding method of ciphertext domain image based on pixel difference coding
CN111970507A