Single-pixel value sorting reversible information hiding method and system based on global sorting
Through a single pixel value sorting method based on global sorting, similar pixels in the global scope are gathered together, which solves the performance limitation caused by the blocking method relying on local spatial correlation in the prior art, and achieves more efficient reversible information hiding performance.
Patent Information
- Application Number
- CN202411941270.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-12-26
AI Technical Summary
When using textured complex images, the existing reversible information hiding methods rely too much on local spatial correlation, resulting in performance limitations.
A single pixel value sorting method based on global sorting is used to gather pixels with similar values in the global range together. Through four-layer division and global sorting, the predicted value and complexity of each pixel layer are calculated to guide whether the pixels to be embedded in the pixel segment are embedded with secret information.
Improves the hidden performance of reversible information hiding, reduces carrier distortion, and enhances embedding capacity, especially when processing complex textured images.
Smart Images

Figure CN119728869A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of information security technology, relates to the field of reversible information hiding, and particularly to a single pixel value sorting reversible information hiding method and system based on global sorting. Background Art
[0002] Reversible information hiding is an advanced information security technology that can hide secret information in a public carrier image, making the secret information not only invisible but also difficult to detect, thereby causing attackers to ignore the existence of the secret information, avoiding the risk of information being stolen during transmission, and enabling secret communication; in addition, the legitimate recipient can restore all secret information and the original carrier image without loss. Specifically, reversible information hiding technology is often used in fields that require high quality of carrier images, such as military, aerospace, judicial authentication, and medical images.
[0003] The main criteria for measuring the effectiveness of reversible information hiding algorithms are carrier distortion and embedding capacity; explanatory terms, carrier distortion refers to the change in the visual quality of the carrier image before and after the secret information is embedded, and embedding capacity refers to the maximum amount of secret information that can be embedded in a carrier image.
[0004] In order to reduce carrier distortion and increase embedding capacity, some researchers proposed using the surrounding pixels of the pixel to be embedded to predict it, and embedding secret information into the prediction error, which achieved good results. Later, new research proposed combining the prediction errors into pairs, and by modifying the mapping method of the two-dimensional prediction error, the distortion performance and embedding capacity were further improved.
[0005] At present, researchers have proposed dividing the carrier image into local pixel blocks and then predicting and embedding secret information separately, which has achieved good overall results. However, the block division method of such existing methods is too dependent on the local spatial correlation of the image, and it is difficult to perform well when facing images with complex textures. Summary of the invention
[0006] The purpose of the present invention is to provide a reversible information hiding method and system based on global sorting of single pixel value sorting to solve one or more of the above-mentioned technical problems. The technical solution disclosed in the present invention gathers pixels with similar values in the global range together, breaking through the distance limitation, and can solve the technical problem that the existing technology only relies on the local spatial correlation block of the image to limit the reversible information hiding performance, and can improve the hiding performance of reversible information hiding.
[0007] In order to achieve the above object, the present invention adopts the following technical solutions:
[0008] In a first aspect, the present invention provides a single pixel value sorting reversible information hiding method based on global sorting, comprising the following steps:
[0009] Acquire an original carrier image and perform an anti-overflow and anti-underflow operation to obtain a processed carrier image; based on the original carrier image, acquire a position array recording the overflow and underflow positions;
[0010] Divide the processed carrier image except the first row into four pixel layers, and calculate the prediction value and complexity of all pixels in each pixel layer in sequence, and globally sort the pixels of each pixel layer according to the prediction value and complexity of the pixels to obtain a one-dimensional pixel sequence;
[0011] Based on a one-dimensional pixel sequence, for all pixel segment sizes within a selected range, according to the relationship between a preset complexity threshold and the complexity of each pixel segment, it is guided whether to embed secret information in the pixels to be embedded in each pixel segment; wherein, for the selected current pixel segment size, the pixel segment complexity under the current pixel segment size and the single pixel value sorting prediction error of each pixel segment are calculated, and according to the relationship between the pixel segment complexity and the complexity threshold, it is guided whether the pixels to be embedded in each pixel segment are used to embed secret information, and according to the value of the prediction error, the secret information is embedded in the processed carrier image, and then the auxiliary information required to restore the carrier image and extract the information is embedded in the first row of pixels of the processed carrier image to obtain a secret carrier image; wherein, the auxiliary information includes a position array recording the overflow and underflow positions, the pixel segment size and the complexity threshold;
[0012] The distortion levels of the encrypted carrier image and the original carrier image under different pixel segment sizes are compared, and the encrypted carrier image with the lowest distortion is selected as the final encrypted carrier image.
[0013] A further improvement of the present invention is that in the step of dividing the portion of the processed carrier image except the first row into four pixel layers, calculating the prediction values and complexity of all pixels of each pixel layer in sequence, and globally sorting the pixels of each pixel layer by the prediction values and complexity of the pixels to obtain a one-dimensional pixel sequence,
[0014] The step of dividing the portion of the processed carrier image except the first row into four pixel layers is that all pixels whose horizontal and vertical coordinates are both odd numbers form a first pixel layer, all pixels whose horizontal coordinates are even numbers and whose vertical coordinates are odd numbers form a second pixel layer, all pixels whose horizontal coordinates are odd numbers and whose vertical coordinates are even numbers form a third pixel layer, and all pixels whose horizontal coordinates are even numbers and whose vertical coordinates are odd numbers form a fourth pixel layer;
[0015] The steps of calculating the predicted values and the complexity of all pixels in each pixel layer in the order of the first pixel layer, the second pixel layer, the third pixel layer, and the fourth pixel layer are as follows: for each pixel in each pixel layer, the predicted value is calculated using the pixels of 16 other pixel layers around the pixel, and the complexity is calculated using the 8 pixels adjacent to the pixel;
[0016] The steps of globally sorting the pixels of each pixel layer by the predicted value and complexity of the pixels are as follows: for all the pixels in each pixel layer, firstly, the predicted value is used to sort them in ascending order, and then the pixels with the same predicted value in the entire pixel sequence after ascending order are sorted alternately in ascending and descending order to obtain a globally sorted sequence.
[0017] A further improvement of the present invention is that the step of calculating the predicted values and complexity of all pixels of each pixel layer in the order of the first pixel layer, the second pixel layer, the third pixel layer, and the fourth pixel layer is that for each pixel in each pixel layer, the predicted value is calculated using the pixels of 16 other pixel layers around the pixel, and the complexity is calculated using the 8 pixels adjacent to the pixel.
[0018] For a selected pixel, use the pixels {x 1 ,x 2 ,...,x 16} Calculate the geometric similarity parameter A according to the following formula i (i∈[1,8]), the calculation expression is:
[0019]
[0020] Where τ is the grayscale range;
[0021] The twist distance is calculated as follows:
[0022] D i =dk 1 ×A i ×d×(d-1);
[0023] In the formula, k 1 =4 is the coefficient that controls the distortion strength; d = 1 / 2 is the original relative distance between the pixel and the adjacent pixel; the distance d from the pixel to the rectangular edge formed by the adjacent pixel is calculated according to the following formula 1 ' 80 d 9 ' 0 d 1 ' 35 and d 4 ' 5 :
[0024]
[0025] The inverse gradient weights in eight directions are calculated according to the following formula:
[0026]
[0027] In the formula, k 2 = 0.2 is a parameter that controls the influence of gradient on prediction;
[0028] Combining the distortion distance and the corresponding inverse gradient weight, the weights of the eight neighboring pixels are calculated according to the following formula:
[0029]
[0030] U=g 180 (1-d′ 180 )+g 0 ·d′ 180 +g 90 (1-d′ 90 )+g -90 ·d′ 90 +k 3 ·g 135 (1-d′ 135 )+k 3 ·g -45 ·d′ 135 +k 3 ·g 45 (1-d' 45 )+k 3 ·g -135 ·d′ 45 ;
[0031] In the formula, is the adjustment parameter of spatial distance;
[0032] Assign weights to the corresponding adjacent pixels and calculate the predicted value of the center pixel according to the following formula:
[0033]
[0034] Where [·] represents the rounding function;
[0035] The pixel complexity C is calculated using the 8 pixels adjacent to the center pixel according to the following formula:
[0036] C=|x 5 -x 2 |+|x 2 -x 6 |+|x 6 -x 3 |+|x3 -x 7 |+|x 7 -x 4 |+|x 4 -x 8 |+|x 8 -x 1 |+|x 1 -x 5 |.
[0037] A further improvement of the present invention is that, based on the one-dimensional pixel sequence, for all pixel segment sizes within the selected range, according to the relationship between a preset complexity threshold and the complexity of each pixel segment, in the step of guiding whether to embed the pixel to be embedded in each pixel segment into secret information,
[0038] Set the size of the pixel segment to s;
[0039] For a pixel segment, the pixels {p, z 1 ,z 2 ,…,z s-1}, p represents the pixel to be embedded, z 1 ,z 2 ,…,z s-1 Represents the predicted pixel used to predict p; all pixel segments are obtained in sequence with one pixel as the interval according to the global sorting order;
[0040] Calculate the single pixel ranking prediction value of the pixel p to be embedded in each pixel segment; calculate the complexity C of each pixel segment Seq ;
[0041] Visit each pixel segment obtained in turn and calculate the prediction error of the pixel p to be embedded; add the complexity threshold T to the complexity C of each pixel segment. Seq For comparison, if C Seq >T, then skip the pixel segment. If C Seq ≤T, the secret information is embedded in the pixel segment.
[0042] A further improvement of the present invention is that
[0043] The step of calculating the single pixel ranking prediction value of the pixel p to be embedded in each pixel segment is as follows: for each pixel segment {p, z 1 ,z 2 ,…,z s-1}, use the predicted pixel {z 1 ,z 2 ,…,z s-1} Get the two single pixel value sorted prediction values of the pixel p to be embedded and
[0044]
[0045] The complexity C of calculating each pixel segment Seq In the step of 1 ,z 2 ,…,z s-1}, calculate the complexity C of the pixel segment according to the following formula Seq :
[0046]
[0047] In the formula, is the calculated pixel p, z 1 、z 2 …z s-1 The pixel complexity of
[0048] The method sequentially accesses each pixel segment obtained, calculates the prediction error of the pixel p to be embedded; and compares the complexity threshold T with the complexity C of each pixel segment. Seq For comparison, if C Seq >T, then skip the pixel segment. If C Seq ≤T, then the steps of embedding secret information into pixel segments are as follows: for each pixel segment {p, z 1 ,z 2 ,…,z s-1}, use the single pixel value to sort the predicted value according to the following formula and Calculate the prediction error e:
[0049]
[0050] In the formula, Indicates that the prediction error does not exist;
[0051] For each pixel segment {p,z 1 ,z 2 ,…,z s-1}, the complexity threshold T and the complexity C of each pixel segment Seq For comparison, if C Seq >T, skip the current pixel segment; if C Seq ≤T, check the prediction error of the pixel to be embedded in the pixel segment. If it does not exist, skip the current pixel segment. Otherwise, embed the secret information into pixel p according to the following formula:
[0052]
[0053] In the formula, represents the modified pixel; sd∈{0,1} is the embedded secret information bit.
[0054] A further improvement of the present invention is that in the step of obtaining the original carrier image and performing an anti-overflow and anti-underflow operation to obtain a processed carrier image; and obtaining a position array recording the overflow and underflow positions based on the original carrier image,
[0055] Traverse all pixels of the original carrier image except the first row in raster scanning order, set the initial value of parameter k to 1, and perform the following operations on each pixel:
[0056]
[0057] Wherein, p represents the pixel value being traversed; LM is a position array, which is a one-dimensional vector used to record the position of the pixel whose pixel value has been adjusted;
[0058] LM is arithmetically compressed to reduce the number of bits required by the recorder, and a compressed position array CLM is obtained.
[0059] A further improvement of the present invention is that
[0060] The step of embedding the auxiliary information required for restoring the carrier image and extracting the information into the first row of pixels of the processed carrier image is as follows: for a carrier image of size H×W, record the first row of pixels. The least significant bit of the pixels is converted into the secret information; the first line of the original The least significant bit is replaced by auxiliary information; the auxiliary information includes the pixel segment size s used, which occupies 3 bits; the complexity threshold T of the four layers, which occupies 4×12=48 bits; the last position P of the four layers of embedding end , occupied Bit, Indicates rounding up; the length of the compressed position array CLM is l CLM , occupied Bit.
[0061] A further improvement of the present invention is that after obtaining the final encrypted carrier image, a decoding step is also included; wherein,
[0062] The decoding step includes: reading the first line of the final encrypted carrier image The least significant bit of the pixel is used to obtain auxiliary information for decoding; wherein the auxiliary information for decoding includes the pixel segment size s used, the complexity threshold T of the four layers, and the last position P of the four layers embedded end and the length l of the compressed position array CLM CLM ;
[0063] The order of the layers in decoding is opposite to that in the embedding stage;
[0064] For each pixel level decoding, we perform global sorting in the same way as embedding, calculate the complexity of all pixel segments of size s, and then start from the last embedding position P of the pixel level. end At the beginning, a pixel segment of size s is obtained, and according to the relationship between the complexity of the pixel segment and the complexity threshold T, the pixel segment is guided to be decoded or skipped; after decoding a pixel segment, the next pixel segment is obtained in the opposite direction of the embedding stage at intervals of one pixel and decoding is attempted until all pixel segments are decoded;
[0065] The least significant bit corresponding to the first row in the decoded secret message bit secret information and the first line before the current The least significant bit of the pixel is replaced;
[0066] The l corresponding to CLM CLM The secret information of the bits is extracted and decompressed to obtain the position array LM, and the pixel values that have undergone the anti-underflow and anti-underflow operations are restored using LM.
[0067] In a second aspect, the present invention provides a single pixel value sorting reversible information hiding system based on global sorting, comprising:
[0068] A preprocessing module is used to obtain an original carrier image and perform an anti-overflow and anti-underflow operation to obtain a processed carrier image; based on the original carrier image, a position array recording the overflow and underflow positions is obtained;
[0069] A global sorting module is used to divide the part of the processed carrier image except the first row into four pixel layers, and calculate the prediction value and complexity of all pixels in each pixel layer in sequence, and globally sort the pixels of each pixel layer according to the prediction value and complexity of the pixels to obtain a one-dimensional pixel sequence;
[0070] A prediction and embedding module, for guiding whether to embed secret information in pixels to be embedded in each pixel segment based on a one-dimensional pixel sequence and for all pixel segment sizes within a selected range according to the relationship between a preset complexity threshold and the complexity of each pixel segment; wherein, for a selected current pixel segment size, the pixel segment complexity under the current pixel segment size and the single pixel value sorting prediction error of each pixel segment are calculated, and according to the relationship between the pixel segment complexity and the complexity threshold, guiding whether to embed secret information in pixels to be embedded in each pixel segment, and embedding secret information into a processed carrier image according to the value of the prediction error, and then embedding auxiliary information required for restoring the carrier image and extracting information into the first row of pixels of the processed carrier image to obtain a secret carrier image; wherein, the auxiliary information includes a position array recording the overflow and underflow positions, the pixel segment size and the complexity threshold;
[0071] The final encrypted carrier image acquisition module is used to compare the distortion degree of the encrypted carrier image obtained under different pixel segment sizes and the original carrier image, and select the encrypted carrier image with the lowest distortion as the final encrypted carrier image.
[0072] According to a third aspect of the present invention, there is provided an electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the reversible information hiding method based on global sorting of single pixel value sorting as described in any one of the first aspect of the present invention is implemented.
[0073] Compared with the prior art, the present invention has the following beneficial effects:
[0074] The existing algorithms based on pixel value sorting still have a lot of room for improvement. Currently, they only rely on the local spatial correlation of the carrier image, and cannot obtain predicted pixels that can accurately predict the pixels to be embedded. The pixel aggregation method still needs to be improved. In view of the above-mentioned existing technical problems, the present invention specifically provides a single pixel value sorting reversible information hiding method based on global sorting, which adopts a prediction based on the four-layer division of the carrier image. After globally sorting the pixel prediction value and complexity, all pixels are converted into a one-dimensional sequence, and similar pixels in the global range are concentrated in the same neighborhood regardless of spatial distance, so that the prediction using pixels in the neighborhood can be more accurate, thereby reducing carrier distortion. In summary, in the technical solution of the present invention, a global sorting method is proposed, which converts the layered image into a one-dimensional sequence, so that similar pixels in the entire image are concentrated in the same neighborhood, which can bring the benefit of increased prediction accuracy, reduce carrier distortion caused by embedding secret information, and improve the embedding performance of the reversible information hiding method. BRIEF DESCRIPTION OF THE DRAWINGS
[0075] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below; obviously, the drawings described below are some embodiments of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0076] Figure 1 It is a flowchart of a single pixel value sorting reversible information hiding method based on global sorting in an embodiment of the present invention;
[0077] Figure 2 is a schematic diagram of four-layer division of a carrier image used in an embodiment of the present invention;
[0078] Figure 3is a schematic diagram of pixels used when calculating the predicted value and complexity of pixels in the current layer using pixels in other three layers in an embodiment of the present invention;
[0079] Figure 4 It is a schematic diagram showing the change of the peak signal-to-noise ratio (PSNR) of the carrier image and the original image with the embedding amount (Payload) when the method provided by the embodiment of the present invention is compared with the existing traditional single pixel value sorting method on the image Baboon;
[0080] Figure 5 It is a schematic diagram showing the change of the peak signal-to-noise ratio (PSNR) of the carrier image and the original image with the embedding amount (Payload) when the method provided by the embodiment of the present invention is compared with the existing traditional single pixel value sorting method on the image Barbara;
[0081] Figure 6 It is a schematic diagram showing the change of the peak signal-to-noise ratio (PSNR) of the carrier image and the original image with the embedding amount (Payload) when the method provided by the embodiment of the present invention is compared with the existing traditional single pixel value sorting method on the image Lake;
[0082] Figure 7 It is a schematic diagram of a single pixel value sorting reversible information hiding system based on global sorting in an embodiment of the present invention. DETAILED DESCRIPTION
[0083] In order to make the purpose, technical solutions and advantages of the present invention clearer, the technical solutions in the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention; it is obvious that the described embodiments and technical solutions are only part of the embodiments of the present invention, not all of the embodiments.
[0084] All other embodiments obtained by those of ordinary skill in the art without creative work based on the technical solutions disclosed in the embodiments of the present invention belong to the scope of protection of the present invention. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0085] See also Figure 1 , a single pixel value sorting reversible information hiding method based on global sorting is provided in an embodiment of the present invention, comprising the following steps:
[0086] Step 1: Obtain an original carrier image and perform an anti-overflow and anti-underflow operation to obtain a processed carrier image; based on the original carrier image, obtain a position array recording the overflow and underflow positions;
[0087] In a specific exemplary technical solution, all pixels except the first row of the pre-selected original carrier image are traversed in raster scanning order, the initial value of parameter k is set to 1, and the following operation is performed on each pixel:
[0088]
[0089] In formula (1), p represents the pixel value being traversed; LM is a position array, which is a one-dimensional vector used to record the position of the pixel whose pixel value has been adjusted;
[0090] Further, LM is arithmetically compressed to reduce the number of bits required by the recorder, and a compressed position array CLM is obtained; CLM is incorporated into the secret information to be embedded as a part of the secret information;
[0091] Step 2: Divide the processed carrier image except the first row into four pixel layers, and calculate the prediction value and complexity of all pixels in each pixel layer in sequence, and globally sort the pixels of each pixel layer according to the prediction value and complexity of the pixels to obtain a one-dimensional pixel sequence;
[0092] See also Figure 2 , Figure 3 In a specific exemplary technical solution, the processed carrier image except the first row is processed according to Figure 2 As shown, it is divided into four layers (i.e., four pixel layers) and used in sequence Figure 3 The surrounding pixels shown are used to calculate the predicted values and complexity of all pixels in each layer; the pixels in each pixel layer are globally sorted by the predicted values and complexity of the pixels to obtain the entire one-dimensional pixel sequence;
[0093] In a specific exemplary technical solution, the processed carrier image is divided into four layers; wherein all pixels whose horizontal and vertical coordinates are both odd numbers constitute the first layer, all pixels whose horizontal coordinates are even numbers and vertical coordinates are odd numbers constitute the second layer, all pixels whose horizontal coordinates are odd numbers and vertical coordinates are even numbers constitute the third layer, and all pixels whose horizontal coordinates are even numbers and vertical coordinates are odd numbers constitute the fourth layer;
[0094] For a pixel p, use the pixels {x 1 ,x 2 ,...,x 16} Calculate the geometric similarity parameter A according to the following formula i (i∈[1,8]):
[0095]
[0096] In formula (2), τ is the grayscale range, and for an 8-bit image, τ is 256.
[0097] The warp distance is then calculated as follows:
[0098] D i =dk 1 ×A i ×d×(d-1)(3)
[0099] In formula (3), k 1 =4 is the coefficient controlling the distortion strength; d=1 / 2 is the original relative distance between pixel p and its neighboring pixels.
[0100] Then, the distance d from pixel p to the edge of the rectangle formed by its adjacent pixels is calculated according to the following formula: 1 ' 80 d 9 ' 0 d 1 ' 35 and d 4 ' 5 :
[0101]
[0102] The inverse gradient weights in eight directions are calculated according to the following formula:
[0103]
[0104] In formula (5), k 2 = 0.2 is a parameter that controls the influence of the gradient on the prediction.
[0105] Then, combining the warped distance and its corresponding inverse gradient weight, the weights of the eight neighboring pixels are calculated as follows:
[0106] U=g 180 (1-d′ 180 )+g 0 ·d′ 180 +g 90 (1-d′ 90 )+g -90 ·d′ 90 +k 3 ·g 135 (1-d′ 135 )+k 3 ·g -45 ·d′ 135 +k 3 ·g 45 (1-d' 45 )+k 3 ·g-135 ·d′ 45 (6)
[0107] In formula (6), is the adjustment parameter of the spatial distance.
[0108] After that, these weights are assigned to the corresponding neighboring pixels, and the predicted value of the central pixel p is calculated according to the following formula:
[0109] In formula (7), [·] represents a rounding function.
[0110] Use the 8 pixels adjacent to the central pixel p to calculate its pixel complexity according to the following formula:
[0111] C=|x 5 -x 2 |+|x 2 -x 6 |+|x 6 -x 3 |+|x 3 -x 7 |+|x 7 -x 4 |+|x 4 -x 8 |+|x 8 -x 1 |+|x 1 -x 5 | (8)
[0112] For all pixels in each layer, first use their predicted values to sort them in ascending order, and then sort the pixels with the same predicted values in the entire pixel sequence after ascending order alternately in ascending and descending order to obtain a globally sorted sequence;
[0113] Step 3: Based on the one-dimensional pixel sequence, for all pixel segment sizes within the selected range, according to the relationship between the preset complexity threshold and the complexity of each pixel segment, guide the pixels to be embedded in each pixel segment whether to use the single pixel value sorting method to embed secret information;
[0114] In a specific exemplary technical solution, the size of the pixel segment is set to s, s∈{4,7,10,13,16}; for a pixel segment, the pixels {p,z 1 ,z 2 ,…,z s-1}, where p represents the pixel to be embedded, z 1 ,z 2 ,…,z s-1is the predicted pixel used to predict p; all pixel segments are obtained in sequence with one pixel as the interval according to the global sorting order;
[0115] For each pixel segment {p,z 1 ,z 2 ,…,z s-1}, use the predicted pixel {z 1 ,z 2 ,…,z s-1} Get the two single pixel value sorted prediction values of pixel p and
[0116]
[0117] For each pixel segment {p,z 1 ,z 2 ,…,z s-1}, calculate the complexity C of the pixel segment according to the following formula Seq :
[0118]
[0119] In formula (10), is the calculated pixel p, z 1 、z 2 …z s-1 The pixel complexity.
[0120] For each pixel segment {p,z 1 ,z 2 ,…,z s-1}, use the single pixel value to sort the predicted value according to the following formula and Calculate the prediction error e:
[0121]
[0122] In formula (11), Indicates that there is no prediction error.
[0123] For each pixel segment {p,z 1 ,z 2 ,…,z s-1}, the pre-selected complexity threshold T and the complexity C of each pixel segment Seq For comparison, if C Seq >T, skip the current pixel segment; if C Seq ≤T, check the prediction error of the pixel to be embedded in the pixel segment. If it does not exist, skip the current pixel segment. Otherwise, embed the secret information into pixel p according to the following formula:
[0124]
[0125] In formula (12), represents the modified pixel p, and sdA{0,1} is the embedded secret information bit.
[0126] In addition, the step of embedding the auxiliary information required for restoring the carrier image and extracting the information into the first row of pixels of the processed carrier image comprises: for a carrier image of size H×W, recording the first row of the front The least significant bit of the pixels is merged into the secret information; the first line of the original The least significant bits are replaced with auxiliary information;
[0127] The auxiliary information includes: the pixel segment size s used, which occupies 3 bits; the complexity threshold T of the four layers, which occupies 4×12=48 bits; the last position P of the four layers of embedding end , occupied Bit, Indicates rounding up; the length of the compressed position array CLM is l CLM , occupied Bit.
[0128] Step 4: Compare the distortion levels of the encrypted carrier images at different pixel segment sizes, and select the encrypted carrier image with the smallest distortion compared to the original carrier image as the final encrypted carrier image.
[0129] In the embodiment of the present invention, the performance of the final method can be measured by an embedding capacity-peak signal-to-noise ratio curve, that is, the carrier image quality under a specific amount of embedded information.
[0130] In summary, an embodiment of the present invention discloses a single pixel value sorting reversible information hiding method based on global sorting, which is used for secret communication. The method includes: performing anti-overflow / underflow operations on a carrier image, and recording corresponding information for image recovery; dividing the carrier image into four layers, calculating the pixel prediction value and complexity of each layer, and performing global sorting; according to the relationship between the complexity and the complexity threshold, controlling the embedding operation of each pixel segment in turn; and embedding the auxiliary information required for decoding into the image.
[0131] See also Figures 4 to 6 The technical solution of the embodiment of the present invention can improve the embedding performance of the reversible information hiding algorithm based on the pixel value sorting method, and the effectiveness of the method is verified by experiments. Figure 4 , Figure 5 and Figure 6It can be seen that the single pixel value sorting reversible information hiding method based on global sorting in the embodiment of the present invention can effectively improve the embedding performance of the pixel value sorting algorithm. In addition, by comparing the embedding performance of the single pixel value sorting reversible information hiding method based on traditional blocking and the algorithm of the present invention on the standard test images Baboon, Barbara and Lake, that is, the PSNR curve corresponding to the embedding amount starting from 5,000 bits with a step size of 1,000 bits to the maximum embedding capacity of the algorithm of the present invention, it can be seen that the method proposed in the present invention has a significant improvement in carrier distortion performance. Furthermore, the adaptive global sorting method proposed in the embodiment of the present invention is not only applicable to the single pixel value sorting method mentioned in the embodiment of the present invention, but also to many other methods based on pixel value sorting, which can reduce carrier distortion.
[0132] The following are device embodiments of the present invention, which can be used to implement the method embodiments of the present invention. For details not disclosed in the device embodiments, please refer to the method embodiments of the present invention.
[0133] See also Figure 7 In an embodiment of the present invention, a single pixel value sorting reversible information hiding system based on global sorting is provided, comprising:
[0134] A preprocessing module is used to obtain an original carrier image and perform an anti-overflow and anti-underflow operation to obtain a processed carrier image; based on the original carrier image, a position array recording the overflow and underflow positions is obtained;
[0135] A global sorting module is used to divide the part of the processed carrier image except the first row into four pixel layers, and calculate the prediction value and complexity of all pixels in each pixel layer in sequence, and globally sort the pixels of each pixel layer according to the prediction value and complexity of the pixels to obtain a one-dimensional pixel sequence;
[0136] A prediction and embedding module, for guiding whether to embed secret information in pixels to be embedded in each pixel segment based on a one-dimensional pixel sequence and for all pixel segment sizes within a selected range according to the relationship between a preset complexity threshold and the complexity of each pixel segment; wherein, for a selected current pixel segment size, the pixel segment complexity under the current pixel segment size and the single pixel value sorting prediction error of each pixel segment are calculated, and according to the relationship between the pixel segment complexity and the complexity threshold, guiding whether to embed secret information in pixels to be embedded in each pixel segment, and embedding secret information into a processed carrier image according to the value of the prediction error, and then embedding auxiliary information required for restoring the carrier image and extracting information into the first row of pixels of the processed carrier image to obtain a secret carrier image; wherein, the auxiliary information includes a position array recording the overflow and underflow positions, the pixel segment size and the complexity threshold;
[0137] The final encrypted carrier image acquisition module is used to compare the distortion degree of the encrypted carrier image obtained under different pixel segment sizes and the original carrier image, and select the encrypted carrier image with the lowest distortion as the final encrypted carrier image.
[0138] In one embodiment of the present invention, a computer device is provided, the computer device comprising a processor and a memory, the memory is used to store a computer program, the computer program includes program instructions, and the processor is used to execute the program instructions stored in the computer storage medium. The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc., which are the computing core and control core of the terminal, which are suitable for implementing one or more instructions, and are specifically suitable for loading and executing one or more instructions in the computer storage medium to implement the corresponding method flow or corresponding function; the processor described in the embodiment of the present invention can be used to perform the operation of the single pixel value sorting reversible information hiding method based on global sorting.
[0139] In one embodiment of the present invention, a storage medium is provided, specifically a computer-readable storage medium (Memory), which is a memory device in a computer device for storing programs and data. It is understandable that the computer-readable storage medium here can include both built-in storage media in the computer device and, of course, extended storage media supported by the computer device. The computer-readable storage medium provides a storage space, which stores the operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by the processor are also stored in the storage space, and these instructions can be one or more computer programs (including program codes). It should be noted that the computer-readable storage medium here can be a high-speed RAM (Random Access Memory) memory, or a non-volatile memory (non-volatile memory), such as at least one disk memory. The processor can load and execute one or more instructions stored in the computer-readable storage medium to implement the corresponding steps of the single pixel value sorting reversible information hiding method based on global sorting in the above embodiment.
[0140] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, optical storage, etc.) that contain computer-usable program code.
[0141] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0142] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0143] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0144] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A reversible information hiding method based on global sorting of single pixel values, characterized in that: The following steps are involved: Acquire an original carrier image and perform an anti-overflow and anti-underflow operation to obtain a processed carrier image; based on the original carrier image, acquire a position array recording the overflow and underflow positions; Divide the processed carrier image except the first row into four pixel layers, and calculate the prediction value and complexity of all pixels in each pixel layer in sequence, and globally sort the pixels of each pixel layer according to the prediction value and complexity of the pixels to obtain a one-dimensional pixel sequence; Based on a one-dimensional pixel sequence, for all pixel segment sizes within a selected range, according to the relationship between a preset complexity threshold and the complexity of each pixel segment, it is guided whether to embed secret information in the pixels to be embedded in each pixel segment; wherein, for the selected current pixel segment size, the pixel segment complexity under the current pixel segment size and the single pixel value sorting prediction error of each pixel segment are calculated, and according to the relationship between the pixel segment complexity and the complexity threshold, it is guided whether the pixels to be embedded in each pixel segment are used to embed secret information, and according to the value of the prediction error, the secret information is embedded in the processed carrier image, and then the auxiliary information required to restore the carrier image and extract the information is embedded in the first row of pixels of the processed carrier image to obtain a secret carrier image; wherein, the auxiliary information includes a position array recording the overflow and underflow positions, the pixel segment size and the complexity threshold; The distortion levels of the encrypted carrier image and the original carrier image under different pixel segment sizes are compared, and the encrypted carrier image with the lowest distortion is selected as the final encrypted carrier image.
2. According to the method of reversible information hiding based on global sorting of single pixel value sorting according to claim 1, it is characterized in that: In the step of dividing the portion of the processed carrier image except the first row into four pixel layers, calculating the prediction values and complexity of all pixels in each pixel layer in sequence, and globally sorting the pixels of each pixel layer by the prediction values and complexity of the pixels to obtain a one-dimensional pixel sequence, The step of dividing the portion of the processed carrier image except the first row into four pixel layers is that all pixels whose horizontal and vertical coordinates are both odd numbers form a first pixel layer, all pixels whose horizontal coordinates are even numbers and whose vertical coordinates are odd numbers form a second pixel layer, all pixels whose horizontal coordinates are odd numbers and whose vertical coordinates are even numbers form a third pixel layer, and all pixels whose horizontal coordinates are even numbers and whose vertical coordinates are odd numbers form a fourth pixel layer; The steps of calculating the predicted values and the complexity of all pixels in each pixel layer in the order of the first pixel layer, the second pixel layer, the third pixel layer, and the fourth pixel layer are as follows: for each pixel in each pixel layer, the predicted value is calculated using the pixels of 16 other pixel layers around the pixel, and the complexity is calculated using the 8 pixels adjacent to the pixel; The steps of globally sorting the pixels of each pixel layer by the predicted value and complexity of the pixels are as follows: for all the pixels in each pixel layer, firstly, the predicted value is used to sort them in ascending order, and then the pixels with the same predicted value in the entire pixel sequence after ascending order are sorted alternately in ascending and descending order to obtain a globally sorted sequence.
3. The method for reversible information hiding based on global sorting of single pixel values according to claim 2, characterized in that: The step of calculating the predicted values and complexity of all pixels in each pixel layer in the order of the first pixel layer, the second pixel layer, the third pixel layer, and the fourth pixel layer is as follows: for each pixel in each pixel layer, the predicted value is calculated using the pixels of 16 other pixel layers around the pixel, and the complexity is calculated using the 8 pixels adjacent to the pixel. For a selected pixel, the pixels {x1, x2, …, x 16 } Calculate the geometric similarity parameter A according to the following formula i (i∈[1,8]), the calculation expression is: Where τ is the grayscale range; The twist distance is calculated as follows: D i =d-k1×A i ×d×(d-1); Where k1=4 is the coefficient controlling the distortion strength; d=1 / 2 is the original relative distance between a pixel and its adjacent pixels; the distance d′ from a pixel to the edge of the rectangle formed by the adjacent pixels is calculated according to the following formula: 180 , d′ 90 , d′ 135 and d′ 45 : The inverse gradient weights in eight directions are calculated according to the following formula: In the formula, k2=0.2 is a parameter that controls the influence of the gradient on the prediction; Combining the distortion distance and the corresponding inverse gradient weight, the weights of the eight neighboring pixels are calculated according to the following formula: U=g 180 (1-d′ 180 )+g0·d′ 180 +g 90 (1-d′ 90 )+g -90 ·d′ 90 +k3·g 135 (1-d′ 135 )+k3·g -45 ·d′ 135 +k3·g 45 (1-d' 45 )+k3·g -135 ·d′ 45 ; In the formula, is the adjustment parameter of spatial distance; Assign weights to the corresponding adjacent pixels and calculate the predicted value of the center pixel according to the following formula: Where [·] represents the rounding function; The pixel complexity C is calculated using the 8 pixels adjacent to the center pixel according to the following formula: C=|x5-x2|+|x2-x6|+|x6-x3|+|x3-x7|+|x7-x4|+|x4-x8|+|x8-x1|+|x1-x5|.
4. The method for reversible information hiding based on global sorting of single pixel values according to claim 1, characterized in that: In the step of guiding whether to embed secret information in the pixel to be embedded in each pixel segment based on the one-dimensional pixel sequence and for all pixel segment sizes within the selected range according to the relationship between the preset complexity threshold and the complexity of each pixel segment, Set the size of the pixel segment to s; For a pixel segment, the pixels {p,z1,z2,…,z s-1 }, p represents the pixel to be embedded, z1,z2,…,z s-1 Represents the predicted pixel used to predict p; all pixel segments are obtained in sequence with one pixel as the interval according to the global sorting order; Calculate the single pixel ranking prediction value of the pixel p to be embedded in each pixel segment; Calculate the complexity C of each pixel segment Seq ; Visit each pixel segment obtained in turn and calculate the prediction error of the pixel p to be embedded; add the complexity threshold T to the complexity C of each pixel segment. Seq For comparison, if C Seq >T, then skip the pixel segment. If C Seq ≤T, the secret information is embedded in the pixel segment.
5. The method for reversible information hiding based on global sorting of single pixel values according to claim 4, characterized in that: The step of calculating the single pixel ranking prediction value of the pixel p to be embedded in each pixel segment is as follows: for each pixel segment {p, z1, z2, ..., z s-1 }, and use the predicted pixels {z1,z2,…,z s-1 } Get the two single pixel value sorted prediction values of the pixel p to be embedded and The complexity C of calculating each pixel segment Seq In the step of s-1 }, calculate the complexity C of the pixel segment according to the following formula Seq : In the formula, C p , is the calculated pixel p, z1, z2…z s-1 The pixel complexity of The method sequentially accesses each pixel segment obtained, calculates the prediction error of the pixel p to be embedded; and compares the complexity threshold T with the complexity C of each pixel segment. Seq For comparison, if C Seq >T, then skip the pixel segment. If C Seq ≤T, then the steps of embedding secret information into pixel segments are as follows: for each pixel segment {p,z1,z2,…,z s-1 }, use the single pixel value to sort the predicted value according to the following formula and Calculate the prediction error e: In the formula, Indicates that the prediction error does not exist; For each pixel segment {p,z1,z2,…,z s-1 }, the complexity threshold T and the complexity C of each pixel segment Seq For comparison, if C Seq >T, skip the current pixel segment; if C Seq ≤T, check the prediction error of the pixel to be embedded in the pixel segment. If it does not exist, skip the current pixel segment. Otherwise, embed the secret information into pixel p according to the following formula: In the formula, represents the modified pixel; sd∈{0,1} is the embedded secret information bit.
6. The method for reversible information hiding based on global sorting of single pixel values according to claim 1, characterized in that: In the step of obtaining the original carrier image and performing an anti-overflow and anti-underflow operation to obtain a processed carrier image; and obtaining a position array recording the overflow and underflow positions based on the original carrier image, Traverse all pixels of the original carrier image except the first row in raster scanning order, set the initial value of parameter k to 1, and perform the following operations on each pixel: In the formula, p represents the pixel value traversed; LM is a position array, which is a one-dimensional vector used to record the positions of pixels whose pixel values have been adjusted; LM is arithmetically compressed to reduce the number of bits required by the recorder, and a compressed position array CLM is obtained.
7. The method for reversible information hiding based on global sorting of single pixel values according to claim 6, characterized in that: The step of embedding the auxiliary information required for restoring the carrier image and extracting the information into the first row of pixels of the processed carrier image is as follows: for a carrier image of size H×W, record the first row of pixels. The least significant bit of the pixels is converted into the secret information; the first line of the original The least significant bit is replaced by auxiliary information; the auxiliary information includes the pixel segment size s used, which occupies 3 bits; the complexity threshold T of the four layers, which occupies 4×12=48 bits; the last position P of the four layers of embedding end , occupied Bit, Indicates rounding up; the length of the compressed position array CLM is l CLM , occupied Bit.
8. The method for reversible information hiding based on global sorting of single pixel values according to claim 7, characterized in that: After obtaining the final encrypted carrier image, a decoding step is also included; wherein, The decoding step includes: reading the first line of the final encrypted carrier image The least significant bit of the pixel is used to obtain auxiliary information for decoding; wherein the auxiliary information for decoding includes the pixel segment size s used, the complexity threshold T of the four layers, and the last position P of the four layers embedded end and the length l of the compressed position array CLM CLM ; The order of the layers in decoding is opposite to that in the embedding stage; For each pixel level decoding, we perform global sorting in the same way as embedding, calculate the complexity of all pixel segments of size s, and then start from the last embedding position P of the pixel level. end At the beginning, a pixel segment of size s is obtained, and according to the relationship between the complexity of the pixel segment and the complexity threshold T, the pixel segment is guided to be decoded or skipped; after decoding a pixel segment, the next pixel segment is obtained in the opposite direction of the embedding stage at intervals of one pixel and decoding is attempted until all pixel segments are decoded; The least significant bit corresponding to the first row in the decoded secret message bit secret information and the first line before the current The least significant bit of the pixel is replaced; The l corresponding to CLM CLM The secret information of the bits is extracted and decompressed to obtain the position array LM, and the pixel values that have undergone the anti-underflow and anti-underflow operations are restored using LM.
9. A single pixel value sorting reversible information hiding system based on global sorting, characterized in that: include: A preprocessing module is used to obtain the original carrier image and perform anti-overflow and anti-underflow operations to obtain a processed carrier image; Based on the original carrier image, obtaining a position array recording the overflow and underflow positions; A global sorting module is used to divide the part of the processed carrier image except the first row into four pixel layers, and calculate the prediction value and complexity of all pixels in each pixel layer in sequence, and globally sort the pixels of each pixel layer according to the prediction value and complexity of the pixels to obtain a one-dimensional pixel sequence; A prediction and embedding module, for guiding whether to embed secret information in pixels to be embedded in each pixel segment based on a one-dimensional pixel sequence and for all pixel segment sizes within a selected range according to the relationship between a preset complexity threshold and the complexity of each pixel segment; wherein, for a selected current pixel segment size, the pixel segment complexity under the current pixel segment size and the single pixel value sorting prediction error of each pixel segment are calculated, and according to the relationship between the pixel segment complexity and the complexity threshold, guiding whether to embed secret information in pixels to be embedded in each pixel segment, and embedding secret information into a processed carrier image according to the value of the prediction error, and then embedding auxiliary information required for restoring the carrier image and extracting information into the first row of pixels of the processed carrier image to obtain a secret carrier image; wherein, the auxiliary information includes a position array recording the overflow and underflow positions, the pixel segment size and the complexity threshold; The final encrypted carrier image acquisition module is used to compare the distortion degree of the encrypted carrier image obtained under different pixel segment sizes and the original carrier image, and select the encrypted carrier image with the lowest distortion as the final encrypted carrier image.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the single pixel value sorting reversible information hiding method based on global sorting as described in any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Reversible information hiding method and system based on pixel value sorting prediction and diamond prediction
CN113099067A
JPEG image adaptive reversible information hiding method based on block grouping
CN113225566A
Image reversible information hiding method and system based on DCT coefficient correlation
CN113676616A
Reversible information hiding method and system based on intra-block and intra-block pixel prediction complexity
CN117596344A
Method for concealing private data, program performing the same, and private data communication system
JP2019035850A