Reversible data hiding method for binary image
By chunking in binary images and embedding of reference pixel points determined by using keys, security and data integrity problems in reversible data hiding of ciphertext images are solved, and efficient and lossless data hiding and image recovery effects are achieved. .
Patent Information
- Application Number
- CN202411190757.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2025-02-07
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art has security and data integrity problems in ciphertext image reversible data hiding, especially when the UB area reference pixel points are fixed, which may lead to data leakage and image corruption.
By dividing the binary image into uniform blocks (UB) and non-uniform blocks (NUB), and using the reference pixel points determined by the key in the UB area for data embedding, the scrambling processing and a new prediction method are used in the NUB area for data embedding. Data embedding.
High security data hiding and lossless image recovery are achieved, enhancing data integrity and steganography stability.
Smart Images

Figure CN119402601A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to data security technology, and in particular to a binary image reversible data hiding method. Background Art
[0002] At present, in order to protect data from being leaked and achieve data confidentiality, people choose to hide data cleverly in digital media. However, some early algorithms will affect the integrity of the original image when embedding data, which is a problem worthy of attention. In some special cases, it is necessary to ensure that the original image is not changed. Therefore, for these situations, people have proposed a new technology called Reversible Data Hiding (RDH), which can not only completely extract the original data, but also restore the image without loss.
[0003] A reversible data hiding (RDH) scheme for binary images has been proposed. The key to this scheme is that it cleverly embeds data by flipping pairs of images with opposite central pixels. A secure binary image steganography has been studied, which focuses on reducing texture distortion to improve the security and stability of steganography. The method of some people is to create a histogram by analyzing the length of consecutive identical pixel values in the image, and then modify this histogram to embed data. A high-capacity reversible binary image data hiding technology has been explored, which is based on pattern replacement. This technology mainly uses the characteristics of binary images to embed data by replacing specific pattern blocks in the image, thereby realizing reversible data hiding in binary images.
[0004] In some applications, it is necessary to ensure that the original image data is not leaked, so as to prevent unauthorized persons from viewing or modifying these images. For example, if you want to store a private photo in the cloud, but do not want others to see the real content of the photo, you can "lock" the photo before uploading it, that is, encrypt it. At this time, reversible data hiding based on the photo is obtained, which is Reversible Data Hiding In Encrypted Images (RDHEI).
[0005] RDHEI mainly consists of three groups of people: content owner, data hider and data receiver. The content owner owns the original image and has the right to decide who can view or modify the image. In order to protect the image, the content owner will encrypt the image with a special encryption key and then send the encrypted image to the data hider. After receiving the encrypted image, the data hider will cleverly embed the data embedding key data into the image and send the image with the secret to the data receiver. When the data receiver gets the image, he can choose to restore the original image with the decryption key and extract the data with the data extraction key. The whole process not only protects the security of the original image, but also realizes the secret transmission of data.
[0006] Someone first proposed the RDHEI scheme, which can embed data while encrypting an image and extract the embedded data during the decryption process. However, this algorithm has limitations. It can only restore the original image approximately, and cannot restore the original image losslessly. Subsequently, someone proposed a new separable RDHEI algorithm. The recipient of the image in this algorithm can restore the image and extract the data separately, and the two processes are no longer dependent on each other. Someone proposed a new algorithm that uses pixel prediction and multi-MSB (Most Significant Bit) plane rearrangement to hide data by modifying multiple most significant bits of specific pixels in the image. Someone explored a technology based on adaptive prediction error. This technology can securely embed additional data in the encrypted image while ensuring that the embedding process is reversible, that is, the embedded data can be extracted completely without affecting the restoration of the original image.
[0007] Technical solutions of existing technology:
[0008] 1. Reversible data hiding technology
[0009] Reversible Data Hiding (RDH) is a technology that hides additional information in data without affecting the integrity of the original information of the main data and can completely extract it when needed. It is usually used in applications such as digital copyright protection, privacy protection, and data integrity verification.
[0010] (1) Embedding algorithm: Secret data is embedded by changing certain characteristics of the carrier data. These changes need to be subtle to avoid causing significant quality loss to the carrier data.
[0011] (2) Extraction algorithm: Perform inverse operations on the carrier data according to the embedding algorithm to recover the embedded secret data. The extraction algorithm needs to have a high degree of accuracy to ensure that the secret data can be restored completely and without error.
[0012] In short, it can not only extract the embedded data completely, but also restore the original image losslessly. When it is necessary to implement reversible data hiding in grayscale images, the most commonly used methods are lossless compression, differential expansion and histogram shift.
[0013] 2. Reversible data hiding technology for binary images
[0014] (1) LSB algorithm:
[0015] The LSB (Least Significant Bit) algorithm is a simple and direct method that works well with binary images. In this method, information is embedded into the least significant bit (LSB) of a pixel. Since there are only two possible values (0 and 1) for a pixel in a binary image, information embedding can be achieved by fine-tuning the LSB.
[0016] 1) Embedding process: For each pixel, the information bit is replaced into the LSB according to the required information (usually 0 or 1), so that the value of this pixel changes from the original 0 or 1 to the information bit that needs to be embedded.
[0017] 2) Extraction process: The extraction process is the opposite of the embedding process, that is, reading the LSB bit of each pixel to extract the embedded information.
[0018] The advantage of this method is that it is simple and easy to implement, but the disadvantage is that the embedded information capacity is limited and the modified image may have slight visual changes.
[0019] (2) Difference expansion method:
[0020] Difference expansion methods in binary images use small differences between adjacent pixel values to hide information. These small differences are usually imperceptible to the human eye and can therefore be used to embed additional information.
[0021] 1) Embedding process: The information bit is represented by fine-tuning the difference between adjacent pixel values (for example, if the difference between pixel A and pixel B is 1, the information bit is 1; if the difference is 0, the information bit is 0).
[0022] 2) Extraction process: The extraction process recovers the embedded information by analyzing the differences in adjacent pixel values.
[0023] The advantage of this method is that it can hide more information and the modification of binary images is almost imperceptible visually.
[0024] 3. Reversible data hiding in ciphertext images
[0025] Existing reversible data hiding in encrypted image (RDHEI) schemes are mainly divided into two categories: one is reserving room before encryption (RRBE), and the other is vacating room after encryption (VRAE).
[0026] (1) In the VRBE scheme, the original image is first preprocessed to eliminate or reduce the redundant information in it, making room for subsequent data embedding. After the preprocessing is completed, the image is encrypted. This method uses the redundancy existing in the original image to achieve the possibility of data embedding.
[0027] (2) In the VRAE scheme, data is directly embedded in the encrypted image. This method does not require preprocessing before encryption, but directly embeds information during the encryption process or in the encrypted image.
[0028] In the field of Reversible Data Hiding in Encrypted Images (RDHEI), the latest research results come from Ren et al., who proposed a separable technique that allows the receiver to independently choose to recover the image or extract the secret data without performing both processes at the same time.
[0029] Disadvantages of existing technology:
[0030] 1. In reversible data hiding in ciphertext images, "making room before encryption" usually means that before hiding the data, some space needs to be reserved in the ciphertext image to accommodate the hidden data. This method has some risks. If space has been reserved in the ciphertext image to store the hidden data, the attacker can determine the location that may contain the hidden data by analyzing specific areas of the image, which may reduce the security of steganography.
[0031] 2. Since the encrypted ciphertext should maintain data integrity and consistency, "making room after encryption" to store additional data may lead to data modification or data consistency issues after decryption, which will affect the correctness and reliability of the data.
[0032] 3. The method of Ren et al. fixes the reference pixels in the uniform block (UB) area, and there is a large error in the extraction. This means that the reference pixels in the UB area are vulnerable to attacks. When restoring the image or extracting data, the original data may not be fully and accurately reproduced, which will affect the quality of the image or the integrity of the data. This technology also faces security issues. In the field of data hiding and encryption, security is of vital importance. Any defects that may cause data leakage or image corruption may pose a serious threat to the system. Although the method of Ren et al. provides a separable option, this may also increase the risk of the system being attacked or cracked.
[0033] Although the separable technology of Ren et al. has brought new possibilities to the field of RDHEI, its errors and security issues also need our attention. In future research, it is necessary to continue to explore more accurate, secure and efficient data hiding and encryption technologies to meet the needs of practical applications. Summary of the invention
[0034] The main purpose of the present invention is to provide a reversible data hiding method for binary images, in which the reference pixel points in the UB area are determined by a key, which has higher security, and there is only one reference pixel point in each UB block, so a large amount of data can be embedded; since the method changes the prediction method, the prediction of the non-uniform block (NUB) area is more accurate, and ultimately the original image can be restored without loss.
[0035] The technical solution adopted by the present invention is: a binary image reversible data hiding method, comprising:
[0036] Original image preprocessing, including image segmentation algorithm and image rearrangement algorithm;
[0037] Data embedding in UB area;
[0038] NUB area is scrambled and data is embedded, including the blocks in the NUB area are scrambled and NUB
[0039] Data embedding of regions;
[0040] Data extraction and image restoration, including UB area data extraction and image restoration, NUB area data
[0041] Data extraction and image restoration, binary image restoration.
[0042] Furthermore, the image segmentation algorithm includes:
[0043] Assume that the size of the original image is M×M, and each pixel is either 0 or 1; divide the original image into non-overlapping blocks of size N×N; blocks that are all white or all black are called uniform blocks, denoted by UB, and other blocks are called non-uniform blocks, denoted by NUB; next, set the UB block to label 1 and the NUB block to label 0; all labels form a tag map of size Get the type image.
[0044] Furthermore, the image rearrangement algorithm includes:
[0045] The original image is scanned block by block in the order of scan lines, i.e., from left to right and from top to bottom; with the help of the type image, two block sequences are obtained: the UB sequence and the NUB sequence; the blocks are rearranged to ensure that all UB blocks are in the upper part of the original image and all NUB blocks are in the lower part; according to the image rearrangement algorithm, the binary image is rearranged into UB and NUB regions.
[0046] Furthermore, the data embedding in the UB area includes:
[0047] The reference pixel points of the UB area are determined according to the key KA, and the UB area is embedded with the type image bit stream, compressed prediction error sequence W' and secret data except the reference pixel points.
[0048] Furthermore, the scrambling of the blocks in the NUB area includes:
[0049] Let K be the set of all possible permutations on Zm = {1, 2, 3, ..., m}, where m is the number of non-uniform blocks;
[0050] Take π∈K;
[0051] Let the sequence of non-uniform blocks be: x1, x2, x3, …, xm, where xi is the i-th non-uniform block;
[0052] Use formula (1) to replace all non-uniform blocks:
[0053] e π (x1,x2,x3,...,x m )=(x π(1) ,x π(2) ,x π(3) ,...,x π(m) ) (1)
[0054] Use formula (2) to restore the image and get the original non-uniform block:
[0055]
[0056] Among them, yi is the i-th non-uniform block after scrambling, and π and π-1 are inverse permutations of each other on Zm.
[0057] Furthermore, the data embedding of the NUB region includes:
[0058] Embed 4 bits of secret data in each block: select two T-shaped and two cross-shaped;
[0059] Six bits of secret data are embedded in each block: four T-shaped and two cross-shaped ones are selected.
[0060] Furthermore, the UB area data extraction and image restoration includes:
[0061] If the key KA is known, the random 0-1 sequence R generated by KA can be known. The sequence is converted into decimal in groups of four and 1 is added to obtain the reference pixel points in each UB block. The remaining points can be extracted to obtain the type image bit stream, W' and secret data.
[0062] Furthermore, the NUB region data extraction and image restoration includes:
[0063] According to the embedding method, the NUB area is directly scanned to extract P point and M point pixels, and the image is directly restored after data extraction; P point represents the part where data is to be embedded, and M point represents the part where data is to be embedded.
[0064] Furthermore, the binary image restoration includes:
[0065] The W' extracted from the UB area is restored to the prediction error sequence W. When W is equal to 1, the pixel value at point P or point M is modified. Then, the blocks in the NUB area are scrambled to obtain the carrier image.
[0066] The positions of uniform blocks and non-uniform blocks are rearranged by obtaining the type image bit stream in the UB region to restore the original binary image.
[0067] Advantages of the present invention:
[0068] The functions of the present invention are separable: the separation design allows information extraction and image restoration to be performed independently, thereby achieving higher security; by separating information extraction and image restoration, the access and use of information can be better controlled;
[0069] High embedding capacity: The binary image is divided into UB area and NUB area by block rearrangement. In each UB block, only one pixel is used as a reference pixel, and the rest can be used for data embedding. Compared with other algorithms, the embeddable part of this system accounts for a larger proportion of the UB part, so the system has a high-capacity embedding capability;
[0070] Lossless restoration of the original binary image: For the NUB block, since the prediction results obtained by the two prediction methods proposed in this method are more accurate, the lossless restoration effect is better, and the prediction error sequence is used, which will not cause distortion.
[0071] In addition to the above-described purposes, features and advantages, the present invention has other purposes, features and advantages. The present invention will be further described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] The drawings constituting a part of this application are used to provide a further understanding of the present invention. The illustrative embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0073] Figure 1 It is a solution embedding flow chart of the present invention;
[0074] Figure 2 It is a flow chart of extracting data and restoring original image according to the scheme of the present invention;
[0075] Figure 3 is the image block diagram of the present invention;
[0076] Figure 4 is an image rearrangement diagram of the present invention;
[0077] Figure 5 is the UB marker reference pixel of the present invention;
[0078] Figure 6 It is a schematic diagram of image embedding by region according to the present invention;
[0079] Figure 7 These are four T-shaped structural diagrams of the present invention;
[0080] Figure 8 These are two cross-shaped structural diagrams of the present invention;
[0081] Fig. 9 is a schematic diagram of an embedding method 1 of the present invention;
[0082] Fig.10 is a schematic diagram of an embedding method 2 of the present invention;
[0083] Fig.11 It is an example diagram of UB area data extraction and image restoration of the present invention;
[0084] Fig.12 It is a T-shaped structure diagram of NUB region image restoration of the present invention;
[0085] Fig.13 It is a cross-shaped structure diagram of NUB region image restoration of the present invention;
[0086] Fig.14 It is a schematic diagram of extracting information and restoring an image in the NUB region of the present invention. DETAILED DESCRIPTION
[0087] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0088] The present invention proposes a reversible data hiding method for binary images. First, the binary image is divided into blocks, which are divided into two types: uniform blocks UB and non-uniform blocks NUB. Then, these blocks are rearranged to obtain a carrier image. Each UB block uses a key KA to select a reference pixel point, and the value of the reference pixel point remains unchanged. The rest is replaced by the type image bit stream, W' and secret data. The NUB area is first scrambled, and then the remaining secret data is embedded into each NUB block according to the embedding method selected by the system, and finally a disguised binary image is formed. Figure 1 The flowchart of the scheme for embedding data is shown in FIG. Figure 2 Shown is the flow chart of the scheme for extracting data and restoring the original image.
[0089] The whole binary image reversible data hiding method includes four stages: the first stage is the preprocessing stage, in which the original binary image is divided into blocks and rearranged. The second stage is the data embedding of uniform block regions. The third stage is the scrambling and data embedding of non-uniform block regions. The fourth stage is data extraction and image recovery.
[0090] The four stages include:
[0091] 1. Original image preprocessing
[0092] (1) Image segmentation algorithm;
[0093] Assume that the size of the original image is M×M, and each pixel is either 0 (black) or 1 (white). First, divide the original image into non-overlapping blocks of size N×N, where N is generally much smaller than M. Blocks that are all white or all black are called uniform blocks, denoted by UB, and other blocks are called non-uniform blocks, denoted by NUB. Next, set the UB block to label 1 and the NUB block to label 0. All labels form a tag map (size ), and then obtain the type image. Figure 3 An example is given in the figure. As shown in the figure, the original image size is 6×6, which is divided into 2×2 small blocks to form a 3×3 type image, and finally the corresponding tag map and type image are formed.
[0094] (2) Image rearrangement algorithm;
[0095] Scan the original image block by block in the order of scan lines, i.e., from left to right and from top to bottom. With the help of the type image, we can obtain two block sequences: the UB sequence (composed of all uniform blocks) and the NUB sequence (composed of all non-uniform blocks). Next, we rearrange these blocks to ensure that all UB blocks are in the upper part of the original image and all NUB blocks are in the lower part. For the sake of explanation, Figure 4 An example of image rearrangement is shown in .
[0096] In actual operation, the binary image is divided into 4×4 small blocks using an image partitioning algorithm, and then the binary image is rearranged into UB and NUB regions according to an image rearrangement algorithm.
[0097] 2. UB area data embedding;
[0098] Before embedding data in this part, the reference pixel position of UB needs to be marked. The key KA is needed here. The key KA will generate a random 0-1 sequence, which is named R. Since the binary image is divided into 4×4 small blocks, each block has 16 pixels. Convert the four bits of R into decimal and add 1 to form Ri, where i represents the i-th uniform block. The position of the reference pixel is determined according to the value of Ri to facilitate the subsequent image recovery. If there are n uniform blocks, a 0-1 random sequence of length 4×n needs to be generated.
[0099] like Figure 5 Here is an example. Assume that the uniform blocks in the UB area are in the form of 2×2, and each uniform block contains 4×4 pixel values. The key KA generates a 0-1 random sequence of 4×4 length, that is, 0111 1001 11100001, which is converted into decimal and added by one, and the results are 8, 10, 15, 2. Then the reference pixel mark R1 is 8, R2 is 10, R3 is 15, and R4 is 2. Therefore, data is not embedded at R1, R2, R3, and R4.
[0100] After the marking of the UB area is completed, data is embedded in the remaining area of UB, directly replacing the remaining pixels. First, the type image bit stream generated in the preprocessing stage is embedded, and then the prediction error sequence W' is embedded.
[0101] (Introduced in the third stage), and finally embed the data that needs to be hidden, such as Figure 6 The purpose of doing this is to facilitate the subsequent restoration of the original image.
[0102] 3. NUB area scrambles and embeds data;
[0103] First, the blocks in the NUB area are scrambled, and then all the "T" and "X" structures in the NUB area are scanned according to the embedding method. If there is no prediction error in P or M, it is recorded as 0; if there is a prediction error in P or M, it is recorded as 1, and finally a 0-1 prediction error sequence is obtained, represented by W. Generally speaking, there are only a few errors in the image recovery of the NUB area, so there are more 0s and fewer 1s in W. The sequence W is compressed into W', and W' is embedded in the UB area.
[0104] Explanation on embedding method and P and M:
[0105] Figure 7 Four T-type structures proposed by the present invention. P, that is, the orange block, represents the part to be embedded. It can be seen that in a 4×4 small block, if embedding is selected, the 3rd, 8th, 9th, and 14th bits can be selected for embedding.
[0106] Figure 8 These are two cross-shaped structures proposed by the present invention. M, that is, the orange block, represents the part to be embedded with data. It can be seen that in a 4×4 small block, if embedding is selected, the 11th bit and the 6th bit can be selected for embedding.
[0107] There are two ways to embed the NUB area:
[0108] (1) Embed 4 bits of secret data in each block: select two T-shaped and two cross-shaped. Fig. 9 Six possible situations are shown, (a) represents T1, T2 and two crosses, (b) represents T1, T3 and two crosses, (c) represents T1, T4 and two crosses, (d) represents T2, T3 and two crosses, (e) represents T2, T4 and two crosses, and (f) represents T3, T4 and two crosses. Fig. 9 Each combination can embed four bits in a block, and the orange color indicates the possible embedding positions.
[0109] (2) Embed 6 bits of secret data in each block: select four T-shaped and two cross-shaped. Fig.10 Only one case is shown, with orange indicating the possible embeddable positions.
[0110] To embed data in the NUB area, first select the embedding method. The embedded data directly replaces the value of the embeddable position.
[0111] 4. Data extraction and image restoration;
[0112] First, find the dividing point between uniform blocks and non-uniform blocks, which is fixed for each image. Then use different methods to extract and recover data in each part.
[0113] (1) UB area data extraction and image restoration;
[0114] If the key KA is known, the random 0-1 sequence R generated by KA can be known. The sequence is converted into decimal in groups of four and 1 is added to obtain the reference pixel points in each UB block. The remaining points can be extracted to obtain the type image bit stream, W' and secret data.
[0115] like Fig.11 The figure shows an example. According to R1, R2, R3, and R4 obtained by KA, the original uniform block part can be restored. The secret data can be obtained by extracting the remaining points. The secret information extracted in the figure is 0101 0001 0100000110100100001010101011010111100000101111000110
[0116] (2) NUB region data extraction and image restoration;
[0117] According to the embedding method, the system directly scans the NUB area, extracts the pixels of point P and point M, and directly restores the image after data extraction.
[0118] Since two embedding models are used in the NUB region, this section provides two ways to restore the original image using these two models.
[0119] 1) T-type: Fig.12 As shown;
[0120]
[0121] Explanation of formula (3): The restoration of the pixel value of P is determined by the pixel values of the surrounding R, S, and T. When the pixel values around P are mostly 0, P is restored to 0. When the pixel values around P are mostly 1, P is restored to 1.
[0122] 2) Cross type: Fig.13 As shown;
[0123]
[0124] Explanation of formula (4): The restoration of the pixel value of M is determined by the pixel values of the surrounding pixels A, B, C, and D. When the pixel values of the surrounding pixels of M are mostly 0, M is restored to 0. When the pixel values of the surrounding pixels of M are mostly 1, M is restored to 1.
[0125] like Fig.14 As shown, an example is given. In a 4×4 small block, the embedding method (a) in method 1 is selected to embed the secret information 0010, and then the secret data is extracted and the image is restored.
[0126] (3) Binary image restoration;
[0127] Depend on Fig.14 Comparing the original image and the restored image, we can see that the restored image by this method may have errors, but for a binary image, the overall error is not large. W' has been obtained before, and the prediction error sequence W can be decompressed to restore the original image losslessly.
[0128] The W' extracted from the UB area is restored to the prediction error sequence W. When W is equal to 1, the pixel value extracted at point P or point M is modified (0 is changed to 1, 1 is changed to 0), and then the NUB area is scrambled to finally obtain the carrier image.
[0129] The original binary image can be restored by rearranging the positions of uniform blocks and non-uniform blocks in the type image bit stream obtained in the UB region.
[0130] The present invention proposes a reversible data hiding method for binary images. The method first divides the image into blocks to distinguish between uniform blocks and non-uniform blocks, and then adopts corresponding data embedding strategies according to different types of blocks, thereby significantly improving the overall data embedding efficiency. A key is used when selecting reference pixels in the uniform block area to ensure the randomness of the reference pixels. When restoring non-uniform block images, the method adopts a new prediction method, which provides more accurate prediction results, thereby achieving lossless restoration of the original image.
[0131] The reference pixel points in the UB area of this method are determined by a key, which is more secure. In addition, there is only one reference pixel point in each UB block, so a large amount of data can be embedded. At the same time, since this method changes the prediction method, the prediction of the non-uniform block (NUB) area is more accurate, and the original image can be restored losslessly in the end.
[0132] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A binary image reversible data hiding method, characterized in that: include: Original image preprocessing, including image segmentation algorithm and image rearrangement algorithm; Data embedding in UB area; NUB area is scrambled and data is embedded, including scrambling blocks in the NUB area and embedding data in the NUB area; Data extraction and image restoration, including UB area data extraction and image restoration, NUB area data Data extraction and image restoration, binary image restoration.
2. The binary image reversible data hiding method according to claim 1, characterized in that: The image segmentation algorithm includes: Assume that the size of the original image is M×M, and each pixel is either 0 or 1; divide the original image into non-overlapping blocks of size N×N; blocks that are all white or all black are called uniform blocks, denoted by UB, and other blocks are called non-uniform blocks, denoted by NUB; next, set the UB block to label 1 and the NUB block to label 0; all labels form a tag map of size Get the type image.
3. The binary image reversible data hiding method according to claim 1, characterized in that: The image rearrangement algorithm comprises: The original image is scanned block by block in the order of scan lines, i.e., from left to right and from top to bottom; with the help of the type image, two block sequences are obtained: the UB sequence and the NUB sequence; the blocks are rearranged to ensure that all UB blocks are in the upper part of the original image and all NUB blocks are in the lower part; according to the image rearrangement algorithm, the binary image is rearranged into UB and NUB regions.
4. The binary image reversible data hiding method according to claim 1, characterized in that: The data embedding in the UB area includes: The reference pixel points of the UB area are determined according to the key KA, and the UB area is embedded with the type image bit stream, compressed prediction error sequence W' and secret data except the reference pixel points.
5. The binary image reversible data hiding method according to claim 1, characterized in that: The scrambling process of the blocks in the NUB area includes: Let K be the set of all possible permutations on Zm = {1, 2, 3, ..., m}, where m is the number of non-uniform blocks; Take π∈K; Let the sequence of non-uniform blocks be: x1, x2, x3, …, xm, where xi is the i-th non-uniform block; Use formula (1) to replace all non-uniform blocks: e π (x1,x2,x3,...,x m )=(x π (1),x π (2),x π (3),...,x π ( m )) (1) Use formula (2) to restore the image and get the original non-uniform block: Among them, yi is the i-th non-uniform block after scrambling, and π and π-1 are inverse permutations of each other on Zm.
6. The binary image reversible data hiding method according to claim 1, characterized in that: The data embedding of the NUB region includes: Embed 4 bits of secret data in each block: select two T-shaped and two cross-shaped; Six bits of secret data are embedded in each block: four T-shaped and two cross-shaped ones are selected.
7. The binary image reversible data hiding method according to claim 1, characterized in that: The UB area data extraction and image restoration include: If the key KA is known, the random 0-1 sequence R generated by KA can be known. The sequence is converted into decimal in groups of four and 1 is added to obtain the reference pixel points in each UB block. The remaining points can be extracted to obtain the type image bit stream, W' and secret data.
8. The binary image reversible data hiding method according to claim 1, characterized in that: The NUB region data extraction and image restoration include: According to the embedding method, the NUB area is directly scanned to extract P point and M point pixels, and the image is directly restored after data extraction; P point represents the part where data is to be embedded, and M point represents the part where data is to be embedded.
9. The binary image reversible data hiding method according to claim 1, characterized in that: The binary image restoration comprises: The W' extracted from the UB area is restored to the prediction error sequence W. When W is equal to 1, the pixel value at point P or point M is modified. Then, the blocks in the NUB area are scrambled to obtain the carrier image. The positions of uniform blocks and non-uniform blocks are rearranged by obtaining the type image bit stream in the UB region to restore the original binary image.
Citation Information
Cited By
Logistics privacy protection method based on encrypted two-dimensional code
CN120509810A
A logistics privacy protection method based on encrypted two-dimensional code
CN120509810B