An Image Steganography Method and Device Based on Adaptive Least Significant Bit
By adopting the adaptive least significant bit technology in image steganography technology and selecting the best embedded subband and the lowest significant bit number, the problems of degraded steganography image quality and difficulty in lossless recovery of secret images in the prior art are solved, and high-quality dense images and lossless recovery of secret images are achieved.
Patent Information
- Application Number
- CN202211353455.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-01
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2042-11-01
AI Technical Summary
When existing image steganography technology improves embedded capacity, it often leads to a decrease in the quality of the steganography image, and it is difficult to adaptively select the best embedded subband and the lowest significant number of bits, affecting the lossless recovery of secret images.
Adaptive least significant bit technology is adopted, among the four subbands of the cover image that have been transformed through integer wavelet, which subband is embedded and several least significant bits are embedded to obtain the optimal dense image quality.
It significantly improves the visual quality of dense images and ensures lossless recovery of secret images.
Smart Images

Figure CN115643347B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of information security, and in particular to an image steganography method and device based on adaptive least significant bit. Background Art
[0002] Image steganography technology refers to embedding a secret image or secret data into a carrier medium in a reversible manner. Reversible means that a secret image or secret data can be reconstructed without any quality loss. This characteristic of image steganography technology is of great significance in many fields such as military, medical, and copyright protection.
[0003] Currently, image steganography technology is mainly divided into two categories: spatial domain steganography and frequency domain steganography. Spatial domain steganography is the earliest steganography, which mainly realizes information embedding by directly modifying the pixel brightness value, color texture, and edge of the cover image. Least significant bit (LSB) replacement, reversible color transformation, pixel value difference (PVD), and interpolation are classic techniques in spatial domain steganography. These schemes are very simple and efficient. However, their embedding capacity is limited. When the number of embedded bits increases, the quality of the stego image will be very poor. This will cause the stego image to be easily noticed and illegally attacked during the channel transmission process. Frequency domain steganography mainly embeds secret information into the frequency domain of the image. Currently, common methods include discrete Fourier transform (DFT), discrete wavelet transform (DWT), discrete cosine transform (DCT), etc. Although these methods can obtain relatively good quality of stego images, on the one hand, they usually cause the secret image to be unable to be losslessly restored, which may misread information due to the quality loss of reconstructing the secret image, and on the other hand, they cannot adaptively select the best embedding subband and the number of least significant bits to be embedded, and the quality of the stego image still needs to be improved. Summary of the Invention
[0004] The purpose of the present invention is to provide an image steganography method and device based on adaptive least significant bit, which can adaptively select which subband to embed and how many least significant bits to embed in the four subbands of the cover image after integer wavelet transform to obtain the optimal quality of the stego image. This method not only improves the visual quality of the stego image, but also ensures that the secret image can be losslessly restored.
[0005] To achieve the above purpose, the technical solution adopted by the present invention is as follows:
[0006] The present invention discloses an image steganography method based on adaptive least significant bit, including:
[0007] Determine the least significant bits to be embedded in the four subbands generated by the cover image, and preprocess the cover image based on the least significant bits;
[0008] Perform integer wavelet transform on the preprocessed cover image to generate four subbands;
[0009] Embed the secret information to be hidden into the four subbands of the cover image based on the least significant bits embedded in each subband to obtain the subbands after embedding the secret information;
[0010] Generate a stego-image based on the subbands after embedding the secret information;
[0011] Restore the stego-image to obtain the original secret image.
[0012] Further, determining the least significant bits to be embedded in the four subbands to be generated by the cover image includes:
[0013] Calculate the sum of the least significant bits to be embedded in the four subbands to be generated by the cover image:
[0014]
[0015] where \(n\) is the sum of the least significant bits to be embedded in the four subbands, \(M\) and \(N\) are the height and width of the cover image respectively, \(Len\) is the length of the secret information, represents rounding up;
[0016] Adaptively select the least significant bits of each subband according to the actual situation.
[0017] Further, the length of the secret information is calculated as follows:
[0018] Convert the decimal pixel values of the secret image to be hidden into binary numbers to obtain the secret information to be hidden represented in binary form;
[0019] Calculate the string length of the secret information to be hidden as the length of the secret information.
[0020] Further, the preprocessing of the cover image based on the least significant bits includes:
[0021] Perform anti-overflow processing on the cover image in the following manner:
[0022] maxC = max(n1, n2, n3, n4);
[0023]
[0024] where \(max()\) is the function to find the maximum value, \(maxC\) is the maximum value, \(n1\), \(n2\), \(n3\), and \(n4\) are the number of least significant bits to be embedded in the A, H, V, and D four subbands to be generated by the cover image respectively, \(T(i, j)\) is the original pixel value at the position \((i, j)\) of the cover image, and \(T'(i, j)\) is the pixel value after anti-overflow processing of the pixel at the position \((i, j)\) of the cover image.
[0025] Further, the least significant bits embedded based on each sub-band are used to embed the secret information to be hidden into the four sub-bands of the cover image to obtain the sub-bands after the secret information is embedded, including:
[0026] Calculate the maximum embeddable information volume of each sub-band:
[0027]
[0028] where C A 、C H 、C V and C D are the maximum embeddable information volumes of the four sub-bands A, H, V, and D respectively;
[0029] Based on the maximum embeddable information volumes of the four sub-bands, the secret information is sequentially embedded into the four sub-bands D, V, H, and A to obtain the sub-bands after the secret information is embedded.
[0030] Further, the step of sequentially embedding the secret information into the four sub-bands D, V, H, and A based on the maximum embeddable information volumes of the four sub-bands to obtain the sub-bands after the secret information is embedded includes:
[0031] If Len is less than C D , then embed the Len-bit secret information into the D sub-band;
[0032] If Len is greater than C D and less than C V + C D , then first embed the first C D -bit secret information into the D sub-band, and then embed the C D + 1-bit to Len information bits into the V sub-band;
[0033] If Len is greater than C V + C D and less than C H + C V + C D , then first embed the first C D -bit secret information into the D sub-band, and then embed the C D + 1-bit to C V + C D information bits into the V sub-band, and then embed the C V + C D + 1 to Len bits into the H sub-band;
[0034] If Len is greater than C H + C V + C D , then first embed the first C D -bit secret information into the D sub-band, and then embed the CD +1 bit to C V +C D The information bits are embedded into the V sub-band, and then C V +C D +1 to C V +C D +C H bits are embedded into the H sub-band, and then the remaining Len - C V +C D +C H bits are embedded into the A sub-band.
[0035] Furthermore, generating a stego-image based on the sub-bands after embedding the secret information includes:
[0036] Performing an inverse integer wavelet transform on the sub-bands after embedding the secret information to obtain a stego-image.
[0037] Furthermore, recovering the original secret image from the stego-image includes:
[0038] Performing an integer wavelet transform on the stego-image to obtain the sub-bands after embedding the secret information;
[0039] Converting the decimal coefficients of the four sub-bands after embedding the secret information into binary coefficients;
[0040] Extracting the corresponding bits of the obtained sub-bands according to the number of least significant bits embedded in each sub-band;
[0041] Converting the extracted binary to decimal to obtain the original secret image.
[0042] On the other hand, the present invention provides an image steganography device based on adaptive least significant bit for implementing the aforementioned image steganography method based on adaptive least significant bit. The device includes:
[0043] A preprocessing module for determining the least significant bits to be embedded in the four sub-bands to be generated from the cover image and preprocessing the cover image based on the least significant bits;
[0044] A first generation module for performing an integer wavelet transform on the preprocessed cover image to generate four sub-bands;
[0045] An embedding module for embedding the secret information to be hidden into the four sub-bands of the cover image based on the least significant bits embedded in each sub-band to obtain the sub-bands after embedding the secret information;
[0046] A second generation module for generating a stego-image based on the sub-bands after embedding the secret information;
[0047] A recovery module for recovering the original secret image from the stego-image.
[0048] The beneficial effects of the present invention are as follows:
[0049] First, the present invention converts the pixel values of the secret image into binary form and performs integer wavelet transform on the cover image to obtain four sub-bands. Then, according to the amount of secret information to be embedded, it adaptively selects which sub-bands to embed and the least significant bits in each sub-band to ensure obtaining the stego-image with the optimal quality. The method of the present invention uses the adaptive least significant bit model to adaptively and flexibly select the sub-bands to be embedded and the number of least significant bits to be embedded, significantly improving the quality of the stego-image on the basis of ensuring the complete reversibility of the secret image. Description of the Drawings
[0050] Figure 1 is the flowchart of the adaptive least significant bit image steganography algorithm in Embodiment 1 of the present invention;
[0051] Figure 2 is the cover image B in Embodiment 3 of the present invention;
[0052] Figure 3 is the secret image T in Embodiment 3 of the present invention;
[0053] Figure 4 is the cover image T after anti-overflow processing in Embodiment 3 of the present invention ′ ;
[0054] Figure 5 is the stego-image W in Embodiment 3 of the present invention;
[0055] Figure 6 is the restored secret image B in Embodiment 3 of the present invention; Detailed Embodiments
[0056] The present invention will be further described below. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention and cannot be used to limit the protection scope of the present invention.
[0057] Embodiment 1
[0058] This embodiment provides an image steganography method based on adaptive least significant bit. The flowchart is as Figure 1 shown, and it includes:
[0059] Determine the least significant bits to be embedded in the four sub-bands to be generated from the cover image, and preprocess the cover image based on the least significant bits;
[0060] Perform integer wavelet transform on the preprocessed cover image to generate four sub-bands;
[0061] Embed the secret information to be hidden into the four sub-bands of the cover image based on the least significant bits embedded in each sub-band, and obtain the sub-bands after embedding the secret information;
[0062] Generate a stego-image based on the sub-bands after embedding the secret information;
[0063] Restore the stego-image to obtain the original secret image.
[0064] In this embodiment, the decimal pixel values of the secret image to be hidden are converted into binary numbers, and their lengths are calculated. Based on the length of the secret information, the sum of the least significant bits to be embedded in the four sub-bands is determined, and then the number of least significant bits to be embedded in each sub-band is adaptively and flexibly selected according to the actual situation.
[0065] In this embodiment, the sum of the least significant bits to be embedded in the four sub-bands is calculated as follows:
[0066]
[0067] Where n is the sum of the least significant bits embedded in the four sub-bands, and M and N are the height and width of the cover image respectively.
[0068] In this embodiment, before formally embedding the secret information, perform anti-overflow preprocessing on the cover image.
[0069] Embodiment 2
[0070] This embodiment provides an image steganography method based on adaptive least significant bits, including:
[0071] S1. Preprocess the secret image to be hidden to obtain the form of the secret image to be hidden represented in binary form, which is called the secret information to be hidden, and calculate the length of the secret information to be hidden;
[0072] In order to determine which sub-bands (A, H, V, D) of the cover image after integer wavelet transform are selected for embedding and the sum of the least significant bits (n=n1 + n2 + n3 + n4) embedded in multiple sub-bands in the subsequent steps,
[0073] In this embodiment, it is necessary to convert the decimal pixel values of the secret image to be hidden into binary numbers and calculate their lengths. The calculation is as follows:
[0074] S = dec2bin(B, 8);
[0075] Len = length(S);
[0076] Among them, B is the secret image to be hidden with pixel values represented in decimal form, S is the secret information to be hidden with pixel values represented in binary form, dec2bin(,) is the decimal-to-binary function, and length is the function to calculate the length of a string. S2. Determine the least significant bit to be embedded in each sub-band according to the length of the secret information to be hidden and the size of the cover image.
[0077] In order to reasonably allocate the number of least significant bits embedded in each sub-band in the subsequent steps.
[0078] In this embodiment, it is necessary to determine the least significant bits to be embedded in the four sub-bands A, H, V, and D according to the length of the information to be hidden and the size of the cover image. The specific process is as follows:
[0079] S21. Before determining the least significant bits to be embedded in the four sub-bands respectively, it is first necessary to determine the total number of least significant bits to be embedded in the four sub-bands. The calculation formula for the sum of the least significant bits embedded in the four sub-bands is:
[0080]
[0081] Among them, n1, n2, n3, and n4 are the number of least significant bits embedded in the four sub-bands A, H, V, and D respectively, n is the sum of the least significant bits embedded in the four sub-bands, represents rounding up, and M and N are the height and width of the cover image respectively.
[0082] S22. Determine the least significant bits to be embedded in each sub-band respectively according to the sum n of the least significant bits embedded in the four sub-bands determined in step S21, that is, the specific values of n1, n2, n3, and n4. The determination of this value needs to be flexibly selected adaptively according to the actual situation to achieve the optimal quality of the stego image.
[0083] S3. Perform anti-overflow processing on the cover image.
[0084] The pixel value range of the image is from 0 to 255. In order to prevent the pixel values of the stego image from overflowing after embedding the secret information, it is necessary to preprocess the cover image before formally embedding the secret information.
[0085] The anti-overflow processing method is:
[0086] maxC = max(n1, n2, n3, n4);
[0087]
[0088] Among them, max() is a function for finding the maximum value, maxC is equal to the maximum value of n1, n2, n3, and n4, T(i, j) is the original pixel value at position (i, j), and T′(i, j) is the pixel value after overflow processing at position (i, j).
[0089] S4. Perform integer wavelet transform on the cover image after anti-overflow processing to generate four subbands:
[0090] Convert the cover image in the spatial domain to the frequency domain to generate four subbands A, H, V, and D, and the coefficients of each subband are integers. The integer wavelet transform formula is:
[0091] (A, H, V, D) = IWT(T′(i, j));
[0092] Among them, IWT is the integer wavelet transform function.
[0093] S5. Embed the secret information into the four subbands of the cover image to obtain the subbands A′, H′, V′, D′ embedded with the secret information
[0094] In this embodiment, according to the least significant bits determined in step S2 for embedding in the four subbands A, H, V, and D, the secret information is embedded into the four subbands of the cover image.
[0095] Since the change of the coefficients in the D subband has the least impact on the quality of the stego-image, and the change of the coefficients in the A subband has the greatest impact on the quality of the stego-image, the secret information is preferentially embedded in the D subband. If the embedding amount in the D subband is not enough, then the H and V subbands are embedded, and finally the A subband is embedded. The specific process is as follows:
[0096] S51. According to the least significant bit positions determined in step S2 for embedding in the four subbands A, H, V, and D respectively, calculate the maximum embeddable information amount of each subband. The calculation is as follows:
[0097]
[0098] Among them, C A 、C H 、C V and C D are the maximum embeddable information amounts of the four subbands A, H, V, and D respectively.
[0099] S52. According to the length Len of the binary secret information S determined in step S1, embed it into the four subbands D, V, H, and A in order using the least significant bit method to obtain the subbands V′, H′, D′, A′ embedded with the secret information. Specifically as follows:
[0100] If Len is less than C D, only the Len-bit secret information needs to be embedded into the D sub-band;
[0101] If Len is greater than C D and less than C V +C D , first embed the first C D bits of secret information into the D sub-band, and then embed the C D + 1 bits to Len information bits into the V sub-band;
[0102] If Len is greater than C v +C D and less than C H +C V +C D , first embed the first C D bits of secret information into the D sub-band, and then embed the C D + 1 bits to C V +C D information bits into the V sub-band, then embed the C V +C D + 1 to Len bits into the H sub-band;
[0103] If Len is greater than C H +C V +C D , first embed the first C D bits of secret information into the D sub-band, and then embed the C D + 1 bits to C V +C D information bits into the V sub-band, then embed the C V +C D + 1 to C V +C D +C H bits into the H sub-band, and finally embed the remaining last Len - C V +C D +C H bits into the A sub-band.
[0104] The algorithm for the specific embedding process is:
[0105]
[0106] Among them, n i - LSB is the least significant bit replacement function, indicating replacing the lowest n i of each coefficient in the sub-band.
[0107] S6. Generate a stego-image based on the sub-bands after embedding the secret information,
[0108] Perform the inverse integer wavelet transform on the sub-bands obtained in step S5 after embedding the secret information to obtain the final stego-image W.
[0109] The formula for the inverse integer wavelet transform is:
[0110] W = RIWT(A′, H′, V′, D′);
[0111] S7. Recover the secret image.
[0112] Perform the inverse process of embedding on the stego-image obtained in step S6 to recover the secret image, specifically as follows:
[0113] S71. Perform the integer wavelet transform on the stego-image obtained in step S6 to obtain four sub-bands A′, H′, V′, and D′. The formula for the integer wavelet transform is:
[0114] (A″, H″, V″, D″) = IWT(W);
[0115] where IWT() is the inverse integer wavelet transform function, and A″, H″, V″, D″ are the four sub-bands obtained by performing the inverse wavelet transform on the stego-image W, respectively.
[0116] S72. Convert the decimal coefficients of the four sub-bands A″, H″, V″, D″ embedded with the secret information obtained in step S71 into binary coefficients. The formula for converting decimal to binary is:
[0117] P′ = dec2bin(P, 8);
[0118] where P is the sub-band with coefficients represented in decimal form, and P′ is the sub-band with coefficients represented in binary form.
[0119] S73. Extract the corresponding n bits of the sub-bands obtained in step S72 according to the number of least significant bits embedded in each sub-band determined in step S2.
[0120] S74. Convert the binary extracted in step S73 into decimal to recover the secret image.
[0121] Embodiment 3
[0122] This embodiment provides an image steganography method based on adaptive least significant bits. The simulation is carried out using MATLAB2017 software. The cover image is selected as the standard test grayscale image Baboon with a size of 512×512, denoted as B, as Figure 2 shown; the secret image is selected as the standard test grayscale image Lena with a size of 256×256, denoted as T, as Figure 3 shown.
[0123] In this embodiment, the Lena image is hidden into the Baboon image by using the image steganography method based on adaptive least significant bit. The specific process is as follows:
[0124] A1. Preprocess the secret image:
[0125] Convert the decimal pixel value of the secret image B to be hidden into a binary number S, and calculate its length Len. The calculation formula is:
[0126] S = dec2bin(B, 8);
[0127] Len = length(S) = 256×256×8 = 524288;
[0128] Where B is the secret image to be hidden with pixel values represented in decimal form, S is the secret information to be hidden with pixel values represented in binary form, dec2bin(,) is the decimal-to-binary function, and length is the function to calculate the length of a string.
[0129] In this example, first convert the pixel values of the 256×256 secret image Lena into binary to obtain the secret information S, and then calculate the length of the secret information to be 524288.
[0130] A2. Determine the least significant bit to be embedded in each subband, specifically:
[0131] A21. Determine the sum of the least significant bits to be embedded in the four subbands, and the calculation is as follows:
[0132]
[0133] Where n1, n2, n3, and n4 are the number of least significant bits to be embedded in the four subbands A, H, V, and D respectively, n is the sum of the least significant bits to be embedded in the four subbands, and M and N are the height and width of the cover image respectively.
[0134] In this example, both M and N are 512. After calculation, n = 8, that is, the sum of the least significant bits to be embedded in the four subbands is 8.
[0135] A22. Determine the least significant bit to be embedded in each subband according to the sum n of the least significant bits to be embedded in the four subbands determined in step A21, that is, determine the specific values of n1, n2, n3, and n4. The determination of this value needs to be flexibly selected adaptively according to the actual situation to achieve the optimal quality of the stego image.
[0136] In this example, through multiple experiments, it is found that when n1 = 4, n2 = 2, n3 = 2, and n4 = 0, the stego image has the optimal quality. In the following steps, the example of n1 = 4, n2 = 2, n3 = 2, and n4 = 0 will also be used for illustration.
[0137] A3. Perform anti-overflow processing on the cover image:
[0138] The anti-overflow processing formula is:
[0139] maxC = max(n1, n2, n3, n4) = max(4, 2, 2, 0) = 4;
[0140]
[0141] where max() is the function to find the maximum value, T(i,j) is the original pixel value at position (i,j), and T ′ (i,j) is the pixel value after overflow processing at position (i,j).
[0142] In this example, the maximum number of bits embedded in the four sub-bands is 4 bits embedded in the D sub-band. For anti-overflow processing, that is, replace the pixel values less than or equal to 16 in the cover image T with 16, and replace the pixel values greater than or equal to 239 with 239. The cover image T' after anti-overflow processing is as Figure 4 shown.
[0143] A4. Perform integer wavelet transform on the cover image T' after anti-overflow processing to generate four sub-bands A, H, V, and D,
[0144] Convert the cover image in the spatial domain to the frequency domain to generate four sub-bands A, H, V, and D, and the coefficients of each sub-band are all integers. The integer wavelet transform formula is:
[0145] (A, H, V, D) = IWT(T');
[0146] where IWT is the integer wavelet transform function.
[0147] In this example, perform integer wavelet transform on the cover image T' to obtain four sub-bands A, H, V, and D with sizes all of 256×256, and the coefficients of each sub-band are all integers.
[0148] A5. Embed the secret information into the four sub-bands of the cover image to obtain the sub-bands A', H', V', D' embedded with the secret information,
[0149] According to the least significant bits n1 = 4, n2 = 2, n3 = 2, n4 = 0 determined in step A2 and embedded into the four sub-bands D, V, H, and A respectively, embed the secret information into the four sub-bands of the cover image.
[0150] Since the change of the coefficients in the D sub-band has the least impact on the quality of the encrypted image, and the change of the coefficients in the A sub-band has the greatest impact on the quality of the encrypted image, the secret information is preferentially embedded in the D sub-band. If the embedding amount in the D sub-band is insufficient, then the H and V sub-bands are embedded, and finally the A sub-band is embedded.
[0151] In this example, 4 significant bits are embedded in each coefficient in D, 2 significant bits are embedded in each coefficient in V, 2 significant bits are embedded in each coefficient in H, and 0 significant bits are embedded in each coefficient in A.
[0152] A51. According to the determined least significant bit numbers respectively embedded in the four sub-bands A, H, V, and D, calculate the maximum embeddable information amount of each sub-band as follows:
[0153]
[0154] Among them, C A , C H , C V and C D are the maximum embeddable information amounts of the four sub-bands A, H, V, and D respectively.
[0155] In this example, the maximum embeddable information amounts of each sub-band are respectively:
[0156]
[0157]
[0158] A52. According to the length of the binary secret information S determined in step A1 being 524288, embed it into the four sub-bands D, V, H, and A in order using the least significant bit method.
[0159] If Len is less than C D , then only the secret information with Len needs to be embedded into the D sub-band;
[0160] If Len is greater than C D and less than C V + C D , then first embed the first C D bits of the secret information into the D sub-band, and then embed the C D + 1 bit to Len information bits into the V sub-band;
[0161] If Len is greater than C D and less than C H + C V + C D , then first embed the first C D bits of the secret information into the D sub-band, and then embed the C D + 1 bit to CV +C D The information bits are embedded into the V sub-band, and then C V +C D bits from +1 to Len are embedded into the H sub-band;
[0162] If Len is greater than C H +C V +C D , then the first C D bits of the secret information are first embedded into the D sub-band, and then C D +1 bits to C V +C D The information bits are embedded into the V sub-band, and then C V +C D +1 to C V +C D +C H bits are embedded into the H sub-band, and finally the remaining last Len - C V +C D +C H bits are embedded into the A sub-band. The algorithm for the specific embedding process is as follows:
[0163]
[0164]
[0165] where n i -LSB is the least significant bit replacement function, indicating replacing the lowest n i for each coefficient in the sub-band.
[0166] In this example, 393216 = C D +C V <Len = 524288 ≤ C D +C V +C H = 524288, which conforms to Case3 in the algorithm, so the following process is executed to complete the embedding of the secret information:
[0167]
[0168]
[0169] A6. Generate the encrypted image:
[0170] Perform the inverse integer wavelet transform on the sub-bands with the embedded secret information obtained in step A5 to obtain the final encrypted image W.
[0171] The inverse integer wavelet transform formula is:
[0172] W = RIWT(A′, H′, V′, D′);
[0173] In this example, perform inverse wavelet transform on the sub-bands D′, V′, H′ after embedding the secret information in step A5 and the A sub-band that does not use the embedded information to obtain the final encrypted image W, as Figure 5 .
[0174] A7. Recover the secret image: Execute the inverse process of the embedding on the encrypted image obtained in step A6 to recover the secret image.
[0175] In this example, execute the inverse process of the embedding on the encrypted image W obtained in step A6 to recover the secret image B. Specifically as follows:
[0176] A71. In this example, perform integer wavelet transform on the encrypted image W obtained in step A6 to obtain four new sub-bands A″, H″, V″, D″, and the coefficients of these four sub-bands are still integers.
[0177] A72. Convert the decimal coefficients of the four sub-bands A″, H″, V″, D″ that have embedded the secret information obtained in step A71 into binary coefficients. The formula for converting decimal to binary is:
[0178] P′ = dec2bin(P, 8);
[0179] where P is the sub-band with coefficients represented in decimal form, and P′ is the sub-band with coefficients represented in binary form.
[0180] In this example, since only the three sub-bands H″, V″, D″ contain the secret information, only the coefficients of the three sub-bands H″, V″, D″ need to be converted from decimal to binary. The formula for converting decimal to binary is:
[0181] D″′ = dec2bin(D″, 8);
[0182] V″′ = dec2bin(V″, 8);
[0183] H″′ = dec2bin(H″, 8);
[0184] A73. Extract the corresponding n bits of the sub-bands obtained in step A72 according to the number of least significant bits embedded in each sub-band determined in step A2.
[0185] In this example, n1 = 4, n2 = 2, n3 = 2, n4 = 0, that is, extract the last four bits of the coefficients in the D″′ sub-band, extract the last two bits of the coefficients in the V″′ sub-band, extract the last two bits of the coefficients in the H″′ sub-band, and no secret information is embedded in A″, so no significant bits need to be extracted. Thus, the secret information S can be obtained.
[0186] In step A74, convert the binary number extracted in step A73 into a decimal number to restore the secret image.
[0187] In this example, convert the binary number extracted in step A73 into a decimal number to restore the secret image B, as Figure 6 .
[0188] Next, perform a performance analysis on the image steganography method based on adaptive least significant bits in this embodiment.
[0189] I. Analysis of the quality of the stego-image
[0190] Currently, the most widely used image quality evaluation metrics are the peak signal-to-noise ratio (PSNR) and the mean structural similarity (MSSIM). The larger the PSNR value and the closer the MSSIM is to 1, the better the visual quality of the image. The calculation formulas are as follows:
[0191]
[0192]
[0193]
[0194]
[0195] When selecting Lena (256×256) as the secret image, Baboon (512×512) as the cover image, and the upsampling rate is 4, the quality of the stego-image is shown in Table 1 below.
[0196] Table 1 Quality of the stego-image
[0197]
[0198] As can be seen from Table 1, in this embodiment, the PSNR of the stego-image is above 50, the MSSIM is close to 1, the PSNR of the restored secret image is close to infinity, and the MSSIM is 1, which proves that the method in this embodiment can not only restore the secret image losslessly but also the stego-image has extremely high quality.
[0199] Example 4
[0200] This embodiment provides an image steganography device based on adaptive least significant bits for implementing the image steganography method based on adaptive least significant bits in Embodiment 1 or Embodiment 2 or Embodiment 3. The device includes:
[0201] A preprocessing module for determining the least significant bits to be embedded in the four subbands generated by the cover image and preprocessing the cover image based on the least significant bits;
[0202] A first generation module for performing integer wavelet transform on the preprocessed cover image to generate four subbands;
[0203] An embedding module for embedding the secret information to be hidden into the four subbands of the cover image based on the least significant bits embedded in each subband to obtain the subbands after embedding the secret information;
[0204] A second generation module for generating a stego-image based on the subbands after embedding the secret information;
[0205] A recovery module for recovering the stego-image to obtain the original secret image.
[0206] Those skilled in the art should understand that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0207] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram can be implemented by computer program instructions, and the combination of the processes and / or blocks in the flowchart and / or block diagram can also be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in one Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0208] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including instruction means, and the instruction means implements the functions specified in one Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0209] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide means for implementing the functions specified in one Figure 1Steps of the functions specified in one process or multiple processes and / or boxes Figure 1 Steps of the functions specified in one box or multiple boxes.
[0210] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that: modifications or equivalent replacements can still be made to the specific implementation manners of the present invention, and any modifications or equivalent replacements that do not depart from the spirit and scope of the present invention should be covered by the protection scope of the claims of the present invention.
Claims
1. An image steganography method based on adaptive least significant bit, characterized in that, Including: Determine the least significant bits to be embedded in the four sub-bands generated from the cover image, including: Calculate the sum of the least significant bits to be embedded in the four sub-bands generated from the cover image: where n is the sum of the least significant bits embedded in the four sub-bands, M and N are the height and width of the cover image respectively, and Len is the length of the secret message, denotes rounding up; Adaptive selection of the least significant bits of each sub-band according to the actual situation; Preprocess the cover image based on the least significant bits; Perform integer wavelet transform on the preprocessed cover image to generate four sub-bands; Embed the secret information to be hidden into the four sub-bands of the cover image based on the least significant bits embedded in each sub-band to obtain the sub-bands after embedding the secret information, including: Calculate the maximum embeddable information volume of each sub-band: Among them, C A , C H , C V and C D are the maximum embeddable information amounts of the four sub-bands A, H, V, and D, respectively; Based on the maximum embeddable information volumes of the four sub-bands, sequentially embed the secret information into the four sub-bands D, V, H, and A to obtain the sub-bands after embedding the secret information, specifically: If Len is less than C D , then embed the Len-bit secret information into the D sub-band; If Len is greater than C D and less than C V + C D , then first embed the first C D bits of the secret information into the D sub-band, and then embed the C D +1 bits to Len bits into the V sub-band; If Len is greater than C V +C D and less than C H +C V +C D , then first embed the first C D bits of the secret information into the D sub-band, then embed C D +1 bits to C V +C D bits into the V sub-band, and then embed C V +C D +1 bits to Len bits into the H sub-band; If Len is greater than C H +C V +C D , then first embed the first C D bits of the secret information into the D sub-band, and then embed C D +1 bits to C V +C d bits into the V sub-band, and then embed C v +C D +1 bits to C V +C D +C H bits into the H sub-band, and then embed the remaining Len - C V +C D +C H bits into the A sub-band; Generate a stego-image based on the sub-bands after embedding the secret information; Restore the stego-image to obtain the original secret image.
2. The image steganography method based on adaptive least significant bit according to claim 1, characterized in that, The length of the secret information is calculated as follows: Convert the decimal pixel values of the secret information to be hidden into binary numbers to obtain the secret information to be hidden represented in binary form; Calculate the string length of the secret information to be hidden as the length of the secret information.
3. An image steganography method based on adaptive least significant bit according to claim 2, characterized in that, The preprocessing of the cover image based on the least significant bits includes: Perform anti-overflow processing on the cover image in the following manner: maxC = max(n1, n2, n3, n4); Where max() is a function to find the maximum value, maxC is the maximum value, n1, n2, n3, and n4 are the number of least significant bits to be embedded in the four sub-bands A, H, V, and D generated from the cover image respectively, T(i, j) is the original pixel value at the position (i, j) of the cover image, and T′(i, j) is the pixel value after anti-overflow processing of the pixel at the position (i, j) of the cover image.
4. An image steganography method based on adaptive least significant bit according to claim 3, characterized in that The generation of the stego-image based on the sub-bands after embedding the secret information includes: Perform inverse integer wavelet transform on the sub-bands after embedding the secret information to obtain the stego-image.
5. A method for image steganography based on adaptive least significant bit according to claim 4, characterized in that, The restoration of the stego-image to obtain the original secret image includes: Perform integer wavelet transform on the stego-image to obtain the sub-bands after embedding the secret information; Convert the decimal coefficients of the four sub-bands after embedding the secret information obtained into binary coefficients; Extract the corresponding number of bits of the obtained sub-bands according to the number of least significant bits embedded in each sub-band; Convert the extracted binary to decimal to obtain the original secret image.
6. An image steganography device based on adaptive least significant bit, characterized in that, A device for implementing the image steganography method based on adaptive least significant bits according to any one of claims 1 to 5, the device includes: A preprocessing module, configured to determine the least significant bits to be embedded in the four sub-bands generated from the cover image, and preprocess the cover image based on the least significant bits; A first generation module, configured to perform integer wavelet transform on the preprocessed cover image to generate four sub-bands; An embedding module, configured to embed the secret information to be hidden into the four sub-bands of the cover image based on the least significant bits embedded in each sub-band to obtain the sub-bands after embedding the secret information; A second generation module, configured to generate a stego-image based on the sub-bands after embedding the secret information; A restoration module, configured to restore the stego-image to obtain the original secret image.
Citation Information
Patent Citations
Methods and apparatus for lossless data hiding
US20060126890A1