Reversible information hiding method and device based on block selection strategy and pixel value sorting

By selecting more background pixels and calculating volatility in the reversible information hiding algorithm, the problem of inaccurate volatility calculation in the existing algorithm is solved, achieving lower image distortion and better invisibility.

CN114022338BActive Publication Date: 2025-01-24INST OF INT RELATIONS
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111069227.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-13
Publication Date
2025-01-24
Estimated Expiration
2041-09-13

AI Technical Summary

Technical Problem

The existing reversible information hiding algorithm based on pixel value sorting is susceptible to special pixels when calculating the volatility of image chunking, resulting in the calculated volatility being unrepresentative and cannot accurately represent the smoothness of image chunking.

Method used

A reversible information hiding method based on block selection strategy and pixel value sorting is proposed to ensure the accuracy and representativeness of volatility calculation by selecting more background pixels and calculating volatility. The specific method includes taking the eight neighborhood pixels with the maximum value and the second largest value as background pixels, and calculating the volatility through the absolute value of the mean difference or median difference.

Benefits of technology

This method can more accurately express the volatility of the maximum and minimum values ​​in the block, reduce the distortion of the image after the data embedding, and achieve better invisibleness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114022338B_ABST
    Figure CN114022338B_ABST
Patent Text Reader

Abstract

The present invention proposes a reversible information hiding method and device based on block selection strategy and pixel value sorting, which includes: dividing an original image into blocks to obtain a divided image, rearranging pixels of the divided image and calculating errors to obtain an error sequence, and classifying the error sequence according to pixel values ​​to generate a position map; collecting background pixels and calculating fluctuation values ​​to generate a fluctuation value set; according to the fluctuation value set, embedding data for each embeddable error to obtain an image carrying secret data; and embedding auxiliary information and the position map as additional information into the image carrying the secret data to obtain an image that finally hides the information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of image processing. Background Art

[0002] Reversible information hiding is a technology that embeds secret information into a carrier and can accurately restore the carrier after the information is extracted. Due to the lossless nature of its carrier, reversible information hiding has been widely used in information protection, image authentication, blockchain, privacy protection, and cloud storage. The reversible information hiding algorithm based on pixel value sorting is an emerging technology. This method first divides the image into blocks, then sorts the pixel values ​​in the image blocks, and calculates the prediction error. Then, information embedding or pixel value translation is performed. When information is embedded, the change to the pixel value is at most 1, thus achieving high fidelity of the image after data embedding. However, the performance of this method is affected by the volatility of the selected image blocks. For smooth blocks, more pixel values ​​that meet the embedding conditions can often be calculated, so the information embedding capacity is large and the efficiency is high; while for texture blocks with large fluctuations, fewer pixels meet the embedding conditions, and invalid translation is more common, resulting in increased image distortion. Therefore, the idea of ​​embedding smooth blocks first came into being. Among them, the definition of volatility is crucial to improving performance. Although existing methods have solved the problem of defining smooth blocks to varying degrees, they do not consider enough pixels to calculate the volatility and are easily affected by special pixels. In some cases, the calculated volatility is not representative and cannot accurately represent the smoothness of the image blocks.

[0003] In 2013, Li et al. proposed a prediction error expansion reversible information hiding algorithm based on pixel value sorting. The algorithm first divides the image into non-overlapping blocks, sorts the pixels in each image block in ascending order, and then predicts the maximum and minimum values ​​using the second largest value and the second smallest value respectively to obtain two prediction errors. Then, a method similar to histogram shift is used to expand the prediction errors for data embedding. In this algorithm, in order to reduce the distortion of the image after data embedding, blocks with low volatility are preferentially selected for information embedding. Among them, volatility is defined as the difference between the second largest value and the second smallest value. In 2014, Ou et al. improved and redefined the calculation method of volatility, and proposed a method in PVO-K to calculate volatility using the external pixels of the block as background pixels, and further applied this method to the subsequent Pairwise-PVO paired pixel value sorting and K-pass PVO multi-channel pixel value sorting algorithms. This method divides pixels into two categories: internal pixels of the block and background pixels. For a certain block, the so-called background pixels refer to all the pixels in the two right columns and two lower rows of the image block. After determining the background pixels, this method defines the sum of the absolute values ​​of the differences between two adjacent pixels in the background pixels as the volatility of the corresponding block. In 2020, Pan et al. further proposed an adaptive volatility calculation method that considers both internal and external pixels of the block as background pixels. The main framework of this method is also based on the PVO algorithm. However, because this method is general for the calculation of block smoothness, it can be easily extended and applied to other algorithms based on the PVO framework. In this method, for the maximum value in a certain block, the background pixels used for volatility calculation are first collected, which contains the following four types of pixels: 1) the eight-neighborhood pixels of the maximum value pixel; 2) the eight-neighborhood pixels of the second largest value pixel; 3) the second largest value pixel; 4) all pixels in the smallest rectangle that includes the maximum value pixel and the second largest value pixel. Considering that these background pixels may contain the maximum and minimum value pixels of other blocks, and the maximum and minimum value pixels may change after data embedding. In order to ensure the reversibility of the algorithm, this method removes the maximum and minimum pixels of the current image block and other image blocks in the selected background pixels. Similarly, for the minimum pixel in a certain block, the background pixels are selected first. Similar to the background pixels of the maximum pixel, its background pixels also include four types of pixels, namely: 1) the eight neighborhood pixels of the minimum pixel; 2) the eight neighborhood pixels of the second smallest pixel; 3) the second smallest pixel; 4) all pixels in the smallest rectangle containing the minimum pixel and the second smallest pixel. Accordingly, these background pixels also need to remove the maximum and minimum points.

[0004] In 2013, Li et al. used the difference between the second largest value and the second smallest value as the smoothness of the block in their method. This method is reversible and is simple and easy to implement, so it has been used in many subsequent algorithms based on pixel value sorting. However, this method has two serious disadvantages: 1) This method only uses pixels inside the two blocks to calculate the volatility, and does not consider the influence of external pixels on the volatility at the maximum or minimum end, so the prediction accuracy is limited. 2) In this method, the volatility is only calculated once in an image block, but the volatility will actually be used at both the maximum and minimum ends. In 2014, Ou et al. considered the influence of external pixels on volatility and proposed a new volatility calculation method. This method introduces external pixels into the calculation of volatility, solving the problem that only internal pixels are used to calculate volatility in the method of Li et al. Experimental results show that in most cases, the image distortion after embedding data in this method is lower than that of the original PVO method. However, this method is not universal, and it also has two shortcomings: 1) It only uses external pixels to calculate volatility, ignoring the internal pixels that affect volatility; 2) In this method, since the background pixels used to calculate volatility are to the right and bottom of the block, when the maximum and second-largest pixels appear in the upper left corner of the image block, the correlation between the background pixels and them is very low. At this time, the volatility calculated using the background pixels has little correlation with the actual maximum and second-largest values. At the same time, it does not solve the problem of smoothness sharing in a block, that is, volatility is used for both the maximum and minimum values. In 2020, Pan et al. proposed an adaptive volatility calculation method to solve the above problems. First, this method considers the influence of internal and external pixels on the volatility in the block at the same time. When selecting background pixels, not only the internal pixels of the block are selected, but also the pixels outside the block are selected. Secondly, this method solves the problem of volatility sharing in the previous methods by selecting background pixels at the maximum and minimum ends respectively. However, this method still has two problems: 1) Although more pixels are selected as background pixels, only two pixels are involved in the volatility calculation, and the other pixels are not used, so the calculation result is inaccurate. Especially for texture blocks, a large number of volatility pixels are not involved in the calculation, resulting in the calculated volatility result cannot truly represent the relationship between the predicted value and the predicted value in the block. 2) When calculating volatility, this method puts all background pixels into the same set, then selects the maximum value and the minimum value in this set as the difference, and divides the difference by the total number of elements in the set as the volatility value. When the maximum value and the minimum value pixels in the set happen to be in the same eight-neighborhood, the volatility value cannot guarantee the correlation with the maximum value and the second largest value in the image block at the same time, so the result cannot accurately represent the volatility of the maximum value end in the block. The same problem exists for the minimum value end. Summary of the invention

[0005] The present invention aims to solve one of the technical problems in the related art at least to a certain extent.

[0006] To this end, a first object of the present invention is to propose a reversible information hiding method based on block selection strategy and pixel value sorting, so as to obtain an image carrying secret information with lower distortion after data embedding.

[0007] The second object of the present invention is to propose a reversible information hiding device based on block selection strategy and pixel value sorting.

[0008] To achieve the above-mentioned purpose, the first aspect of the embodiment of the present invention proposes a reversible information hiding method based on block selection strategy and pixel value sorting, including: dividing the original image into blocks to obtain a block-based image, rearranging pixels of the block-based image and calculating errors to obtain an error sequence, and classifying the error sequence according to pixel values ​​to generate a position map; collecting background pixels and calculating fluctuation values ​​to generate a fluctuation value set; according to the fluctuation value set, embedding data for each embeddable error to obtain an image carrying secret data; embedding auxiliary information and the position map as additional information into the image carrying the secret data to obtain an image with final hidden information.

[0009] The reversible information hiding method based on block selection strategy and pixel value sorting proposed in the embodiment of the present invention can calculate the volatility that is more relevant to the block. This provides a good reference for selecting blocks with small volatility when embedding data. After data embedding, the distortion of the image carrying secret information is lower. Specifically, for the maximum end, when selecting background pixels for volatility calculation, the method puts the eight-neighborhood pixels of the maximum value and the eight-neighborhood pixels of the second largest value into two sets as background pixels. In order to ensure the reversibility of the algorithm, the background pixels need to be shaved off the maximum and minimum values ​​belonging to the current block and other blocks. When the pixels are shaved off in the eight-neighborhood of the maximum value, the pixels in the eight-neighborhood of the second largest value at the corresponding position are also shaved off. Finally, according to the size of the background pixel volatility, the average difference or the absolute value of the median difference of the two sets is used as a measure of volatility. This scheme uses enough background pixels when calculating volatility. For the minimum end, a similar method is also used to calculate its volatility. Experimental results show that, in the case of under-embedding, this scheme better expresses the volatility of the maximum and minimum values ​​in the block and achieves better invisibility.

[0010] In addition, the reversible information hiding method based on block selection strategy and pixel value sorting according to the above embodiment of the present invention may also have the following additional technical features:

[0011] Further, in an embodiment of the present invention, rearranging pixels of the segmented image and calculating an error to obtain an error sequence includes:

[0012] First, decompose the image I H×W into k non - overlapping blocks, where each block consists of n pixels denoted as (x1, x2,..., x n ). Arrange (x1, x2,..., x n ) in ascending order to obtain the sequence (x σ(1) , x σ(2) ,..., x σ(n) ), which satisfies x σ(1) ≤x σ(2) ≤...≤x σ(n) . If x σ(u) = x σ(v) and u < v, then σ(u) < σ(v);

[0013] Then, use the formula to calculate the prediction error of the i - th block respectively:

[0014]

[0015]

[0016] Finally, obtain k errors and

[0017] Further, in an embodiment of the present invention, collecting background pixels and calculating a fluctuation value to generate a set of fluctuation values includes:

[0018] Select background pixels. Each pixel block includes n pixel points. The n pixels are arranged in ascending order to form a sequence (x σ(1) , x σ(2) ,..., x σ(n) ). Taking the end with the maximum pixel as an example, the eight pixels adjacent to the maximum pixel value x σ(n) and the eight pixels adjacent to the second - maximum pixel value x σ(n-1) are selected as background pixels. To ensure the reversibility of the algorithm, the background pixels need to exclude the maximum and minimum values belonging to the current block and other blocks. When a pixel in the eight - neighborhood of the maximum value is excluded, the pixels in the eight - neighborhood of the second - maximum value at the corresponding position are also excluded, obtaining the final set of background pixels.

[0019] Calculate the fluctuation value. Taking the j - th block of pixels as an example, refers to the maximum and minimum pixels in the j - th block, refers to the second - maximum and second - minimum pixels in the j - th block. Taking and For example, its fluctuation value

[0020]

[0021] Among them, V1 and V2 refer to and Respective background pixel sets, m1 and m2 are the number of background pixels of V1 and V2 respectively, and the number of pixels in each pixel set is less than or equal to 8;

[0022] Through the above calculation method, the fluctuation value at the maximum value side can be calculated, and similarly, the fluctuation value at the minimum value side can be obtained.

[0023] Furthermore, in one embodiment of the present invention, embedding data into each embeddable error to obtain an image carrying secret data includes:

[0024] First, the potential embedding capacity of the selected image is estimated by counting the number of embeddable errors, where the embeddable error is the number of error values ​​1 and -1, and the length of the data to be embedded is represented by l num , if the total number of target pixels is less than l num , the selected image is not suitable for embedding. If the target image is suitable for embedding, data embedding is performed to obtain an image carrying secret information.

[0025] Furthermore, in one embodiment of the present invention, after obtaining the final image with hidden information, the method further includes:

[0026] After obtaining the final hidden information image, the additional information is extracted from the corresponding pixels, and then the image is divided into blocks according to the extracted parameters, and the prediction error and fluctuation value are calculated;

[0027] Before extracting from the end position of data embedding The lowest bit of each pixel is replaced with the lowest bit of the corresponding pixel in the current image, and then the image is re-divided into blocks, the error and volatility are calculated, the secret data is extracted from the first block, and the original image is restored.

[0028] To achieve the above object, another embodiment of the present invention provides a reversible information hiding device based on a block selection strategy and pixel value sorting, including: an image processing module that divides an original image into blocks to obtain a blocked image, rearranges pixels of the blocked image and calculates an error to obtain an error sequence, and generates a position map by classifying according to pixel values based on the error sequence; a calculation module that collects background pixels and calculates a fluctuation value to generate a set of fluctuation values; a data embedding module that embeds data into each embeddable error according to the set of fluctuation values to obtain an image carrying secret data; and an additional information embedding module that embeds auxiliary information and the position map as additional information to obtain an image with finally hidden information.

[0029] The reversible information hiding device based on a block selection strategy and pixel value sorting proposed in the embodiment of the present invention can calculate a volatility more relevant to the blocks. This provides a better reference for selecting blocks with small volatility when embedding data. After data embedding, the obtained image carrying secret information has a lower distortion degree. Specifically, for one end of the maximum value, when selecting background pixels for volatility calculation in this method, the eight-neighbor pixels of the maximum value and the eight-neighbor pixels of the second largest value are respectively put into two sets as background pixels. To ensure the reversibility of the algorithm, the maximum and minimum values belonging to other blocks need to be removed from the background pixels. When pixels are removed from the eight-neighbor of the maximum value, the pixels in the eight-neighbor of the second largest value at the corresponding position are also removed. Finally, the absolute value of the difference between the average values or the median differences of the two sets is used as a measure of volatility according to the size of the background pixel volatility. This scheme uses a sufficient number of background pixels when calculating volatility. For the minimum value end, a similar method is also used to calculate its volatility. It better expresses the volatility at one end of the maximum value and the minimum value in the block in the case of non-full embedding and achieves better invisibility.

[0030] Further, in an embodiment of the present invention, the image processing module is further configured to:

[0031] First, decompose the image I H×W into k non-overlapping blocks, each block consisting of n pixels denoted as (x1, x2,..., x n ), arrange (x1, x2,..., x n ) in ascending order to obtain a sequence (x σ(1) , x σ(2) ,..., x σ(n) ), this sequence satisfies x σ(1) ≤x σ(2) ≤...≤x σ(n) , if x σ(u) =x σ(v) and u < v, then there is σ(u) < σ(v);

[0032] Then use the formula to calculate the prediction error of the i-th block respectively:

[0033]

[0034]

[0035] Finally, we get k errors and

[0036] Furthermore, in one embodiment of the present invention, the calculation module is further used for:

[0037] Select background pixels, each pixel block includes n pixels, and n pixels are arranged in ascending order to form (x σ(1) ,x σ(2) ,...,x σ(n) ) sequence, taking the maximum value pixel as an example, and the maximum pixel value x σ(n) The sum of the eight adjacent pixels and the second largest pixel value x σ(n-1) Eight adjacent pixels are selected as background pixels. In order to ensure the reversibility of the algorithm, the background pixels need to remove the maximum and minimum values ​​belonging to other blocks. When the pixel is removed from the eight-neighborhood of the maximum value, the pixels in the eight-neighborhood of the corresponding position with the next largest value are also removed to obtain the final background pixel.

[0038] Calculate the fluctuation value, taking the jth block of pixels as an example, refers to the largest and smallest pixels in the jth block, refers to the second largest and second smallest pixels in the jth block, and For example, its fluctuation value

[0039]

[0040] Among them, V1 and V2 refer to and The respective background pixel sets, m1 and m2 are the number of background pixels of V1 and V2 respectively, so the number of pixels in each pixel set is less than or equal to 8;

[0041] Through the above calculation method, the fluctuation value at the maximum value side can be calculated, and similarly, the fluctuation value at the minimum value side can be obtained.

[0042] Furthermore, in one embodiment of the present invention, the data embedding module is further used to:

[0043] The potential capacity of the selected image is estimated by comparing the number of target pixels, which are pixels that will not overflow after prediction error expansion. The length of the data to be embedded is denoted as l num , if the total number of target pixels is less than l num , the selected image is not suitable for embedding. If the target image is suitable for embedding, data embedding is performed to obtain an image carrying secret information.

[0044] Furthermore, in one embodiment of the present invention, after obtaining the final image with hidden information, the method further includes:

[0045] The data extraction module is used to extract the additional information from the corresponding pixels after obtaining the final hidden information image, and then divide the image into blocks according to the extracted parameters, and calculate the prediction error and fluctuation value;

[0046] The carrier image recovery module is used to extract the previous image from the end position of data embedding. The lowest bit of each pixel is replaced with the lowest bit of the corresponding pixel in the current image, and then the image is re-divided into blocks, the error and volatility are calculated, the secret data is extracted from the first block, and the original image is restored. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0048] Figure 1 A schematic flow chart of a reversible information hiding method based on block selection strategy and pixel value sorting provided by an embodiment of the present invention.

[0049] Figure 2 A schematic diagram of a flow chart of a reversible information hiding device based on block selection strategy and pixel value sorting provided by an embodiment of the present invention.

[0050] Figure 3 This is a schematic diagram of an example of background pixels of a 3×3 pixel block provided in an embodiment of the present invention.

[0051] Figure 4 This is a schematic diagram of an example of pixel labeling in 8 areas provided by an embodiment of the present invention.

[0052] Figure 5 A schematic diagram of a data embedding process provided by an embodiment of the present invention.

[0053] Figure 6 A schematic diagram of the data extraction and image restoration process provided by an embodiment of the present invention.

[0054] Figure 7 A schematic diagram of the volatility calculation process provided by an embodiment of the present invention. Detailed implementation manners

[0055] The embodiments of the present invention will be described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to explain the present invention, but should not be construed as limiting the present invention.

[0056] The reversible information hiding method and device based on a block selection strategy and pixel value sorting according to the embodiments of the present invention will be described below with reference to the accompanying drawings.

[0057] Figure 1 It is a schematic flowchart of a reversible information hiding method based on an improved block selection strategy and pixel value sorting provided for the embodiments of the present invention.

[0058] As Figure 1 shown, the reversible information hiding method based on a block selection strategy and pixel value sorting includes the following steps:

[0059] S101: Divide the original image into blocks to obtain the block-divided image, rearrange the pixels of the block-divided image and calculate the error to obtain an error sequence, and generate a position map according to the error sequence by classifying according to pixel values.

[0060] Further, in an embodiment of the present invention, step S1 includes:

[0061] First, decompose the image I H×W into k non-overlapping blocks, each block consisting of n pixels denoted as (x1, x2,..., x n ), arrange (x1, x2,..., x n ) in ascending order to obtain the sequence (x σ(1) , x σ(2) ,..., x σ(n) ), this sequence satisfies x σ(1) ≤ x σ(2) ≤... ≤ x σ(n) , if x σ(u) = x σ(v) and u < v, then there is σ(u) < σ(v);

[0062] Then use formulas (1) and (2) to calculate the prediction error of the i-th block respectively:

[0063]

[0064]

[0065] Finally, obtain k errors and

[0066] In order to solve the overflow problem, the present invention divides the pixels in a block into three categories according to the pixel values. σ(n) =255 and Then let lm max(i) =1, otherwise lm max(i) = 0. On the other hand, if x σ(1) =255 and The present invention is provided min(i) =1, otherwise lm min(i) =0.

[0067] S102: Collect background pixels and calculate fluctuation values ​​to generate a fluctuation value set.

[0068] The specific volatility calculation process is as follows: Figure 7 As shown, for the calculation of volatility, background pixels are first selected, each pixel block includes n pixels, and n pixels are arranged in ascending order to form (x σ(1) ,x σ(2) ,...,x σ(n) ) sequence. Taking the maximum value pixel as an example, σ(n) The sum of the eight adjacent pixels and the second largest pixel value x σ(n-1) Eight adjacent pixels are selected as background pixels. To ensure reversibility, the present invention sets all x σ(n) 、x σ(1) Remove from background pixels, regardless of x σ(n) 、x σ(1) Belongs to the current block or other pixel blocks. The present invention takes the jth block (divided into 3×3 blocks) as an example, and its background pixels are as follows Figure 3 shown.

[0069] like Figure 3 As shown, the background pixels are surrounded by rectangles. refers to the largest and smallest pixels in the jth block, refers to the second largest and second smallest pixels in the jth block, and For example, its fluctuation value

[0070]

[0071] Among them, V1 and V2 refer to and Respective background pixel sets, m1 and m2 are the number of background pixels of V1 and V2 respectively, and the number of pixels in each pixel set is less than or equal to 8;

[0072] By the same calculation method, the fluctuation value at the minimum value end can be calculated

[0073]

[0074] Among them, V3 and V4 refer to and The respective background pixel sets, m3 and m4 are the number of background pixels of V3 and V4 respectively.

[0075] In the method of calculating the volatility by the average value of (3) and (4), the volatility value is easily affected by extremely large or extremely small individual pixel values. To solve this problem, the present invention further proposes a strategy of using the median to calculate the volatility value, as shown in equations (5) and (6), and the absolute value of the difference between the medians of two background pixel sets is used as the volatility value.

[0076]

[0077]

[0078] In order to determine which fluctuation value calculation method is more suitable for the current pixel block, the present invention proposes a new judgment method. and For example, by calculating and The volatility of the pixel block is defined by the absolute value of the background pixel difference at the corresponding position. σ(n) 、x σ(1) If the background pixel is removed and there is no corresponding pixel, then skip this pixel pair and calculate the difference of the next pixel pair. If the calculated value is greater than the standard value we set in advance, the fluctuation value calculation method based on the median is used. If it is less than the standard value, the mean calculation method is used. The pixel labels and corresponding relationships are as follows: Figure 4 As shown. Among them, Indicates the center pixel, numbers 1-8 represent The eight neighborhood pixels are marked in clockwise order from small to large distances. The corresponding calculation formula can be expressed as:

[0079]

[0080]

[0081] S103: According to the fluctuation value set, data is embedded into each embeddable error to obtain an image carrying secret data.

[0082] Specifically, the present invention first estimates the potential capacity of the selected image by comparing the number of target pixels, where the target pixels are pixels that will not overflow after prediction error expansion, and the length of the data to be embedded is represented by l numIf the total number of target pixels is less than l num , the selected image is not suitable for embedding. If the target image is suitable for embedding, the background pixels are selected. Considering the maximum and minimum values ​​at the same time, the obtained fluctuation value is counted as and In C max and C min During the generation process, the sum of the absolute values ​​of the differences of the corresponding 8 surrounding pixels is compared with the standard value to determine whether each item uses the mean-based method or the median-based method.

[0083] The core of the present invention is to embed data into a region whose fluctuation value is less than a predefined fluctuation threshold. When the embedding capacity of the image is greater than the amount of data to be embedded, invalid displacement can be reduced, thereby obtaining a smaller distortion. max , C min The elements of are compared with the threshold respectively. If the volatility is greater than the threshold, the corresponding error is skipped. If the corresponding volatility is less than the given threshold, data embedding judgment is performed on it. Specifically, the two sequences corresponding to the target pixel are selected alternately according to their volatility value and natural order. max sequence, consider the i-th suitable target pixel, if lm max(i) = 1, this pixel will be skipped to process the next pixel. If lm max(i) =0, when the error meets the embedding condition, 1-bit data will be embedded into the target pixel through prediction error expansion. The embedding process is shown in formula (9). If the error does not meet the data embedding condition, the corresponding maximum value pixel needs to be added by 1 to avoid confusion when extracting data.

[0084]

[0085] Similarly, for C min sequence, consider the i-th suitable target pixel, if lm min(i) = 1, this pixel will be skipped. If lm min(i) =0, when the error meets the embedding condition, 1-bit data will be embedded into the target pixel through prediction error expansion. The embedding process is shown in formula (10). If the error does not meet the data embedding condition, the corresponding minimum pixel needs to be reduced by 1 to avoid confusion when extracting data.

[0086]

[0087] When all the secret information is embedded in the image, record C max , C min The position where the sequence ends and is counted as l endax and l endin, they will all be embedded into the subsequent blocks of the image as auxiliary information to achieve blind extraction.

[0088] S104: Embed the auxiliary information and the position map as additional information into the image carrying the secret data to obtain a final image with hidden information.

[0089] In order to achieve blind extraction, the present invention embeds auxiliary information and position map as additional information. First, record the front ( The lowest bit value of the pixel is rounded up to an integer function) to obtain a binary sequence. Then the additional information replaces the previous The lowest bit of each pixel, with additional information including 8 bits of block size, record end position and compression position map Bit. Finally, from l endax +1 and l endin +1, and then embed the obtained binary sequence into the image through the fourth step to obtain the final image with hidden information. The specific data embedding process is as follows: Figure 5 shown.

[0090] After obtaining the image with hidden information I' H×W After that, the present invention first extracts the additional information from the corresponding pixels, and then divides the image into blocks according to the extracted parameters. Similar to the case of embedding information, the present invention calculates the prediction error and the fluctuation value. Finally, the embedded information is extracted, and the original image is restored. In this section, the present invention will introduce the data extraction and original image restoration. The specific data extraction and image restoration process is as follows: Figure 6 shown.

[0091] Extraction of additional information. First, The lowest bit of each image is extracted from the pixels to obtain additional information, including the block size 8 bits, the length of the end position parameter and the compression position map.

[0092] Image segmentation and error calculation. First, I' H×W Divide it into blocks of the same size as in the embedding process, then sort each block and calculate the prediction error to get E max 、E min sequence.

[0093] Fluctuation value calculation. Use the same method as the embedding process to select background pixels and calculate the fluctuation to get C max and C min Volatility series.

[0094] forward The lowest bit of each pixel is restored. endax +1 and l endin+1 block position starts, restore the corresponding front The lowest bit of the pixel. When the volatility meets the conditions, C max Taking the i-th position in as an example, i∈(l endax +1,...,k), if lm max(i) = 1, the pixel will be skipped to process the next pixel. If lm max(i) =0, the 1-bit embedded data will be extracted according to formula (11), and the corresponding original pixel will be restored according to formula (12). If the volatility is greater than or equal to the threshold, the corresponding pixel will be skipped.

[0095]

[0096]

[0097] Similarly, when volatility satisfies the conditions, for C min The i position in the endin +1,...,k), if lm min ( i) = 1, this pixel will be skipped to process the next pixel. If lm min(i) =0, the 1-bit embedded data will be extracted according to formula (13), and the original pixel will be restored according to formula (14). If the volatility is greater than or equal to the threshold, the corresponding pixel will be skipped.

[0098]

[0099]

[0100] Data extraction and image restoration. The lowest bit of each pixel is replaced with the lowest bit of the corresponding pixel in the current image, and then the image is re-divided into blocks, the error and volatility are calculated, and finally the secret data is extracted from the first block using the method in the previous step, while the original image is restored.

[0101] The reversible information hiding method based on block selection strategy and pixel value sorting proposed in the embodiment of the present invention can calculate the volatility that is more relevant to the block. This provides a good reference for selecting blocks with small volatility when embedding data. After data embedding, the distortion of the image carrying secret information is lower. Specifically, for the maximum end, when selecting background pixels for volatility calculation, the method puts the eight-neighborhood pixels of the maximum value and the eight-neighborhood pixels of the second largest value into two sets as background pixels. In order to ensure the reversibility of the algorithm, the background pixels need to be shaved off the maximum and minimum values ​​belonging to other blocks. When the pixels are shaved off in the eight-neighborhood of the maximum value, the pixels in the eight-neighborhood of the second largest value at the corresponding position are also shaved off. Finally, according to the size of the background pixel volatility, the average difference or the absolute value of the median difference of the two sets is used as a measure of volatility. This scheme uses enough background pixels when calculating volatility. For the minimum end, a similar method is also used to calculate its volatility. Experimental results show that, in the case of under-embedding, this scheme better expresses the volatility of the maximum and minimum values ​​in the block and achieves better invisibility.

[0102] In order to implement the above embodiment, the present invention also proposes a reversible information hiding device based on block selection strategy and pixel value sorting.

[0103] Figure 2 A schematic structural diagram of a reversible information hiding device based on block selection strategy and pixel value sorting provided by an embodiment of the present invention.

[0104] like Figure 2 As shown, the reversible information hiding device based on block selection strategy and pixel value sorting includes: an image processing module 10 , a calculation module 20 , a data embedding module 30 , and an additional information embedding module 40 .

[0105] Among them, the image processing module is used to divide the original image into blocks to obtain block images, rearrange the pixels of the block images and calculate the errors to obtain an error sequence, and classify the error sequences according to the pixel values ​​to generate a position map; the calculation module is used to collect background pixels and calculate the fluctuation values ​​to generate a fluctuation value set; the data embedding module is used to embed data into each embeddable error according to the fluctuation value set to obtain an image carrying secret data; the additional information embedding module is used to embed auxiliary information and the position map as additional information to obtain the final image with hidden information.

[0106] Furthermore, in one embodiment of the present invention, the image processing module 10 is also used for:

[0107] First, image I H×W Decompose into k non-overlapping blocks, each block consists of n pixels and is denoted as (x1, x2, ..., xn ), arrange (x1, x2,..., x n ) in ascending order to obtain the sequence (x σ(1) , x σ(2) ,..., x σ(n) ), and this sequence satisfies x σ(1) ≤x σ(2) ≤...≤x σ(n) . If x σ(u) =x σ(v) and u < v, then σ(u) < σ(v);

[0108] Then, use the formula to calculate the prediction error of the i-th block respectively:

[0109]

[0110]

[0111] Finally, obtain k errors and

[0112] Further, in an embodiment of the present invention, the calculation module 20 is further configured to:

[0113] Select background pixels. Each pixel block includes n pixel points, and the n pixels are arranged in ascending order to form the sequence (x σ(1) , x σ(2) ,..., x σ(n) ). Taking the end of the maximum pixel as an example, the eight pixels adjacent to the maximum pixel value x σ(n) and the eight pixels adjacent to the second maximum pixel value x σ(n-1) are selected as background pixels;

[0114] Calculate the fluctuation value. Taking the j-th block of pixels as an example, refers to the maximum and minimum pixels in the j-th block, refers to the second maximum and second minimum pixels in the j-th block. Taking and as an example, its fluctuation value

[0115]

[0116] where V1 and V2 refer to and their respective background pixel sets, m1 and m2 are the numbers of background pixels of V1 and V2 respectively, and the number of pixels in each pixel set is less than or equal to 8;

[0117] Through the above calculation method, the fluctuation value at the maximum value side can be calculated, and similarly, the fluctuation value at the minimum value side can be obtained.

[0118] Furthermore, in one embodiment of the present invention, the data embedding module 30 is further configured to:

[0119] The potential capacity of the selected image is estimated by comparing the number of target pixels, which are pixels that will not overflow after prediction error expansion. The length of the data to be embedded is denoted as l num , if the total number of target pixels is less than l num , the selected image is not suitable for embedding. If the target image is suitable for embedding, the background pixels are selected.

[0120] Furthermore, in one embodiment of the present invention, after obtaining the final image with hidden information, the method further includes:

[0121] The additional information extraction module 100 is used to extract the additional information from the corresponding pixels after obtaining the final hidden information image, and then divide the image into blocks according to the extracted parameters, and calculate the prediction error and fluctuation value;

[0122] The data extraction and carrier image recovery module 200 is used to extract the previous image from the end position of data embedding. The lowest bit of each pixel is replaced with the lowest bit of the corresponding pixel in the current image, and then the image is re-divided into blocks, the error and volatility are calculated, the secret data is extracted from the first block, and the original image is restored.

[0123] The reversible information hiding device based on improved block selection strategy and pixel value sorting proposed in the embodiment of the present invention can calculate the volatility that is more relevant to the block. This provides a good reference for selecting blocks with small volatility when embedding data. After data embedding, the distortion of the image carrying secret information is lower. Specifically, for the maximum value end, when selecting background pixels for volatility calculation, this method puts the eight-neighborhood pixels of the maximum value and the eight-neighborhood pixels of the second largest value into two sets respectively, and then uses the absolute value of the mean difference or median difference of the two sets as a measure of volatility. This scheme uses enough background pixels when calculating volatility. For the minimum value end, a similar method is also used to calculate its volatility. In the case of incomplete embedding, the volatility of the maximum value end and the minimum value end in the block is better expressed, and better invisibility is achieved.

[0124] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0125] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0126] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and modify the above embodiments within the scope of the present invention.

Claims

1. A reversible information hiding method based on block selection strategy and pixel value sorting, characterized in that: The following steps are involved: Divide the original image into blocks to obtain divided images, rearrange pixels of the divided images and calculate errors to obtain an error sequence, and classify the error sequence according to pixel values ​​to generate a position map; collecting background pixels and calculating fluctuation values ​​to generate a fluctuation value set; According to the fluctuation value set, data is embedded into each embeddable error to obtain an image carrying secret data; Embedding the auxiliary information and the position map as additional information into the image carrying the secret data to obtain a final image with hidden information; The step of rearranging pixels of the divided image and calculating errors to obtain an error sequence includes: First, decompose the image I H×W into k non - overlapping blocks, where each block consists of n pixels denoted as (x1, x2,..., xn). Arrange (x1, x2,..., x n ) in ascending order to obtain the sequence (x σ(1) , x σ(2) ,..., x σ(n) ). This sequence satisfies x σ(1) ≤x σ(2) ≤...≤x σ(n) . If x σ(u) = x σ(v) and u < v, then σ(u) < σ(v); Then use the formula to calculate the prediction error of the i-th block respectively: Finally, we get k errors and The collecting background pixels and calculating the fluctuation values ​​to generate a fluctuation value set includes: Select background pixels, each pixel block includes n pixels, and n pixels are arranged in ascending order to form (x σ(1) ,x σ(2) ,...,x σ(n) ) sequence, taking the maximum value pixel as an example, and the maximum pixel value x σ( n ) The sum of the eight adjacent pixels and the second largest pixel value x σ(n-1) Eight adjacent pixels are selected as background pixels. The maximum and minimum values ​​belonging to other blocks and the current block need to be removed from the background pixels. When the pixel is removed from the eight-neighborhood of the maximum value, the pixel in the eight-neighborhood of the corresponding position with the second largest value is also removed, and the neighborhood of the second largest value is also processed accordingly. Finally, according to the size of the volatility of the background pixel, the mean of the absolute values ​​of the difference between the corresponding positions of the two eight-neighborhoods or the absolute value of the difference between the medians of the two eight-neighborhoods is selected as the volatility value; Calculate the fluctuation value, taking the jth block of pixels as an example, refers to the largest and smallest pixels in the jth block, refers to the second largest and second smallest pixels in the jth block, and For example, its fluctuation value Among them, V1 and V2 refer to and Respective background pixel sets, m1 and m2 are the number of background pixels of V1 and V2 respectively, and the number of pixels in each pixel set is less than or equal to 8; Through the above calculation method, the fluctuation value at the maximum value end is calculated, and the fluctuation value at the minimum value end can be obtained similarly; The step of embedding data into each embeddable error to obtain an image carrying secret data comprises: First, the potential embedding capacity of the selected image is estimated by counting the number of embeddable errors, where the embeddable error values ​​are 1 and -1, and the length of the data to be embedded is represented by l num , if the total number of embeddable errors is less than l num , the selected image is not suitable for embedding. If the target image is suitable for embedding, data embedding is performed to obtain an image carrying secret information.

2. The method according to claim 1, characterized in that After obtaining the final image with hidden information, it also includes data extraction and carrier image recovery; After obtaining the final hidden information image, the additional information is extracted from the corresponding pixels, and then the image is divided into blocks according to the extracted parameters, and the prediction error and fluctuation value are calculated; Before extracting from the end position of data embedding The lowest bit of each pixel is replaced with the lowest bit of the corresponding pixel in the current image, and then the image is re-divided into blocks, the error and volatility are calculated, the secret data is extracted from the first block, and the original image is restored.

3. A reversible information hiding device based on block selection strategy and pixel value sorting, characterized in that: Includes the following modules: An image processing module is used to divide the original image into blocks to obtain divided images, rearrange pixels of the divided images and calculate errors to obtain an error sequence, and classify the error sequence according to pixel values ​​to generate a position map; A calculation module, used for collecting background pixels and calculating fluctuation values ​​to generate a fluctuation value set; A data embedding module, used for embedding data into each embeddable error according to the fluctuation value set to obtain an image carrying secret data; An additional information embedding module is used to embed the auxiliary information and the position map as additional information to obtain a final image with hidden information; Wherein, the image processing module is also used for: First, decompose the image I H×W into k non - overlapping blocks, where each block consists of n pixels denoted as (x1, x2,..., xn). Arrange (x1, x2,..., x n ) in ascending order to obtain the sequence (x σ(1) , x σ(2) ,..., x σ(n) ). This sequence satisfies x σ(1) ≤x σ(2) ≤...≤x σ(n) . If x σ(u) =x σ(v) and u < v, then σ(u) < σ(v); Then use the formula to calculate the prediction error of the i-th block respectively: Finally, we get k errors and The computing module is further used for: Select background pixels, assuming that each pixel block consists of n pixels, and n pixels are arranged in ascending order to form (x σ(1) ,x σ(2) ,...,x σ(n) ) sequence, taking the maximum value pixel as an example, and the maximum pixel value x σ( n ) The sum of the eight adjacent pixels and the second largest pixel value x σ(n-1) Eight adjacent pixels are selected as background pixels. The background pixels need to remove the maximum and minimum values ​​belonging to other blocks and the block. When the pixel is removed in the eight-neighborhood of the maximum value, the pixel in the eight-neighborhood of the corresponding position with the second largest value is also removed, and the second largest value is also processed accordingly. Finally, according to the size of the volatility of the background pixel, the mean of the absolute values ​​of the difference between the corresponding positions of the two eight-neighborhoods or the absolute value of the difference between the medians of the two eight-neighborhoods is selected as the volatility value; Calculate the fluctuation value, taking the jth block of pixels as an example, refers to the largest and smallest pixels in the jth block, refers to the second largest and second smallest pixels in the jth block, and For example, its fluctuation value Among them, V1 and V2 refer to and The respective background pixel sets, m1, m2 are the number of background pixels of V1 and V2, respectively, because and has been removed, so the number of pixels in each pixel set is less than or equal to 8; Through the above calculation method, the fluctuation value at the maximum value end can be calculated, and similarly, the fluctuation value at the minimum value end can be calculated; The data embedding module is further used for: First, the potential embedding capacity of the selected image is estimated by counting the number of embeddable errors, where the error values ​​of the embeddable errors are 1 and -1, and the length of the data to be embedded is represented by l num , if the total number of embeddable errors is less than l num , the selected image is not suitable for embedding. If the target image is suitable for embedding, data embedding is performed to obtain an image carrying secret information.

4. The device according to claim 3, characterized in that Also includes: The data extraction module is used to extract the additional information from the corresponding pixels after obtaining the final hidden information image, and then divide the image into blocks according to the extracted parameters, and calculate the prediction error and fluctuation value; The carrier image recovery module is used to extract the previous image from the end position of data embedding. The lowest bit of each pixel is replaced with the lowest bit of the corresponding pixel in the current image, and then the image is re-divided into blocks, the error and volatility are calculated, the secret data is extracted from the first block, and the original image is restored.

Citation Information

Patent Citations

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

    CN111898136A

  • Image reversible information hiding method based on PVO and 3D mapping modification

    CN113095990A