A reversible information hiding adaptive verification prediction method, device and equipment
By dividing images into texture and smooth blocks and using adaptive verification prediction, the method minimizes prediction errors and visual differences, improving prediction accuracy and capacity in areas with richer textures.
Patent Information
- Application Number
- CN202410765630.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-14
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2044-06-14
AI Technical Summary
Existing prediction error expansion (PEE) technologies introduce large prediction errors in areas with richer textures, leading to significant visual differences between the final predicted image and the original image, reducing the effectiveness of information hiding.
The method involves dividing an image into texture and smooth blocks, using a global predictor for smooth blocks and a local predictor for texture blocks to adaptively verify prediction results, combining these to minimize prediction errors and maintain image details.
This approach reduces prediction errors and visual differences by employing a global and local predictor strategy, effectively maintaining global information and detail information in different image regions, thereby enhancing prediction accuracy and capacity.
Smart Images

Figure CN118741004B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image security technology, and in particular to a reversible information hiding adaptive verification prediction method, device and equipment. Background Art
[0002] Data hiding is a technique that hides secret information in the original carrier to ensure that the existence of the hidden information is not detected. However, most data hiding methods will cause permanent damage to the original carrier, making it impossible for the receiver to obtain the complete original carrier after extracting the hidden information. In some special fields, such as medical images, legal evidence, and military, the damage to the original image will cause errors in professional decision-making. Therefore, in order to meet the needs of lossless restoration of original images in special fields, reversible data hiding (RDH) technology came into being.
[0003] In order to improve the performance of hidden information embedding, many reversible information hiding (RDH) methods have been proposed. These algorithms can be mainly divided into the following categories: lossless compression, difference expansion (DE), histogram shift (HS) and prediction error expansion (PEE). At present, the prediction error expansion (PEE) algorithm is regarded as the most widely studied technology because the prediction error amplitude generated by the prediction error expansion (PEE) algorithm is small, which is conducive to improving the embedding capacity. The prediction error expansion (PEE) technology mainly performs image prediction and hidden information embedding at the sending end. Image prediction mainly predicts the original carrier image to obtain the predicted image, which is equivalent to encrypting the original image. Hidden information embedding is to embed secret information in the encrypted image. At the receiving end, the encrypted image is decrypted by the encryption key to obtain the decrypted image. The hidden secret information can be extracted by the hidden key to restore the original image.
[0004] At present, the improvement of prediction error expansion (PEE) technology is mainly concentrated in two aspects: image prediction and hidden information embedding. Among them, in terms of image prediction, Hu et al. published the paper "Reversible Data Hiding By Using CNN Prediction and Adaptive Embedding" in 2022. This paper uses convolutional neural network CNN as a predictor and uses its global optimization ability to improve image prediction performance. Because Transformer neural network can better process global information than convolutional neural network CNN, Zhou et al. published the paper "Reversible data hiding using a transformer predictor and an adaptive embedding strategy" in 2023. This paper uses Transformer neural network as a predictor to further improve the prediction efficiency. Although the above methods have improved the image prediction performance to a certain extent, there are still the following shortcomings: the predictor using convolutional neural network CNN or Transformer neural network considers the global information of the image block, but not all areas in the image are suitable for global prediction. For areas with rich textures, if global prediction is used, it is bound to introduce a large prediction error in this area, resulting in a large visual difference between the final predicted image and the original image, reducing the effectiveness of information hiding. Summary of the invention
[0005] The present invention aims to at least solve the technical problem that, when predicting an image, the existing prediction error expansion (PEE) technology uses global prediction for the entire original carrier image, which introduces a large prediction error in areas with richer textures, resulting in a large visual difference between the final predicted image and the original carrier image, and provides a reversible information hiding adaptive verification prediction method, device and equipment.
[0006] In order to achieve the above-mentioned purpose of the present invention, according to the first aspect of the present invention, the present invention provides a reversible information hiding adaptive verification prediction method, comprising: dividing an original image into multiple image blocks, dividing the pixel points of the image blocks into non-overlapping point sets and cross sets; distinguishing the multiple image blocks into texture blocks and smooth blocks; inputting the point sets of the image blocks into a global predictor to obtain the cross set global prediction results of the image blocks; when the image block is a smooth block, obtaining the predicted image of the image block through the cross set global prediction results and the point set of the image block; when the image block is a texture block, using a local predictor to verify the cross set global prediction results to obtain the cross set verification prediction results, and obtaining the predicted image of the image block through the cross set verification prediction results and the point set of the image block; combining the predicted images of the multiple image blocks to obtain the predicted image of the original image.
[0007] In order to achieve the above-mentioned purpose of the present invention, according to the second aspect of the present invention, the present invention provides a reversible information hiding adaptive verification prediction device, which is used to implement a reversible information hiding adaptive verification prediction method described in the first aspect of the present invention, including: a division module, which divides the original image into multiple image blocks, and divides the pixel points of the image block into non-overlapping point sets and cross sets; a category distinction module, which distinguishes the multiple image blocks into texture blocks and smooth blocks; a cross set global prediction module, which inputs the point set of the image block to the global predictor to obtain the cross set global prediction result of the image block; a predicted image acquisition module for the image block, when the image block is a smooth block, obtains the predicted image of the image block through the cross set global prediction result and the point set of the image block; when the image block is a texture block, uses the local predictor to verify the cross set global prediction result to obtain the cross set verification prediction result, and obtains the predicted image of the image block through the cross set verification prediction result and the point set of the image block; a predicted image generation module, which combines the predicted images of the multiple image blocks to obtain the predicted image of the original image.
[0008] In order to achieve the above-mentioned purpose of the present invention, according to the third aspect of the present invention, the present invention provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the reversible information hiding adaptive verification prediction method described in the first aspect of the present invention.
[0009] In order to achieve the above-mentioned purpose of the present invention, according to the fourth aspect of the present invention, the present invention provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the reversible information hiding adaptive verification prediction method described in the first aspect of the present invention.
[0010] The beneficial technical effects of the present invention are as follows: an original image is divided into a plurality of image blocks, pixels of each image block are divided into non-intersecting point sets and cross sets, the point set is input into a global predictor to predict the pixel values of the cross set pixels to obtain a cross set global prediction result, the image blocks are divided into two types, texture blocks and smooth blocks, according to the texture richness of each region, the cross set global prediction result of the image block is adaptively checked or not checked according to the type of the image block, when the image block is a smooth block, the cross set global prediction result and the point set of the image block are directly combined to obtain a predicted image of the image block; when the image block is a texture block, in order to reduce the prediction loss and reduce the visual difference between the predicted image and the original image, the cross set global prediction result is checked by a local predictor to obtain a cross set check prediction result, and then the cross set check prediction result and the point set of the image block are combined to obtain the predicted image of the image block, so that the predicted image of the texture block not only maintains the global information but also maintains the detail information, realizes the adaptive check of the global predictor and the local predictor in different regions of the image, controls the prediction error within a certain range, reduces the prediction error, and reduces the visual difference between the predicted image and the original image. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 It is a flow chart of a reversible information hiding adaptive verification prediction method in a preferred embodiment of the present invention;
[0012] Figure 2 It is an implementation flow chart of a reversible information hiding adaptive verification prediction method in an application scenario of the present invention;
[0013] Figure 3 is a schematic diagram of the structure of a global predictor in a preferred embodiment of the present invention;
[0014] Figure 4 is a schematic diagram of the principle of a local predictor in a preferred embodiment of the present invention;
[0015] Figure 5 It is an experimental comparison diagram of the reversible information hiding adaptive verification prediction method provided by the present invention and the existing predictor;
[0016] Figure 6 It is a schematic structural diagram of an electronic device in a preferred embodiment of the present invention. DETAILED DESCRIPTION
[0017] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0018] In the description of the present invention, it is necessary to understand that the terms "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.
[0019] In the description of the present invention, unless otherwise specified and limited, it should be noted that the terms "installed", "connected" and "connected" should be understood in a broad sense. For example, it can be a mechanical connection or an electrical connection, or it can be the internal connection between two components. It can be a direct connection or an indirect connection through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to the specific circumstances.
[0020] The present invention discloses a reversible information hiding adaptive verification prediction method. In a preferred embodiment, Figure 1 As shown, including:
[0021] Step S1, dividing the original image into multiple image blocks, and dividing the pixel points of the image blocks into non-intersecting point sets and cross sets. Preferably, a chessboard partitioning method is used to divide the pixel points of the image blocks into non-intersecting point sets and cross sets.
[0022] The original image is the original carrier in the reversible data hiding (RDH) method. The original image is divided into multiple image blocks of fixed size, and the pixel values of the cross-set pixels of the image blocks are predicted to obtain the predicted image of the image blocks. The image block can be regarded as a pixel matrix. The process of the chessboard division method is: mark the first row of pixels of the pixel matrix from left to right as cross-set pixel point ×, point-set pixel point ●, cross-set pixel point ×, point-set pixel point ●...point-set pixel point ●, and mark the second row of pixels of the pixel matrix from left to right as point-set pixel point ●, cross-set pixel point ×, point-set pixel point ●...cross-set pixel point ×, refer to Figure 2 and Figure 4 , and so on until the last row of pixels in the pixel matrix, so that the pixels of the image block are divided into point set pixels and cross set pixels without intersection. All cross set pixels of the image block constitute the cross set of the image block, and all point set pixels constitute the point set of the image block.
[0023] Step S2: divide the multiple image blocks into texture blocks and flat blocks.
[0024] The image texture in the texture block is richer than that in the smooth block. The image block can be manually marked as a texture block or a smooth block; a texture feature extraction model based on deep learning can also be used to extract the texture features of the image block, and the texture block and the smooth block can be distinguished by comparing the texture feature differences of different image blocks. The texture feature extraction model is preferably, but not limited to, the image texture feature extraction device or image texture feature extraction system disclosed in the Chinese patent publication number CN102289671A or CN109522907A.
[0025] Step S3, inputting the point set of the image block into the global predictor to obtain the cross set global prediction result of the image block.
[0026] The cross set pixel values of each image block are globally predicted respectively to obtain a cross set global prediction result, and the cross set global prediction result of the image block is specifically a set of global prediction pixel values of all cross set pixel points of the cross set of the image block. The global predictor is preferably, but not limited to, an existing convolutional neural network CNN predictor or a neural network Transformer predictor.
[0027] Step S4, when the image block is a smooth block, a predicted image of the image block is obtained through the cross set global prediction result and the point set of the image block; when the image block is a texture block, a local predictor is used to verify the cross set global prediction result to obtain a cross set verification prediction result, and a predicted image of the image block is obtained through the cross set verification prediction result and the point set of the image block.
[0028] When the image block is a smooth block, the predicted image of the smooth block is obtained by combining the cross set global prediction result of the image block and the original pixel value of the image block point set. When the image block is a texture block, due to the rich details in the texture block, directly using the cross set global prediction result will bring a large prediction error, resulting in a large visual difference between the predicted image and the original image, thereby affecting the information hiding effect. Therefore, a local predictor is used to verify the cross set global prediction result of the texture block to obtain a cross set verification prediction result. The cross set verification prediction result includes the verification prediction pixel values of multiple cross set pixel points, and then the cross set verification prediction result and the original pixel value of the image block point set are combined together to obtain the predicted image of the texture block.
[0029] Step S5, combining the predicted images of the multiple image blocks to obtain the predicted image of the original image. Specifically, the predicted images of the multiple image blocks are combined and spliced together to obtain the predicted image of the original image.
[0030] In a preferred embodiment, in order to fully capture the detailed features of the image blocks and more accurately distinguish between texture blocks and smooth blocks, in step S2, multiple image blocks are distinguished into texture blocks and smooth blocks, including: inputting the original image into the self-attention recognition model, the self-attention recognition model outputs the smooth block confidence probability and the texture block confidence probability of the image block, when the smooth block confidence probability of the image block is greater than or equal to the texture block confidence probability, the image block is defined as a smooth block, otherwise, the image block is defined as a texture block.
[0031] In this embodiment, the self-attention recognition model is pre-trained, and the self-attention recognition model includes:
[0032] Two convolutional layers, one convolutional layer extracts low-level features of image patches, and the other convolutional layer extracts high-level features of image patches;
[0033] A complex attention module that uses convolution operations to generate query matrices, key matrices, and value matrices for input image patches, and obtains attention maps through matrix multiplication to enhance input features;
[0034] The fully connected layer flattens the output features of the two convolutional layers and the output features of the attention module, and maps the flattened features into the smooth block confidence probability and texture block confidence probability of each image block.
[0035] In an application scenario of this embodiment, Figure 2 The implementation process of the adaptive verification prediction method for reversible information hiding is demonstrated. The original image is first input into the self-attention recognition model to distinguish between smooth blocks and texture blocks. The pixel points of texture blocks and smooth blocks are divided into point sets and cross sets respectively. The point sets of texture blocks and smooth blocks are respectively input into the global predictor to obtain the corresponding cross set global prediction results. For texture blocks, the local predictor is also required to verify the obtained cross set global prediction results. The predicted images of texture blocks and smooth blocks are merged to obtain the predicted image corresponding to the original image.
[0036] Compared with the convolutional neural network CNN, the Vision Transformer model (ViT model for short) is independent of the convolution operation, reduces the number of model parameters, reduces the computational complexity, and introduces a global attention mechanism to effectively capture the global information of the image, thereby improving the performance. In a preferred embodiment, the ViT model is introduced as the global predictor of this embodiment. However, the input of the existing ViT model can only be an image, and the output is a classification result, which cannot be adapted to the scenario of the present invention. In this regard, this embodiment improves the existing ViT model and provides a new type of global predictor. The structural diagram of the global predictor is shown in FIG. Figure 3Therefore, in step S3, the point set of the image block is input to the global predictor to obtain the cross set global prediction result of the image block, including:
[0037] Step S31, reshape the point set of the image block into a two-dimensional image. The size of the two-dimensional image is smaller than the size of the image block, the cross set pixels of the image block are set to be empty, and all the point set pixels shrink inward to occupy the cross set pixels, thereby forming a two-dimensional image containing only the point set pixels.
[0038] Step S31, inputting the two-dimensional image into the global predictor to obtain the cross-set global prediction result of the image block; wherein, referring to Figure 3 , the global predictor includes:
[0039] The embedding layer divides the two-dimensional image into slices of fixed size, and each slice is projected into a high-dimensional feature space through a linear layer to form a slice embedding vector. The slice size is preferably but not limited to 4×4, and the dimension of the slice embedding vector is 256.
[0040] The position embedding module embeds the position information of the slice in the slice embedding vector. This can preserve the position information of the image slice and enhance the model's understanding of the image spatial structure.
[0041] In this embodiment, the output vector z0 of the position embedding module is expressed as:
[0042]
[0043] in, represents the i-th slice patch, i∈[1,N]; E represents the linear projection matrix of the linear layer; E POS Represents position encoding, that is, the location information of the slice; N is equal to the product of the length and width of the two-dimensional image divided by the size of each slice patch.
[0044] The Transformer encoder of the ViT model encodes the output vector of the position embedding module to obtain the point set encoding features.
[0045] The fully connected layer maps the point set encoding features to the cross set global prediction results of the image block, which is a linear layer. The cross set global prediction results of the image block include the global prediction pixel values of multiple cross set pixel points.
[0046] In this embodiment, the Transformer encoder of the ViT model includes a multi-layer self-attention mechanism and a feedforward neural network, each layer of which consists of a multi-head self-attention module and a fully connected layer to capture global dependencies. Preferably, the Transformer encoder of the ViT model includes 6 layers of self-attention mechanisms, and each layer of multi-head self-attention modules includes 8 heads. The formula of the multi-head attention mechanism is:
[0047]
[0048] Among them, Q, K, and V are query vectors, key vectors, and value vectors, respectively. All three are obtained by multiplying the output vector of the position embedding module with three learnable parameter matrices WQ, WK, and WV. k is the scaling factor.
[0049] In this embodiment, preferably, during the global prediction model training process, the loss function is set to the mean square error loss function (MSE), and the optimizer is set to Adam.
[0050] In a preferred embodiment, in step S4, the process of using the local predictor to verify the cross-set global prediction result to obtain the cross-set verification prediction result is: Figure 4 , traverse each cross set pixel and execute:
[0051] Step S41, calculating the difference between the global predicted pixel value of each cross-set pixel point and the pixel values of the point-set pixels in the diamond-shaped area around the cross-set pixel point.
[0052] Reference Figure 4 , for the cross set pixel u i,j , (i, j) represents the coordinates of the cross set pixel point in the image, and the cross set pixel point u i,j The diamond-shaped area around the image block contains four point sets of pixels: v i,j-1 、v i,j+1 、v i+1,j and v i-1,j . Get the cross set pixel u i,j The global predicted pixel value x i,j and point set pixel v i,j-1 、v i,j+1 、v i+1,j and v i-1,j The difference in pixel values is used to express the cross set pixel u i,j The difference between the global predicted pixel value and the pixel value of the surrounding point set. Since the texture block is rich in details, ignoring this difference will introduce prediction errors. Therefore, different methods need to be selected according to the size of the difference to calculate the cross set pixel u i,j The check predicted pixel value makes the cross set pixel u i,j The difference between the verification prediction pixel value and the pixel value of the point set pixel in the surrounding diamond area is small, reducing the prediction error.
[0053] In this embodiment, the difference is preferably but not limited to the cross set pixel point u i,j The global predicted pixel value and the point set pixel v i,j-1 、vi,j+1 、v i+1,j and v i-1,j The absolute value of the difference between the mean values of the pixel values, or the cross set pixel u i,j The global predicted pixel value and the point set pixel v i,j-1 、v i,j+1 、v i+1,j and v i-1,j The absolute value of the difference between the minimum or maximum pixel values, or the cross set pixel u i,j The global predicted pixel value of the point set is the expected value, and the pixel value v i,j-1 、v i,j+1 、v i+1,j and v i-1,j The pixel value is summed with the expected standard deviation.
[0054] Step S42, if the difference is greater than the difference threshold, then the mean of the pixel values of the point set pixels in the diamond area around the cross set pixel point is used as the verification prediction pixel value of the cross set pixel point. If the difference is less than or equal to the difference threshold, then the mean of the pixel values of the point set pixels in the diamond area around the cross set pixel point whose pixel values are less than or equal to the pixel threshold is used as the verification prediction pixel value of the cross set pixel point. Preferably, the mean is rounded down as the verification prediction pixel value of the cross set pixel point. The verification prediction pixel values of multiple cross set pixel points are obtained according to the above method, and the verification prediction pixel values of multiple cross set pixel points constitute the cross set verification prediction result.
[0055] When the difference is greater than the difference threshold, for the cross set pixel u i,j , its check predicted pixel value x' i,j for:
[0056]
[0057] x i,j-1 、x i,j+1 、x i-1,j 、x i+1,j are the pixel points v of the point set i,j-1 、v i,j+1 、v i-1,j 、v i+1,j The pixel value of .
[0058] In this embodiment, the difference threshold may be an empirical value, which may be determined according to a secret information embedding method subsequent to the information hiding algorithm. Different secret information embedding methods set different difference thresholds. The difference threshold is preferably, but not limited to, 3 or 5. The pixel threshold may also be a pre-set empirical value.
[0059] When the difference is less than the difference threshold, for the cross set pixel u i,j , the pixel point v i,j-1、v i,j+1 、v i-1,j 、v i+1,j The mean of the pixel values of the point set pixels whose pixel values are less than or equal to the pixel threshold is taken as the cross set pixel point u i,j The predicted pixel value x' i,j .
[0060] This embodiment selects different methods to calculate the cross set pixel point u according to the size of the difference. i,j The check prediction pixel value ensures that the cross set pixel u i,j The verification prediction pixel value maintains the global correlation effect while keeping the difference with the pixel values of the point set in the surrounding diamond area within a small range, reducing the prediction error and avoiding the visual difference between the predicted image of the image block and the original image of the image block.
[0061] In this embodiment, in order to more accurately evaluate the difference between the global predicted pixel value of the cross set pixel point and the pixel value difference of the point pixel point in the diamond area around it, simplify the calculation process and improve the processing speed, preferably, the difference in the above step S41 is the sum of the absolute errors between the global predicted pixel value of each cross set pixel point and the pixel value of the point set pixel point in the diamond area around the cross set pixel point. Then the above difference t is:
[0062] t=∑|x a,b -x i,j |
[0063] (a,b)∈{(i,j-1),(i,j+1),(i-1,j),(i+1,j)}
[0064] Among them, x a,b Represents the cross set pixel u i,j The pixel points v contained in the diamond area around the image block i,j-1 or v i,j+1 or v i+1,j or v i-1,j The pixel value of x i,j Represents the cross set pixel u i,j The global predicted pixel value.
[0065] In this embodiment, in order to further reduce the prediction error, preferably, the pixel threshold S is K times the difference threshold θ, 0<K<1, that is, S=Kθ. The prediction error is controlled within the interval of [-θ / K,θ / K]. K is preferably but not limited to 1 / 4, so that the prediction error is controlled within the interval of [-θ / 4,θ / 4].
[0066] In this embodiment, when the difference is less than the difference threshold, for the cross set pixel u i,j , get the cross set pixel u i,jThe pixel points v in the surrounding diamond area i,j-1 、v i,j+1 、v i-1,j 、v i+1,j The point set whose pixel value is less than or equal to the pixel threshold in the set is represented by the mean pixel value of the point set as M(x i,j-1 ,x i,j+1 ,x i-1,j ,x i+1,j ),and
[0067] n=count[M(x i,j-1 ,x i,j+1 ,x i-1,j ,x i+1,j )]
[0068] count represents the counting function; the cross set pixel u i,j The predicted pixel value x' i,j for:
[0069]
[0070] n is a positive integer less than 4.
[0071] The proposed predictor is used to verify the prediction performance of the proposed predictor. The six existing predictors include differential extension predictor (DP), bidirectional interpolation predictor (BIP), median edge direction predictor (MEDP), gradient adaptive predictor (GAP) and two CNN predictors, which are respectively denoted as CNN and CNNP. Under the same distortion, the more accurate the predictor is, the more prediction error values are near the 0 point, and the sharper the PEH is, so it can provide more payload. Figure 5 Taking the original image Lena as an example, the comparison results of the PEH peak values of the reversible information hiding adaptive verification prediction method of the present invention and the above six predictors are described. Figure 5 It can be observed that the proposed predictor has more prediction error values near 0 and sharper PEH than the other six predictors. This is mainly because the proposed predictor effectively verifies information of different scales, thereby improving prediction accuracy and increasing embedding capacity.
[0072] The reversible information hiding adaptive verification prediction method provided by the present invention is based on the multi-view adaptive verification predictor of the improved ViT model, and utilizes the long-distance dependency modeling and position encoding of the ViT model, so that it can better understand the relationship between different regions in the image without being limited by the size and stride of the convolution kernel, and allows it to perform effective reasoning without explicit position information. The present invention introduces the idea of global and local verification into RDH for the first time, adds a self-attention mechanism and improves the local predictor, realizes the adaptive verification of the global predictor and the local predictor in different regions of the image, effectively utilizes information of different scales, and controls the prediction error within a certain range, thereby reducing the prediction error and improving the prediction accuracy and capacity.
[0073] Based on the same inventive concept, the present invention also provides a reversible information hiding adaptive verification prediction device, which is used to implement the above-mentioned reversible information hiding adaptive verification prediction method. In a preferred embodiment, the device includes: a division module, which divides the original image into multiple image blocks, and divides the pixel points of the image block into non-overlapping point sets and cross sets; a category distinction module, which distinguishes the multiple image blocks into texture blocks and smooth blocks; a cross set global prediction module, which inputs the point set of the image block to the global predictor to obtain the cross set global prediction result of the image block; a block image prediction image acquisition module, when the image block is a smooth block, obtains the predicted image of the image block through the cross set global prediction result and the point set of the image block; when the image block is a texture block, uses a local predictor to verify the cross set global prediction result to obtain the cross set verification prediction result, and obtains the predicted image of the image block through the cross set verification prediction result and the point set of the image block; a prediction image generation module, which combines the prediction images of multiple image blocks to obtain the predicted image of the original image.
[0074] In this embodiment, preferably, the process in which the predicted image acquisition module uses a local predictor to verify the cross set global prediction result to obtain the cross set verification prediction result is: traverse each cross set pixel point and execute: calculate the difference between the global prediction pixel value of each cross set pixel point and the pixel value of the point set pixel points in the diamond area around each cross set pixel point; if the difference is greater than the difference threshold, then use the average of the pixel values of the point set pixel points in the diamond area around each cross set pixel point as the verification prediction pixel value of each cross set pixel point; if the difference is less than or equal to the difference threshold, then use the average of the pixel values of the point set pixel points in the diamond area around each cross set pixel point whose pixel values are less than the pixel threshold as the verification prediction pixel value of each cross set pixel point.
[0075] In this implementation, the division module, the category distinction module, the cross set global prediction module, the block image prediction image acquisition module, and the prediction image generation module respectively correspond to steps S1, S2, S3, S4, and S5 of the above-mentioned reversible information hiding adaptive verification prediction method, and will not be repeated here.
[0076] Based on the same inventive concept, the present invention also discloses a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the above-mentioned reversible information hiding adaptive verification prediction method. The computer program product should be understood as a software product that mainly implements its solution through a computer program, such as a program product integrated in the cloud or a software library or a device memory.
[0077] Based on the same inventive concept, the present invention also discloses an electronic device. In one embodiment, the electronic device includes at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the reversible information hiding adaptive verification prediction method provided by the present invention.
[0078] like Figure 6 , which is a schematic diagram of the structure of an electronic device of a reversible information hiding adaptive verification prediction method provided by an embodiment of the present invention. The electronic device may include a processor 10, a memory 11, a communication bus 12, and a communication interface 13, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as a reversible information hiding adaptive verification prediction method program.
[0079] Among them, the processor 10 can be composed of an integrated circuit in some embodiments, for example, it can be composed of a single packaged integrated circuit, or it can be composed of multiple integrated circuits with the same function or different functions, including one or more central processing units (CPU), microprocessors, digital processing chips, graphics processors and various control chips. The processor 10 is the control core (Control Unit) of the electronic device, which uses various interfaces and lines to connect various components of the entire electronic device, and executes or executes programs or modules stored in the memory 11 (for example, executing a reversible information hiding adaptive verification prediction method, etc.), and calls data stored in the memory 11 to execute various functions of the electronic device and process data.
[0080] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (for example, SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of an electronic device, such as a mobile hard disk of the electronic device. In other embodiments, the memory 11 may also be an external storage device of an electronic device, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Further, the memory 11 may also include both an internal storage unit of the electronic device and an external storage device. The memory 11 can not only be used to store application software and various types of data installed in the electronic device, such as the code of the reversible information hiding adaptive verification prediction method program, etc., but also can be used to temporarily store data that has been output or is to be output.
[0081] The communication bus 12 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.
[0082] The communication interface 13 is used for communication between the above-mentioned electronic device and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a display (Display), an input unit (such as a keyboard (Keyboard)), and optionally, the user interface may also be a standard wired interface, a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visual user interface.
[0083] Figure 6 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 6The structure shown does not constitute a limitation on the electronic device, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0084] For example, although not shown, the electronic device may also include a power source (such as a battery) for supplying power to various components. Preferably, the power source may be logically connected to at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include any components such as one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, and power status indicators. The electronic device may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be described in detail here.
[0085] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited by this structure.
[0086] Furthermore, if the module / unit integrated in the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).
[0087] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", "an implementation", "a preferred implementation" 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 representation of the above terms does 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.
[0088] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.
Claims
1. A reversible information hiding adaptive verification prediction method, characterized in that: include: The original image is divided into multiple image blocks, and the pixel points of the image blocks are divided into non-intersecting point sets and cross sets; Dividing the plurality of image blocks into texture blocks and flat blocks; Input the point set of the image block to the global predictor to obtain the cross set global prediction result of the image block; When the image block is a smooth block, the predicted image of the image block is obtained through the cross set global prediction result and point set of the image block; When the image block is a texture block, the cross set global prediction result is verified by using a local predictor to obtain a cross set verification prediction result, and a predicted image of the image block is obtained through the cross set verification prediction result and the point set of the image block; Combining the predicted images of the multiple image blocks to obtain a predicted image of the original image; The step of inputting a point set of an image block to a global predictor to obtain a cross set global prediction result of the image block includes: Reshape the point set of the image patch into a two-dimensional image; The two-dimensional image is input into a global predictor to obtain a cross-set global prediction result of the image block; wherein the global predictor comprises: An embedding layer, which divides the two-dimensional image into slices of fixed size and generates slice embedding vectors; A position embedding module, which embeds the position information of the slice in the slice embedding vector; The Transformer encoder of the ViT model encodes the output vector of the position embedding module to obtain the point set encoding features; A fully connected layer maps the point set encoding feature to a cross-set global prediction result of the image block, where the cross-set global prediction result of the image block includes global prediction pixel values of multiple cross-set pixel points; The method of using a local predictor to verify the cross set global prediction result to obtain a cross set verification prediction result includes: Traversing each cross set pixel point, calculating the difference between the global predicted pixel value of each cross set pixel point and the pixel value of the point set pixel point in the diamond area around each cross set pixel point; If the difference is greater than the difference threshold, the average of the pixel values of the point set pixels in the diamond area around each cross set pixel point is used as the verification prediction pixel value of each cross set pixel point; If the difference is less than or equal to the difference threshold, the average of the pixel values of the point set pixels in the diamond area around each cross set pixel point whose pixel values are less than or equal to the pixel threshold is used as the verification prediction pixel value of each cross set pixel point.
2. A reversible information hiding adaptive verification prediction method as claimed in claim 1, characterized in that: The step of dividing the plurality of image blocks into texture blocks and flat sliders comprises: The original image is input to the self-attention recognition model, and the self-attention recognition model outputs the smooth block confidence probability and the texture block confidence probability of the image block. When the smooth block confidence probability of the image block is greater than or equal to the texture block confidence probability, the image block is defined as a smooth block, otherwise, the image block is defined as a texture block.
3. A reversible information hiding adaptive verification prediction method as claimed in claim 1, characterized in that: The difference is the sum of absolute errors between the global predicted pixel value of each cross-set pixel and the pixel values of the point-set pixels in the diamond-shaped area around each cross-set pixel.
4. A reversible information hiding adaptive verification prediction method as claimed in claim 3, characterized in that: The pixel threshold is K times the difference threshold, 0<K<1.
5. A reversible information hiding adaptive verification prediction device, used to implement a reversible information hiding adaptive verification prediction method according to any one of claims 1 to 4, characterized in that: include: A partitioning module is used to partition the original image into multiple image blocks, and to partition the pixel points of the image blocks into non-intersecting point sets and cross sets; A category distinguishing module, which distinguishes the plurality of image blocks into texture blocks and flat blocks; A cross set global prediction module, inputting a point set of an image block to a global predictor to obtain a cross set global prediction result of the image block; A predicted image acquisition module for an image block, when the image block is a smooth block, obtains a predicted image of the image block through a cross set global prediction result and a point set of the image block; when the image block is a texture block, verifies the cross set global prediction result using a local predictor to obtain a cross set verification prediction result, and obtains a predicted image of the image block through the cross set verification prediction result and a point set of the image block; The predicted image generation module combines the predicted images of the multiple image blocks to obtain the predicted image of the original image.
6. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method described in any one of claims 1 to 4 are implemented.
7. An electronic device, characterized in that: The electronic device comprises: At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute a reversible information hiding adaptive verification prediction method as described in any one of claims 1 to 4.
