Image data hiding method based on voting strategy to predict pixels
By using a pixel prediction method based on a voting strategy and embedding secret data using a mapping table, the problems of image quality distortion and low embedding efficiency in existing technologies are solved, achieving efficient data hiding and image quality preservation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-10
- Publication Date
- 2026-03-27
AI Technical Summary
Existing data hiding methods based on interpolation prediction suffer from high image quality distortion after embedding secret data and perform poorly when embedding large amounts of information.
A pixel prediction method based on a voting strategy is adopted. Pixels are divided in a chessboard pattern. White pixels are used to predict gray pixel values. Data is directly embedded into the predicted pixels according to the designed mapping table. During extraction, the same prediction method and differences are used to find secret data.
It significantly improves the payload capacity of data hiding, and the image quality is better than existing technologies when embedding a large amount of information. It has obvious advantages in PSNR and is suitable for complex and smooth images.
Smart Images

Figure CN116260978B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application researches the field of pixel prediction information hiding, and proposes an image data hiding method based on a voting strategy for predicting pixels. BACKGROUND
[0002] With the rapid development of computers and networks, people have become accustomed to using networks to transmit various data, and thus the privacy and security of data transmission has become increasingly important. Hiding information that does not want to be discovered or tampered with in seemingly unusual digital image carriers is a hot issue in the field of information security research. Data hiding (DH) technology is a potential solution that protects information privacy while achieving information transmission. Generally, data hiding methods can be divided into two categories: reversible data hiding and irreversible data hiding. The classification standard depends on the ability of the receiver to recover the cover digital image. Reversible data hiding (RDH) can recover the original cover image after reading the embedded secret information. Irreversible data hiding (IRDH) cannot recover the cover digital image without loss after extracting the information. IRDH methods are usually used in cases where high-precision cover digital images are not required.
[0003] So far, researchers have developed many efficient and easy-to-implement image data hiding techniques, such as difference expansion (DE), histogram shifting (HS), prediction-based data hiding methods, pixel value ordering (PVO), and the like. The DE method embeds secret data by expanding pixel differences. In the HS technique, an image intensity histogram must be generated first, and then data is embedded. Prediction-based data hiding methods include three main steps: content prediction, data embedding, and data extraction, which require people to use various predictors to predict pixel values, and then modify the original or predicted pixel values according to specific data embedding rules. Finally, the receiver extracts data according to the predicted values calculated from the received image. The PVO-based data hiding method requires pixels to be arranged in ascending order in an image block, and then the minimum and maximum pixel values therein are modified to embed secret data.
[0004] Due to the characteristics of prediction-based data hiding methods, the embedding performance and the degree of image distortion are usually related to the pixel predictor used and the embedding rule. For content prediction, a predictor that can accurately estimate pixels needs to be designed, such as a median edge detector (MED), a gradient predictor, a diamond predictor, and an interpolation predictor. For data embedding, people usually study how to further optimize the data embedding method to have a low distortion degree under a given payload.
[0005] Interpolation prediction is a relatively special prediction method. In the data hiding method based on interpolation prediction, if the image transmitted by the data hider is the same size as the original image, the data hider will first reduce the original image to one quarter of the size, keep the pixels as seed pixels, and use the seed pixels for interpolation to make the size of the carrier image the same as the original image. Then, the secret information is only hidden in the interpolated pixels. In this way, the original image cannot be recovered after the secret data is extracted. If the image size transmitted by the data hider is larger than the original image, the data hider will keep all the pixels of the original image as seed pixels, and then use the seed pixels for interpolation expansion to make the size of the cover image four times larger than the original image. Then, the secret information is only hidden in the interpolated pixels. In this way, after the secret data is extracted, only the interpolated pixels need to be deleted to obtain the lossless original image.
[0006] The focus of the interpolation-based data hiding method is the interpolation algorithm and the data embedding method. Previous work on interpolation techniques includes neighborhood mean interpolation (NMI), neighborhood pixel interpolation (INP), enhanced neighborhood mean interpolation (ENMI), etc. SUMMARY
[0007] To solve the problems in the prior art, an effective data hiding method based on voting strategy prediction pixels is proposed. The scheme first uses a pixel prediction method based on voting strategy to predict the pixel value, and then directly embeds data into the predicted pixels according to the designed mapping table. In the information extraction process, the scheme also uses a pixel prediction method based on voting strategy to predict the pixel value, and then finds the secret data represented by the difference between the predicted value and the secret pixel in the mapping table according to the difference between the predicted value and the secret pixel, and converts it to a k-bit binary number, i.e. the secret data can be extracted. It has similarities with the interpolation-based data hiding scheme, i.e. the pixels used for prediction remain unchanged, and the secret data is only embedded in the predicted pixels. Compared with other data hiding schemes based on prediction error, the scheme directly modifies the predicted value for embedding. The predicted pixels are added or subtracted according to the value of the secret data, and the more secret data bits are embedded, the larger the modification range of the predicted pixels. Therefore, the distortion degree of image quality mainly depends on the design of the predictor; the more accurate the prediction, the higher the quality of the stego image. The secret data that can be embedded in each predicted pixel is k bits (k = 1, 2,..., 7). The present application has significantly improved the data hiding capability, and the visual quality of the stego image is better than that of the existing methods in the prior art when more information is embedded.
[0008] The technical scheme adopted by the present application is as follows:
[0009] An image data hiding method based on voting strategy prediction pixels, comprising the following steps:
[0010] S1: for a gray scale image with size MxN to be transmitted, the pixels are divided into gray pixels and white pixels in the pattern of international chessboard, and the white pixels are used to predict the gray pixels;
[0011] S2: for different cases of values of four white pixels around a single gray pixel X, a prediction method is constructed for each case to predict the gray pixel X with the four white pixels around it;
[0012] S3: each gray pixel X in the divided gray scale image is traversed, a prediction value of the current gray pixel X is obtained by selecting the prediction method corresponding to the case of the current gray pixel X, and a secret information embedding process is performed on the current gray pixel X, the secret information embedding process is as follows:
[0013] k-bit secret data is read from the unembedded part of the secret data sequence to be embedded in sequence and converted into a decimal number B, a mapping table for embedding information is obtained, and the mapping table has a mapping relationship between the conversion formula of the gray pixel and the secret pixel and the decimal number, the corresponding conversion formula of the gray pixel and the secret pixel is found from the mapping table according to the decimal number B, and the current gray pixel X is modified into the corresponding secret pixel X' based on the found conversion formula, thereby embedding k-bit secret data in the current gray pixel X;
[0014] S4: after traversing each gray pixel in the image, the secret data containing secret image is sent to the receiving end.
[0015] As preferred, in S1, after the gray scale image is divided in the pattern of international chessboard, the pixel closest to the center gray pixel among the 8 neighborhood pixels of each gray pixel is a white pixel, and the remaining 4 neighborhood pixels are gray pixels.
[0016] As preferred, in S2, the prediction methods constructed for all cases are as follows:
[0017] S21: for a gray pixel X not located at the edge of the image, according to the values of the four white pixels around the gray pixel X, the prediction method for the gray pixel X is divided into five types, wherein:
[0018] The first type is that the values of the four white pixels are all equal, and the prediction value of the gray pixel X is the value of any one white pixel;
[0019] The second type is that there are two groups of same pixels in the four white pixels, and the prediction value of the gray pixel X is the down-rounded value of the average value of the two groups of white pixels;
[0020] The third type is that only two of the four white pixels are equal and the rest are not equal. According to the voting strategy, the predicted value of the gray pixel X is the value of the white pixel with the highest frequency among the four white pixels.
[0021] The fourth type is that only one of the four white pixels is different from the others. According to the voting strategy, the predicted value of X is the value of the white pixel with the highest frequency among the four white pixels.
[0022] The fifth type is that the four white pixels are not equal. The predicted value of the gray pixel X is the down-rounded value of the average of the four white pixels.
[0023] S22: For a gray pixel X located at the edge of the image and having only three white pixels in its neighborhood, the prediction method of the gray pixel X is divided into three types, wherein:
[0024] When the three white pixels are equal, the predicted value of the gray pixel X is the value of any one of the white pixels.
[0025] When only two of the three white pixels are equal, according to the voting strategy, the predicted value of X is the value of the white pixel with the highest frequency among the three white pixels.
[0026] When the three white pixels are not equal, the predicted value of the gray pixel X is the down-rounded value of the average of the three white pixels.
[0027] S23: For a gray pixel X located at the vertex of the image and having only two white pixels in its neighborhood, the prediction method of the gray pixel X is divided into two types, wherein:
[0028] When the two white pixels are equal, the predicted value of the gray pixel X is the value of any one of the white pixels.
[0029] When the two white pixels are not equal, the predicted value of the gray pixel X is the down-rounded value of the average of the two white pixels.
[0030] As a preferred, in the S3, for each current gray pixel X not located at the edge of the image in the traversal process, the calculation method of the predicted value of the gray pixel X is represented by the following formula:
[0031]
[0032] wherein: ai represents the four white pixels around the current gray pixel X, i = 1, 2, 3, 4, a1 represents any one of the four white pixels around the gray pixel X, a2, a3 and a4 are the other pixels except a1 among the four white pixels, represents down-rounding.
[0033] As preferred, in the S3, the binary secret data b1b2…bk of k bits is read k and converted into a decimal number B, wherein k is a positive integer not more than 7.
[0034] As preferred, k is a positive integer not more than 5.
[0035] As preferred, in the S3, the specific construction method of the mapping table for embedding information is as follows:
[0036] According to the number k of bits of the secret data to be embedded, all the decimal values in the range of [1, 2 k -1] are sequentially distributed on a number axis with 0 as the origin in an alternating left-right order, the decimal number B corresponding to the origin is 0, the conversion formulae of the gray pixel X and the secret pixel X' are X' = X and X' = X - i respectively corresponding to the decimal number B = 2i - 1 of the i-th coordinate position on the left side of the origin, and the conversion formulae of the gray pixel X and the secret pixel X' are X' = X + j respectively corresponding to the decimal number B = 2j of the j-th coordinate position on the right side of the origin; the conversion formulae and the decimal number B on the number axis are converted into a table form to form the mapping table.
[0037] As preferred, when the receiving end receives the secret image sent by the sending end, the pixels are first divided into gray pixels and white pixels in the style of an international chessboard, so as to predict the value of the gray pixel X using the white pixel, then calculate the difference between the value of the actually received secret pixel X' and the value of the predicted gray pixel X, query the mapping table according to the difference value, thereby obtaining the embedded decimal secret information B, and finally restore the decimal secret information B to binary secret data of k bits; finally, all the binary secret data extracted from the secret image are sequentially combined to obtain the embedded original secret data sequence.
[0038] Compared with the prior art, the present application has the following beneficial effects:
[0039] The present application uses a pixel prediction method based on a voting strategy, uses the seed pixels around the pixel for prediction, and then embeds data into the predicted pixel according to the designed mapping table. In order to extract information, only the same prediction method is used to predict the pixel again, and then the difference between the predicted pixel and the secret pixel is compared, and the secret data can be extracted with the help of the mapping table. Experimental results show that the scheme proposed in the present application has a very high payload capacity, which can reach 655,361 bits, which is much higher than similar schemes in other technologies. In addition, the scheme proposed in the present application has obvious PSNR advantage in embedding a large amount of information. BRIEF DESCRIPTION OF DRAWINGS
[0040] Figure 1An example diagram for dividing pixels according to the international chessboard pattern of the present application.
[0041] Figure 2 Five prediction methods for the current pixel of the present application.
[0042] Figure 3 An example diagram for information embedding of the present application.
[0043] Figure 4 An example diagram for information extraction of the present application.
[0044] Figure 5 Test images of the present application, wherein (a) Lena, (b) Airplane, (c) Baboon, (d) Boat.
[0045] Figure 6 A line chart for the execution results of the present application compared with other schemes. DETAILED DESCRIPTION
[0046] The specific embodiments of the scheme of the present application are described in further detail below with reference to the accompanying drawings.
[0047] In a preferred embodiment of the present application, a data hiding method for predicting pixels based on a voting strategy is provided, and the specific steps are as follows:
[0048] S1: For a gray-scale image with a size of MxN to be transmitted, the pixels are divided into gray pixels and white pixels according to the international chessboard pattern, so that the white pixels are used to predict the gray pixels.
[0049] In the embodiment of the present application, the division of the gray-scale image according to the international chessboard pattern in the above step S1 means that a gray-white grid layout similar to an international chessboard is formed, as shown in FIG. 1, that is, the pixel closest to the center gray pixel among the eight neighboring pixels of each gray pixel is a white pixel, and the remaining four neighboring pixels located at the corner points of the gray pixel are all gray pixels. Since there is similarity between neighboring pixels of an image, the white pixels can be used to predict the gray pixels. Figure 1
[0050] For the convenience of subsequent description, the gray pixel is denoted as X below, and X also represents the pixel value of the gray pixel in the calculation formula.
[0051] S2: For different cases that may occur for the values of the four white pixels around a single gray pixel X, a prediction method for predicting the gray pixel X using the four white pixels around it is constructed for each case.
[0052] In the embodiment of the present application, the prediction methods constructed for all cases in the above step S2 are as follows:
[0053] S21: For the gray pixel X not located at the image edge, according to the values of the four white pixels around the gray pixel X, the prediction method for the gray pixel X is divided into five types, wherein:
[0054] The first type (Type 1) is that the values of the four white pixels are all equal, and the prediction value of the gray pixel X is the value of any one white pixel;
[0055] The second type (Type 2) is that there are two groups of same pixels in the four white pixels, and the prediction value of the gray pixel X is the down rounding value of the average value of the two groups of white pixels;
[0056] The third type (Type 3) is that only two of the four white pixels are equal and the remaining pixels are not equal, and according to the voting strategy, the prediction value of the gray pixel X is the value of the white pixel with the highest occurrence in the four white pixels;
[0057] The fourth type (Type 4) is that only one of the four white pixels is different from the others, and according to the voting strategy, the prediction value of X is the value of the white pixel with the highest occurrence in the four white pixels;
[0058] The fifth type (Type 5) is that the four white pixels are not equal, and the prediction value of the gray pixel X is the down rounding value of the average value of the four white pixels.
[0059] As shown in the following table, the specific prediction process of the above five types in an example is shown, from left to right, the five gray pixels belong to the aforementioned Type 1, Type 2, Type 3, Type 4, and Type 5 respectively. Figure 2
[0060] S22: For the gray pixel X located at the image edge and having only three white pixels in the neighborhood pixels, the prediction method for the gray pixel X is divided into three types, wherein:
[0061] When the three white pixels are equal, referring to the aforementioned Type 1, the prediction value of the gray pixel X is the value of any one white pixel;
[0062] When only two of the three white pixels are equal, referring to the aforementioned Type 4, according to the voting strategy, the prediction value of X is the value of the white pixel with the highest occurrence in the three white pixels;
[0063] When the three white pixels are not equal, referring to the aforementioned Type 5, the prediction value of the gray pixel X is the down rounding value of the average value of the three white pixels.
[0064] S23: for the gray pixel X located at the image vertex and only two white pixels in the neighborhood of the pixel, the prediction method of the gray pixel X is divided into two types, wherein:
[0065] When the two white pixels are equal, referring to the aforementioned Type 1, the prediction value of the gray pixel X is the value of any one white pixel;
[0066] When the two white pixels are not equal, referring to the aforementioned Type 5, the prediction value of the gray pixel X is the down rounding value of the average value of the two white pixels.
[0067] S3: traversing each gray pixel X in the gray scale image divided by pixels, selecting the prediction method corresponding to the current gray pixel X to obtain the prediction value of the current gray pixel X, so as to perform the operation of embedding secret data on the gray pixel X.
[0068] In the embodiment of the present application, for each current gray pixel X not located at the image edge in the traversal process, referring to the prediction method classification given in the aforementioned S21 step, the calculation method of the prediction value is expressed by the following formula:
[0069]
[0070] Wherein: ai represents the four white pixels around the current gray pixel X, i = 1, 2, 3, 4, a1 indicates any one pixel of the four white pixels around the gray pixel X, a2, a3 and a4 are the other pixels except a1 in the four white pixels, represents down rounding.
[0071] And for each current gray pixel X located at the image edge in the traversal process, the prediction needs to be performed according to the prediction method classification in the aforementioned S22 and S23.
[0072] In addition, in the traversal process, after obtaining the prediction value of the current gray pixel X, the secret information embedding process also needs to be performed on the current gray pixel X, and the secret information embedding process is as follows:
[0073] Reading k-bit secret data in sequence from the unembedded part of the secret data sequence to be embedded, and converting it into a decimal number B, obtaining a mapping table for embedding information, and the mapping table has a mapping relationship between the conversion formula of the gray pixel and the secret pixel and the decimal number, finding the conversion formula of the corresponding gray pixel secret pixel from the mapping table according to the decimal number B, and modifying the current gray pixel X to the corresponding secret pixel X' based on the found conversion formula, completing the embedding of k-bit secret data in the current gray pixel X.
[0074] It is important to note that the secret data sequence to be embedded is a binary information sequence, and its specific length needs to be selected based on the actual situation. The length of the secret data that can be hidden in the image must be greater than the length of the secret data sequence to be embedded. The above-described secret information embedding process is performed pixel by pixel. Each time, k bits of secret data from the secret data sequence to be embedded are extracted and embedded into one gray pixel, until the entire secret data sequence to be embedded is embedded.
[0075] In an embodiment of the present invention, in S3 above, k bits of binary secret data b1b2…b are read. k The data is then converted to a decimal number B, where k is a positive integer not exceeding 7 (k = 1, 2, ..., 7). In this embodiment, when k = 5, the maximum hiding capacity of the scheme is already superior to other methods. Larger k can embed more secret data, but the visual quality of the image will further degrade. Therefore, in this embodiment, k is preferably a positive integer not exceeding 5, k = 1, 2, 3, 4, or 5.
[0076] In an embodiment of the present invention, in step S3 above, a mapping table for embedding information needs to be designed. The predicted gray pixel X can be modified according to the contents of the mapping table to hide the corresponding secret data; the specific method for constructing the information embedding mapping table is as follows:
[0077] First, construct a number line with an origin and tick values spaced 1s apart. Then, based on the number of bits k of the secret data to be embedded, assign values in the order [1, 2] on the number line, with the origin at 0, alternating between left and right. kAll decimal values within the range of -1 are assigned to the origin, which is set to 0. Decimal value 1 is assigned to the first scale position to the left of the origin, decimal value 2 to the first scale position to the right of the origin, decimal value 3 to the second scale position to the left of the origin, decimal value 4 to the second scale position to the right of the origin, and so on. Then, for each scale position, a conversion formula for the corresponding gray pixel X and hidden pixel X' needs to be set. The scale value to the left of the origin is negative, and the scale value to the right of the origin is integer. The conversion formula at the origin is X' = X. The conversion formula for scale positions with a distance of i from the origin is X' = X + the scale value that distinguishes between positive and negative values at that position. Finally, on this number line, the decimal number B corresponding to the origin is 0, and the conversion formula for the corresponding gray pixel X and hidden pixel X' is X' = X. The decimal number B corresponding to the i-th coordinate position to the left of the origin is 2i-1, and the conversion formula for the corresponding gray pixel X and hidden pixel X' is X' = Xi. The decimal number B corresponding to the j-th coordinate position to the right of the origin is 2j, and the conversion formula for the corresponding gray pixel X and hidden pixel X' is X' = X+j. Converting these conversion formulas and the decimal number B on this number line into a tabular form forms a mapping table.
[0078] like Figure 3 The diagram illustrates an exemplary mapping representation where the range of all decimal values in the mapping table is [0, 2]. k -1]. Based on this mapping table, if the white pixels surrounding a current gray pixel X are 11, 11, 12, and 12 respectively, then it conforms to Type 2, and therefore its prediction formula is: If the k=3-bit binary secret data to be embedded is 010, then it is converted into the decimal number B=2. From the mapping table, the conversion formula corresponding to B=2 can be found as X'=X+1. Thus, the hidden pixel value X'=11+1=12 corresponding to the current gray pixel X in the hidden image is obtained.
[0079] With the embedding map designed in the above manner, if the number of bits of embedded secret data is relatively small, the modification to the predicted pixel X will be within a small range. Because decimal values are symmetrically alternated between the left and right sides with 0 as the origin, if the number of bits of embedded secret data is relatively large, the modification to the predicted gray pixel X will also be halved.
[0080] It is particularly important to note that, since the image in this invention is a grayscale image with a grayscale value range of 0 to 255, when embedding k bits of secret data, if the current grayscale pixel prediction value X is within the embedding value B = 2... k -1 and 2 kWhen the value is -2, the situation may occur where X'>255 or X'<0. In this case, the gray pixel position will not be embedded, and the pixel at that position will retain its original pixel value.
[0081] S4: After traversing every gray pixel in the image, send the hidden image containing the secret data to the receiving end.
[0082] In an embodiment of the present invention, in step S4 above, after the receiving end receives the hidden image sent by the sending end, it first divides the pixels into gray pixels and white pixels according to the pattern of an international chessboard, thereby using the white pixels to predict the value of gray pixel X, then calculates the difference between the actual received hidden pixel X' value and the predicted gray pixel X value, and queries the mapping table according to the difference to obtain the embedded decimal secret information B. Finally, the decimal secret information B is restored to k-bit binary secret data; finally, all the binary secret data extracted from the hidden image are combined in sequence to obtain the embedded original secret data sequence.
[0083] like Figure 4 As shown, continuing with the aforementioned mapping table as an example, for a hidden pixel X' = 12, the surrounding white pixels are 11, 11, 12, and 12 respectively. Therefore, it conforms to Type 2. Based on the four white pixels, the predicted value of the gray pixel X is calculated according to the prediction formula corresponding to Type 2. Therefore, X'-X=1, which translates to X'=X+1. Using this formula, we can look up the corresponding embedded decimal secret information B=2 in the mapping table. Converting the decimal 2 to binary reveals the embedded binary secret information as 010, thus enabling the extraction and reconstruction of the secret information.
[0084] Similarly, it should be noted that if X is found to be at the value B=2 when extracting information... k -1 and 2 k When the value is -2, the operation will result in X'>255 or X'<0, in which case the gray pixel position will not be embedded.
[0085] To further demonstrate the technical effects of the present invention, the specific application results of the above method in actual cases are given below.
[0086] Example
[0087] This embodiment is based on the above method, and the specific implementation steps are as described above, and will not be repeated here. Only the experimental results are shown below. In all experiments, this invention uses... Figure 57 gray-scale images in the database of USC-SIPI as test images, with the size of 512x512. To evaluate the performance of the proposed scheme, the maximum embedding capacity (EC), structural similarity (SSIM), peak signal-to-noise ratio (PSNR) and cosine similarity (CS) of the proposed scheme and related works are compared.
[0088] In the present application, k represents the number of bits of secret data embedded in the current prediction position each time. Table 1 shows the various performances of the proposed scheme on test images with different k values (k = 1, 2, 3, 4, or 5).
[0089] Table 1: Performance of different k values on EC, PSNR and SSIM on test images.
[0090]
[0091] The embedding capacity obtained from the experiments of the present embodiment has two characteristics: first, as can be seen from Table 1, when k = 5, the current maximum capacity can reach 655,361 bits, and as k increases, the capacity shows a steady increase, so the capacity of the present embodiment can continue to increase without considering other conditions; second, the capacity for different images is highly stable. For different images, at the same k value, all the embedding capacities are similar. That is, the proposed scheme is suitable for both complex images and smooth images, and there is no situation that only a small amount of information can be embedded for a certain image.
[0092] Table 1 also shows the PSNR and SSIM under different k values. When 1 bit of information is embedded in each interpolation element space, the PSNR value is as high as 36.0874 dB. The highest value of SSIM is 0.9440, and the image distortion degree is low.
[0093] The information embedding capacity and image quality of the scheme are always in conflict with each other. While improving the hiding capacity, the image quality will inevitably be lost. What can be tried is to reduce the damage to the image under the same embedding capacity. In order to more clearly show the results, Figure 6 The PSNR of four test images with different embedding capacities is shown. As can be seen from the figure, when the EC is low, the PSNR of the proposed scheme is worse than that of the scheme of Bai et al. [3], but when the EC reaches 3x10 5 After 6 bits, the PSNR of the proposed scheme becomes higher than that of other methods. In addition, as the EC increases, the PSNR of the proposed scheme decreases more slowly. Therefore, when a large amount of secret data needs to be embedded, the proposed scheme is more cost-effective than other schemes.
[0094] In addition, the present application also compares the scheme of the present application with other prior art methods [3, 4, 5, 6] in terms of EC, PSNR and SSIM. As can be seen from Table 2, when the EC is similar, the PSNR and SSIM of the scheme proposed in the present application are higher than those of other methods. In addition, when k = 5, the method of the present application can obtain a higher EC than most schemes, and when k = 5, the scheme proposed in the present application can even obtain a higher PSNR than low concealment [22, 23]. These data fully demonstrate the superiority of the scheme proposed in the present application in terms of high concealment capacity and PSNR.
[0095] Table 2: Comparison of EC, PSNR and SSIM with different schemes.
[0096]
[0097] The specific methods of the related work [3] to [6] in the prior art used for comparison are as follows:
[0098] [1] Coltuc D. Improved embedding for prediction-based reversible watermarking. IEEE Trans Inf Forensics Security 2011; 6: 873-82.
[0099] [2] Sudipta M, Biswapati J. Directional pvo for reversible data hiding scheme with image interpolation. Multimedia Tools Applications; 2018. p. 1-31.
[0100] [3] Bai X, Chen Y, Duan G, et al. A data hiding scheme based on the difference of image interpolation algorithms [J]. Journal of Information Security and Applications, 2022, 65: 103068.
[0101] [4] Jung KH, Yoo KY. Data hiding method using image interpolation.
[0102] Comput Stand Interfaces 2009;31:465-70.
[0103] [5] Lee CF, Huang YL. An efficient image interpolation increasing pay-load in reversible data hiding. Expert Syst Appl 2012;39:6712-9.
[0104] [6] Malik A, Sikka G, Verma HK. Image interpolation based high capacity reversible data hiding scheme. Multimed Tools Appl 2016.
[0105] The results show that the scheme has a very high payload capacity, up to 655,361 bits, higher than other prior art. And if willing to sacrifice some PSNR, the proposed scheme can also obtain higher embedding capacity. In addition, the scheme has obvious PSNR advantage in embedding a large amount of information.
[0106] The above-described embodiments are only a preferred scheme of the present application, and are not intended to limit the present application. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the present application. Therefore, all technical solutions obtained by equivalent replacement or equivalent transformation shall fall within the protection scope of the present application.
Claims
1. A method for image data hiding of pixels based on voting strategy, characterized in that, The steps are as follows: S1: for a gray scale image with a size of MxN to be transmitted, the pixels are divided into gray pixels and white pixels in the pattern of an international chessboard, so that the white pixels are used to predict the gray pixels; the length of the secret data that can be hidden in the gray scale image is greater than the length of the secret data sequence to be embedded; S2: for different cases that may occur for the values of the four white pixels around a single gray pixel X, a prediction method is constructed for each case to predict the gray pixel X using the four white pixels around it; S3: each gray pixel X in the gray scale image after pixel division is traversed, a prediction value of the current gray pixel X is obtained by selecting the prediction method corresponding to the case of the current gray pixel X, and then a secret information embedding process is performed on the current gray pixel X, the secret information embedding process being as follows: from the unembedded part of the secret data sequence to be embedded, k-bit secret data is read in sequence and converted into a decimal number B, a mapping table for embedding information is obtained, the mapping table having a mapping relationship between the conversion formula of the gray pixel and the hidden pixel and the decimal number, the corresponding conversion formula of the gray pixel and the hidden pixel is found from the mapping table according to the decimal number B, so that the current gray pixel X is modified into the corresponding hidden pixel X' based on the found conversion formula, thereby embedding the k-bit secret data in the current gray pixel X; S4: after traversing each gray pixel in the image, the hidden image containing the secret data is sent to the receiving end; In S2, the prediction methods constructed for all cases are as follows: S21: for a gray pixel X not located at the edge of the image, according to the values of the four white pixels around the gray pixel X, the prediction method for the gray pixel X is divided into five types, wherein: the first type is that the values of the four white pixels are all equal, and the prediction value of the gray pixel X is the value of any one white pixel; the second type is that there are two groups of identical pixels in the four white pixels, and the prediction value of the gray pixel X is the down-rounded value of the average value of the two groups of white pixels; the third type is that only two of the four white pixels are equal and the remaining pixels are not equal, and according to the voting strategy, the prediction value of the gray pixel X is the value of the white pixel with the highest occurrence frequency among the four white pixels; the fourth type is that only one of the four white pixels is different from the others, and according to the voting strategy, the prediction value of the gray pixel X is the value of the white pixel with the highest occurrence frequency among the four white pixels; the fifth type is that the four white pixels are not equal, and the prediction value of the gray pixel X is the down-rounded value of the average value of the four white pixels; S22: for a gray pixel X located at the edge of the image and having only three white pixels in the neighborhood, the prediction method for the gray pixel X is divided into three types, wherein: when the three white pixels are equal, the prediction value of the gray pixel X is the value of any one white pixel; when only two of the three white pixels are equal, according to the voting strategy, the prediction value of the gray pixel X is the value of the white pixel with the highest occurrence frequency among the three white pixels; when the three white pixels are not equal, the prediction value of the gray pixel X is the down-rounded value of the average value of the three white pixels; S23: for the gray pixel X located at the image vertex and having only two white pixels in the neighborhood pixels, the prediction method of the gray pixel X is divided into two types, wherein: when the two white pixels are equal, the predicted value of the gray pixel X is the value of any one white pixel; when the two white pixels are not equal, the predicted value of the gray pixel X is the down rounding value of the average value of the two white pixels.
2. The method of claim 1, wherein, In the S1, after the gray scale image is divided according to the international chessboard pattern, the pixel closest to the center gray pixel in the eight neighborhood pixels of each gray pixel is a white pixel, and the remaining four neighborhood pixels are gray pixels.
3. The method of claim 1, wherein the voting strategy is based on a plurality of pixel values of the image data. In the S3, the binary secret data b1b2…bk of k bits are read k and converted into a decimal number B, where k is a positive integer not exceeding 7.
4. The method of claim 1, wherein, k is a positive integer not more than 5.
5. The method of claim 3, wherein the voting strategy is based on a majority rule. In the S3, the specific construction method of the mapping table for embedding information is: According to the bit number k of the secret data to be embedded, all decimal values in the range of [1, 2 k -1] are sequentially distributed in an alternating left-right order on a number axis with 0 as the origin, the decimal number B corresponding to the origin is 0, the conversion formula of the gray pixel X and the hidden secret pixel X' corresponding to the origin is X'=X, the decimal number B corresponding to the i-th coordinate position on the left side of the origin is 2i-1, the conversion formula of the gray pixel X and the hidden secret pixel X' corresponding to the i-th coordinate position on the left side of the origin is X'=X-i, the decimal number B corresponding to the j-th coordinate position on the right side of the origin is 2j, and the conversion formula of the gray pixel X and the hidden secret pixel X' corresponding to the j-th coordinate position on the right side of the origin is X'=X+j; the conversion formula and the decimal number B on the number axis are converted into a table form to form the mapping table.
6. The method of claim 5, wherein, After the receiving end receives the hidden image sent by the sending end, the pixels are first divided into gray pixels and white pixels according to the international chessboard pattern, so as to predict the value of the gray pixel X using the white pixel, then calculate the difference between the actual received hidden pixel X' and the predicted gray pixel X, and then query the mapping table according to the difference, so as to obtain the embedded decimal secret information B, finally restore the decimal secret information B to the binary secret data of k bits; finally, all the binary secret data extracted from the hidden image are combined in order to obtain the embedded original secret data sequence.
Citation Information
Patent Citations
Reversible data hiding method for high dynamic range image
CN104021518A
Multi-strategy combined reversible data hiding method based on pixel prediction
CN115118836A