A reversible information hiding method and system based on adaptive pixel block division

Through the use of adaptive pixel block division method and complexity threshold, the pixel blocks of the carrier image are dynamically divided and secret information is embedded, which solves the problem of low efficiency of blocking methods in the prior art, and achieves higher embedding capacity and lower carrier distortion.

CN115550518BInactive Publication Date: 2025-03-14XI AN JIAOTONG UNIV +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211213022.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-30
Publication Date
2025-03-14
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The blocking method in the prior art is inefficient, limiting the performance of reversible information hiding algorithms, especially in increasing the embedding capacity and reducing carrier distortion.

Method used

Adaptive pixel block division method is adopted to dynamically divide the pixel block size and complexity threshold by presetting the pixel block size and complexity threshold, and calculate the prediction error based on the complexity of the block to embed secret information.

Benefits of technology

The number of blocks and embedding capacity of the carrier image is significantly increased, the carrier distortion is reduced, and the hidden performance of reversible information hiding is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115550518B_ABST
    Figure CN115550518B_ABST
Patent Text Reader

Abstract

The present invention discloses a reversible information hiding method and system based on adaptive pixel block division, the method comprising the following steps: performing an anti-overflow operation on the part of a pre-selected carrier image except the first row to obtain a processed carrier image; based on an adaptive pixel block division method, performing pixel block division on the processed carrier image using a preset pixel block size; based on the carrier image after pixel block division, locating the position of the pixels to be embedded in each pixel block, and calculating the complexity of each pixel block; obtaining the prediction error of the maximum value pixel to be embedded and the minimum value pixel to be embedded in each pixel block, and embedding the information to be transmitted based on the prediction error; embedding the auxiliary information required for restoring the carrier image and extracting information into the first row of pixels of the processed carrier image. The present invention can improve the embedding performance of the reversible information hiding algorithm, and the effectiveness of the method of the present invention is verified by experiments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of information security technology, relates to the field of reversible information hiding based on spatial domain, and in particular to a reversible information hiding method and system based on adaptive pixel block division. Background Art

[0002] Reversible information hiding is an advanced information security technology that can embed secret information into a publicly available carrier image, making the secret information invisible and its existence unknown, making it impossible for attackers to attack, avoiding information theft during transmission, and enabling data to be communicated confidentially without being discovered. In addition, the receiver can losslessly restore all the secret information and the complete carrier image. Reversible information hiding technology is often used in fields that are sensitive to the quality of carrier images, including military, aerospace, finance, and medical care.

[0003] The two main performance indicators for measuring the quality of reversible information hiding algorithms are carrier distortion and embedding capacity. Carrier distortion refers to the loss of image quality before and after the carrier image is embedded with secret information, and embedding capacity refers to the total amount of secret information that can be hidden in a carrier image. In order to reduce carrier distortion, some researchers have proposed embedding secret information into the pixels with the largest number of pixel values ​​in the carrier image, so that the distortion of each pixel value is at most 1, and the overall distortion of the carrier is significantly reduced. However, the embedding capacity of this method is small and has a great correlation with the content of the carrier image itself. In order to increase the embedding capacity, some researchers have proposed using the four neighboring pixels of each pixel to predict it and embed the secret information into the carrier prediction error, but the prediction accuracy of this method is not high and will lead to large carrier distortion.

[0004] At present, researchers have proposed dividing the carrier image into blocks and then predicting and embedding secret information separately, which has achieved good overall results. However, the block division method of this type of existing method is too simple and inefficient. It is necessary to improve it so as to increase the number of blocks, increase the embedding capacity and reduce the carrier distortion. Summary of the invention

[0005] The purpose of the present invention is to provide a reversible information hiding method and system based on adaptive pixel block division to solve one or more of the above-mentioned technical problems. The method provided by the present invention can solve the technical problem that the inefficient block division method in the prior art limits the performance of reversible information hiding, and can increase the number of blocks, so that the embedding capacity is increased and the carrier distortion is reduced, which can improve the hiding performance of reversible information hiding.

[0006] In order to achieve the above object, the present invention adopts the following technical solutions:

[0007] The present invention provides a reversible information hiding method based on adaptive pixel block division, comprising the following steps:

[0008] Step 1, performing an anti-overflow operation on a portion of a pre-selected carrier image except the first row to obtain a processed carrier image; and obtaining position map information recording an overflow position based on the pre-selected carrier image;

[0009] Step 2, based on an adaptive pixel block division method, using a preset pixel block size to divide the processed carrier image obtained in step 1 into pixel blocks to obtain a carrier image after dividing into pixel blocks;

[0010] Step 3, based on the carrier image after dividing the pixel blocks obtained in step 2, locate the position of the pixels to be embedded in each pixel block, calculate the complexity of each pixel block; obtain the prediction error of the maximum value pixel to be embedded and the minimum value pixel to be embedded in each pixel block, and embed the information to be transmitted based on the prediction error;

[0011] Step 4: embed auxiliary information required for restoring the carrier image and extracting information into the first row of pixels of the processed carrier image; wherein the auxiliary information includes the position map information.

[0012] A further improvement of the method of the present invention is that it also includes:

[0013] Step 5, obtain multiple preset pixel block sizes, repeat steps 2 to 4 based on each preset pixel block size, compare the distortion sizes of the encrypted carrier images under different preset pixel block sizes, and select the encrypted carrier image with the smallest distortion compared to the original carrier image as the final encrypted carrier image.

[0014] A further improvement of the method of the present invention is that step 2 specifically comprises the following steps:

[0015] Step 2.1, set a label map of the same size as the processed carrier image excluding the first row of pixels, and all pixel values ​​in the label map are initially 0; use a given pixel block size of h×w to select a pixel block from the upper left corner of the processed carrier image, locate the minimum pixel and the maximum pixel of the pixel block, calculate the complexity value of the pixel block, and set the pixel values ​​of all pixel positions in the label map corresponding to the pixel block in the processed carrier image to 1, and jump to step 2.2;

[0016] Step 2.2, move the pixel block selected in the processed carrier image from the current position to the right by one pixel, and use the pixel block at this time as a temporary pixel block, and locate the minimum pixel and the maximum pixel of the temporary pixel block; if the pixel value at the position corresponding to the minimum pixel and the maximum pixel in the mark image is 0, jump to step 2.3, otherwise jump to step 2.2; if the pixel block exceeds the right boundary of the processed carrier image after moving, jump to step 2.4;

[0017] Step 2.3, determine that the current pixel block is an available block, calculate the complexity of the current pixel block, and set the pixel values ​​of all pixel positions corresponding to the current pixel block in the processed carrier image in the mark map to 1, and jump to execute step 2.2;

[0018] Step 2.4, set the pixel values ​​of the positions in the marked image corresponding to the range that cannot be selected to 1; if there are still more than h rows of 0-value pixels in the marked image, move the pixel block down by h rows, and move it to the left to a position that exceeds the left boundary of the image by one pixel on the left, and then jump to execute step 2.2; if there are less than h rows of 0-value pixels in the marked image, set all the remaining pixel values ​​of 0 in the marked image to 1, and end the adaptive blocking process.

[0019] A further improvement of the method of the present invention is that in step 3,

[0020] The step of locating the position of the pixel to be embedded in each pixel block includes: for a pixel block, obtaining each pixel value therein in a raster scanning order to obtain a pixel value sequence {p1, p2, ..., p h×w}; Arrange the pixel value sequence in ascending order to obtain the sorted sequence {p σ(1) , p σ(2) ,…,p σ(h×w)}, where σ:{1, 2, ..., h×w}→{1, 2, ..., h×w} is a one-to-one sorting mapping, and the mapping result is p σ(1) ≤p σ(2) ≤…≤p σ(h×w) ; Among them, in p σ(i) =p σ(j) When σ(i)<σ(j), i<j, i, j∈{1, 2, …, h×w} is the number of the pixel in the sorted pixel value sequence; the minimum pixel p σ(1) With the maximum pixel p σ(h×w) are possible pixels to be embedded;

[0021] When calculating the complexity of each pixel block, the complexity calculation expression of the pixel block is, C = p σ(h×w-1) -p σ(2) ;

[0022] The prediction errors of the pixels with the maximum value to be embedded and the pixels with the minimum value to be embedded in each pixel block are obtained. The process of embedding the information to be transmitted based on the prediction errors includes: sequentially accessing each pixel block in the carrier image after the pixel blocks are divided obtained in step 2, comparing the pre-selected complexity threshold T with the complexity C of each pixel block, skipping the current block if C>T, and calculating the prediction errors of the pixels to be embedded in the pixel block if C≤T, and embedding the secret information.

[0023] A further improvement of the method of the present invention is that in the process of obtaining the prediction error of the maximum value pixel to be embedded and the minimum value pixel to be embedded in each pixel block in step 3,

[0024] Maximum pixel p σ(h×w) The prediction error PE max The calculation is,

[0025]

[0026] Where u and v are the spatial position numbers of the largest pixel and the second largest pixel in the block;

[0027] The pixel is embedded or moved according to the value of the prediction error, and its expression is:

[0028]

[0029] Where b∈{0,1} is the secret information bit, is the maximum pixel value in the embedded block;

[0030] Minimum pixel p σ(1) The prediction error PE min The calculation is,

[0031]

[0032] Where s and t are the spatial position numbers of the smallest pixel and the second smallest pixel in the block;

[0033] The pixel is embedded or moved according to the value of the prediction error, and its expression is:

[0034]

[0035] Try to embed each pixel block in turn; for each pixel block, first try to embed the maximum value p σ(h×w) Embed it and try to find the minimum value p σ(1) Embedding is performed until the secret information is completely embedded or there are no free pixels.

[0036] A further improvement of the method of the present invention is that step 4 specifically comprises:

[0037] For a carrier image of size H×W, record the first line of The least significant bit of each pixel is combined into the secret information;

[0038] Change the original first line to The least significant bits are replaced by auxiliary information; the auxiliary information includes: the pixel block sizes h and w used, occupying 2×2=4 bits; the complexity threshold T, occupying 8 bits; the last position P embedded end , occupied bits; length l of compressed location map CLM CLM , occupied bit; where Indicates rounding up.

[0039] A further improvement of the method of the present invention is that after step 4, decoding is also included;

[0040] The decoding steps include:

[0041] Read the first line before The least significant bit of the pixel is used to obtain various parameters for embedding the secret information; the various embedding parameters include the pixel block sizes h and w used, the complexity threshold T, the last position P of the embedding end and the length l of the compressed position map CLM CLM ;

[0042] According to the obtained embedding parameters, the image is divided into blocks according to the same adaptive block division method as that during embedding, the position of the pixels to be extracted from each pixel block is determined and the complexity of the pixel block is calculated; according to the complexity threshold and the complexity value of each pixel block, each pixel block is guided to perform a decoding operation or skip an operation until the last position P of the embedding is decoded. end ;

[0043] The least significant bit corresponding to the first row in the decoded secret message Bit and the first line The least significant bit of the pixel corresponding to CLM is replaced; CLM The secret information of the bits is extracted and decompressed to obtain LM, and the edge pixel value is restored using LM.

[0044] The present invention provides a reversible information hiding system based on adaptive pixel block division, comprising:

[0045] A preprocessing module, used for performing an anti-overflow operation on a portion of a pre-selected carrier image except the first row to obtain a processed carrier image; and obtaining position map information recording an overflow position based on the pre-selected carrier image;

[0046] A pixel block division module is used to divide the processed carrier image into pixel blocks based on an adaptive pixel block division method and a preset pixel block size to obtain a carrier image after dividing the pixel blocks;

[0047] A prediction and embedding module, which is used to locate the position of the pixels to be embedded in each pixel block based on the carrier image obtained after dividing the pixel blocks, and calculate the complexity of each pixel block; obtain the prediction error of the maximum value pixel to be embedded and the minimum value pixel to be embedded in each pixel block, and embed the information to be transmitted based on the prediction error;

[0048] An auxiliary information embedding module is used to embed auxiliary information required for restoring the carrier image and extracting information into the first row of pixels of the processed carrier image; wherein the auxiliary information includes the position map information.

[0049] A further improvement of the system of the present invention is that it also includes:

[0050] The decoding module is used for losslessly decoding the embedded information and losslessly restoring the carrier image by using the auxiliary information.

[0051] Compared with the prior art, the present invention has the following beneficial effects:

[0052] In the reversible information hiding method provided by the present invention, the block division method based on the adaptive moving step size is used to increase the number of blocks, so that the embedding capacity is increased and the carrier distortion is reduced, and the hiding performance of the reversible information hiding can be improved. Further specifically explained, the present invention proposes an adaptive moving step size block division method so that the blocks divided into the image can overlap with each other, thereby significantly increasing the number of blocks of the carrier image, while bringing the benefit of increasing the embedding capacity in proportion, and reducing the carrier distortion caused by embedding secret information under the selection of the complexity threshold. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art; 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.

[0054] Figure 1 It is a flowchart of a reversible information hiding method based on adaptive pixel block division provided by an embodiment of the present invention;

[0055] Figure 2 is a schematic diagram of pixel value sorting with a block size of 3×3 used in an embodiment of the present invention;

[0056] Figure 3 is a schematic diagram of an adaptive pixel block division method used in an embodiment of the present invention;

[0057] Figure 4 is a schematic diagram comparing the number of blocks obtained by the adaptive pixel block division method used in the embodiment of the present invention under different pixel block sizes and the number of blocks obtained by the traditional method;

[0058] Figure 5 is a schematic diagram comparing the embedding capacity obtained by the adaptive pixel block partitioning method used in the embodiment of the present invention under different pixel block sizes and the embedding capacity of the traditional method;

[0059] Figure 6 is a schematic diagram showing the variation of the peak signal-to-noise ratio (PSNR) of the carrier image and the original image with the embedding capacity (EC) when the algorithm in the embodiment of the present invention is compared with the traditional pixel value sorting prediction; wherein, Figure 6 (a) is a schematic diagram of the result on the image Lena. Figure 6 (b) is a schematic diagram of the result on the image Baboon. Figure 6 (c) in the figure is a schematic diagram of the results on image Barbara. DETAILED DESCRIPTION

[0060] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0061] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0062] The present invention is further described in detail below in conjunction with the accompanying drawings:

[0063] See also Figure 1, a reversible information hiding method based on adaptive pixel block division provided by an embodiment of the present invention comprises the following steps:

[0064] Step 1, performing an anti-overflow operation on a portion of a pre-selected carrier image except the first row to obtain a processed carrier image; obtaining position map information recording the overflow position based on the pre-selected carrier image for use in restoring the carrier image;

[0065] Step 2, based on a preset pixel block size, using an adaptive pixel block division method to divide the processed carrier image into pixel blocks to obtain a carrier image after dividing into pixel blocks;

[0066] Step 3, based on the carrier image after dividing the pixel blocks, locate the position of the pixels to be embedded in each pixel block, and calculate the complexity of each pixel block; obtain the prediction error of the maximum value pixel to be embedded and the minimum value pixel to be embedded in the pixel block; embed the information to be transmitted into the processed carrier image obtained in step 1 based on the prediction error; wherein, when obtaining the prediction error of the maximum value pixel to be embedded and the minimum value pixel to be embedded in the pixel block, when the complexity of the pixel block is less than or equal to the preset complexity threshold, the pixels to be embedded in the pixel block are used to calculate the prediction error of the embedded information;

[0067] Step 4: embed auxiliary information required for restoring the carrier image and extracting information into the first row of pixels of the processed carrier image; the auxiliary information includes the position map information.

[0068] In the embodiment of the present invention, in order to obtain better effects, the following may also be included:

[0069] Step 5, obtain multiple preset pixel block sizes; repeat steps 2 to 4 based on each preset pixel block size; compare the distortion sizes of the encrypted carrier images under different pixel block sizes, and select the encrypted carrier image with the smallest distortion compared to the original carrier image as the final encrypted carrier image.

[0070] Step 1 of the embodiment of the present invention may specifically include the following steps:

[0071] Scan each pixel except the first row of the pre-selected carrier image in the order of raster scanning, set the initial value of k to 1, and perform the following operations on each pixel:

[0072]

[0073] In the formula, p x,y Represents the pixel value with coordinates (x, y), x∈[2,H], y∈[1,W], H and W represent the height and width of the carrier image respectively; LM is a position map, which is a one-dimensional vector used to record the position of the pixel whose pixel value has been adjusted.

[0074] The LM is arithmetically compressed to reduce the required storage amount, and a compressed position map CLM is obtained; the CLM is incorporated into the secret information to be embedded as a part of the secret information.

[0075] In step 2 of the embodiment of the present invention, the size of the pixel block is set to h×w, h∈{2,3,4,5}, w∈{2,3,4,5}.

[0076] In step 2 of the embodiment of the present invention, the method for adaptively dividing the processed carrier image into pixel blocks comprises the following steps:

[0077] Step 2.1, set a label map of the same size as the processed carrier image excluding the first row of pixels, whose size is (H-1)×W, and all pixel values ​​are initially 0. Use a given pixel block size to select a pixel block from the upper left corner of the processed carrier image excluding the first row of pixels, locate the minimum pixel and the maximum pixel of the block, calculate the complexity value of the block, and set the pixel values ​​of all pixel positions of the block in the processed carrier image corresponding to the label map to 1; execute step 2.2.

[0078] Step 2.2, move the pixel block one pixel to the right from the current position, and use the pixel block at this time as a temporary pixel block, locate its minimum pixel and maximum pixel, if the pixel value corresponding to the minimum pixel and maximum pixel in the mark image is 0, execute step 2.3, otherwise repeat step 2.2; if the pixel block exceeds the right boundary of the processed carrier image after moving, execute step 2.4.

[0079] Step 2.3, determine that the current pixel block is an available block, calculate its complexity, and set the pixel values ​​of all pixel positions of the block in the processed carrier image corresponding to the marked image to 1; execute step 2.2.

[0080] Step 2.4, set the pixel values ​​of the positions in the marked image corresponding to the range that cannot be selected to 1. If there are still more than h rows of 0-valued pixels in the marked image, move the pixel block down by h rows and move it to the left to a position that exceeds the left edge of the image by one pixel on the left, and then execute step 2.2. If there are less than h rows of 0-valued pixels in the marked image, set all the remaining 0-valued pixels in the marked image to 1, and end the adaptive blocking process.

[0081] In step 3 of the embodiment of the present invention, for a pixel block, each pixel value therein is acquired in a raster scanning order to obtain a pixel value sequence {p1, p2, ..., p h×w}, arrange the pixel value sequence in ascending order, and obtain the sorted sequence {p σ(1) ,p σ(2) ,…,p σ(h×w)}; where, σ: {1, 2, …, h×w} → {1, 2, …, h×w} is a one-to-one sorting mapping, and the mapping result is p σ(1) ≤ p σ(2) ≤ … ≤ p σ(h×w) , where, at p σ(i) = p σ(j) and when σ(i) < σ(j), there is i < j, i, j ∈ {1, 2, …, h×w} being the sequence numbers of pixels in the sorted pixel value sequence; where, the minimum pixel p σ(1) and the maximum pixel p σ(h×w) are the possible pixels to be embedded.

[0082] The complexity calculation method of the pixel block is: C = p σ(h×w-1) - p σ(2) .

[0083] Step 3 of the embodiment of the present invention specifically includes the following steps:

[0084] Access each block obtained in step 2 in sequence, compare the pre-selected complexity threshold T with the complexity C of each block. If C > T, skip the current block. If C ≤ T, calculate the prediction error of the pixel to be embedded in this block and embed the secret information therein. The specific calculation and embedding method are as follows. Note that the original values of the pixels rather than the embedded values are used for accessing the block and performing calculations.

[0085] The prediction error PE σ(h×w) of the maximum pixel p max is calculated as:

[0086] PE max = p u - p v ′

[0087]

[0088] In the formula, u and v are the spatial position sequence numbers of the maximum pixel and the second largest pixel in the block. The pixel is embedded or moved according to the value of the prediction error, and its expression is:

[0089]

[0090] In the formula, b ∈ {0, 1} is the secret information bit, is the maximum pixel value in the block after embedding.

[0091] The prediction error PE σ(1) of the minimum pixel p min is calculated as:

[0092] PE min = p s - p t,

[0093]

[0094] Where s and t are the spatial position numbers of the smallest pixel and the second smallest pixel in the block. The pixel is embedded or moved according to the value of the prediction error, and the expression is:

[0095]

[0096] Try to embed each block in the order of the blocks in step 2; for each block, first try to embed the maximum value p σ(h×w) Embed it and try to find the minimum value p σ(1) Embedding is performed until the secret information is completely embedded or there are no free pixels.

[0097] Step 4 of the embodiment of the present invention specifically includes the following steps:

[0098] For a carrier image of size H×W, record the first line of The least significant bit of each pixel is combined into the secret information;

[0099] Change the original first line to The least significant bits are replaced with auxiliary information, the auxiliary information comprising:

[0100] The pixel block sizes h and w used take up 2×2=4 bits; the complexity threshold T takes up 8 bits; the last position P of the embedding end , occupied bits; length l of compressed location map CLM CLM , occupied bit; where Indicates rounding up.

[0101] The method of the embodiment of the present invention further includes decoding; the decoding step includes:

[0102] Read the first line before The least significant bit of the pixel is used to obtain the various parameters for embedding the secret information, including the pixel block sizes h and w used; the complexity threshold T; the final position P of the embedding end ; The length l of the compressed position map CLM CLM .

[0103] According to the obtained parameters, the image is divided into blocks using the same adaptive block division method as that used in embedding, the position of the pixels to be extracted in each block is determined and its complexity is calculated.

[0104] According to the complexity and complexity threshold and the complexity value of each block, guide each block to perform decoding operation or skip operation until decoding to the last embedded position P end .

[0105] The least significant bit corresponding to the first row in the decoded secret message Bit before the first line The least significant bit of the pixel is replaced.

[0106] The l corresponding to CLM CLM The bits of secret information are extracted and decompressed to obtain LM, which is then used to restore the original edge pixel values.

[0107] In the embodiment of the present invention, through the study of reversible information hiding technology, it is concluded that the algorithm based on pixel value sorting still has a large room for improvement, the number of blocks of the carrier image needs to be further increased, and the conversion efficiency between the embedding capacity and the carrier distortion still needs to be improved. The present invention proposes a block method with an adaptive moving step size, so that the blocks divided into the image can overlap with each other, thereby significantly increasing the number of blocks of the carrier image, while bringing the benefit of increasing the embedding capacity in proportion, and reducing the carrier distortion caused by embedding secret information under the selection of the complexity threshold. In the present invention, the proposed block method with an adaptive moving step size is not only applicable to the prediction and embedding methods mentioned in the present invention, but also to various other methods based on pixel value sorting, which can increase the embedding capacity and reduce the carrier distortion.

[0108] See also Figures 1 to 6 , a reversible information hiding method for adaptive pixel block division for pixel value sorting according to an embodiment of the present invention comprises the following steps:

[0109] Step 1: performing an anti-overflow operation on the pre-selected carrier image except the first row, and obtaining a processed carrier image and a position map recording the overflow position;

[0110] Scan each pixel except the first row of the pre-selected carrier image in the order of raster scanning, set the initial value of k to 1, and perform the following operations on each pixel:

[0111]

[0112] In formula (1), p x,y Represents the pixel value with coordinates (x, y), x∈[2,H], y∈[1,W], H and W represent the height and width of the carrier image respectively; LM is a position map, which is a one-dimensional vector used to record the position of the pixel whose pixel value has been adjusted.

[0113] The LM is arithmetically compressed to reduce the required storage amount, and a compressed position map CLM is obtained; the CLM is incorporated into the secret information to be embedded as a part of the secret information.

[0114] Step 2: For all pixel block sizes within the selected range, Figure 3 As shown in FIG. 1 , an adaptive pixel block division method is used to determine the blocks of the processed carrier image. Figure 2 As shown, the positions of the pixels to be embedded in each block are located, and the complexity of each block is calculated.

[0115] The size of the pixel block is set to h×w, h∈{2, 3, 4, 5}, w∈{2, 3, 4, 5}.

[0116] For a pixel block, each pixel value is obtained in the raster scanning order to obtain the pixel value sequence {p1, p2, ..., p h×w}, arrange the pixel value sequence in ascending order, and obtain the sorted sequence {p σ(1) , p σ(2) ,…,p σ(h×w)}; where σ: {1, 2, ..., h×w} → {1, 2, ..., h×w} is a one-to-one sorting mapping, and the mapping result is p σ(1) ≤p σ(2) ≤…≤p σ(h×w) , where p σ(i) =p σ(j) When σ(i)<σ(j), i<j, i, j∈{1, 2, …, h×w} is the number of the pixel in the sorted pixel value sequence; the minimum pixel p σ(1) With the maximum pixel p σ(h×w) is the possible pixel to be embedded. The complexity of the block is calculated as:

[0117] C=p σ(h×w-1) -p σ(2) (2).

[0118] The method for adaptively dividing the processed carrier image into pixel blocks comprises the following steps:

[0119] (1) Set a label map of the same size as the processed carrier image excluding the first row of pixels, with a size of (H-1)×W, in which all pixel values ​​are initially 0. Use a pixel block of a given size to select a pixel block from the upper left corner of the processed carrier image excluding the first row of pixels, locate the minimum pixel and the maximum pixel of the block, calculate the complexity value of the block, and set the pixel values ​​of all pixel positions of the block in the processed carrier image corresponding to the label map to 1. Execute process (2) in step 2.

[0120] (2) Move the pixel block to the right by one pixel from the current position, and use the pixel block as a temporary pixel block to locate its minimum pixel and maximum pixel. If the pixel value at the position corresponding to the minimum pixel and the maximum pixel in the label image is 0, then execute the process (3) in step 2, otherwise repeat the process (2) in step 2. If the pixel block exceeds the right boundary of the processed carrier image after movement and the pixel block cannot be selected, then execute the process (4) in step 2.

[0121] (3) Determine that the current pixel block is an available block, calculate its complexity, and set the pixel values ​​of all pixel positions of the block in the processed carrier image corresponding to the label map to 1. Execute process (2) in step 2.

[0122] (4) Set the pixel values ​​of the positions in the marked image corresponding to the range that cannot be selected to 1. If there are still more than h rows of 0-valued pixels in the marked image, move the pixel block down by h rows and move it to the left to a position that exceeds the left edge of the image by one pixel on the left, and then execute the process (2) in step 2. If there are less than h rows of 0-valued pixels in the marked image, set the values ​​of all the remaining 0 pixels in the marked image to 1, and end the adaptive blocking process.

[0123] Step three: for each processed carrier image determined to be divided into blocks, according to the relationship between the preset complexity threshold and the complexity of each block, guide the pixels to be embedded in each block whether to calculate the prediction error for embedding information; embed the information to be transmitted into the processed carrier image according to the calculated prediction error.

[0124] Visit each block obtained in step 2 in turn, compare the pre-selected complexity threshold T with the complexity C of each block, if C>T, skip the current block, if C≤T, calculate the prediction error of the pixel to be embedded in the block, and embed the secret information into it. The specific calculation and embedding method is as follows. Note that the original value of the pixel is used to visit the block and perform calculations instead of the embedded value.

[0125] Maximum pixel p σ(h×w) The prediction error PE max The calculation is:

[0126] PE maX =p u -p v (3)

[0127]

[0128] In formula (4), u and v are the spatial position numbers of the largest pixel and the second largest pixel in the block. The pixel is embedded or moved according to the value of the prediction error, and the expression is:

[0129]

[0130] In formula (5), b∈{0,1} is the secret information bit, is the maximum pixel value in the embedded block.

[0131] Minimum pixel p σ(1) The prediction error PE min The calculation is:

[0132] PE min =p s -p t (6)

[0133]

[0134] In formula (7), s and t are the spatial position numbers of the smallest pixel and the second smallest pixel in the block. The pixel is embedded or moved according to the value of the prediction error, and the expression is:

[0135]

[0136] Try to embed each block in the order of the blocks in step 2; for each block, first try to embed the maximum value p σ(h×w) Embed it and try to find the minimum value p σ(1) Embedding is performed until the secret information is completely embedded or there are no free pixels.

[0137] Step 4: Embed the auxiliary information required to restore the carrier image and extract information into the first row of pixels of the processed carrier image; select the final encrypted carrier image.

[0138] For a carrier image of size H×W, record the first line of The least significant bit of each pixel is combined into the secret information;

[0139] Change the original first line to The least significant bits are replaced with auxiliary information, the auxiliary information comprising:

[0140] The pixel block sizes h and w used take up 2×2=4 bits; the complexity threshold T takes up 8 bits; the last position P of the embedding end , occupied bits; length l of compressed location map CLM CLM , occupied Bit, Indicates rounding up.

[0141] The distortion sizes of the encrypted carrier images under different pixel block sizes are compared, and the encrypted carrier image with the smallest distortion compared to the original carrier image is selected as the final encrypted carrier image.

[0142] The performance of the final method can be measured by the embedding capacity-peak signal-to-noise ratio curve, that is, the quality of the carrier image at a specific amount of embedded information.

[0143] In summary, the embodiment of the present invention discloses a reversible information hiding method for adaptive pixel block division for pixel value sorting, which is used for secret communication, and the method includes: performing anti-overflow / underflow operations on the carrier image and recording corresponding information for image recovery; adaptively dividing the carrier image into blocks, determining the position of the pixel to be embedded, and calculating the complexity of each block; guiding the embedding operation of each pixel in turn according to the relationship between the complexity and the complexity threshold; embedding the auxiliary information required for decoding into the image. 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.

[0144] pass Figure 4 , Figure 5 and Figure 6 It can be seen that the reversible information hiding method of adaptive pixel block partitioning for pixel value sorting can effectively improve the embedding capacity and embedding performance of the pixel value sorting algorithm. Figure 4 , Figure 5 By comparing the number of blocks and the embedding capacity of the pixel value sorting method based on traditional block and the pixel value sorting method based on adaptive block under different pixel block sizes on the test image Lena, it can be seen that the algorithm of the present invention has a stable improvement in improving the embedding capacity.

[0145] Figure 6 By comparing the embedding performance of the traditional block-based pixel value sorting reversible information hiding method and the algorithm of the present invention on the standard test images Lena, Baboon and Barbara, that is, the PSNR curve corresponding to the embedding amount starting from 5,000 bits in steps 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 obvious improvements in both embedding capacity and carrier distortion performance.

[0146] In summary, the purpose of the embodiment of the present invention is to provide a reversible information hiding method for adaptive pixel block division for pixel value sorting, so as to solve the problem that the efficiency of the block division method in the prior art is low and thus limits the performance of the reversible information hiding algorithm. The present invention proposes an adaptive moving step block division method so that the blocks divided into the image can overlap with each other, thereby significantly increasing the number of blocks of the carrier image, while bringing the benefit of increasing the embedding capacity in proportion, and reducing the carrier distortion caused by embedding secret information under the selection of the complexity threshold. The reversible information hiding method for adaptive pixel block division for pixel value sorting disclosed in the present invention includes: Step 1: performing an anti-overflow operation on the part of the pre-selected carrier image except the first row, and obtaining the processed carrier image and the position map recording the overflow position. Step 2: For all pixel block sizes within the selected range, use an adaptive pixel block division method to determine the block division of the processed carrier image, locate the position of the pixel to be embedded in each block, and calculate the complexity of each block. Step 3: For each processed carrier image that is determined to be divided into blocks, according to the relationship between the preset complexity threshold and the complexity of each block, guide the pixels to be embedded in each block whether to calculate the prediction error for embedding information; embed the information to be transmitted into the processed carrier image according to the calculated prediction error. Step 4: Embed the auxiliary information required to restore the carrier image and extract the information into the first row of pixels of the processed carrier image; select the final secret carrier image. The present invention proposes an efficient block method to improve the embedding performance of the reversible information hiding algorithm, and verifies the effectiveness of the method through experiments.

[0147] The following are device embodiments of the present invention, which can be used to perform method embodiments of the present invention. For details not disclosed in the device embodiments, please refer to the method embodiments of the present invention.

[0148] In yet another embodiment of the present invention, a reversible information hiding system based on adaptive pixel block division is provided, comprising:

[0149] A preprocessing module, used for performing an anti-overflow operation on a portion of a pre-selected carrier image except the first row to obtain a processed carrier image; and used for obtaining position map information for carrier image restoration based on the pre-selected carrier image;

[0150] An adaptive pixel block division module, used for adaptively dividing the processed carrier image into blocks except for the first row, determining the position of the pixels to be embedded in each block, and calculating the complexity of each block;

[0151] A prediction and embedding module, used for guiding each pixel to be embedded whether to calculate a prediction error for embedding information according to the relationship between the complexity and the complexity threshold; for the prediction error obtained by calculation, embedding the secret information into the processed carrier image according to its value;

[0152] An auxiliary information embedding module, used to embed auxiliary information required for restoring the carrier image and extracting information into the first row of pixels of the processed carrier image; the auxiliary information includes the position map information;

[0153] The decoding module is used for losslessly decoding the embedded information and losslessly restoring the carrier image by using the auxiliary information.

[0154] 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 in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0155] 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.

[0156] 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.

[0157] 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 The steps for the functions specified in one or more boxes.

[0158] 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 adaptive pixel block partitioning, characterized in that: The following steps are involved: Step 1, performing an anti-overflow operation on the pre-selected carrier image except the first row to obtain a processed carrier image; Acquiring location map information recording overflow locations based on the pre-selected carrier image; Step 2, based on an adaptive pixel block division method, using a preset pixel block size to divide the processed carrier image obtained in step 1 into pixel blocks to obtain a carrier image after dividing into pixel blocks; Step 3, based on the carrier image after dividing the pixel blocks obtained in step 2, locate the position of the pixels to be embedded in each pixel block, calculate the complexity of each pixel block; obtain the prediction error of the maximum value pixel to be embedded and the minimum value pixel to be embedded in each pixel block, and embed the information to be transmitted based on the prediction error; Step 4, embedding auxiliary information required for restoring the carrier image and extracting information into the first row of pixels of the processed carrier image; wherein the auxiliary information includes the position map information; in, Step 2 specifically includes the following steps: Step 2.1, set a label map of the same size as the processed carrier image excluding the first row of pixels, and all pixel values ​​in the label map are initially 0; use a given pixel block size of h×w to select a pixel block from the upper left corner of the processed carrier image, locate the minimum pixel and the maximum pixel of the pixel block, calculate the complexity value of the pixel block, and set the pixel values ​​of all pixel positions in the label map corresponding to the pixel block in the processed carrier image to 1, and jump to execute step 2.2; Step 2.2, move the pixel block selected in the processed carrier image from the current position to the right by one pixel, and use the pixel block at this time as a temporary pixel block, and locate the minimum pixel and the maximum pixel of the temporary pixel block; if the pixel value at the position corresponding to the minimum pixel and the maximum pixel in the mark image is 0, jump to step 2.3, otherwise jump to step 2.2; if the pixel block exceeds the right boundary of the processed carrier image after moving, jump to step 2.4; Step 2.3, determine that the current pixel block is an available block, calculate the complexity of the current pixel block, and set the pixel values ​​of all pixel positions corresponding to the current pixel block in the processed carrier image in the marking image to 1, and jump to execute step 2.2; Step 2.4, set the pixel values ​​of the positions in the marked image that are within the range that cannot be selected to 1; if there are still more than h rows of 0-valued pixels in the marked image, move the pixel block down by h rows, and move it to the left to a position that exceeds the left boundary of the image by one pixel on the left, and then jump to execute step 2.2; if there are less than h rows of 0-valued pixels in the marked image, set the values ​​of all the remaining 0 pixels in the marked image to 1, and end the adaptive blocking process; In step 3, the step of locating the positions of the pixels to be embedded in each pixel block includes: for a pixel block, obtaining each pixel value therein in raster scan order to obtain a pixel value sequence {p1, p2, …, p h×w}; arranging the pixel value sequence in ascending order to obtain a sorted sequence {p σ(1) , p σ(2) , …, p σ(h×w)}, where σ: {1, 2, …, h×w} → {1, 2, …, h×w} is a one-to-one sorting mapping, and the mapping result is p σ(1) ≤ p σ(2) ≤ … ≤ p σ(h×w) ; where, when p σ(i) = p σ(j) and σ(i) < σ(j), there is i < j, and i, j ∈ {1, 2, …, h×w} are the serial numbers of the pixels in the sorted pixel value sequence; the smallest pixel p σ(1) and the largest pixel p σ(h×w) are the possible pixels to be embedded; When calculating the complexity of each pixel block, the complexity calculation expression of the pixel block is, C = p σ(h×w-1) -p σ(2) ; Obtaining the prediction errors of the pixels with the maximum value to be embedded and the pixels with the minimum value to be embedded in each pixel block, and embedding the information to be transmitted based on the prediction errors comprises: sequentially accessing each pixel block in the carrier image after the pixel blocks are divided obtained in step 2, comparing the pre-selected complexity threshold T with the complexity C of each pixel block, skipping the current block if C>T, and calculating the prediction errors of the pixels to be embedded in the pixel block if C≤T, and embedding the secret information; In the process of obtaining the prediction error of the maximum value pixel to be embedded and the minimum value pixel to be embedded in each pixel block in step 3, Maximum pixel p σ(h×w) The prediction error PE max The calculation is, Where u and v are the spatial position numbers of the largest pixel and the second largest pixel in the block; The pixel is embedded or moved according to the value of the prediction error, and its expression is: Where b∈{0,1} is the secret information bit, is the maximum pixel value in the embedded block; Minimum pixel p σ(1) The prediction error PE min The calculation is, Where s and t are the spatial position numbers of the smallest pixel and the second smallest pixel in the block; The pixel is embedded or moved according to the value of the prediction error, and its expression is: Try to embed each pixel block in turn; for each pixel block, first try to embed the maximum value p σ(h×w) Embed it and try to find the minimum value p σ(1) Embedding is performed until the secret information is completely embedded or there are no more available pixels; Step 4 specifically includes: For a carrier image of size H×W, record the first line of The least significant bit of each pixel is combined into the secret information; Change the original first line to The least significant bits are replaced by auxiliary information; the auxiliary information includes: the pixel block sizes h and w used, occupying 2×2=4 bits; the complexity threshold T, occupying 8 bits; the last position P embedded end , occupied bits; length l of compressed location map CLM CLM , occupied bit; where Indicates rounding up.

2. The reversible information hiding method based on adaptive pixel block division according to claim 1 is characterized in that: Also includes: Step 5, obtain multiple preset pixel block sizes, repeat steps 2 to 4 based on each preset pixel block size, compare the distortion sizes of the encrypted carrier images under different preset pixel block sizes, and select the encrypted carrier image with the smallest distortion compared to the original carrier image as the final encrypted carrier image.

3. The reversible information hiding method based on adaptive pixel block division according to claim 1 is characterized in that: After step 4, decoding is also included; The decoding steps include: Read the first line before The least significant bit of the pixel is used to obtain various parameters for embedding the secret information; the various embedding parameters include the pixel block sizes h and w used, the complexity threshold T, the last position P of the embedding end and the length l of the compressed position map CLM CLM ; According to the obtained embedding parameters, the image is divided into blocks according to the same adaptive block division method as that during embedding, the position of the pixels to be extracted from each pixel block is determined and the complexity of the pixel block is calculated; according to the complexity threshold and the complexity value of each pixel block, each pixel block is guided to perform a decoding operation or skip an operation until the last position P of the embedding is decoded. end ; The least significant bit corresponding to the first row in the decoded secret message Bit and the first line The least significant bit of the pixel corresponding to CLM is replaced; CLM The bit secret information is extracted and decompressed to obtain the decompressed position map LM, and the edge pixel values ​​are restored using the decompressed position map LM.

4. A reversible information hiding system based on adaptive pixel block partitioning, characterized in that: The method for implementing the reversible information hiding method based on adaptive pixel block division as claimed in claim 1 comprises: A preprocessing module, used for performing an anti-overflow operation on a portion of a pre-selected carrier image except the first row to obtain a processed carrier image; and obtaining position map information recording an overflow position based on the pre-selected carrier image; A pixel block division module is used to divide the processed carrier image into pixel blocks based on an adaptive pixel block division method and a preset pixel block size to obtain a carrier image after dividing the pixel blocks; A prediction and embedding module, which is used to locate the position of the pixels to be embedded in each pixel block based on the carrier image obtained after dividing the pixel blocks, and calculate the complexity of each pixel block; obtain the prediction error of the maximum value pixel to be embedded and the minimum value pixel to be embedded in each pixel block, and embed the information to be transmitted based on the prediction error; An auxiliary information embedding module is used to embed auxiliary information required for restoring the carrier image and extracting information into the first row of pixels of the processed carrier image; wherein the auxiliary information includes the position map information.

5. The reversible information hiding system based on adaptive pixel block partitioning according to claim 4 is characterized in that: Also includes: The decoding module is used for losslessly decoding the embedded information and losslessly restoring the carrier image by using the auxiliary information.

Citation Information

Patent Citations

  • A reversible data hiding method based on pixel multi-scale prediction

    CN109948307A

  • High-fidelity reversible information hiding method and device based on prediction error value sorting

    CN111898136A